/* ── Tokens (mirror of .claude/skills/nook-design/colors_and_type.css) ── */
:root {
  /* Dark theme (provisional — proper design comes with the app/Flutter port).
     Base black, white text, brand point colors: main #FFDC54, sub #00FFF6. */
  --nook-bg:         #000000;
  --nook-surface:    #202026;
  --nook-surface-2:  #2b2b32;
  --nook-divider:    #34343c;
  --nook-overlay:    rgba(0, 0, 0, 0.6);
  --nook-fg:         #ffffff;
  --nook-fg-2:       #e4e4e6;
  --nook-fg-3:       #bcbcc2;
  --nook-mute:       #8b909a;
  --nook-mute-2:     #6a6f79;
  --nook-accent:        #FFDC54;   /* main point */
  --nook-accent-hover:  #e6c43c;
  --nook-accent-2:      #00FFF6;   /* sub point */
  --nook-on-accent:     #000000;   /* text/icon on accent backgrounds */
  --nook-accent-bg:  #2a2614;
  --nook-letterbox:  #2e2e34;   /* page gutter behind the centered app — lighter than #000 app so the edges read */

  --font-sans: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-h1: 24px;
  --fs-h2: 20px;
  --fs-h3: 17px;
  --fs-title: 16px;
  --fs-body: 14px;
  --fs-body-sm: 13px;
  --fs-caption: 12px;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 999px;

  --gnb-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Form controls don't inherit font-family by default — force them to, so every
   control picks up Pretendard (var(--font-sans) on body) without per-rule fonts. */
input, textarea, select, button { font-family: inherit; }

/* Hide scrollbars app-wide — scrolling still works via wheel/touch fling.
   (Visual preference; the bar is never used directly.) */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--nook-letterbox);
  color: var(--nook-fg);
  font: 400 var(--fs-body)/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: var(--nook-bg);
}

/* ── Scene base ── */
.scene { display: none; flex: 1; flex-direction: column; min-height: 0; }
.scene.active { display: flex; }

/* ── Intro ── */
#scene-intro {
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  text-align: center;
  gap: var(--sp-2);
}
#scene-intro h1 {
  font-size: var(--fs-h1);
  font-weight: 900;   /* Nook wordmark — heaviest Pretendard (Black) */
  margin-bottom: var(--sp-1);
}
#scene-intro p {
  color: var(--nook-fg-3);
  margin-bottom: var(--sp-5);
}

/* ── Tab scenes ── */
.tab-header {
  flex-shrink: 0;
  padding: var(--sp-3) var(--sp-6);
}
.tab-header h2 {
  font-size: var(--fs-h2);
  font-weight: 900;   /* Nook wordmark — heaviest Pretendard (Black) */
  cursor: pointer;    /* tap to return Home */
  display: inline-block;   /* keep the hit area to the text, not the full row */
}
.tab-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--sp-6) calc(var(--gnb-h) + var(--sp-6));
}

/* ── Home ── */
.placeholder {
  text-align: center;
  padding: var(--sp-10) var(--sp-4);
  color: var(--nook-mute);
}
.placeholder h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--nook-fg);
  margin-bottom: var(--sp-2);
}
.placeholder p {
  font-size: var(--fs-body-sm);
  line-height: 1.5;
}

/* ── Home feed (vertical shorts pager: one video per screen, snap-scroll) ── */
/* #home-feed is the scroll container (.tab-content). Make it a y-mandatory
   snap pager, full-bleed, with each card filling the area above the bottom nav
   (padding-bottom = gnb height keeps the mute toggle / subtitle clear of it). */
#home-feed {
  padding: 0 0 var(--gnb-h);
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;          /* hide scrollbar (shorts feel) */
}
#home-feed::-webkit-scrollbar { display: none; }
#home-feed .feed-card {
  margin: 0;
  height: 100%;                   /* one page = full content height above gnb */
  scroll-snap-align: start;
  scroll-snap-stop: always;       /* page one video at a time */
}
#home-feed .feed-video-wrap {
  aspect-ratio: auto;             /* override 9/16 — fill the page */
  height: 100%;
  border-radius: 0;               /* edge-to-edge */
}
#home-feed .feed-video { border-radius: 0; }

