/* ==========================================================
   hatsu.dev — Content-first Stylesheet
   Inspired by: Sora + JetBrains Mono, single-column, quiet
   ========================================================== */

/* --- Variables -------------------------------------------- */
:root {
  --white: #ffffff;
  --ink: #000000;
  --dawn: #FF6B35;
  --mist: #888888;
  --border: #EAEAEA;
  --faint: #FAFAFA;
  --glow: #F59E0B;
  --green: #1a7f37;
  --red: #cf222e;
}

/* --- Reset & Base ----------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Header ----------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* プロダクト詳細ページではヘッダーのstickyを無効化 */
body:has(.detail) .header {
  position: relative;
}

/* --- Detail Sticky Bar ----------------------------------- */
.detail-sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 0.25s ease;
  pointer-events: none;
}

.detail-sticky-bar.visible {
  transform: translateY(0);
  pointer-events: auto;
}

.detail-sticky-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-sticky-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.detail-sticky-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
}

.detail-sticky-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-sticky-sep {
  color: var(--mist);
  font-size: 12px;
  flex-shrink: 0;
}

.detail-sticky-user {
  font-size: 12px;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
}

.detail-sticky-user:hover {
  color: var(--dawn);
}

.detail-sticky-upvote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.detail-sticky-upvote:hover {
  border-color: var(--dawn);
  color: var(--dawn);
}

.detail-sticky-upvote.upvoted {
  background: var(--dawn);
  border-color: var(--dawn);
  color: var(--white);
}

.detail-sticky-upvote .upvote-icon {
  width: 14px;
  height: 14px;
}

.header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.06em;
  user-select: none;
}

.logo-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.logo-dot {
  color: var(--dawn);
}

.nav-spacer {
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.header-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

/* --- Notification Bell ------------------------------------ */
.notif-wrap {
  position: relative;
}

.notif-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  border-radius: 8px;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.notif-bell:hover {
  color: var(--ink);
  background: var(--faint);
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  background: var(--dawn);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  line-height: 15px;
  text-align: center;
  border-radius: 8px;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  overflow: hidden;
}

.notif-dropdown.active {
  display: block;
}

.notif-dropdown-header {
  padding: 12px 16px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.notif-list {
  max-height: 360px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--faint);
  transition: background 0.15s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--faint);
}

.notif-item-unread {
  background: rgba(255, 107, 53, 0.06);
}

.notif-item-unread:hover {
  background: rgba(255, 107, 53, 0.1);
}

.notif-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
}

.notif-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--mist);
  margin-top: 3px;
  display: block;
}

.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--mist);
  font-size: 12.5px;
}

/* --- Header Close (minimal layout) ------------------------ */
.header-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--mist);
  transition: color 0.15s, background 0.15s;
}

.header-close:hover {
  color: var(--ink);
  background: var(--faint);
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--dawn);
  color: var(--white);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--faint);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* --- Footer ----------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-footer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.04em;
  opacity: 0.3;
}

.footer-copy {
  font-size: 12px;
  color: var(--mist);
  opacity: 0.4;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  color: var(--mist);
  opacity: 0.4;
  transition: opacity 0.15s;
}

.footer-social-link:hover {
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 12px;
  color: var(--mist);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.footer-link:hover {
  opacity: 1;
}

.footer-bottom {
  margin-top: 20px;
}

.footer-copyright {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
  opacity: 0.3;
}

/* ==========================================================
   Detail Page
   ========================================================== */

/* --- Detail Nav ------------------------------------------ */
.detail-nav {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--ink);
}

/* --- Rank Badge (Hero) ----------------------------------- */
.rank-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--glow);
  color: var(--ink);
}

.rank-badge-1 {
  background: var(--glow);
  color: var(--ink);
}

.rank-badge-2 {
  background: #C0C0C0;
  color: var(--white);
}

.rank-badge-3 {
  background: #CD7F32;
  color: var(--white);
}

/* --- Hero ------------------------------------------------- */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hero-left {
  flex: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.hero-cat {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 3px 10px;
  border-radius: 8px;
}

.hero-time {
  font-size: 12px;
  color: var(--mist);
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
}

.hero-name {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-tagline {
  margin: 8px 0 0;
  font-size: 15px;
  color: #555;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
}

.hero-rating-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-left: 4px;
}

.hero-rating-count {
  font-size: 12px;
  color: var(--mist);
  line-height: 1.6;
}

.hero-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--mist);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.hero-link-icon:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* --- Upvote ---------------------------------------------- */
.detail-upvote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}

.detail-upvote:hover {
  border-color: var(--dawn);
  color: var(--dawn);
}

.detail-upvote.active {
  border-color: var(--dawn);
  background: var(--dawn);
  color: #fff;
}

.detail-upvote .upvote-icon {
  font-size: 20px;
}

.detail-upvote #upvoteCount {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Content --------------------------------------------- */
.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* --- Section --------------------------------------------- */
.section {
  margin-top: 48px;
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* --- Screenshots ----------------------------------------- */
.screenshots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.screenshots-main {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--faint);
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshots-thumbs {
  display: flex;
  gap: 8px;
}

.screenshot-thumb {
  width: 80px;
  height: 50px;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--faint);
  transition: border-color 0.15s;
}

.screenshot-thumb.active {
  border-color: var(--dawn);
}

.screenshot-thumb:hover {
  border-color: var(--mist);
}

.screenshot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Description ----------------------------------------- */
.desc-text {
  font-size: 14px;
  line-height: 1.85;
  color: #333;
  overflow-wrap: break-word;
  word-break: break-word;
}

.desc-text p {
  margin-bottom: 1.4em;
}

.desc-text p:last-child {
  margin-bottom: 0;
}

.desc-text h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--ink);
}

/* --- Revenue --------------------------------------------- */
.rev-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.rev-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.rev-cell {
  padding: 16px;
  background: var(--faint);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rev-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rev-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.rev-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
}

.rev-sub.up,
.rev-value.up {
  color: var(--green);
}

.rev-sub.down,
.rev-value.down {
  color: var(--red);
}

.rev-chart-wrap {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rev-chart-label {
  font-size: 12px;
  color: var(--mist);
}

.rev-chart-months {
  display: flex;
  gap: 0;
}

.rev-chart-m {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
  opacity: 0.5;
  width: 40px;
  text-align: center;
}

/* --- Press Release --------------------------------------- */
.impact-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.impact-header {
  padding: 16px 24px;
  background: var(--faint);
  border-bottom: 1px solid var(--border);
}

.impact-title-1 {
  font-size: 14px;
  font-weight: 600;
  color: var(--mist);
  margin: 0;
  letter-spacing: -0.01em;
}

.impact-title-2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 0;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.impact-body {
  padding: 24px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #444;
}

.impact-body p {
  margin-bottom: 1.2em;
}

.impact-body p:last-child {
  margin-bottom: 0;
}

.impact-body h3 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--ink);
}
.impact-body h3:first-child {
  margin-top: 0;
}

.impact-contact {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--faint);
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.impact-contact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mist);
  flex-shrink: 0;
}

.impact-contact-items {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.impact-contact-item {
  font-size: 13px;
  color: var(--ink);
}

.impact-contact-link {
  color: var(--dawn);
  text-decoration: none;
}

.impact-contact-link:hover {
  opacity: 0.7;
}

.impact-contact-note {
  font-size: 12px;
  color: var(--mist);
  margin: 0;
}

/* --- Tech Stack ------------------------------------------ */
.stack-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stack-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* --- Developer ------------------------------------------- */
.dev-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dev-card-main {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.dev-card-main:hover .dev-card-name {
  color: var(--dawn);
}

.dev-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}

.dev-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--mist);
}

.dev-card-info {
  flex: 1;
  min-width: 0;
}

.dev-card-name {
  font-size: 16px;
  font-weight: 650;
  margin: 0;
  letter-spacing: -0.02em;
}

.dev-card-hatsu-count {
  display: inline-block;
  font-size: 12px;
  color: var(--dawn);
  font-weight: 600;
  margin-top: 4px;
}

.dev-card-title {
  font-size: 13px;
  color: var(--mist);
  margin-top: 4px;
}

.dev-card-bio {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  margin-top: 10px;
}

.dev-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.dev-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--mist);
  transition: color 0.15s;
}

.dev-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dev-link:hover {
  color: var(--ink);
}

/* --- Ships (Other Products) ------------------------------ */
.dev-ships {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.dev-ships-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.dev-ship-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}

.dev-ship-item:hover {
  opacity: 0.7;
}

.dev-ship-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.dev-ship-tag {
  font-size: 12px;
  color: var(--mist);
}

/* --- Comments -------------------------------------------- */
.comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--faint);
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
}

.comment-avatar-placeholder {
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.comment-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.comment-name-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.comment-name-link:hover {
  text-decoration: underline;
}

.comment-avatar-link {
  flex-shrink: 0;
  line-height: 0;
}

.comment-userid {
  font-size: 11px;
  color: var(--mist);
}

.comment-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid;
}

.comment-badge-dev {
  color: var(--dawn);
  background: #fff8f5;
  border-color: #ffd5c2;
}

.comment-badge-media {
  color: #0969da;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.comment-badge-vc {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.comment-time {
  font-size: 11px;
  color: var(--mist);
  opacity: 0.5;
}

.comment-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #333;
  margin: 6px 0 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.comment-reply {
  padding-left: 42px;
}

/* Thread toggle (Slack-style) */
.comment-thread {
  padding-left: 42px;
}
.comment-thread-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 4px 0;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--dawn);
  font-weight: 500;
  transition: background 0.15s;
}
.comment-thread-toggle:hover {
  background: rgba(255, 107, 53, 0.06);
}
.thread-avatars {
  display: flex;
  align-items: center;
}
.thread-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-right: -6px;
}
.thread-avatar:last-child {
  margin-right: 0;
}
.thread-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--mist);
  font-size: 9px;
  font-weight: 600;
}
.thread-count {
  margin-left: 2px;
}
.thread-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.comment-thread.open .thread-chevron {
  transform: rotate(180deg);
}
.comment-thread .comment-replies-wrap {
  display: none;
}
.comment-thread.open .comment-replies-wrap {
  display: block;
}
.comment-thread .comment-reply {
  padding-left: 0;
}

.comment-avatar-sm {
  width: 26px;
  height: 26px;
}

.comment-like-count {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--mist);
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.comment-like-btn,
.comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
  cursor: pointer;
}