.feed-card {
  margin-bottom: var(--sp-5);
}
.feed-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
}
.feed-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 24px;
  background: transparent;
  outline: none;
  border: none;
  /* Source mp4s have ~4-14px black bars baked in on both sides.
     Zoom 3% to crop worst case; visual content barely shrinks. */
  transform: scale(1.03);
}
.feed-overlay-top {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  right: var(--sp-3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-2);
  pointer-events: none;
  z-index: 4;
}
.feed-character,
.feed-date {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
/* Info label doubles as a channel-home shortcut. The overlay row is
   pointer-events:none so taps fall through to the video everywhere else;
   re-enable them on this label only. */
.feed-character {
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
}
.feed-character:active { background: rgba(0, 0, 0, 0.7); }
.feed-mute-toggle {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  backdrop-filter: blur(4px);
}
.feed-mute-toggle:hover { background: rgba(0, 0, 0, 0.7); }
.feed-mute-toggle svg { width: 18px; height: 18px; display: block; }

/* English subtitle — full caption burned along the bottom of the card.
   Not synced to audio; whole line shown at once. Left padding keeps it clear
   of the bottom-right mute toggle. Pretendard via var(--font-sans). */
.feed-subtitle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  pointer-events: none;
  padding: 40px var(--sp-4) var(--sp-3);
  /* clear the mute toggle bottom-right */
  padding-right: 56px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0) 100%);
}

/* ── Explore (character cards: 9:16, 2-col grid) ── */
.character-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.character-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(160deg, #2a2a35 0%, #16161e 100%);
  cursor: pointer;
  color: #fff;
}
/* Full-bleed character image behind the card content. */
.character-card .card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.character-card .gender-badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
.character-card .gender-badge svg { width: 14px; height: 14px; }
.character-card .gender-badge.gender-male {
  background: rgba(59, 130, 246, 0.6);
  color: #fff;
}
.character-card .gender-badge.gender-female {
  background: rgba(236, 72, 153, 0.6);
  color: #fff;
}
.character-card .card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-3);
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0) 100%);
  z-index: 1;
}
.character-card .card-name {
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 6px;
}
.character-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.character-card .tag {
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  font-weight: 500;
  white-space: nowrap;
}
.character-card .card-intro {
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.character-card .card-hearts {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  font-size: var(--fs-caption);
  font-weight: 600;
}
.character-card .card-hearts svg {
  width: 14px;
  height: 14px;
  color: #ff6b6b;
}

/* Explore race filter chips */
.explore-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: var(--sp-3);
  scrollbar-width: none;
}
.explore-filters::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-pill);
  background: var(--nook-bg);
  color: var(--nook-fg-3);
  font: 500 var(--fs-body-sm) var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}
.filter-chip.active {
  background: var(--nook-accent);
  border-color: var(--nook-accent);
  color: var(--nook-on-accent);
}

/* Character home page (Instagram-like) */
.char-home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-4) 0 var(--sp-6);
  gap: var(--sp-2);
  text-align: center;
}
.char-home-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--nook-surface-2);
  overflow: hidden;
}
.char-home-avatar img { width: 100%; height: 100%; object-fit: cover; }
.char-home-name {
  font-size: var(--fs-h2);
  font-weight: 700;
  margin-top: var(--sp-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.char-home-gender { display: inline-flex; }
.char-home-gender svg { width: 18px; height: 18px; }
.char-home-gender.gender-male   { color: #3b82f6; }
.char-home-gender.gender-female { color: #ec4899; }
.char-home-intro {
  font-size: var(--fs-body);
  color: var(--nook-fg-3);
  max-width: 88%;
  line-height: 1.5;
}
.char-home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 90%;
}
.char-home-tags .tag {
  font-size: var(--fs-caption);
  padding: 3px 10px;
  background: var(--nook-surface-2);
  color: var(--nook-fg-3);
  border-radius: var(--r-pill);
  font-weight: 500;
}

/* 2-col media grid (character home) */
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}
.media-cell {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--nook-surface);
  border-radius: var(--r-md);
  cursor: pointer;
  overflow: hidden;
}
.media-cell:hover { background: var(--nook-surface-2); }
.media-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Paid (locked) gallery image: server sends an already-blurred preview; we just
   overlay the credit price badge. */
.media-credit-badge {
  position: absolute;
  right: var(--sp-2);
  bottom: var(--sp-2);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--nook-accent);
  font-size: var(--fs-caption);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  pointer-events: none;
}