.comment-like-btn:hover { color: #e74c6f; }
.comment-like-btn.liked { color: #e74c6f; }
.comment-reply-btn:hover { color: var(--ink); }

.comment-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.comment-reply-form .comment-input {
  flex: 1;
  font-size: 13px;
  padding: 10px 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.comment-reply-form .comment-submit {
}

.comment-input-wrap {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.comment-input {
  flex: 1;
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  resize: none;
  min-height: 42px;
  color: var(--ink);
  line-height: 1.5;
}

.comment-input:focus {
  border-color: #bbb;
}

.comment-input::placeholder {
  color: #ccc;
}

.comment-submit {
  font-family: 'Sora', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.comment-submit:hover {
  opacity: 0.8;
}

.empty-state {
  font-size: 13px;
  color: var(--mist);
  padding: 16px 0;
}

/* --- Stars ----------------------------------------------- */
.star-icon {
  flex-shrink: 0;
}

.star-filled {
  color: #f59e0b;
}

.star-empty {
  color: #d1d5db;
}

/* --- Section Tabs ---------------------------------------- */
.section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.section-tab {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mist);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'JetBrains Mono', monospace;
}

.section-tab:hover {
  color: var(--ink);
}

.section-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* --- Reviews --------------------------------------------- */
.review {
  padding: 18px 0;
  border-bottom: 1px solid var(--faint);
}

.review:last-of-type {
  border-bottom: none;
}

.review-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.review-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-stars {
  display: flex;
  gap: 1px;
}

.review-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: #333;
  margin: 10px 0 0 42px;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- Review Form ----------------------------------------- */
.review-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-form-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.review-star-select {
  display: flex;
  gap: 4px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: #d1d5db;
  transition: color 0.15s, transform 0.1s;
  display: flex;
}

.star-btn:hover,
.star-btn.active,
.star-btn.selected {
  color: #f59e0b;
  transform: scale(1.1);
}

/* --- Upvote Gate Overlay --------------------------------- */
body.no-scroll {
  overflow: hidden;
}

.upvote-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upvote-gate-icon {
  font-size: 44px;
  color: var(--mist);
  margin: 0 auto 16px;
  display: block;
}

.upvote-gate-modal {
  position: relative;
  background: var(--white);
  border-radius: 8px;
  padding: 40px 36px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.upvote-gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--mist);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.upvote-gate-close:hover {
  color: var(--ink);
  background: var(--faint);
}

.upvote-gate-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.upvote-gate-desc {
  font-size: 13px;
  color: var(--mist);
  line-height: 1.7;
  margin-bottom: 24px;
}

.upvote-gate-progress {
  margin-bottom: 28px;
}

.upvote-gate-btn {
  width: 100%;
  padding: 10px 16px;
}

/* --- Locked Page (legacy) -------------------------------- */
.locked-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  justify-content: center;
}

.locked-card {
  text-align: center;
  max-width: 400px;
}

.locked-icon {
  font-size: 40px;
  color: var(--mist);
  margin-bottom: 16px;
}

.locked-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.locked-desc {
  font-size: 14px;
  color: var(--mist);
  line-height: 1.7;
  margin-bottom: 24px;
}

.locked-progress {
  margin-bottom: 28px;
}

.locked-progress-bar {
  height: 6px;
  background: var(--faint);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.locked-progress-fill {
  height: 100%;
  background: var(--dawn);
  border-radius: 8px;
  transition: width 0.3s;
}

.locked-progress-text {
  font-size: 12px;
  color: var(--mist);
  font-weight: 600;
}

/* --- Login Prompt ---------------------------------------- */
.login-prompt {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--mist);
}

.login-prompt a {
  color: var(--dawn);
  font-weight: 600;
}

.login-prompt a:hover {
  text-decoration: underline;
}

/* --- Auth Modal ------------------------------------------ */
.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal {
  background: var(--white);
  border-radius: 8px;
  padding: 36px 32px;
  max-width: 380px;
  width: 90%;
  position: relative;
  text-align: center;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--mist);
  cursor: pointer;
  line-height: 1;
}

.auth-modal-close:hover {
  color: var(--ink);
}

.auth-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-modal-desc {
  font-size: 13px;
  color: var(--mist);
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-modal-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
}

/* --- Upvote Active State --------------------------------- */
.detail-upvote.upvoted {
  background: var(--dawn);
  color: var(--white);
  border-color: var(--dawn);
}

/* ==========================================================
   Auth Pages
   ========================================================== */

.auth-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--mist);
  margin-bottom: 32px;
}

/* --- Role Selector --------------------------------------- */
.role-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.role-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.role-option:hover {
  background: var(--faint);
}

.role-option.active {
  border-color: var(--dawn);
  background: #fff8f5;
}

.role-icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--mist);
}

.role-option.active .role-icon {
  color: var(--dawn);
}

.role-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-right: 8px;
}

.role-desc {
  font-size: 11px;
  color: var(--mist);
  line-height: 1.4;
}

/* --- Form ------------------------------------------------ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-error-box {
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #DC2626;
  font-size: 13px;
  margin-bottom: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.form-optional {
  font-weight: 400;
  color: var(--mist);
  font-size: 11px;
}

.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--mist);
}

.form-input {
  width: 100%;
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s;
  line-height: 1.5;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #bbb;
}

.form-input::placeholder {
  color: #ccc;
}

.form-textarea {
  resize: vertical;
  min-height: 72px;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  transition: border-color 0.15s;
}

.input-with-prefix:focus-within {
  border-color: #bbb;
}

.input-prefix {
  padding: 10px 0 10px 14px;
  font-size: 14px;
  color: var(--mist);
  user-select: none;
  flex-shrink: 0;
}

.input-has-prefix {
  border: none;
  border-radius: 0 8px 8px 0;
  padding-left: 4px;
}

.input-has-prefix:focus {
  outline: none;
  border-color: transparent;
}

.btn-full {
  width: 100%;
  padding: 11px 24px;
  font-size: 14px;
  margin-top: 4px;
}

/* --- Role Fields Toggle ---------------------------------- */
.role-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hidden {
  display: none;
}

/* --- Social Auth ----------------------------------------- */
.social-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
  border: 1px solid var(--border);
}

.btn-social:hover {
  opacity: 0.85;
}

.btn-google {
  background: var(--white);
  color: var(--ink);
}

.btn-twitter {
  background: var(--ink);
  color: #fff;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  margin-bottom: 24px;
  color: var(--mist);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Auth Footer ----------------------------------------- */
.auth-footer-text {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--mist);
  text-align: center;
}

.auth-link {
  color: var(--dawn);
  font-weight: 500;
}

.auth-link:hover {
  opacity: 0.7;
}

/* --- Check Email ----------------------------------------- */
.check-email-icon {
  margin-bottom: 16px;
}

.check-email-notes {
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--mist);
  line-height: 1.8;
}

.check-email-notes p {
  margin: 0;
}

.check-email-demo {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.check-email-demo-label {
  font-size: 11px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ==========================================================
   Settings Page
   ========================================================== */

.settings-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  justify-content: center;
}

.settings-card {
  width: 100%;
  max-width: 520px;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.settings-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--white);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
}

.settings-avatar-form {
  flex-shrink: 0;
}

.settings-avatar-area {
  position: relative;
  cursor: pointer;
  display: block;
}

.settings-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.settings-avatar-area:hover .settings-avatar-overlay {
  opacity: 1;
}

.settings-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.settings-userid {
  font-size: 13px;
  color: var(--mist);
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.settings-role-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 2px 8px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-block;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.settings-section {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mist);
  padding: 0;
  margin-bottom: 4px;
}

.settings-danger {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn-logout-full {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.btn-logout-full:hover {
  border-color: var(--red);
  background: #fef2f2;
}

.header-avatar-link {
  display: flex;
  align-items: center;
}

.avatar-menu-wrap {
  position: relative;
}

.header-avatar-btn {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.avatar-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  overflow: hidden;
  padding: 4px 0;
}

.avatar-menu.active {
  display: block;
}

.avatar-menu-item {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s;
}

.avatar-menu-item:hover {
  background: var(--faint);
}

/* ==========================================================
   Submit Page
   ========================================================== */

.submit-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.submit-header {
  text-align: center;
  margin-bottom: 28px;
}

.submit-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.submit-sub {
  font-size: 13.5px;
  color: var(--mist);
  margin: 8px 0 0;
  line-height: 1.7;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.step-dot-wrap {
  display: flex;
  align-items: center;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--mist);
  background: var(--white);
  transition: all 0.2s;
}

.step-dot.active {
  border-color: var(--dawn);
  color: var(--dawn);
}

.step-dot.done {
  border-color: var(--dawn);
  background: var(--dawn);
  color: var(--white);
}

.step-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  transition: background 0.2s;
}

.step-line.done {
  background: var(--dawn);
}

/* Step Content */
.step-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}

.step-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mist);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Fields */
.field {
  margin-bottom: 24px;
  position: relative;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.field-optional {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 2px 7px;
  border-radius: 8px;
}
.field-required {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--dawn);
  background: rgba(255, 107, 53, 0.08);
  padding: 2px 7px;
  border-radius: 8px;
}

.field-sub {
  font-size: 12px;
  color: var(--mist);
  margin: 0 0 8px;
  line-height: 1.6;
}

.input {
  width: 100%;
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.15s;
  line-height: 1.5;
  box-sizing: border-box;
}

.input:focus {
  outline: none;
  border-color: #bbb;
}

.input::placeholder {
  color: #ccc;
}

.input-counter {
  position: absolute;
  right: 12px;
  bottom: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--mist);
  opacity: 0.5;
  pointer-events: none;
}

.input-counter.over-limit {
  color: var(--ember);
  opacity: 1;
}

.impact-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.impact-requirement {
  color: var(--mist);
  font-size: 12px;
  margin-top: 4px;
}

.input-prefix-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.input-prefix-wrap:focus-within {
  border-color: #bbb;
}

.input-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--mist);
  padding: 10px 10px 10px 14px;
  background: var(--faint);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

.input-prefix-wrap .input-with-prefix {
  border: none;
  border-radius: 0;
}

.input-prefix-wrap .input-with-prefix:focus {
  border: none;
}

.textarea {
  width: 100%;
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
  box-sizing: border-box;
}

.textarea:focus {
  border-color: #bbb;
}

.textarea::placeholder {
  color: #ccc;
}

.textarea-sm {
  min-height: 80px;
}

/* Category Chips */
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-chip {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.15s;
}

.cat-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cat-chip.selected {
  border-color: var(--dawn);
  background: #fff8f5;
  color: var(--dawn);
  font-weight: 600;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  font-family: inherit;
}

.pricing-card:hover {
  border-color: var(--ink);
}

.pricing-card.selected {
  border-color: var(--dawn);
  background: #fff8f5;
}

.pricing-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.pricing-card.selected .pricing-label {
  color: var(--dawn);
}

.pricing-desc {
  font-size: 11px;
  color: var(--mist);
  line-height: 1.4;
}

/* First Comment */
.first-comment-section {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--faint);
}

.first-comment-section .field {
  margin-bottom: 12px;
}

.first-comment-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--mist);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.first-comment-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Social Impact / Media section */
.media-section {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.media-check-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.media-check-row:hover {
  background: var(--faint);
}

.checkbox {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
  background: var(--white);
}

.checkbox.checked {
  background: #0969DA;
  border-color: #0969DA;
}

.media-check-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-check-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.media-check-sub {
  font-size: 12.5px;
  color: var(--mist);
  line-height: 1.6;
}

.media-fields {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border);
}

.media-fields-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0969DA;
  margin-top: 20px;
  margin-bottom: 4px;
}

.media-fields-sub {
  font-size: 12px;
  color: var(--mist);
  line-height: 1.6;
  margin: 4px 0 16px;
}

.media-fields .field {
  margin-bottom: 16px;
}

.media-fields .field:last-child {
  margin-bottom: 0;
}

/* Confirm card */
.confirm-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}

.confirm-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mist);
  padding: 12px 24px;
  background: var(--faint);
  border-bottom: 1px solid var(--border);
}

.confirm-edit-btn {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--dawn);
  background: none;
  border: none;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.confirm-edit-btn:hover {
  text-decoration: underline;
}