/* Floating Chat button on character home */
#scene-character-home { position: relative; }
#scene-character-home .page-body { padding-bottom: 84px; }
.fab-chat {
  position: absolute;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: var(--sp-3) var(--sp-6);
  background: var(--nook-accent);
  color: var(--nook-on-accent);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  font: 600 var(--fs-body) var(--font-sans);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}
.fab-chat:hover { background: var(--nook-accent-hover); }

/* ── History cards (placeholder structure) ── */
.history-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
  border: 1px solid var(--nook-divider);
  border-radius: 16px;
  background: var(--nook-surface);
  margin-bottom: var(--sp-2);
  cursor: pointer;
}
.history-card:hover { background: var(--nook-surface-2); }
.history-card .avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--nook-surface-2);
  flex-shrink: 0;
  overflow: hidden;
}
.history-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.history-card .meta { flex: 1; min-width: 0; }
.history-card .meta .title { font-weight: 600; font-size: var(--fs-title); }
.history-card .meta .snippet {
  font-size: var(--fs-body-sm);
  color: var(--nook-fg-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-card .right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.history-card .timestamp {
  font-size: var(--fs-caption);
  color: var(--nook-mute);
  flex-shrink: 0;
}
.history-card .btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--r-sm);
  background: none;
  color: var(--nook-mute);
  cursor: pointer;
}
.history-card .btn-delete:hover { background: #fdecea; color: #c0392b; }
.history-card .btn-delete svg { width: 18px; height: 18px; display: block; }

/* ── Confirmation dialog (modal) ── */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: var(--nook-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  z-index: 200;
}
.dialog-backdrop.visible { display: flex; }
.dialog {
  width: 100%;
  max-width: 320px;
  background: var(--nook-bg);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}
.dialog-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.dialog-message {
  font-size: var(--fs-body-sm);
  color: var(--nook-fg-3);
  line-height: 1.5;
  margin-bottom: var(--sp-5);
}
.dialog-actions {
  display: flex;
  gap: var(--sp-2);
}
.dialog-actions button { flex: 1; }

/* ── First-chat opening picker ── */
.opening-dialog { max-width: 360px; }
.opening-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.opening-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: var(--nook-surface);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
}
.opening-option:hover { background: var(--nook-surface-2); border-color: var(--nook-accent); }
.opening-option-title {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--nook-fg-2);
  margin-bottom: var(--sp-1);
}
.opening-option-preview {
  font-size: var(--fs-body-sm);
  color: var(--nook-fg-3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Bottom sheet (out-of-credits purchase) ── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--nook-overlay);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 250;
}
.sheet-backdrop.visible { display: flex; }
.sheet {
  width: 100%;
  max-width: 480px;
  max-height: 80%;
  overflow-y: auto;
  background: var(--nook-bg);
  border-radius: 20px 20px 0 0;
  padding: var(--sp-3) var(--sp-4) var(--sp-6);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(100%);
  animation: sheetUp 0.26s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes sheetUp { to { transform: translateY(0); } }
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--nook-divider);
  margin: 0 auto var(--sp-3);
}
.sheet-head { margin-bottom: var(--sp-3); }
.sheet-title { font-size: var(--fs-h3); font-weight: 600; }
.sheet-subtitle { font-size: var(--fs-body-sm); color: var(--nook-fg-3); margin-top: 4px; }
.sheet #credit-sheet-close { width: 100%; margin-top: var(--sp-3); }