.confirm-grid {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.confirm-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.confirm-item.full {
  grid-column: 1 / -1;
}

.confirm-key {
  font-size: 11px;
  color: var(--mist);
  font-weight: 500;
}

.confirm-val {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.confirm-val.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}

.confirm-edit {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 11.5px;
  color: var(--mist);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
}

.confirm-edit:hover {
  color: var(--ink);
  background: var(--white);
}

/* Step Actions */
.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-next {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
}

.btn-next:hover {
  opacity: 0.8;
}

.btn-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-ghost {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  background: none;
  color: var(--mist);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--faint);
}

.btn-ai-gen {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 8px;
  background: var(--faint);
  color: var(--dawn);
  border: 1px solid var(--dawn);
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}
.btn-ai-gen svg {
  flex-shrink: 0;
}
.field-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.field-label-row .field-label {
  margin-bottom: 0;
}
.btn-ai-gen:hover {
  background: var(--dawn);
  color: #fff;
}
.btn-ai-gen:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-locked {
  background: var(--faint);
  color: var(--mist);
  cursor: not-allowed;
}

.impact-preview {
  margin-top: 12px;
  padding: 20px;
  background: var(--faint);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #444;
}
.impact-preview-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--mist);
  letter-spacing: -0.01em;
}
.impact-preview-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.5;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.impact-preview-body {
  font-size: 13px;
  line-height: 1.8;
  color: #555;
  overflow-wrap: break-word;
  word-break: break-word;
}
.impact-preview-body p {
  margin-bottom: 1.2em;
}
.impact-preview-body p:last-child {
  margin-bottom: 0;
}
.impact-preview-body h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  color: var(--ink);
}

#editForm .step-content {
  margin-bottom: 20px;
}
#editForm .step-content:last-of-type {
  margin-bottom: 0;
}

.btn-submit {
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  background: var(--dawn);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s;
}

.btn-submit:hover {
  opacity: 0.88;
}

/* --- User Profile ---------------------------------------- */
.user-profile {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.user-header {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--faint);
  flex-shrink: 0;
  object-fit: cover;
}

.user-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--mist);
}

.user-header-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-copy-url {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  color: var(--border);
  background: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s;
}
.btn-copy-url .btn-copy-url-label {
  display: none;
}
.btn-copy-url:hover {
  color: var(--mist);
}
.btn-copy-url.copied {
  color: var(--dawn);
}

.user-userid {
  font-size: 14px;
  color: var(--mist);
}

.user-title {
  font-size: 13px;
  color: var(--mist);
  margin-top: 8px;
}

.user-bio {
  font-size: 14px;
  color: var(--ink);
  margin-top: 8px;
  line-height: 1.6;
}

.user-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.user-joined {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--mist);
  margin-bottom: 6px;
}

.user-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.user-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.user-tab:hover {
  color: var(--ink);
}

.user-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.user-tab-panel {
  display: none;
}

.user-tab-panel.active {
  display: block;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--mist);
  margin-left: 4px;
}

.user-tab.active .tab-badge {
  background: var(--ink);
  color: var(--white);
}

.user-product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-product-list .pickup-card {
  border-radius: 8px;
}

.user-product-list .pickup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.user-activity-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.user-activity-item:last-child {
  border-bottom: none;
}

.user-activity-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-activity-product {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.user-activity-product:hover {
  color: var(--dawn);
}

.user-activity-body {
  font-size: 14px;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.5;
}

.user-activity-time {
  font-size: 12px;
  color: var(--mist);
  margin-top: 6px;
  display: block;
}

@media (max-width: 640px) {
  .user-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .user-name-row {
    justify-content: center;
  }

  .user-links {
    justify-content: center;
  }

  .user-tabs {
    overflow-x: auto;
  }

  .user-tab {
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .step-content {
    padding: 24px 18px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .confirm-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Index / Top Page
   ========================================================== */

/* --- Welcome Banner -------------------------------------- */
.welcome-banner {
  position: relative;
  max-width: 780px;
  margin: 24px auto 0;
  padding: 20px 24px 18px;
  background: var(--faint);
  border-radius: 8px;
}
.welcome-close {
  position: absolute;
  top: 28px;
  right: 20px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--mist);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}
.welcome-close:hover {
  color: var(--ink);
}
.welcome-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  line-height: 1.4;
}
.welcome-desc {
  font-size: 13px;
  color: var(--mist);
  line-height: 1.6;
  margin: 0;
}
.welcome-signup {
  font-size: 13px;
  color: var(--mist);
  margin: 6px 0 0;
}
.welcome-signup a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Page Head ------------------------------------------- */
.page-head {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 24px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.page-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  margin: 4px 0 0;
}

/* ── Pickup ── */
.pickup-section {
  max-width: 780px;
  margin: 40px auto 44px;
  padding: 0 24px;
}
.pickup-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pickup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pickup-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--dawn);
  color: #fff;
}
.pickup-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.pickup-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}
.pickup-card:hover {
  box-shadow: none;
}
.pickup-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pickup-top-left {
  flex: 1;
  min-width: 0;
}
.pickup-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pickup-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}
.pickup-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pickup-cat {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 3px 10px;
  border-radius: 8px;
}
.pickup-pricing {
  font-size: 11px;
  font-weight: 500;
  color: var(--dawn);
  background: rgba(255, 107, 53, 0.08);
  padding: 3px 10px;
  border-radius: 8px;
}
.pickup-time {
  font-size: 12px;
  color: var(--mist);
  opacity: 0.6;
}
.pickup-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.pickup-tagline {
  font-size: 15px;
  color: #444;
  margin: 0 0 10px;
  line-height: 1.5;
}
.pickup-desc {
  font-size: 13.5px;
  color: var(--mist);
  line-height: 1.8;
  margin: 0;
}
.pickup-review {
  margin-top: 12px;
}
.pickup-review-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pickup-review-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-left: 6px;
}
.pickup-review-count {
  font-size: 12px;
  color: var(--mist);
  margin-left: 2px;
}
.pickup-impact {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 8px;
  background: #fffbeb;
}
.pickup-impact-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #b45309;
  margin-bottom: 6px;
}
.pickup-impact-icon {
  font-size: 16px;
  color: #d97706;
}
.pickup-impact-text {
  font-size: 13.5px;
  color: #333;
  line-height: 1.6;
  margin: 0;
}
.pickup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.pickup-dev {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-md {
  width: 32px;
  height: 32px;
}
.pickup-dev-text {
  display: flex;
  flex-direction: column;
}
.pickup-dev-name {
  font-size: 13px;
  font-weight: 600;
}
.pickup-dev-title {
  font-size: 12px;
  color: var(--mist);
}
.pickup-dev-bio {
  font-size: 12px;
  color: var(--mist);
  line-height: 1.5;
}
.pickup-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.page-head-sub {
  margin-top: 48px;
}

.page-title-sub {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.page-live {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--mist);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.page-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Card List ------------------------------------------- */
.card-list {
  max-width: 780px;
  margin: 20px auto 0;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.card {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.card:first-child {
  border-top: 1px solid var(--border);
}

.card:hover {
  background: var(--faint);
  margin: 0 -12px;
  padding: 20px 12px;
  border-radius: 8px;
  border-color: transparent;
}

.card:hover + .card {
  border-top-color: transparent;
}

/* --- Card Left (Upvote) ---------------------------------- */
.card-left {
  flex-shrink: 0;
  padding-top: 2px;
}

.upvote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 44px;
  height: 44px;
  padding-top: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.upvote-btn:hover {
  border-color: var(--dawn);
  color: var(--dawn);
}

.upvote-btn.active {
  border-color: var(--dawn);
  background: var(--dawn);
  color: var(--white);
}

.upvote-icon {
  font-size: 16px;
}

.card:hover .upvote-btn {
  border-color: #ccc;
}

.upvote-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* --- Card Body ------------------------------------------- */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Rank Badge ------------------------------------------ */
.rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.rank-1 {
  background: var(--glow);
  color: var(--ink);
}

.rank-2 {
  background: #C0C0C0;
  color: var(--white);
}

.rank-3 {
  background: #CD7F32;
  color: var(--white);
}

.card-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.card-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
  opacity: 0.6;
}

.card-cat {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 2px 8px;
  border-radius: 8px;
}
.card-pricing {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--dawn);
  background: rgba(255, 107, 53, 0.08);
  padding: 2px 8px;
  border-radius: 8px;
}

.card-time {
  font-size: 11px;
  color: var(--mist);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-tagline {
  font-size: 13.5px;
  color: #555;
  line-height: 1.6;
  margin: 6px 0 0;
}

/* --- Metrics --------------------------------------------- */
.metrics {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.metric-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}

.metric-delta.up {
  color: var(--green);
}

.metric-delta.down {
  color: var(--red);
}

/* --- Card Footer ----------------------------------------- */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.dev-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar-placeholder {
  background: var(--faint);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--mist);
}

.dev-text {
  min-width: 0;
}

.dev-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dev-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.dev-userid {
  font-size: 11px;
  color: var(--mist);
}

.dev-meta {
  font-size: 11px;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Tags ------------------------------------------------ */
.card-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: var(--mist);
  background: var(--faint);
  padding: 3px 8px;
  border-radius: 8px;
}

.tag-impact {
  color: #16a34a;
  background: #f0fdf4;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .detail-nav {
    padding: 12px 16px 0;
  }

  .hero {
    padding: 16px 16px 0;
  }

  .hero-top {
    flex-direction: column;
  }

  .detail-upvote {
    width: 56px;
    height: 56px;
  }

  .hero-name {
    font-size: 22px;
  }

  .content {
    padding: 0 16px 40px;
  }

  .rev-grid,
  .rev-grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .rev-mini-chart {
    width: 100%;
    max-width: 240px;
  }

  .screenshots-thumbs {
    overflow-x: auto;
  }

  .comment-reply {
    padding-left: 20px;
  }

  .impact-contact {
    flex-direction: column;
    gap: 8px;
  }

  .pickup-section {
    padding: 0 16px;
  }
  .pickup-card {
    padding: 16px;
  }
  .pickup-name {
    font-size: 16px;
  }
  .pickup-top {
    flex-direction: column;
    gap: 4px;
  }

  .rev-chart-wrap {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .dev-card {
    flex-direction: column;
  }

  .impact-body {
    padding: 16px;
  }

  .nav-tabs {
    display: none;
  }

  .footer-inner {
    padding: 32px 16px;
  }

  .auth-page {
    padding: 32px 16px;
  }

  .page-head {
    padding: 24px 16px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card-list {
    padding: 0 16px 40px;
  }

  .card:hover {
    margin: 0 -8px;
    padding: 20px 8px;
  }

  .card-identity {
    gap: 6px;
  }

  .card-url {
    display: none;
  }

  .metrics {
    gap: 14px;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .role-option {
    padding: 12px 14px;
  }
}

/* --- Verified Badge -------------------------------------- */
.verified-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

/* ==========================================================
   Admin
   ========================================================== */
.admin-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.admin-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.admin-tab:hover {
  color: var(--ink);
}

.admin-tab.active {
  color: var(--ink);
  border-bottom-color: var(--dawn);
}

.admin-filter {
  margin-bottom: 16px;
}
.admin-filter-input {
  width: 100%;
  max-width: 320px;
  padding: 7px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  outline: none;
  transition: border-color .15s;
}
.admin-filter-input::placeholder {
  color: var(--mist);
}
.admin-filter-input:focus {
  border-bottom-color: var(--ink);
}
.admin-filter-input.has-value:focus {
  border-bottom-color: var(--dawn);
}

.admin-empty {
  text-align: center;
  color: var(--mist);
  font-size: 14px;
  padding: 40px 0;
}

.admin-user-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
}

.admin-user-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--mist);
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--mist);
}