/* ── My Page ── */
.my-profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--nook-divider);
  margin: 0 0 var(--sp-4);
}
.my-profile .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--nook-surface-2);
  object-fit: cover;
  flex-shrink: 0;
}
.my-profile .profile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.my-profile .nickname {
  font-size: var(--fs-title);
  font-weight: 600;
}
.my-profile .user-id {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--nook-fg-2);
}
.my-profile .user-id .value {
  margin-left: var(--sp-1);
}
.my-section {
  margin-bottom: var(--sp-5);
}
.my-section h3 {
  font-size: var(--fs-caption);
  color: var(--nook-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
  font-weight: 600;
  padding-left: var(--sp-4);
}
/* Card wrapper for Settings groups: gray bg, rounded, holds .my-row stack */
.my-card {
  background: var(--nook-surface);
  border-radius: var(--r-md);
  padding: 0 var(--sp-4);
}

/* Credit balance card on My page */
.credit-card {
  background: var(--nook-surface);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.credit-card .credit-label {
  font-size: var(--fs-body-sm);
  color: var(--nook-mute);
}
.credit-card .credit-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.credit-card .credit-amount {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-h2);
  font-weight: 600;
}
.credit-card .credit-amount svg {
  width: 22px;
  height: 22px;
  color: #e74c3c;
}
.btn-recharge {
  padding: var(--sp-2) var(--sp-4);
  background: var(--nook-accent);
  color: var(--nook-on-accent);
  border: 1px solid var(--nook-accent);
  border-radius: var(--r-pill);
  cursor: pointer;
  font: 500 var(--fs-body-sm) var(--font-sans);
}
.btn-recharge:hover { background: var(--nook-accent-hover); }
/* Refresh button loading state: hide the label, spin a ring in its place */
.btn-recharge.is-loading { color: transparent; pointer-events: none; position: relative; }
.btn-recharge.is-loading::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--nook-bg);
  border-radius: 50%;
  animation: nookSpin 0.6s linear infinite;
}
@keyframes nookSpin { to { transform: rotate(360deg); } }

/* Profile edit page */
.my-profile .avatar { cursor: pointer; }

.profile-avatar-block {
  display: flex;
  justify-content: center;
  padding-top: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--nook-surface-2);
}
.avatar-container .avatar-large {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.edit-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: var(--fs-caption);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--sp-1) 0;
  text-align: center;
}

/* Segmented control (Gender) */
.segment {
  display: flex;
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.segment-btn {
  flex: 1;
  padding: var(--sp-3) var(--sp-2);
  background: var(--nook-bg);
  border: none;
  border-right: 1px solid var(--nook-divider);
  cursor: pointer;
  font: 500 var(--fs-body) var(--font-sans);
  color: var(--nook-fg);
}
.segment-btn:last-child { border-right: none; }
.segment-btn.selected {
  background: var(--nook-fg);
  color: var(--nook-bg);
}

/* Profile input */
.profile-input {
  width: 100%;
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-body);
  background: var(--nook-bg);
  color: var(--nook-fg);
  font-family: var(--font-sans);
}
.profile-input:focus { outline: none; border-color: var(--nook-fg); }

/* User ID display with copy button */
.userid-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--nook-surface);
  border-radius: var(--r-md);
}
.userid-row .userid-value {
  font-size: var(--fs-body);
  color: var(--nook-fg);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-copy {
  padding: var(--sp-1) var(--sp-3);
  background: var(--nook-bg);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  cursor: pointer;
  font: 500 var(--fs-body-sm) var(--font-sans);
  color: var(--nook-fg);
  flex-shrink: 0;
}
.btn-copy:hover { background: var(--nook-surface-2); }
.my-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--nook-divider);
}
/* Only actionable rows get the clickable cursor — navigation rows, purchase
   packs, and sign-out. Display rows (Account info, credit history, App Version,
   toggle rows) stay default. */
.my-row[data-nav],
.my-row[data-credits],
#row-settings-signout { cursor: pointer; }
.my-row:last-child { border-bottom: none; }
.my-row .label { font-size: var(--fs-body); color: var(--nook-fg); }
.my-row .value { font-size: var(--fs-body-sm); color: var(--nook-mute); }
.my-row .chevron { color: var(--nook-mute); font-size: 18px; }
/* Recharge discount: "off" badge in the label, struck original before the price */
.my-row .off-badge {
  margin-left: var(--sp-2);
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--nook-fg);
  color: var(--nook-bg);
  font-size: var(--fs-caption);
  font-weight: 600;
  vertical-align: middle;
}
.my-row .price-original {
  margin-right: var(--sp-2);
  color: var(--nook-mute-2);
  text-decoration: line-through;
}
/* Segmented control (Charges / Usage tabs on Credit History) */
.segmented {
  display: flex;
  gap: var(--sp-1);
  padding: 4px;
  margin-bottom: var(--sp-3);
  background: var(--nook-accent-bg);
  border-radius: var(--r-pill);
}
.segmented .seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--nook-mute);
  font-size: var(--fs-body-sm);
  font-weight: 600;
  padding: 8px 0;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.segmented .seg-btn.active {
  background: var(--nook-bg);
  color: var(--nook-fg);
}
/* Credit pack row mid-purchase: dim + ignore further taps */
.my-row.is-busy { opacity: 0.5; pointer-events: none; }
/* Credit history rows: date under the label, signed delta on the right */
.my-row .credit-history-date {
  margin-left: var(--sp-2);
  color: var(--nook-mute);
  font-size: var(--fs-caption);
}
.my-row .credit-delta { font-variant-numeric: tabular-nums; font-weight: 600; }
.my-row .credit-delta.is-plus  { color: var(--nook-fg); }
.my-row .credit-delta.is-minus { color: var(--nook-mute); }
.my-signin {
  text-align: center;
  padding: var(--sp-10) var(--sp-4);
}
.my-signin p {
  color: var(--nook-mute);
  margin-bottom: var(--sp-4);
}

/* ── GNB (Bottom Nav) ── */
.gnb {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--gnb-h);
  display: none;
  align-items: stretch;
  background: var(--nook-bg);
  border-top: 1px solid var(--nook-divider);
  z-index: 50;
}
.gnb.visible { display: flex; }
.gnb-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--nook-mute);
  font: 500 var(--fs-caption) var(--font-sans);
  padding: var(--sp-1);
}
.gnb-item.active { color: var(--nook-fg); }
.gnb-item svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ── Chat ── */
#scene-chat { background: var(--nook-bg); position: relative; }
/* Representative character image laid behind the chat. The messages area is
   transparent so it shows through there; header/input stay opaque on top. A
   modest scrim keeps bubbles readable. Swapped at runtime by the bg button. */
.chat-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.chat-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 20, 26, 0.32);
}
/* Long-press peek: hold anywhere on the wallpaper (not a bubble or a control)
   and the chat UI + scrim fade out so the image shows clearly; restored on
   release. Transitions live on the base elements so fade-in is smooth too. */
#scene-chat .chat-header,
#scene-chat .messages,
#scene-chat .input-bar,
.chat-bg::after { transition: opacity 0.25s ease; }
#scene-chat.peek-bg .chat-header,
#scene-chat.peek-bg .messages,
#scene-chat.peek-bg .input-bar {
  opacity: 0;
  pointer-events: none;
}
#scene-chat.peek-bg .chat-bg::after { opacity: 0; }
.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nook-divider);
  flex-shrink: 0;
  background: var(--nook-bg);
  position: relative;
  z-index: 1;
}
.chat-header .back {
  font-size: 28px;
  color: var(--nook-fg-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -3px;   /* the ‹ glyph sits low in its box — lift to match the title */
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--nook-surface-2);
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-bg-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nook-fg-2);
  padding: 4px 6px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.chat-bg-btn:hover { color: var(--nook-fg); }