.admin-user-email {
  font-size: 12px;
  color: var(--mist);
}

.admin-role-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--faint);
  color: var(--ink);
}

.admin-role-media { background: #f0f4ff; color: #3b5998; }
.admin-role-vc { background: #fef9ee; color: #b45309; }

.admin-status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
}

.admin-status-pending { background: #fef3c7; color: #92400e; }
.admin-status-active { background: #dcfce7; color: var(--green); }
.admin-status-rejected { background: #fef2f2; color: var(--red); }

.admin-user-extra {
  font-size: 12px;
  color: var(--mist);
  margin-top: 2px;
}

.admin-user-date {
  font-size: 11px;
  color: var(--mist);
  margin-top: 4px;
}

.admin-user-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* Admin back link */
.admin-back {
  margin-bottom: 12px;
}
.admin-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--mist);
  text-decoration: none;
  transition: color .15s;
}
.admin-back-link:hover {
  color: var(--ink);
}

/* Admin user detail */
.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.admin-user-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
}
.admin-user-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-user-avatar-lg span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--faint);
  font-size: 24px;
  font-weight: 600;
  color: var(--mist);
}
.admin-detail-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--mist);
  margin-top: 6px;
}
.admin-detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.admin-detail-form {
  max-width: 640px;
}
.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.admin-form-group-full {
  grid-column: 1 / -1;
}
.admin-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mist);
  margin-bottom: 4px;
}
.admin-form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.admin-form-input:focus {
  border-color: var(--dawn);
}
.admin-form-textarea {
  resize: vertical;
}
.admin-form-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}
.admin-form-check input {
  margin: 0;
}
.admin-status-archived {
  background: #6b7280;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* Archived user content */
.comment-archived {
  opacity: 0.5;
}
.comment-name-archived {
  color: var(--mist);
  font-style: italic;
}
.comment-text-archived {
  color: var(--mist);
  font-style: italic;
}
.comment-delete-btn {
  background: none;
  border: none;
  color: var(--mist);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.comment-delete-btn:hover {
  color: #e74c3c;
}
.review-archived {
  opacity: 0.5;
}
.user-activity-archived {
  color: var(--mist);
  font-style: italic;
  text-decoration: none;
  cursor: default;
}

/* Archived user page */
.archived-page {
  text-align: center;
  padding: 80px 20px;
}
.archived-icon {
  margin-bottom: 16px;
}
.archived-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.archived-desc {
  color: var(--mist);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Admin invite code management */
.admin-detail-invites {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.admin-invite-summary {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--mist);
  margin-bottom: 16px;
}
.admin-invite-issue {
  margin-bottom: 20px;
}
.admin-invite-issue-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.admin-invite-select {
  width: auto;
  max-width: 100px;
}
.admin-invite-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--mist);
  margin-bottom: 8px;
}
.admin-invite-section {
  margin-bottom: 16px;
}
.admin-invite-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-invite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--faint);
  border-radius: 6px;
  font-size: 13px;
}
.admin-invite-item-used {
  opacity: 0.6;
}
.admin-invite-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.admin-invite-source {
  font-size: 11px;
  color: var(--mist);
  background: var(--white);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.admin-invite-used-by {
  font-size: 13px;
}
.admin-invite-used-by a {
  color: var(--dawn);
  text-decoration: none;
}
.admin-invite-used-by a:hover {
  text-decoration: underline;
}
.admin-invite-date {
  font-size: 11px;
  color: var(--mist);
  margin-left: auto;
}
.admin-invite-delete {
  background: none;
  border: none;
  color: var(--mist);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.admin-invite-delete:hover {
  color: var(--red);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-danger {
  background: var(--white);
  color: var(--red);
  border: 1px solid var(--red);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-danger:hover {
  background: #fef2f2;
}

/* --- Admin: Header Row ----------------------------------- */
.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Admin: Top-level navigation */
.admin-nav {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.admin-nav-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.admin-nav-tab:hover {
  color: var(--ink);
}
.admin-nav-tab.active {
  color: var(--ink);
  border-bottom-color: var(--dawn);
}

.admin-featured-count {
  font-size: 13px;
  color: var(--mist);
  margin-bottom: 12px;
}

/* --- Admin: Product Management --------------------------- */
.admin-product-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.admin-product-card:last-child {
  border-bottom: none;
}

.admin-product-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.admin-product-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  color: var(--mist);
}

.admin-product-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-product-details {
  flex: 1;
  min-width: 0;
}

.admin-product-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-product-link {
  color: inherit;
  text-decoration: none;
}
.admin-product-link:hover {
  text-decoration: underline;
  color: var(--color-primary, #2563eb);
}

.admin-featured-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--glow);
  color: var(--ink);
}

.admin-product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.admin-product-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.admin-product-status-published { background: #dcfce7; color: var(--green); }
.admin-product-status-rejected { background: #fef2f2; color: var(--red); }
.admin-product-status-draft { background: var(--faint); color: var(--mist); }

.admin-product-cat {
  font-size: 11px;
  color: var(--mist);
}

.admin-product-pricing {
  font-size: 11px;
  color: var(--mist);
}

.admin-product-upvotes {
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
}

.admin-product-tagline {
  font-size: 12px;
  color: var(--mist);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-product-maker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--mist);
}

.admin-maker-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-maker-name {
  font-weight: 500;
  color: var(--ink);
}

.admin-product-date {
  color: var(--mist);
}

.admin-reorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.admin-reorder-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--mist);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.admin-reorder-btn:hover:not(:disabled) {
  border-color: var(--dawn);
  color: var(--dawn);
}

.admin-reorder-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.admin-reorder-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--mist);
  line-height: 1;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* --- Static Pages ---------------------------------------- */
.static-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.static-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.static-date {
  font-size: 12px;
  color: var(--mist);
  margin: 0 0 32px;
}

.static-body {
  margin-top: 32px;
}

.static-body h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
}

.static-body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 12px;
}