/* GG/OR engine toggle — compact segmented control for dev model testing. */
.model-toggle {
  flex-shrink: 0;
  display: inline-flex;
  border: 1px solid var(--nook-divider);
  border-radius: 6px;
  overflow: hidden;
}
.model-toggle .model-opt {
  background: var(--nook-surface);
  color: var(--nook-fg-3);
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  line-height: 1;
}
.model-toggle .model-opt + .model-opt { border-left: 1px solid var(--nook-divider); }
.model-toggle .model-opt.active {
  background: var(--nook-accent);
  color: var(--nook-on-accent);
}
.chat-header .meta { flex: 1; min-width: 0; }
.chat-header .meta .title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-header .meta .subtitle {
  font-size: var(--fs-caption);
  color: var(--nook-mute);
  margin-top: 2px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  position: relative;
  z-index: 1;
}
.msg-row { display: flex; }
.msg-row.user { justify-content: flex-end; }
.msg-row.assistant { justify-content: flex-start; }
.msg-bubble {
  max-width: 78%;
  padding: 7px 11px;
  border-radius: 6px;
  background: var(--nook-surface);
  border: 1px solid var(--nook-divider);
  color: var(--nook-fg);
  font-size: var(--fs-body);
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.msg-row.user .msg-bubble {
  background: var(--nook-accent);
  color: var(--nook-on-accent);
  border-color: transparent;
}
/* Opening scene = neutral context, belongs to neither character nor user: the
   bubble is centered in the column (not left-aligned like the character) to read
   as stage direction. The text inside is left-aligned, though — the scenario runs
   to several sentences, and centered body copy hurts readability (ragged left edge
   makes the eye hunt for each line's start). Gray bubble + italic already set it
   apart from speaker turns. */
.msg-row.narration { justify-content: center; }
.msg-row.narration .msg-bubble {
  max-width: 90%;
  background: #cccccc;
  border-color: rgba(0, 0, 0, 0.15);
  color: #000000;
  font-style: italic;
  text-align: left;
}
/* Per-message delete X (dev) — sits just right of a character bubble. */
.msg-row.assistant { align-items: center; }
.msg-del {
  flex-shrink: 0;
  margin-left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--nook-surface-2);
  color: var(--nook-fg-3);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.msg-del:hover { opacity: 1; background: #5a2030; color: #ffd9d9; }

/* Concept scene image — lives INSIDE the opening narration bubble, just under
   the scene text. A 765 square thumb (fills the bubble width); tapping opens
   the 1024 original in the viewer. */
.concept-img-thumb {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
}
.concept-img-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
}

/* Fullscreen scene-image viewer (1024 original). */
.viewer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  z-index: 300;
}
.viewer-backdrop.visible { display: flex; }
#image-viewer-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.viewer-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.viewer-close:hover { background: rgba(0, 0, 0, 0.8); }
.typing-bubble {
  padding: 9px 13px;
  border-radius: 6px;
  background: var(--nook-surface);
  border: 1px solid var(--nook-divider);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nook-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  display: inline-block;
  animation: nookDotBounce 1.2s infinite ease-in-out;
}
@keyframes nookDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--nook-divider);
  flex-shrink: 0;
  background: var(--nook-bg);
  position: relative;
  z-index: 1;
}
.input-bar textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--nook-divider);
  border-radius: 6px;
  padding: 8px 12px;
  font: var(--fs-body)/1.4 var(--font-sans);
  color: var(--nook-fg);
  background: var(--nook-bg);
  min-height: 36px;
  max-height: 120px;
  outline: none;
}
.input-bar textarea:focus { border-color: var(--nook-accent-2); }
.input-bar textarea::placeholder { color: var(--nook-mute); }
.input-bar .btn-primary {
  width: 36px;
  height: 36px;
  padding: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.input-bar .btn-primary:disabled {
  background: var(--nook-surface-2);
  color: var(--nook-mute-2);
  border-color: var(--nook-surface-2);
}
/* "Generate & send" — AI writes the user's next line and sends it in one tap.
   Secondary look so Send stays the primary action. */
.input-bar .btn-suggest {
  width: 36px;
  height: 36px;
  padding: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nook-surface-2);
  color: var(--nook-accent-2);
  border: 1px solid var(--nook-divider);
  border-radius: 6px;
  cursor: pointer;
}
.input-bar .btn-suggest:disabled {
  color: var(--nook-mute-2);
  cursor: not-allowed;
}
.input-bar .btn-suggest.loading {
  opacity: 0.55;
}

/* ── Buttons ── */
.btn-primary {
  padding: var(--sp-3) var(--sp-5);
  background: var(--nook-accent);
  color: var(--nook-on-accent);
  border: 1px solid var(--nook-accent);
  border-radius: var(--r-sm);
  cursor: pointer;
  font: 500 var(--fs-body) var(--font-sans);
}
.btn-primary:disabled {
  background: var(--nook-mute-2);
  border-color: var(--nook-mute-2);
  cursor: not-allowed;
}
.btn-ghost {
  padding: var(--sp-2) var(--sp-3);
  background: none;
  color: var(--nook-fg-3);
  border: none;
  cursor: pointer;
  font: 400 var(--fs-body) var(--font-sans);
}
.btn-outline {
  padding: var(--sp-2) var(--sp-4);
  background: none;
  color: var(--nook-fg);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  cursor: pointer;
  font: 500 var(--fs-body-sm) var(--font-sans);
}
.btn-outline:hover { background: var(--nook-surface); }

/* ── Auth gate (overlay) ── */
.auth-gate {
  position: fixed;
  inset: 0;
  background: var(--nook-bg);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-6);
  z-index: 100;
}
.auth-gate.visible { display: flex; }
.auth-gate h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
}
.auth-gate p {
  font-size: var(--fs-body-sm);
  color: var(--nook-mute);
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
  margin: 0;
}
.auth-gate .btn-primary { min-width: 240px; }

/* ── Sub-page header (Settings/Language/Terms/Privacy) ── */
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nook-divider);
  flex-shrink: 0;
  background: var(--nook-bg);
}
.page-header .back {
  font-size: 28px;
  color: var(--nook-fg-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -3px;   /* the ‹ glyph sits low in its box — lift to match the title */
}
.page-header .title {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}
.page-header .header-action {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nook-fg-3);
  font: 500 var(--fs-body-sm) var(--font-sans);
  padding: var(--sp-1) var(--sp-2);
}
.page-header .header-action:hover { color: var(--nook-fg); }

/* ── Inquiry history ── */
.inquiry-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  background: var(--nook-surface);
  margin-bottom: var(--sp-2);
  cursor: pointer;
}
.inquiry-card:hover { background: var(--nook-surface-2); }
.inquiry-card .meta { flex: 1; min-width: 0; }
.inquiry-card .reason { font-weight: 600; font-size: var(--fs-body); }
.inquiry-card .date { font-size: var(--fs-caption); color: var(--nook-mute); margin-top: 2px; }
.inquiry-status {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  background: var(--nook-surface-2);
  color: var(--nook-fg-3);
}
.inquiry-status.reported  { background: #fdeccf; color: #8a5a00; }
.inquiry-status.reviewing { background: #dbe6fb; color: #2456a6; }
.inquiry-status.answered  { background: #d7eede; color: #2e7d52; }

/* Inquiry detail */
.inquiry-detail-meta {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--sp-2) var(--sp-3);
  font-size: var(--fs-body-sm);
  margin-bottom: var(--sp-5);
}
.inquiry-detail-meta .k { color: var(--nook-mute); }
.inquiry-detail-meta .v { color: var(--nook-fg); }
.inquiry-block-label {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--nook-fg-2);
  margin-bottom: var(--sp-2);
}
.inquiry-text {
  background: var(--nook-surface);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  font-size: var(--fs-body);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: var(--sp-5);
}
.inquiry-text.pending { color: var(--nook-mute); font-style: italic; }

/* ── Notices ── */
.notice-card {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  background: var(--nook-surface);
  margin-bottom: var(--sp-2);
  cursor: pointer;
}
.notice-card:hover { background: var(--nook-surface-2); }
.notice-card .notice-date { font-size: var(--fs-caption); color: var(--nook-mute); margin-bottom: 2px; }
.notice-card .notice-title { font-weight: 600; font-size: var(--fs-body); }

.notice-detail-date { font-size: var(--fs-caption); color: var(--nook-mute); margin-bottom: var(--sp-2); }
.notice-detail-title { font-size: var(--fs-h3); font-weight: 700; margin-bottom: var(--sp-4); line-height: 1.35; }
.notice-detail-body {
  font-size: var(--fs-body);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--nook-fg-2);
}

/* ── Media detail (single image) ── */
/* Media detail viewer — no fixed aspect / no black background, so the image
   shows at its natural ratio with no letterbox. */
.media-detail-viewer {
  width: 100%;
  background: transparent;
  border-radius: var(--r-md);
  overflow: hidden;
}
/* Room for the floating Chat button so it doesn't cover the image bottom. */
#scene-media-detail .page-body { padding-bottom: 84px; }
.media-detail-viewer img,
.media-detail-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--r-md);
}
.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sp-6);
}