.static-body ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.static-body li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 4px;
}

.static-body a {
  color: var(--dawn);
  text-decoration: none;
}

.static-body a:hover {
  opacity: 0.7;
}

/* Contributors */
.contributors-desc {
  font-size: 14px;
  color: var(--mist);
  margin-top: 8px;
}

.contributors-section {
  margin-bottom: 48px;
}

.contributors-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--dawn);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.contributors-label-note {
  font-size: 13px;
  color: var(--mist);
  margin-bottom: 20px;
}

.contributors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}

.contributor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 12px 4px;
  border-radius: 8px;
  transition: background 0.15s;
}

.contributor-card:hover {
  background: var(--cloud);
}

.contributor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.contributor-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cloud);
  color: var(--mist);
  font-size: 18px;
  font-weight: 600;
}

.contributor-id {
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contributors-empty {
  font-size: 13px;
  color: var(--mist);
  text-align: center;
  padding: 40px 0;
}

.about-hatsu-list {
  list-style: none;
  padding-left: 0;
}

.about-hatsu-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-hatsu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.faq-item p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
  margin: 0;
}

/* --- Screenshot Upload ----------------------------------- */
.screenshot-upload {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.screenshot-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.screenshot-preview {
  position: relative;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.screenshot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

.screenshot-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 120px;
  height: 80px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--faint);
  color: var(--mist);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.screenshot-add-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* --- Rich Text Editor ------------------------------------ */
.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--faint);
}

.editor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
}

.editor-btn:hover {
  background: var(--border);
}
.editor-btn.active {
  background: var(--ink);
  color: #fff;
}

.editor-area-tall {
  min-height: 280px;
}

.editor-area {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  font-family: 'Sora', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.editor-area p {
  margin: 0 0 1.4em;
}
.editor-area p:last-child {
  margin-bottom: 0;
}
.editor-area:focus {
  border-color: var(--ink);
}

.editor-area:empty::before {
  content: attr(data-placeholder);
  color: var(--mist);
  pointer-events: none;
}

.editor-area h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.editor-area b,
.editor-area strong {
  font-weight: 600;
}

/* Loading overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.loading-overlay.active {
  display: flex;
}
.loading-modal {
  background: #fff;
  border-radius: 10px;
  padding: 40px 48px;
  text-align: center;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--ink);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  font-size: 14px;
  color: var(--ink);
  margin: 0;
}
.loading-error {
  color: var(--red);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.loading-error-item {
  display: block;
}
.loading-close-btn {
  margin-top: 20px;
  padding: 8px 32px;
  font-size: 13px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.loading-close-btn:hover {
  opacity: 0.85;
}
body.no-scroll {
  overflow: hidden;
}

/* --- Upvoted by ------------------------------------------ */
.section-label-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.upvoted-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--mist);
}
.upvoted-grid {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.upvoted-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  width: 50%;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}
.upvoted-slot:nth-last-child(-n+2) {
  border-bottom: none;
}
.upvoted-filled:hover {
  background: var(--faint);
}
.upvoted-empty {
}
.upvoted-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--mist);
  min-width: 24px;
}
.upvoted-filled:nth-child(-n+3) .upvoted-rank {
  color: var(--dawn);
  font-weight: 600;
}
.upvoted-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.upvoted-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--mist);
  font-size: 10px;
  font-weight: 600;
}
.upvoted-avatar-empty {
  border: 1.5px dashed var(--border);
  background: none;
}
.upvoted-name {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  min-width: 0;
}
.upvoted-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upvoted-id-empty {
  color: var(--mist);
}
@media (max-width: 640px) {
  .upvoted-slot {
    width: 100%;
    border-right: none;
  }
  .upvoted-slot:last-child {
    border-bottom: none;
  }
  .upvoted-slot:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }
}

/* --- Icon upload ----------------------------------------- */
.icon-upload {
  display: flex;
  align-items: center;
  gap: 16px;
}
.icon-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--faint);
  color: var(--mist);
}
.icon-upload-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Related Links */
.related-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.related-link-url {
  flex: 1;
  min-width: 0;
}
.related-link-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--sub);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}
.related-link-remove:hover {
  color: var(--red);
  background: rgba(239,68,68,0.08);
}
.related-link-add {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* Related Links on show page */
.related-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.related-link-simple {
  color: var(--mist);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.related-link-simple:hover {
  color: var(--ink);
  text-decoration: underline;
}
.related-link-simple svg {
  flex-shrink: 0;
}

.icon-upload-btn {
  cursor: pointer;
}
.icon-remove-btn {
  color: var(--mist);
  font-size: 12px;
}

/* --- Icon placeholders (card, hero, sticky) -------------- */
.card-icon-placeholder,
.pickup-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--faint);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--mist);
  font-weight: 600;
  font-size: 14px;
}
.hero-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--faint);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--mist);
  font-weight: 600;
  font-size: 20px;
}
.detail-sticky-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--mist);
  font-weight: 600;
  font-size: 12px;
}