/* ── Legal / long-form documents (Terms, Privacy) ── */
.legal {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--nook-fg-2);
}
.legal .legal-meta {
  font-size: var(--fs-caption);
  color: var(--nook-fg-3);
  margin-bottom: var(--sp-5);
}
.legal h2 {
  font-size: var(--fs-title);
  color: var(--nook-fg);
  margin: var(--sp-6) 0 var(--sp-2);
}
.legal h2:first-of-type { margin-top: 0; }
.legal p { margin: 0 0 var(--sp-3); }
.legal ul { margin: 0 0 var(--sp-3); padding-left: 1.25em; }
.legal li { margin: 0 0 var(--sp-1); }
.legal .legal-note {
  background: var(--nook-accent-bg);
  border-radius: 12px;
  padding: var(--sp-4);
  margin: var(--sp-4) 0;
  font-size: var(--fs-body-sm);
  color: var(--nook-fg-2);
}
.legal .legal-note strong { color: var(--nook-fg); }

/* ── Icon button (gear in My header, etc.) ── */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-1);
  color: var(--nook-fg-2);
  line-height: 0;
}
.icon-btn:hover { color: var(--nook-fg); }
.icon-btn svg { width: 22px; height: 22px; display: block; }
/* Credit heart (Home/Explore/History headers) — red to match the My-page credit balance heart (#e74c3c). */
.icon-btn[data-recharge] { color: #e74c3c; }
.icon-btn[data-recharge]:hover { color: #d64636; }

/* My tab header: title left + gear right */
.tab-header.with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* Danger variant for Delete Account */
.btn-outline.danger {
  color: #c0392b;
  border-color: #e6b8b3;
}
.btn-outline.danger:hover { background: #fdecea; }

/* Sub-page sticky footer (Delete Account confirmation, etc.) */
.page-footer {
  flex-shrink: 0;
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
  border-top: 1px solid var(--nook-divider);
  background: var(--nook-bg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.agree-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-body-sm);
  color: var(--nook-fg);
  cursor: pointer;
}
.agree-row input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--nook-fg);
}

/* Solid danger button (Delete Account confirm) */
.btn-danger {
  padding: var(--sp-3) var(--sp-5);
  background: #c0392b;
  color: #fff;
  border: 1px solid #c0392b;
  border-radius: var(--r-sm);
  cursor: pointer;
  font: 500 var(--fs-body) var(--font-sans);
}
.btn-danger:disabled {
  background: var(--nook-surface-2);
  border-color: var(--nook-surface-2);
  color: var(--nook-mute-2);
  cursor: not-allowed;
}

/* Language list rows */
.language-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--nook-divider);
  cursor: pointer;
  font-size: var(--fs-body);
  color: var(--nook-fg);
}
.language-row:last-child { border-bottom: none; }
.language-row .check { color: var(--nook-fg); display: none; }
.language-row.selected .check { display: block; }

/* iOS-style toggle switch (Settings/Preferences) */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--nook-surface-2);
  transition: background 0.2s;
  border-radius: var(--r-pill);
}
.slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.switch input:checked + .slider { background: var(--nook-accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Contact us radio rows */
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--nook-divider);
  cursor: pointer;
  font-size: var(--fs-body);
  color: var(--nook-fg);
}
.contact-row:last-child { border-bottom: none; }
.contact-row input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--nook-fg);
}

/* Contact us — message field + counter */
.contact-message { margin-top: var(--sp-5); }
.contact-message-label {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--nook-fg-2);
  margin-bottom: var(--sp-2);
}
.contact-textarea {
  width: 100%;
  padding: var(--sp-3);
  background: var(--nook-bg);
  border: 1px solid var(--nook-divider);
  border-radius: var(--r-sm);
  color: var(--nook-fg);
  font: 400 var(--fs-body)/1.5 var(--font-sans);
  resize: vertical;
  min-height: 120px;
  outline: none;
}
.contact-textarea:focus { border-color: var(--nook-fg); }
.contact-textarea::placeholder { color: var(--nook-mute); }
.contact-counter {
  text-align: right;
  font-size: var(--fs-caption);
  color: var(--nook-mute);
  margin-top: var(--sp-1);
}

/* Toast (global) */
.toast {
  position: fixed;
  bottom: calc(var(--gnb-h) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--nook-fg);
  color: var(--nook-bg);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-body-sm);
  border-radius: var(--r-sm);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  z-index: 300;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
