@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');
:root {
  --ink: #17151a;
  --muted: #756f78;
  --line: #e8e1dd;
  --paper: #fffaf3;
  --rose: #d44d66;
  --wine: #8f2948;
  --gold: #c9a15a;
  --shadow: 0 32px 90px rgba(23, 21, 26, 0.16);
  --soft-shadow: 0 12px 32px rgba(23, 21, 26, 0.08);
  --card-radius: 18px;
  --font-serif: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-display: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --page-gutter: 20px;
  --page-top-gap: 22px;
  --page-bottom-gap: 110px;
  --section-gap: 16px;
  --card-padding: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(201, 161, 90, 0.12), transparent 32%),
    radial-gradient(ellipse at 92% 4%, rgba(212, 77, 102, 0.09), transparent 30%),
    linear-gradient(160deg, #f6f0e8 0%, #eee7df 100%);
}

/* ── Typography ── */
h1, h2, h3, h4, p { margin-top: 0; }

h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--fw-bold);
  line-height: 1.08;
  letter-spacing: -0.02em;
  word-break: keep-all;
  margin-bottom: 18px;
}

h2 {
  font-size: var(--text-display);
  line-height: 1.12;
  margin-bottom: 14px;
}

h3 {
  font-size: var(--text-lg);
  line-height: 1.25;
  margin-bottom: 10px;
}

h4 {
  font-size: var(--text-md);
  line-height: 1.3;
  margin-bottom: 6px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
}

.count {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Shell ── */
.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 16px;
  height: 100vh;
  padding: 20px;
  align-items: start;
  overflow: hidden;
}

.quiz-panel,
.insight-panel {
  border: 1px solid rgba(83, 35, 55, 0.11);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.93);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.quiz-panel {
  height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 32px 36px;
}

.insight-panel {
  padding: 24px;
  position: sticky;
  top: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* ── Top bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  position: sticky;
  top: 0;
  z-index: 24;
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 180ms ease, border-color 180ms ease;
  will-change: transform;
}

.topbar.gnb-hidden {
  transform: translateY(-110%);
}

.topbar.gnb-elevated {
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-height: 36px;
}

.topbar-brand:active {
  opacity: 0.72;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--wine);
  letter-spacing: -0.01em;
}

.brand-sep { color: var(--line); }

.brand-sub {
  color: var(--muted);
  font-size: var(--text-sm);
}

.wallet {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(83, 35, 55, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 12px;
  text-align: right;
}

.wallet span {
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.wallet strong {
  color: var(--wine);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.auth-entry {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  min-width: 74px;
  padding: 7px 10px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.auth-entry span {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  line-height: 1.1;
}

.auth-entry strong {
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  line-height: 1.1;
}

.auth-entry.verified strong {
  color: var(--accent);
}

/* ── Progress ── */
.progress {
  height: 3px;
  margin: 18px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede0e5;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  transition: width 280ms ease;
}

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; }

/* ════════════════ INTRO ════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 32px;
  align-items: center;
  margin-bottom: 44px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(185, 133, 69, 0.3));
  margin-bottom: 14px;
}

.hero-desc {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.72;
  max-width: 400px;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-stats {
  display: flex;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.earn-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(83, 35, 55, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  margin-top: 18px;
  padding: 10px;
}

.earn-strip button {
  min-height: 36px;
  border-radius: 999px;
  background: #fff;
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 0 12px;
  box-shadow: 0 6px 14px rgba(83, 35, 55, 0.08);
}

.earn-strip span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 20px;
}

.stat:first-child { padding-left: 0; }

.stat strong {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--ink);
}

.stat span {
  font-size: var(--text-2xs);
  color: var(--muted);
}

.stat-sep {
  width: 1px;
  height: 30px;
  background: var(--line);
  flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 12px;
  align-items: start;
}

.hero-main-cover {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 28px 64px rgba(45, 30, 40, 0.26);
  aspect-ratio: 3/4;
}

.hero-main-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: coverBreath 7s ease-in-out infinite;
}

.hero-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(15, 8, 18, 0.76) 0%,
    rgba(15, 8, 18, 0.08) 52%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  gap: 14px;
}

.hero-cover-info .eyebrow {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.hero-cover-info strong {
  display: block;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 4px 8px;
}

.hero-peek-btn {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 10px;
  color: var(--wine);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  padding: 9px 14px;
  min-height: 0;
  cursor: pointer;
  transition: background 160ms, transform 160ms;
}

.hero-peek-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.hero-side-covers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}

.side-cover {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: 0 8px 22px rgba(45, 30, 40, 0.2);
  cursor: pointer;
  transition: transform 300ms ease;
}

.side-cover:hover { transform: scale(1.04); }

.side-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.side-cover span {
  position: absolute;
  top: 6px;
  right: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 3px 6px;
}

/* Genre Strip */
.genre-strip {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.genre-strip-label {
  margin-bottom: 12px;
}

.genre-scroll {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.genre-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(45, 30, 40, 0.14);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.genre-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(45, 30, 40, 0.22);
}

.genre-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.genre-card span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(0deg, rgba(15, 8, 18, 0.68), transparent);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  text-align: center;
}

/* ── Buttons ── */
button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: var(--fw-bold);
  padding: 0 20px;
  min-height: 46px;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button:hover { transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: 0.6; transform: none; }

.primary {
  background: linear-gradient(135deg, var(--wine) 0%, #7a3347 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(83, 35, 55, 0.24);
}

.primary.large {
  min-height: 52px;
  font-size: var(--text-md);
  padding: 0 28px;
}

.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

/* ════════════════ QUIZ ════════════════ */
.answers {
  display: grid;
  gap: 10px;
  max-width: 820px;
}

.answer {
  position: relative;
  width: 100%;
  min-height: 70px;
  border: 1px solid rgba(83, 35, 55, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.4;
  padding: 0 20px 0 24px;
  text-align: left;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: border-color 200ms, background 200ms, transform 200ms ease, box-shadow 200ms;
}

.answer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--wine), var(--gold));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 220ms ease;
  border-radius: 0 2px 2px 0;
}

.answer:hover {
  border-color: rgba(83, 35, 55, 0.28);
  background: rgba(255, 255, 255, 0.97);
  transform: translateX(6px);
  box-shadow: 0 16px 40px rgba(45, 30, 40, 0.12);
}

.answer:hover::before {
  transform: scaleY(1);
}

/* ════════════════ RESULT ════════════════ */
.result-hero {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.result-hero h2 {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  color: var(--wine);
  margin-bottom: 12px;
  word-break: keep-all;
}

.result-summary {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.72;
  max-width: 700px;
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags span {
  border-radius: 999px;
  background: rgba(83, 35, 55, 0.05);
  border: 1px solid rgba(83, 35, 55, 0.14);
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 5px 10px;
}

/* Preview Split */
.preview-split {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 32px;
}

.preview-img-col {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(45, 30, 40, 0.2);
  aspect-ratio: 3/4;
  flex-shrink: 0;
}

.preview-img-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-text-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-meta-row .eyebrow { margin-bottom: 0; }

.meta-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(83, 35, 55, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 4px 10px;
}

.scene-block {
  border-left: 2px solid var(--gold);
  padding-left: 14px;
}

.scene-label {
  display: block;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.scene {
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.68;
  margin: 0;
}

.reader {
  position: relative;
  border: 1px solid rgba(83, 35, 55, 0.08);
  border-radius: 14px;
  background: linear-gradient(160deg, #fffaf4, #fff8f0);
  padding: 28px 24px 24px;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 2;
  color: var(--ink);
  max-height: 340px;
  overflow: auto;
}

.reader::before {
  content: "\201C";
  position: absolute;
  top: -4px;
  left: 14px;
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 1;
  color: rgba(185, 133, 69, 0.18);
  font-style: italic;
  pointer-events: none;
}

.reader p { margin: 0 0 12px; }
.reader p:last-child { margin-bottom: 0; }

/* Recommendations */
.recommendations {
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

/* ── Book Cards ── */
.book-card {
  border: 1px solid rgba(83, 35, 55, 0.09);
  border-radius: var(--card-radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 300ms ease, box-shadow 300ms ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.book-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 80%
  );
  background-size: 300% 300%;
  background-position: 0% 0%;
  opacity: 0;
  transition: opacity 300ms, background-position 600ms ease;
  pointer-events: none;
  border-radius: var(--card-radius);
  z-index: 5;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(45, 30, 40, 0.2);
}

.book-card:hover::after {
  opacity: 1;
  background-position: 100% 100%;
}

.book-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #1c1320;
}

.book-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
  transition: transform 500ms ease;
}

.book-card:hover .book-cover img { transform: scale(1.055); }

.book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(12, 7, 15, 0.7) 0%, rgba(12, 7, 15, 0.04) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 22%);
  pointer-events: none;
}

.cover-spine {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.04));
  pointer-events: none;
  z-index: 2;
}

.cover-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 4px 8px;
}

.cover-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 14px 16px 14px;
  display: grid;
  gap: 4px;
}

.cover-copy span {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cover-copy strong {
  color: #fff;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  line-height: 1.12;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.cover-copy small {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.book-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.book-topline span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.book-topline strong {
  color: var(--wine);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.book-body h4 { margin: 0; }

.book-body p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.62;
  margin: 0;
  flex: 1;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.book-tags span {
  border-radius: 999px;
  background: rgba(83, 35, 55, 0.05);
  border: 1px solid rgba(83, 35, 55, 0.1);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 4px 8px;
}

.book-body button {
  width: 100%;
  min-height: 38px;
  font-size: var(--text-sm);
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: var(--fw-bold);
  margin-top: 2px;
}

.book-body button:hover { background: #2d2330; transform: none; }

.book-body button.episode-lock-btn {
  background: linear-gradient(100deg, var(--wine), #9d4158);
  box-shadow: 0 10px 22px rgba(83, 35, 55, 0.18);
}

.book-body button.episode-lock-btn:hover {
  background: linear-gradient(100deg, #3f1c2b, #7f3046);
}

/* ── Checkout ── */
.checkout {
  border: 1px solid rgba(83, 35, 55, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  padding: 24px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 20px;
}

.checkout-header {
  margin-bottom: 18px;
}

.checkout-header h3 {
  font-size: var(--text-lg);
  margin-bottom: 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-height: 104px;
  border: 1.5px solid rgba(83, 35, 55, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms, background 160ms, transform 160ms;
}

.plan:hover {
  transform: translateY(-2px);
  border-color: rgba(83, 35, 55, 0.35);
}

.plan.active {
  border-color: var(--wine);
  background: rgba(83, 35, 55, 0.04);
}

.plan-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-name {
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--ink);
}

.plan-desc {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: var(--fw-medium);
}

.plan-price {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--wine);
  margin-top: auto;
  display: block;
}

.plan-badge {
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 2px 7px;
  letter-spacing: 0.02em;
}

.trust-bar {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.trust-bar span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.pay-row { margin-bottom: 10px; }

.pay-btn {
  width: 100%;
  min-height: 52px;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  border-radius: 14px;
  background: linear-gradient(
    100deg,
    var(--wine) 0%,
    #7a3347 40%,
    #9a3d58 60%,
    var(--wine) 100%
  );
  background-size: 250% 100%;
  background-position: 0% center;
  color: #fff;
  box-shadow: 0 12px 32px rgba(83, 35, 55, 0.3), 0 2px 8px rgba(83, 35, 55, 0.2);
  letter-spacing: -0.01em;
  animation: btnShimmer 4s ease infinite;
}

@keyframes btnShimmer {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.pay-btn:hover {
  box-shadow: 0 18px 44px rgba(83, 35, 55, 0.36), 0 4px 12px rgba(83, 35, 55, 0.22);
  background-position: 100% center;
}

.pay-btn:disabled {
  opacity: 0.65;
  transform: none;
  animation: none;
}

.checkout-msg {
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

/* ── Unlocked ── */
.unlocked {
  border: 1px solid rgba(83, 35, 55, 0.13);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.9);
  padding: 20px 24px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 20px;
}

.unlocked-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.unlocked-book {
  border: 1px solid rgba(83, 35, 55, 0.1);
  border-radius: var(--card-radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  display: flex;
  flex-direction: column;
}

.unlocked-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.unlocked-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.unlocked-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 10, 16, 0.48), rgba(15, 10, 16, 0.04));
}

.unlocked-cover span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  padding: 5px 10px;
}

.unlocked-book .book-body button {
  background: linear-gradient(135deg, var(--wine), #7a3347);
}

.receipt-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(83, 35, 55, 0.14);
  border-radius: 999px;
  background: rgba(83, 35, 55, 0.05);
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 6px 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.result-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

/* ── Insight Panel ── */
.insight-panel h2 {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  margin-bottom: 16px;
}

.featured-mini {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(83, 35, 55, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  padding: 12px;
  margin-bottom: 18px;
}

.featured-mini img {
  width: 80px;
  aspect-ratio: 3/4.2;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(45, 30, 40, 0.18);
}

.featured-mini-info .eyebrow {
  font-size: var(--text-2xs);
}

.featured-mini-info strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.featured-mini-info p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.revenue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.revenue-grid div {
  border: 1px solid rgba(83, 35, 55, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  padding: 11px 13px;
}

.revenue-grid span {
  display: block;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
}

.revenue-grid strong {
  color: var(--wine);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.metric {
  border: 1px solid rgba(83, 35, 55, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  padding: 13px 16px;
  margin-bottom: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  margin-bottom: 5px;
}

.metric strong {
  display: block;
  color: var(--wine);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
}

.side-note {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.68;
  margin: 0;
}

/* ── Animation ── */
@keyframes coverBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.016); }
}

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .hero {
    grid-template-columns: 1fr 440px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 14px;
    height: auto;
    overflow: visible;
  }

  .quiz-panel {
    height: auto;
    min-height: calc(100vh - 28px);
    overflow-y: visible;
    padding: 22px 20px 28px;
  }

  .insight-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 32px;
  }

  .hero-visual {
    grid-template-columns: 1fr 80px;
    max-width: 420px;
  }

  .genre-scroll {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .preview-split {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

  .book-grid,
  .unlocked-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hero-side-covers { display: none; }
  .hero-visual { grid-template-columns: 1fr; }

  .preview-split {
    grid-template-columns: 1fr;
  }

  .preview-img-col {
    aspect-ratio: 4/3;
    max-height: 260px;
  }

  .book-grid,
  .unlocked-grid {
    grid-template-columns: 1fr;
  }

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

  .genre-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-bar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .result-actions {
    justify-content: stretch;
  }

  .result-actions button { flex: 1; }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 10px;
    gap: 10px;
  }

  .quiz-panel,
  .insight-panel {
    border-radius: 18px;
    padding: 18px;
  }

  h1 { font-size: var(--text-display); }

  .hero-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

  .stat-sep { display: none; }
  .stat { padding: 0; }
}

@media (max-width: 380px) {
  .app-shell { padding: 0; gap: 0; }
  .quiz-panel, .insight-panel { border-radius: 0; box-shadow: none; }
}

/* ── Reader page ── */
.reader-page-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 32px 18px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}

.reader-back {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 180ms, color 180ms;
}
.reader-back:hover { border-color: var(--wine); color: var(--wine); }

.reader-page-title {
  flex: 1;
  min-width: 0;
}
.reader-page-title .eyebrow { margin-bottom: 2px; }
.reader-page-title strong {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.novel-body {
  max-width: 580px;
  margin: 0 auto;
  padding: 40px 32px 60px;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 2.15;
  color: var(--ink);
}
.novel-body p {
  margin: 0 0 1.6em;
  word-break: keep-all;
}
.novel-body p:last-child { margin-bottom: 0; }

.reader-paywall {
  max-width: 580px;
  margin: 0 auto 60px;
  padding: 32px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(83,35,55,0.05), rgba(185,133,69,0.05));
  border: 1px solid rgba(83,35,55,0.1);
  text-align: center;
}
.reader-paywall[hidden] { display: none; }
.reader-paywall p {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--wine);
  margin: 0 0 6px;
}
.reader-paywall span {
  display: block;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 20px;
}
.reader-paywall button {
  background: linear-gradient(100deg, var(--wine), #7a3347);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: opacity 200ms;
}
.reader-paywall button:hover { opacity: 0.88; }

.reader-next-block {
  max-width: 580px;
  margin: -22px auto 46px;
  padding: 18px 22px;
  border: 1px solid rgba(83, 35, 55, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.reader-next-block[hidden] { display: none; }

.reader-next-block strong {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  color: var(--ink);
  margin-bottom: 4px;
}

.reader-next-block span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.reader-next-block button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(100deg, var(--wine), #9d4158);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(83, 35, 55, 0.18);
}

/* ── Chapter comments ── */
.chapter-comments {
  max-width: 580px;
  margin: 0 auto 60px;
  padding: 0 32px 40px;
  border-top: 1px solid var(--line);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 18px;
}
.comments-header h4 {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  margin: 0;
  color: var(--ink);
}
.comments-header h4 span {
  color: var(--rose);
  font-size: var(--text-sm);
  margin-left: 6px;
}

.comment-sort {
  display: flex;
  gap: 6px;
}
.sort-btn {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms, color 150ms, background 150ms;
}
.sort-btn.active {
  border-color: var(--wine);
  color: var(--wine);
  background: rgba(83, 35, 55, 0.05);
}

/* ── Credit dialog ── */
.credit-dialog[hidden] { display: none; }

.credit-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.credit-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 18, 0.46);
  backdrop-filter: blur(8px);
}

.credit-dialog-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 22px;
  background: #fffdf9;
  border: 1px solid rgba(83, 35, 55, 0.16);
  box-shadow: 0 36px 90px rgba(25, 21, 29, 0.28);
  padding: 28px;
}

.credit-dialog-card h3 {
  font-family: var(--font-display);
  color: var(--wine);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
  margin-bottom: 10px;
}

.credit-dialog-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(83, 35, 55, 0.12);
  border-radius: 50%;
  background: #fff;
  color: var(--wine);
  font-size: var(--text-lg);
  cursor: pointer;
}

.dialog-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(83, 35, 55, 0.06);
}

.dialog-balance span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.dialog-balance strong {
  color: var(--wine);
  font-size: var(--text-lg);
}

.dialog-actions {
  display: grid;
  gap: 9px;
}

.dialog-actions button {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dialog-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.paywall-product-grid {
  display: grid;
  gap: 8px;
}

.dialog-actions .paywall-product-card {
  min-height: auto;
  padding: 12px 14px;
  border: 1px solid rgba(30, 70, 64, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 4px;
}

.dialog-actions .paywall-product-card.active {
  border-color: var(--wine);
  box-shadow: 0 0 0 2px rgba(143, 41, 72, 0.08);
}

.paywall-product-card .product-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(143, 41, 72, 0.08);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.paywall-product-card strong,
.paywall-product-card b {
  display: block;
}

.paywall-product-card small {
  color: var(--muted);
  font-weight: 400;
}

.dialog-primary {
  border: none;
  background: linear-gradient(100deg, var(--wine), #9d4158);
  color: #fff;
}

.dialog-secondary {
  border: 1px solid rgba(83, 35, 55, 0.16);
  background: rgba(185, 133, 69, 0.12);
  color: var(--wine);
}

.dialog-ghost {
  border: 1px solid rgba(83, 35, 55, 0.13);
  background: #fff;
  color: var(--muted);
}

.comment-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}
.comment-input-row input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 180ms;
}
.comment-input-row input:focus { border-color: var(--wine); }
.comment-input-row input::placeholder { color: #bbb; }
.comment-input-row button {
  padding: 11px 20px;
  background: var(--wine);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 180ms;
}
.comment-input-row button:hover { opacity: 0.85; }

.comment-list { display: flex; flex-direction: column; gap: 0; }

.comment-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 16px 30px;
  border-bottom: 1px solid rgba(231, 223, 228, 0.6);
  color: var(--muted);
  text-align: center;
}

.comment-empty strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.comment-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(231, 223, 228, 0.6);
}
.comment-item:last-child { border-bottom: none; }

.comment-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wine), var(--rose));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: #fff;
  flex-shrink: 0;
}
.comment-nick {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--ink);
}
.comment-time {
  font-size: var(--text-2xs);
  color: #bbb;
  margin-left: auto;
}
.comment-new-badge {
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--rose);
  background: rgba(189, 75, 103, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
}

.comment-text {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 10px;
  word-break: keep-all;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.comment-like {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: var(--text-xs);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 150ms, color 150ms, background 150ms;
}
.comment-like.liked {
  border-color: var(--rose);
  color: var(--rose);
  background: rgba(189, 75, 103, 0.06);
}
.comment-like:hover:not(.liked) { border-color: var(--muted); }

/* ── Chapter button & expanded reader ── */
.chapter-btn {
  display: block;
  margin-top: 16px;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--wine);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.chapter-btn:hover {
  border-color: var(--wine);
  background: rgba(83, 35, 55, 0.04);
}
.reader.expanded {
  max-height: none;
  overflow: visible;
}

/* ── Type-specific image tinting ── */
[data-type="rival"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(20, 30, 60, 0.72) 0%, rgba(20, 30, 60, 0.05) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 22%);
}
[data-type="rival"] .preview-img-col img { filter: contrast(1.06) saturate(0.9); }

[data-type="devoted"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(40, 18, 38, 0.74) 0%, rgba(40, 18, 38, 0.05) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 22%);
}
[data-type="devoted"] .preview-img-col img { filter: brightness(0.97) saturate(0.88); }

[data-type="possessive"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(10, 5, 14, 0.85) 0%, rgba(10, 5, 14, 0.06) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent 22%);
}
[data-type="possessive"] .preview-img-col img { filter: contrast(1.1) saturate(0.8) brightness(0.94); }

[data-type="contract"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(45, 25, 10, 0.78) 0%, rgba(45, 25, 10, 0.04) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 22%);
}
[data-type="contract"] .preview-img-col img { filter: contrast(1.04) saturate(1.08); }

[data-type="royal"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(18, 8, 45, 0.82) 0%, rgba(18, 8, 45, 0.05) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.25), transparent 22%);
}
[data-type="royal"] .preview-img-col img { filter: contrast(1.05) hue-rotate(12deg) saturate(0.92); }

[data-type="slow"] .book-cover::after {
  background:
    linear-gradient(0deg, rgba(42, 26, 14, 0.76) 0%, rgba(42, 26, 14, 0.05) 54%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 22%);
}
[data-type="slow"] .preview-img-col img { filter: sepia(0.18) saturate(0.9) brightness(0.98); }

/* ════════════════ INTERACTIVE STORY ════════════════ */

/* Intro teaser button */
.interactive-teaser-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;
  background: none;
  border: 1.5px solid rgba(139, 60, 90, 0.3);
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--rose);
  cursor: pointer;
  transition: all 0.2s;
}
.interactive-teaser-btn:hover {
  background: rgba(139, 60, 90, 0.06);
  border-color: var(--rose);
}
.interactive-new {
  background: var(--rose);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
}
.interactive-arrow { opacity: 0.6; }

/* Screen layout */
.interactive-body {
  max-width: 580px;
  margin: 0 auto;
  padding: 36px 0 100px;
}

/* Story text */
.story-segment {
  animation: fadeSlideIn 0.45s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.story-para {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 2.15;
  color: var(--ink);
  margin: 0 0 1.55em;
}
.story-para em {
  font-style: italic;
  color: var(--rose);
}
.story-divider {
  text-align: center;
  color: var(--muted);
  margin: 36px 0;
  font-size: var(--text-md);
  letter-spacing: 10px;
  opacity: 0.45;
}
.story-divider::before { content: '· · ·'; }

/* Choice UI */
.choice-container {
  margin: 40px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: rgba(139, 60, 90, 0.04);
  border-radius: 18px;
  border: 1.5px solid rgba(139, 60, 90, 0.15);
}
.choice-prompt {
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 10px;
}
.choice-btn {
  background: #fff;
  border: 2px solid rgba(139, 60, 90, 0.2);
  border-radius: 12px;
  padding: 16px 20px 16px 48px;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.choice-btn::before {
  content: attr(data-index);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(139, 60, 90, 0.1);
  color: var(--rose);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}
.choice-btn:not(:disabled):hover {
  border-color: var(--rose);
  background: rgba(139, 60, 90, 0.04);
  color: var(--rose);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 60, 90, 0.12);
}
.choice-btn:not(:disabled):hover::before {
  background: var(--rose);
  color: #fff;
}
.choice-btn.chosen {
  border-color: var(--rose);
  background: rgba(139, 60, 90, 0.06);
  color: var(--rose);
  font-weight: var(--fw-semibold);
}
.choice-btn.chosen::before {
  background: var(--rose);
  color: #fff;
  content: '✓';
}
.choice-btn:disabled {
  cursor: default;
  opacity: 0.3;
}
.choice-btn.chosen:disabled {
  opacity: 1;
}

/* Ending card */
.ending-card {
  margin: 48px 0 0;
  padding: 32px;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: rgba(255, 253, 249, 0.7);
  animation: fadeSlideIn 0.5s ease both;
}
.ending-badge {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ending-badge.best  { background: #fdf0e0; color: #a05c1a; }
.ending-badge.happy { background: #ede8f7; color: #6b2d9a; }
.ending-badge.good  { background: #e0edf7; color: #1a5c9a; }
.ending-badge.bad   { background: #f0f0f0; color: #666; }

.ending-title-text {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin: 0 0 6px;
}
.ending-desc-text {
  font-size: var(--text-base);
  color: var(--muted);
  margin: 0 0 24px;
  font-style: italic;
}
.ending-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ending-action-btn {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s;
}
.ending-action-btn:hover {
  border-color: var(--rose);
  color: var(--rose);
}
.ending-tracker {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ending-tracker-label {
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
}
.ending-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.ending-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: all 0.3s;
}
.ending-dot.found.best  { background: #c97a2a; }
.ending-dot.found.happy { background: #8a4dba; }
.ending-dot.found.good  { background: #3a7dba; }
.ending-dot.found.bad   { background: #888; }

/* ════════════════ MOBILE WEBTOON APP OVERRIDE ════════════════ */
body {
  background: #e9e2da;
}

h1,
.brand-mark,
.eyebrow,
.cover-copy span,
.cover-copy small,
.count {
  letter-spacing: 0;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  height: auto;
  margin: 0 auto;
  padding: 0;
  display: block;
  overflow: visible;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(25, 21, 29, 0.06), 0 28px 80px rgba(25, 21, 29, 0.2);
}

.quiz-panel {
  min-height: 100dvh;
  height: auto;
  overflow: visible;
  padding: 0 0 36px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--paper);
  backdrop-filter: none;
}

.insight-panel {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 56px;
  margin: 0;
  padding: 10px var(--page-gutter);
  border-bottom: 1px solid rgba(23, 21, 26, 0.08);
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(18px);
}

.brand-mark {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.brand-sep,
.brand-sub {
  display: none;
}

.wallet {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(23, 21, 26, 0.04);
}

.wallet span {
  font-size: var(--text-2xs);
}

.wallet strong {
  font-size: var(--text-md);
}

.progress {
  position: sticky;
  top: 52px;
  z-index: 19;
  height: 2px;
  margin: 0;
  border-radius: 0;
}

.screen {
  padding: 0 16px;
}

#intro.screen,
#result.screen,
#quiz.screen,
#reader.screen,
#interactive.screen,
#worksPage.screen,
#library.screen,
#myPage.screen,
#policyPage.screen,
#creatorStudio.screen {
  padding: 0;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.hero-visual {
  order: -1;
  display: block;
  width: 100%;
}

.hero-main-cover {
  border-radius: 0;
  aspect-ratio: 1 / 1.12;
  box-shadow: none;
}

.hero-main-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(255, 250, 243, 1), rgba(255, 250, 243, 0));
  z-index: 1;
  pointer-events: none;
}

.hero-cover-overlay {
  z-index: 2;
  padding: 22px 18px;
}

.hero-cover-info strong {
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.hero-peek-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  text-align: center;
}

.hero-side-covers {
  display: none;
}

.hero-content {
  padding: 18px var(--page-gutter) 0;
}

.hero-content::before,
.hero-content > .eyebrow {
  display: none;
}

h1 {
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.hero-desc {
  font-size: var(--text-base);
  line-height: 1.62;
  margin-bottom: 14px;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

button,
.primary.large {
  min-height: 44px;
  border-radius: 12px;
  font-size: var(--text-base);
}

.interactive-teaser-btn {
  width: 100%;
  margin: 0 0 12px;
  justify-content: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 14px 0 4px;
  border-top: 1px solid rgba(23, 21, 26, 0.08);
  border-bottom: 1px solid rgba(23, 21, 26, 0.08);
}

.stat {
  min-width: 0;
  padding: 0 8px 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
  text-align: center;
}

.stat strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  white-space: nowrap;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  white-space: nowrap;
}

.stat-sep {
  display: none;
}

.hero-stats .stat + .stat {
  border-left: 1px solid rgba(23, 21, 26, 0.09);
}

.earn-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(143, 41, 72, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7f2 0%, #fffdf8 100%);
}

.earn-strip span {
  min-width: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  word-break: keep-all;
}

.earn-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.earn-strip button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(143, 41, 72, 0.16);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  box-shadow: none;
  white-space: nowrap;
}

.genre-strip {
  margin-top: 18px;
  padding: 18px 16px 24px;
  border-top: 8px solid #f2ebe3;
}

.genre-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.genre-scroll::-webkit-scrollbar {
  display: none;
}

.genre-card {
  flex: 0 0 86px;
  border-radius: 12px;
}

.result-hero {
  padding: 20px 16px 16px;
  margin: 0;
  border-bottom: 8px solid #f2ebe3;
}

.result-hero h2 {
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.result-summary {
  font-size: var(--text-base);
  line-height: 1.62;
  margin-bottom: 12px;
}

.tags {
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.tags::-webkit-scrollbar {
  display: none;
}

.tags span {
  flex: 0 0 auto;
}

.preview-split {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  margin: 0;
  padding: 18px 16px;
  border-bottom: 8px solid #f2ebe3;
}

.preview-img-col {
  border-radius: 12px;
  aspect-ratio: 3 / 4;
  max-height: none;
  box-shadow: 0 10px 24px rgba(25, 21, 29, 0.16);
}

.preview-text-col {
  gap: 9px;
}

.preview-meta-row {
  flex-wrap: wrap;
}

.preview-text-col h3 {
  font-size: var(--text-md);
  margin: 0;
}

.scene-block {
  display: none;
}

.reader {
  max-height: 178px;
  padding: 18px 16px;
  font-size: var(--text-base);
  line-height: 1.9;
  border-radius: 12px;
}

.reader.expanded {
  max-height: none;
}

.chapter-btn {
  width: 100%;
}

.recommendations {
  margin: 0;
  padding: 18px 0 0;
}

.section-head {
  align-items: center;
  margin: 0;
  padding: 0 16px 12px;
}

.section-head h3 {
  font-size: var(--text-lg);
}

.book-grid {
  display: block;
  border-top: 1px solid rgba(23, 21, 26, 0.08);
}

.book-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 15px 16px 16px;
  border: 0;
  border-bottom: 1px solid rgba(23, 21, 26, 0.08);
  border-radius: 0;
  box-shadow: none;
  background: #fffdf9;
}

.book-card:hover {
  transform: none;
  box-shadow: none;
}

.book-card::after {
  display: none;
}

.book-cover {
  width: 72px;
  border-radius: 8px;
  aspect-ratio: 3 / 4;
}

.cover-spine,
.cover-copy {
  display: none;
}

.cover-badge {
  top: 6px;
  right: 6px;
  font-size: var(--text-2xs);
  padding: 3px 6px;
}

.book-body {
  min-width: 0;
  padding: 0;
  gap: 7px;
}

.book-topline {
  min-width: 0;
}

.book-topline span {
  font-size: var(--text-2xs);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-topline strong {
  font-size: var(--text-sm);
  flex: 0 0 auto;
  text-align: right;
}

.book-body h4 {
  font-size: var(--text-md);
  line-height: 1.25;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.book-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.book-tags {
  display: none;
}

.book-body button {
  width: auto;
  align-self: flex-start;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: var(--text-xs);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkout,
.unlocked,
.action-row.result-actions {
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
  padding: 20px 16px;
}

.checkout {
  border-top: 8px solid #f2ebe3;
}

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

.reader-page-topbar {
  min-height: 56px;
  padding: 10px 14px;
  background: rgba(255, 253, 249, 0.97);
}

.reader-back {
  padding: 7px 11px;
}

.novel-body {
  max-width: none;
  padding: 28px 20px 42px;
  font-size: var(--text-md);
  line-height: 2.18;
}

.chapter-comments,
.reader-next-block {
  max-width: none;
}

.chapter-comments {
  margin: 0;
  padding: 0 16px 34px;
  border-top: 8px solid #f2ebe3;
}

.comments-header {
  padding: 18px 0 14px;
}

.comment-input-row {
  gap: 8px;
}

.reader-next-block {
  margin: 0 16px 34px;
  padding: 16px;
  border-radius: 16px;
  align-items: center;
}

.reader-next-block button {
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.credit-dialog {
  align-items: end;
  padding: 0;
}

.credit-dialog-card {
  width: min(100%, 430px);
  border-radius: 24px 24px 0 0;
  padding: 28px 20px 22px;
}

.dialog-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
}

.dialog-close::before,
.dialog-close::after {
  content: "";
  grid-area: 1 / 1;
  width: 17px;
  height: 3px;
  border-radius: 999px;
  background: var(--wine);
}

.dialog-close::before {
  transform: rotate(45deg);
}

.dialog-close::after {
  transform: rotate(-45deg);
}

@media (max-width: 430px) {
  .app-shell {
    width: 100%;
    box-shadow: none;
  }
}

/* ════════════════ FINAL BRAND SYSTEM PASS ════════════════ */
:root {
  --ink: #151318;
  --muted: #6e6972;
  --subtle: #9b949d;
  --line: #ebe6e1;
  --paper: #fffaf4;
  --surface: #ffffff;
  --wash: #f4eee8;
  --rose: #c93f5d;
  --wine: #9d2f50;
  --gold: #b8904d;
}

body {
  background: #ded8d1;
}

.app-shell {
  background: var(--paper);
}

.topbar {
  min-height: 54px;
  padding: 0 16px;
  background: rgba(255, 250, 244, 0.98);
  border-bottom: 1px solid rgba(21, 19, 24, 0.08);
}

.brand-mark {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.wallet {
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(21, 19, 24, 0.1);
  background: var(--surface);
}

.wallet span {
  color: var(--subtle);
  font-size: var(--text-2xs);
}

.wallet strong {
  color: var(--wine);
  font-size: var(--text-md);
}

.progress {
  top: 54px;
  background: transparent;
}

.progress span {
  background: var(--wine);
}

.hero-visual {
  padding: 10px 12px 0;
  background: var(--paper);
}

.hero-main-cover {
  border-radius: 18px;
  aspect-ratio: 1 / 1.12;
  overflow: hidden;
  background: #211b22;
}

.hero-cover-overlay {
  padding: 18px;
  background:
    linear-gradient(0deg, rgba(12, 10, 13, 0.82) 0%, rgba(12, 10, 13, 0.22) 55%, rgba(12, 10, 13, 0.02) 100%);
}

.hero-main-cover::after {
  display: none;
}

.hero-cover-info .eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.hero-cover-info strong {
  font-size: var(--text-lg);
  line-height: 1.18;
}

.hero-meta span {
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: var(--text-2xs);
}

.hero-peek-btn {
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.hero-content {
  padding: 20px 16px 0;
}

h1 {
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: 1.22;
  font-weight: var(--fw-bold);
  word-break: keep-all;
}

.hero-desc {
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.65;
}

.hero-actions {
  gap: 8px;
}

.primary,
.book-body button.episode-lock-btn,
.dialog-primary,
.pay-btn {
  background: var(--wine);
  color: #fff;
  box-shadow: none;
}

.ghost,
.hero-actions .ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid rgba(21, 19, 24, 0.12);
}

.interactive-teaser-btn {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(157, 47, 80, 0.22);
  background: var(--surface);
  color: var(--wine);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.interactive-new {
  background: var(--wine);
  color: #fff;
}

.hero-stats {
  margin-top: 2px;
  padding: 15px 0 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 0 8px;
}

.stat strong {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

.stat span {
  color: var(--subtle);
  font-size: var(--text-2xs);
}

.earn-strip {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(21, 19, 24, 0.08);
  background: var(--surface);
}

.earn-strip span {
  text-align: center;
  font-size: var(--text-sm);
}

.earn-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.earn-strip button {
  min-height: 34px;
  border-color: rgba(157, 47, 80, 0.18);
  background: #fbf7f4;
  color: var(--wine);
}

.genre-strip,
.result-hero,
.preview-split,
.checkout,
.chapter-comments {
  border-top-color: var(--wash);
  border-bottom-color: var(--wash);
}

.genre-card {
  flex-basis: 82px;
  box-shadow: none;
}

.genre-card span {
  font-size: var(--text-2xs);
}

.result-hero h2 {
  color: var(--ink);
  font-size: var(--text-xl);
}

.result-summary {
  color: var(--muted);
}

.tags span,
.meta-pill {
  border-color: rgba(21, 19, 24, 0.1);
  background: var(--surface);
  color: var(--muted);
}

.book-card {
  min-height: 138px;
  background: var(--paper);
  border-bottom-color: var(--line);
}

.book-cover {
  align-self: start;
  box-shadow: none;
}

.cover-badge {
  background: rgba(255, 255, 255, 0.94);
  color: var(--wine);
  border: 1px solid rgba(157, 47, 80, 0.18);
}

.book-topline span {
  color: var(--subtle);
  font-weight: var(--fw-bold);
}

.book-topline strong {
  color: var(--wine);
  font-weight: var(--fw-bold);
}

.book-body h4 {
  color: var(--ink);
  font-size: var(--text-md);
}

.book-body p {
  color: var(--muted);
}

.book-body button {
  min-height: 31px;
  background: #1c1a20;
  color: #fff;
}

.reader-page-topbar {
  min-height: 54px;
  padding: 0 14px;
  background: rgba(255, 250, 244, 0.98);
}

.reader-back {
  border-color: rgba(21, 19, 24, 0.1);
  background: var(--surface);
  color: var(--ink);
}

.novel-body {
  color: #262126;
}

.reader-next-block {
  border-color: rgba(21, 19, 24, 0.1);
  background: var(--surface);
  box-shadow: none;
}

.reader-next-block button {
  background: var(--wine);
}

.credit-dialog-card {
  background: var(--paper);
  border: 1px solid rgba(21, 19, 24, 0.12);
  box-shadow: 0 -18px 60px rgba(21, 19, 24, 0.18);
}

.credit-dialog-card h3 {
  color: var(--ink);
}

.dialog-balance {
  background: #f5efeb;
}

.dialog-balance strong {
  color: var(--wine);
}

.dialog-secondary {
  background: #f5eee7;
  color: var(--wine);
  border-color: rgba(157, 47, 80, 0.18);
}

.dialog-ghost {
  background: var(--surface);
  color: var(--muted);
}

.dialog-close {
  background: var(--surface);
  border-color: rgba(21, 19, 24, 0.12);
}

/* ════════════════ PRODUCT POLISH PASS ════════════════ */
:root {
  --ink: #17161a;
  --muted: #6f6b74;
  --subtle: #9b96a0;
  --line: #ece8e4;
  --paper: #fbfaf8;
  --surface: #ffffff;
  --wash: #f3f1ef;
  --rose: #d83d62;
  --wine: #a12f50;
  --gold: #b58b42;
  --font-serif: 'Pretendard Variable', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  --font-display: 'Pretendard Variable', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

html {
  background: #d8d4cf;
}

body {
  background: linear-gradient(180deg, #d8d4cf 0%, #cfcac4 100%);
  font-family: var(--font-display);
  letter-spacing: 0;
}

button,
input {
  font-family: inherit;
}

.app-shell {
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(23, 22, 26, 0.08), 0 22px 70px rgba(23, 22, 26, 0.18);
}

.quiz-panel {
  background: var(--paper);
}

.topbar {
  height: 56px;
  min-height: 56px;
  padding: 0 16px;
  background: rgba(251, 250, 248, 0.96);
  border-bottom: 1px solid rgba(23, 22, 26, 0.08);
}

.topbar-brand {
  min-width: 0;
}

.brand-mark {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.wallet {
  height: 32px;
  min-width: 108px;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(23, 22, 26, 0.09);
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 22, 26, 0.04);
}

.wallet span {
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.wallet strong {
  min-width: 36px;
  text-align: right;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.progress {
  top: 56px;
}

.hero-visual {
  padding: 12px 12px 0;
}

.hero-main-cover {
  border-radius: 20px;
  aspect-ratio: 1 / 1.1;
  box-shadow: 0 16px 34px rgba(23, 22, 26, 0.14);
}

.hero-cover-overlay {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(14, 13, 17, 0.02) 0%, rgba(14, 13, 17, 0.12) 38%, rgba(14, 13, 17, 0.86) 100%);
}

.hero-cover-info .eyebrow {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.hero-cover-info strong {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.hero-meta {
  gap: 5px;
}

.hero-meta span {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.hero-peek-btn {
  min-height: 44px;
  border-radius: 12px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.hero-content {
  padding: 19px 16px 0;
}

h1 {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: 1.22;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.hero-desc {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.65;
}

.hero-actions {
  gap: 8px;
}

.primary.large,
.ghost,
.hero-actions .ghost {
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.primary,
.primary.large,
.book-body button.episode-lock-btn,
.dialog-primary,
.pay-btn,
.reader-next-block button {
  background: #17161a;
  color: #fff;
  box-shadow: none;
}

.primary:hover,
.book-body button.episode-lock-btn:hover,
.dialog-primary:hover,
.pay-btn:hover,
.reader-next-block button:hover {
  background: #2a262d;
}

.ghost,
.hero-actions .ghost,
.dialog-ghost {
  border: 1px solid rgba(23, 22, 26, 0.12);
  background: #fff;
  color: var(--ink);
}

.interactive-teaser-btn {
  min-height: 40px;
  margin-bottom: 13px;
  padding: 0 14px;
  border-radius: 12px;
  border-color: rgba(216, 61, 98, 0.17);
  background: #fff;
  color: var(--wine);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.interactive-new {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: var(--text-2xs);
}

.hero-stats {
  margin-top: 0;
  padding: 14px 0 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stats .stat {
  min-width: 0;
  padding: 0 8px;
  border-left: 1px solid var(--line);
  background: transparent;
}

.hero-stats .stat:first-child {
  border-left: 0;
}

.stat strong {
  font-size: var(--text-lg);
  line-height: 1.1;
  font-weight: var(--fw-bold);
}

.stat span {
  margin-top: 5px;
  color: var(--subtle);
  font-size: var(--text-2xs);
  line-height: 1.15;
  font-weight: var(--fw-bold);
}

.earn-strip {
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(23, 22, 26, 0.08);
  background: #fff;
}

.earn-strip span {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: center;
  color: var(--ink);
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: var(--fw-bold);
  overflow-wrap: anywhere;
}

.earn-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.earn-strip button {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(216, 61, 98, 0.16);
  background: #fff7f5;
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.genre-strip,
.result-hero,
.preview-split,
.checkout,
.chapter-comments {
  border-top-color: var(--wash);
  border-bottom-color: var(--wash);
}

.genre-strip {
  margin-top: 18px;
  padding-top: 18px;
}

.genre-card {
  flex-basis: 82px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.genre-card img {
  aspect-ratio: 3 / 4;
}

.genre-card span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: var(--ink);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

.all-works {
  padding: 20px 16px 28px;
  border-top: 8px solid var(--wash);
  background: var(--paper);
}

.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.home-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.15;
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

.home-section-head .eyebrow {
  margin-bottom: 5px;
}

.home-section-head > span {
  flex: 0 0 auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(23, 22, 26, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.work-list {
  display: grid;
  gap: 10px;
}

.work-row {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 1px 2px rgba(23, 22, 26, 0.03);
}

.work-row img {
  width: 68px;
  aspect-ratio: 3 / 4;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  background: #ece8e4;
}

.work-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.work-info strong {
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.24;
  font-weight: var(--fw-bold);
  word-break: keep-all;
}

.work-info em {
  color: var(--wine);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-bold);
}

.work-info small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.42;
  font-weight: var(--fw-bold);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.work-row b {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #17161a;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.result-hero {
  background: var(--paper);
}

.result-hero h2,
.preview-text-col h3,
.section-head h3,
.checkout-header h3,
.book-body h4,
.reader-next-block strong,
.credit-dialog-card h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

.result-hero h2 {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
}

.result-summary {
  color: var(--muted);
  font-size: var(--text-base);
}

.tags span,
.meta-pill {
  height: 25px;
  display: inline-flex;
  align-items: center;
  border-color: rgba(23, 22, 26, 0.1);
  background: #fff;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.book-grid {
  border-top: 1px solid var(--line);
}

.book-card {
  min-height: 136px;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.book-cover {
  width: 70px;
  border-radius: 9px;
  box-shadow: none;
}

.cover-badge {
  top: 6px;
  right: 6px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--wine);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.book-body {
  min-width: 0;
  gap: 6px;
}

.book-topline {
  min-width: 0;
  gap: 8px;
}

.book-topline span {
  min-width: 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-topline strong {
  flex: 0 0 auto;
  max-width: 96px;
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-body h4 {
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.28;
  font-weight: var(--fw-bold);
  word-break: keep-all;
}

.book-body p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.48;
}

.book-body button {
  width: auto;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  background: #17161a;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  line-height: 1;
  white-space: nowrap;
}

.checkout {
  background: #fff;
}

.plan-grid {
  gap: 8px;
}

.plan {
  min-height: 84px;
  border-radius: 14px;
  border: 1px solid rgba(23, 22, 26, 0.1);
  background: #fff;
  padding: 13px 14px;
}

.plan.active {
  border-color: rgba(216, 61, 98, 0.45);
  background: #fff7f5;
}

.plan-name {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.plan-desc {
  color: var(--muted);
  font-size: var(--text-xs);
}

.plan-price {
  color: var(--wine);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

.checkout-method-selector {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  margin: 0 0 16px;
}

.checkout-method-label {
  align-self: center;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.3;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.checkout-method {
  min-width: 0;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-primary);
  padding: 9px 11px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms, background 140ms, box-shadow 140ms;
}

.checkout-method:hover {
  border-color: rgba(30, 70, 64, 0.28);
  background: #fff;
}

.checkout-method.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(30, 70, 64, 0.16);
}

.checkout-method strong,
.checkout-method small {
  display: block;
  min-width: 0;
}

.checkout-method strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.3;
  font-weight: var(--fw-semibold);
}

.checkout-method small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  line-height: 1.35;
  font-weight: var(--fw-regular);
}

.checkout-method-card {
  grid-column: 1 / -1;
}

.trust-bar {
  justify-content: center;
  gap: 16px;
}

.pay-btn {
  min-height: 50px;
  border-radius: 13px;
  background: #17161a;
  font-size: var(--text-md);
  animation: none;
}

.reader-page-topbar {
  min-height: 56px;
  padding: 8px 14px;
}

.reader-back {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
}

.reader-page-title strong {
  font-size: var(--text-sm);
}

.novel-body {
  font-family: var(--font-display);
  color: #262328;
  font-size: var(--text-md);
  line-height: 2.12;
}

.chapter-comments {
  background: #fff;
}

.comment-input-row input,
.comment-input-row button {
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
}

.reader-next-block {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid rgba(23, 22, 26, 0.1);
  background: #fff;
  box-shadow: none;
}

.reader-next-block strong,
.reader-next-block span {
  min-width: 0;
  display: block;
}

.reader-next-block button {
  height: 40px;
  min-height: 40px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.credit-dialog-card {
  background: var(--paper);
  border: 1px solid rgba(23, 22, 26, 0.12);
  box-shadow: 0 -20px 60px rgba(23, 22, 26, 0.2);
}

.credit-dialog-card h3 {
  padding-right: 58px;
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.18;
}

.credit-dialog-card p {
  color: var(--muted);
}

.dialog-balance {
  border-radius: 14px;
  background: #f1eeee;
}

.dialog-balance span {
  font-weight: var(--fw-bold);
}

.dialog-balance strong {
  color: var(--wine);
  font-size: var(--text-xl);
}

.dialog-actions {
  gap: 10px;
}

.dialog-actions button {
  height: 46px;
  min-height: 46px;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.dialog-secondary {
  border-color: rgba(216, 61, 98, 0.18);
  background: #fff2ef;
  color: var(--wine);
}

.dialog-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 22, 26, 0.1);
  border-radius: 999px;
  background: #fff;
  color: transparent;
  font-size: 0;
  line-height: 0;
  appearance: none;
}

.dialog-close::before,
.dialog-close::after {
  content: "";
  grid-area: 1 / 1;
  width: 17px;
  height: 3px;
  border-radius: 999px;
  background: var(--wine);
  transform-origin: center;
}

.dialog-close::before {
  transform: rotate(45deg);
}

.dialog-close::after {
  transform: rotate(-45deg);
}

@media (max-width: 360px) {
  .wallet {
    min-width: 96px;
    padding: 0 8px;
  }

  .wallet span {
    display: none;
  }

  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .book-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding-left: 14px;
    padding-right: 14px;
  }

  .book-cover {
    width: 64px;
  }

  .reader-next-block {
    grid-template-columns: 1fr;
  }

  .reader-next-block button {
    width: 100%;
  }

  .work-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .work-row img {
    width: 60px;
  }

  .work-row b {
    grid-column: 2;
    justify-self: start;
  }
}

/* ════════════════ MOBILE CONTENT PLATFORM PASS ════════════════ */
:root {
  --ink: #19191d;
  --muted: #777780;
  --subtle: #a0a0a8;
  --line: #ececf0;
  --paper: #ffffff;
  --surface: #ffffff;
  --wash: #f5f5f7;
  --rose: #d9365f;
  --wine: #9f2d4e;
}

html,
body {
  background: #d7d7dc;
}

.app-shell,
.quiz-panel {
  background: #fff;
}

.topbar {
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid #ededf0;
  background: rgba(255, 255, 255, 0.98);
}

.brand-mark {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

.wallet {
  min-width: 94px;
  height: 30px;
  border: 1px solid #e6e6ea;
  box-shadow: none;
}

.wallet span {
  display: none;
}

.wallet strong {
  min-width: auto;
  font-size: var(--text-base);
}

.progress {
  display: none;
}

#intro.screen {
  display: none;
  background: #fff;
}

#intro.screen.active {
  display: flex;
  flex-direction: column;
}

.home-tabs {
  order: 1;
  position: sticky;
  top: 52px;
  z-index: 18;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: 1px solid #ededf0;
  background: rgba(255, 255, 255, 0.98);
  scrollbar-width: none;
}

.home-tabs::-webkit-scrollbar {
  display: none;
}

.home-tabs button {
  min-height: 43px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #74747c;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.home-tabs button.active {
  color: #17171b;
  box-shadow: inset 0 -2px 0 #17171b;
}

.continue-reading {
  order: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.continue-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.continue-copy span,
.continue-copy small {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.continue-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-reading button {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #17171b;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.reward-mini {
  order: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.reward-mini span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.reward-mini button {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #efcbd6;
  border-radius: 999px;
  background: #fff;
  color: var(--wine);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.all-works {
  order: 4;
  padding: 18px 0 10px;
  border-top: 0;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.home-section-head {
  align-items: center;
  margin: 0;
  padding: 0 16px 12px;
}

.home-section-head .eyebrow {
  display: none;
}

.home-section-head h2 {
  font-size: var(--text-lg);
}

.home-section-head > span {
  height: 26px;
  border-color: #e4e4e8;
  color: var(--muted);
  font-size: var(--text-2xs);
}

.work-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

.work-filter::-webkit-scrollbar {
  display: none;
}

.work-filter button {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #e6e6ea;
  border-radius: 999px;
  background: #fff;
  color: #6e6e76;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  flex: 0 0 auto;
}

.work-filter button.active {
  border-color: #17171b;
  background: #17171b;
  color: #fff;
}

.work-list {
  gap: 0;
  border-top: 1px solid var(--line);
}

.work-row {
  min-height: 112px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.work-row img {
  width: 64px;
  border-radius: 8px;
}

.work-info {
  gap: 4px;
}

.work-info strong {
  font-size: var(--text-md);
  line-height: 1.24;
}

.work-info em {
  color: #a62d50;
  font-size: var(--text-xs);
}

.work-info small {
  color: #73737b;
  font-size: var(--text-xs);
  line-height: 1.42;
}

.work-row b {
  height: 30px;
  min-width: 48px;
  padding: 0 11px;
  font-size: var(--text-xs);
}

.ranking-section {
  order: 5;
  padding: 18px 0 10px;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.rank-row {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 24px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.rank-num {
  color: #17171b;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  text-align: center;
}

.rank-row img {
  width: 48px;
  aspect-ratio: 3 / 4;
  border-radius: 7px;
  object-fit: cover;
}

.rank-row strong,
.rank-row small {
  display: block;
}

.rank-row strong {
  overflow: hidden;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.rank-row b {
  color: #a62d50;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.hero {
  order: 6;
  display: none;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 13px;
  margin: 0;
  padding: 16px;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.hero-visual {
  order: 0;
  padding: 0;
}

.hero-main-cover {
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  box-shadow: none;
}

.hero-cover-overlay,
.hero-side-covers {
  display: none;
}

.hero-content {
  min-width: 0;
  padding: 0;
}

.hero-content > .eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #a62d50;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

h1 {
  margin: 0 0 6px;
  font-size: var(--text-lg);
  line-height: 1.24;
}

.hero-desc {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.primary.large,
.ghost,
.hero-actions .ghost {
  height: 34px;
  min-height: 34px;
  border-radius: 999px;
  font-size: var(--text-xs);
}

.interactive-teaser-btn {
  height: 34px;
  min-height: 34px;
  margin: 9px 0 0;
  justify-content: flex-start;
  border-radius: 8px;
  font-size: var(--text-xs);
}

.hero-stats {
  display: none;
}

.earn-strip {
  margin-top: 9px;
  padding: 9px;
  border-radius: 8px;
  background: #fafafa;
}

.earn-strip span {
  font-size: var(--text-xs);
}

.earn-strip button {
  height: 30px;
  min-height: 30px;
  border-radius: 8px;
  font-size: var(--text-2xs);
}

.genre-strip {
  order: 7;
  margin-top: 0;
  padding: 18px 16px 22px;
  border-top: 0;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.genre-strip-label {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  text-transform: none;
}

.genre-scroll {
  display: flex;
  grid-template-columns: none;
  gap: 8px;
  overflow-x: auto;
}

.genre-card {
  position: static;
  flex: 0 0 auto;
  aspect-ratio: auto;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  transition: none;
}

.genre-card:hover {
  transform: none;
  box-shadow: none;
}

.genre-card img {
  display: none;
}

.genre-card span {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-xs);
  padding: 0 14px;
}

.result-hero {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.result-hero .eyebrow {
  display: none;
}

.result-hero h2 {
  margin-bottom: 6px;
  font-size: var(--text-lg);
  line-height: 1.2;
}

.result-summary {
  margin-bottom: 10px;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.result-author {
  margin: -1px 0 8px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  line-height: 1.35;
}

.result-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.result-nav-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.result-nav-actions button:active {
  transform: translateY(1px);
}

.tags {
  gap: 6px;
}

.tags span,
.meta-pill {
  height: 24px;
  border-color: #e6e6ea;
  color: #66666e;
}

.preview-split {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  padding: 14px 16px 16px;
  border-bottom: 8px solid var(--wash);
}

.preview-img-col {
  border-radius: 8px;
  box-shadow: none;
}

.preview-meta-row .eyebrow,
.scene-block {
  display: none;
}

.preview-text-col {
  gap: 8px;
}

.preview-text-col h3 {
  font-size: var(--text-md);
  line-height: 1.25;
}

.reader {
  max-height: 128px;
  padding: 12px;
  border: 1px solid #eeeeef;
  border-radius: 8px;
  background: #fafafa;
  font-size: var(--text-sm);
  line-height: 1.75;
}

.reader::before {
  display: none;
}

.chapter-btn {
  height: 36px;
  min-height: 36px;
  border-radius: 999px;
  font-size: var(--text-xs);
}

.recommendations {
  padding-top: 16px;
}

.section-head {
  padding: 0 16px 12px;
}

.section-head .eyebrow {
  display: none;
}

.section-head h3 {
  font-size: var(--text-lg);
}

.book-card {
  min-height: 118px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 12px 16px;
  background: #fff;
}

.book-cover {
  width: 58px;
}

.book-body h4 {
  font-size: var(--text-md);
}

.book-body p {
  font-size: var(--text-xs);
  -webkit-line-clamp: 2;
}

.book-body button {
  height: 30px;
  min-height: 30px;
  font-size: var(--text-xs);
}

.checkout {
  padding: 16px;
  border-top: 8px solid var(--wash);
}

.checkout-header {
  margin-bottom: 12px;
}

.checkout-header .eyebrow {
  display: none;
}

.checkout-header h3 {
  font-size: var(--text-lg);
}

.trust-bar {
  justify-content: flex-start;
  gap: 12px;
  overflow-x: auto;
}

.action-row.result-actions {
  display: none;
}

/* ════════════════ BRAND BOARD + HOME VISUAL PASS ════════════════ */
:root {
  --ink: #17181d;
  --muted: #676b75;
  --subtle: #9aa0aa;
  --line: #e8ebf0;
  --paper: #ffffff;
  --surface: #ffffff;
  --wash: #f4f6f8;
  --accent: #1e4640;
  --accent-strong: #173a35;
  --accent-soft: #e4edea;
  --credit: #9b7322;
  --rose: var(--accent);
  --wine: var(--accent);
  --gold: #d59f2f;
}

html,
body {
  background: #d9dbe1;
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  letter-spacing: 0;
}

body,
button,
input {
  font-synthesis-weight: none;
}

h1,
h2,
h3,
h4,
.brand-mark,
.wallet strong,
.home-section-head h2,
.work-info strong,
.rank-row strong,
.book-body h4,
.result-hero h2,
.preview-text-col h3,
.reader-page-title strong,
.dialog-card h3,
.chapter-comments h4,
.reader-next-block strong {
  font-weight: var(--fw-bold);
  letter-spacing: 0;
}

button,
.home-tabs button,
.continue-reading button,
.reward-mini span,
.reward-mini button,
.work-filter button,
.work-row b,
.rank-row b,
.tags span,
.meta-pill,
.chapter-btn,
.book-body button,
.dialog-close,
.plan,
.comment-input-row button,
.reader-next-block button {
  font-weight: var(--fw-bold);
}

.brand-mark {
  color: #111217;
  font-size: var(--text-md);
}

.brand-sub,
.wallet span {
  color: var(--muted);
}

.wallet {
  border-color: var(--line);
  background: #f9fafb;
}

.wallet.guest-wallet {
  background: #f7f8fa;
}

.wallet.guest-wallet span,
.wallet.guest-wallet strong {
  color: var(--muted);
}

.wallet strong {
  color: var(--accent);
}

.progress span,
.primary,
.checkout-btn,
.comment-input-row button,
.reader-next-block button,
.reader-paywall button,
.plan.primary-plan,
.dialog-action.primary {
  background: var(--accent);
  box-shadow: none;
}

.eyebrow,
.count,
.work-info em,
.rank-row b,
.book-topline strong,
.checkout-total strong,
.result-hero h2,
.reader-back:hover,
.meta-pill,
.tags span,
.dialog-kicker,
.interactive-new {
  color: var(--accent);
}

.topbar {
  border-bottom-color: var(--line);
}

.home-tabs {
  top: 52px;
  gap: 20px;
  border-bottom-color: var(--line);
  transition: top 220ms ease;
}

.app-shell.gnb-hidden .home-tabs {
  top: 0;
}

.home-tabs button {
  color: #69707c;
  font-size: var(--text-md);
}

.home-tabs button.active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.home-tabs {
  display: none !important;
}

.featured-banner {
  order: 2;
  position: relative;
  display: block;
  min-height: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #111217;
  color: #fff;
  text-align: left;
  aspect-ratio: 430 / 300;
  border-bottom: 8px solid var(--wash);
  box-shadow: none;
}

.featured-banner:hover {
  transform: none;
}

.featured-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}

.featured-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 16, 0.82) 0%, rgba(8, 10, 16, 0.48) 46%, rgba(8, 10, 16, 0.08) 100%),
    linear-gradient(0deg, rgba(8, 10, 16, 0.72) 0%, rgba(8, 10, 16, 0) 58%);
}

.featured-copy {
  position: absolute;
  left: 18px;
  right: 92px;
  bottom: 28px;
  display: grid;
  gap: 7px;
}

.featured-copy em {
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-semibold);
}

.featured-copy strong {
  color: #fff;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.16;
  word-break: keep-all;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.featured-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  line-height: 1.45;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-meta {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.continue-reading {
  order: 3;
  border-bottom-color: var(--wash);
}

.continue-copy span,
.continue-copy small {
  font-weight: var(--fw-medium);
}

.continue-copy strong {
  font-weight: var(--fw-bold);
}

.continue-reading button {
  background: var(--ink);
}

.reward-mini {
  order: 4;
}

.reward-mini button {
  border-color: #d5e2ff;
  background: var(--accent-soft);
  color: var(--accent);
}

.reward-mini button#adHomeBtn {
  border-color: #cceae7;
  background: #ecfdfa;
  color: var(--credit);
}

.reward-ad-dialog[hidden] {
  display: none;
}

.reward-ad-dialog {
  position: fixed;
  inset: 0;
  z-index: 34;
  display: grid;
  place-items: center;
  padding: 22px;
}

.reward-ad-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 23, 0.48);
  backdrop-filter: blur(8px);
}

.reward-ad-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 36px 90px rgba(17, 18, 23, 0.24);
  padding: 24px;
}

.reward-ad-card h3 {
  margin: 0 44px 14px 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.25;
}

.mock-ad-screen {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(36, 87, 214, 0.12), rgba(8, 117, 111, 0.13)),
    #f7f9ff;
  border: 1px solid #dfe7ff;
  padding: 44px 18px 16px;
  min-height: 190px;
}

.ad-sponsored {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.mock-ad-screen strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.25;
  margin-bottom: 8px;
}

.mock-ad-screen p {
  max-width: 260px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.55;
  margin: 0 0 30px;
}

.ad-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 87, 214, 0.14);
}

.ad-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 280ms ease;
}

#rewardAdTimer {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.ad-revenue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  margin: 14px 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--wash);
}

.ad-revenue-row span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.ad-revenue-row strong {
  color: var(--credit);
  font-size: var(--text-sm);
  text-align: right;
}

.reward-ad-card .dialog-primary:disabled {
  background: #d7dce7;
  color: #fff;
}

.auth-dialog[hidden] {
  display: none;
}

.auth-dialog {
  position: fixed;
  inset: 0;
  z-index: 38;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 23, 0.52);
  backdrop-filter: blur(8px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 18, 23, 0.22);
  padding: 26px 22px 22px;
}

.auth-card h3 {
  margin: 0 44px 8px 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.25;
}

.auth-card > p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.auth-account-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-account-panel[hidden] {
  display: none;
}

.auth-account-panel > div:first-child,
.auth-account-linked,
.auth-account-stats {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
}

.auth-account-panel span,
.auth-account-panel small {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.auth-account-panel strong {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}

.auth-account-linked strong {
  color: var(--accent);
}

.auth-account-stats {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.auth-account-stats strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.auth-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-account-actions button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

.auth-account-actions button:first-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.auth-consent {
  display: grid;
  gap: 8px;
  margin: 16px 0 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
}

.auth-consent[hidden] {
  display: none;
}

.auth-card [hidden] {
  display: none !important;
}

.auth-consent-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: flex-start;
  gap: 9px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  line-height: 1.45;
}

.auth-consent-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.auth-consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 27px;
}

.auth-consent-links button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.social-login-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.social-login {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

.social-login span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.social-login.google span {
  border: 1px solid #dfe3ea;
  color: #1f2937;
}

.social-login.kakao {
  border-color: #efe08a;
  background: #fff8cf;
}

.social-login.kakao span {
  background: #111;
  color: #fee500;
}

.auth-account-policy {
  margin: -4px 0 14px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f7f8fa;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  line-height: 1.5;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-xs);
  margin: 14px 0;
}

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

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.auth-form input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--ink);
  font-size: var(--text-base);
  outline: none;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-form input[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.field-error {
  min-height: 16px;
  color: #dc2626;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.creator-apply-dialog[hidden] {
  display: none;
}

.creator-apply-dialog,
.creator-review-dialog {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: grid;
  place-items: center;
  padding: 22px;
}

.creator-review-dialog[hidden] {
  display: none;
}

.creator-apply-backdrop,
.creator-review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 23, 0.52);
  backdrop-filter: blur(8px);
}

.creator-apply-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 18, 23, 0.22);
  padding: 26px 22px 22px;
}

.creator-review-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 36px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 18, 23, 0.22);
  padding: 26px 24px 22px;
}

.creator-apply-card h3 {
  margin: 0 44px 8px 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.25;
}

.creator-review-card h3 {
  margin: 0 44px 12px 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.25;
}

.creator-apply-card > p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.creator-apply-status {
  display: grid;
  gap: 6px;
  margin: 15px 0;
  padding: 14px;
  border: 1px solid #dbe4f5;
  border-radius: 12px;
  background: #f7f9ff;
}

.creator-apply-status[hidden],
.creator-apply-form[hidden] {
  display: none !important;
}

.creator-apply-status span {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  padding: 4px 9px;
}

.creator-apply-status strong {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

.creator-apply-status p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.creator-apply-form {
  display: grid;
  gap: 10px;
}

.creator-apply-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.creator-apply-form input,
.creator-apply-form select,
.creator-apply-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  outline: none;
}

.creator-apply-form input,
.creator-apply-form select {
  height: 44px;
  padding: 0 13px;
}

.creator-apply-form textarea {
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.55;
}

.creator-apply-form input:focus,
.creator-apply-form select:focus,
.creator-apply-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.creator-apply-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 4px;
}

.creator-review-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe4f5;
  border-radius: 12px;
  background: #f8fbff;
}

.creator-review-status span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.creator-review-status span[data-status="approved"] {
  background: #ecfdf3;
  color: #047857;
}

.creator-review-status span[data-status="reviewing"] {
  background: #eef4ff;
  color: var(--accent);
}

.creator-review-status span[data-status="hold"] {
  background: #fef3c7;
  color: #92400e;
}

.creator-review-status span[data-status="rejected"] {
  background: #fff1f2;
  color: #be123c;
}

.creator-review-status strong {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.creator-review-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.creator-review-meta div,
.creator-review-section,
.creator-review-memo {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.creator-review-meta div {
  padding: 12px;
}

.creator-review-meta dt {
  margin: 0 0 5px;
  color: var(--text-tertiary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.creator-review-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  word-break: break-all;
}

.creator-review-section {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 14px;
}

.creator-review-section h4,
.creator-review-memo {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.creator-review-section h4 {
  margin: 0;
}

.creator-review-section p,
.creator-review-section a {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.creator-review-section a {
  color: var(--accent);
  word-break: break-all;
}

.creator-review-section a[aria-disabled] {
  color: var(--text-tertiary);
  pointer-events: none;
}

.creator-review-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creator-review-checklist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
}

.creator-review-checklist span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #475569;
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.creator-review-checklist li.done span {
  background: #dcfce7;
  color: #047857;
}

.creator-review-checklist li.warn span {
  background: #fff7ed;
  color: #c2410c;
}

.creator-review-checklist strong {
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.creator-review-checklist small {
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  word-break: break-all;
}

.creator-review-memo {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
}

.creator-review-memo textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.55;
  resize: vertical;
}

.creator-review-memo textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.creator-review-actions {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr 1fr 1.2fr;
  gap: 8px;
  margin-top: 12px;
}

.creator-review-actions button {
  min-height: 42px;
  border-radius: 12px;
}

.creator-content-review-card {
  width: min(880px, 100%);
}

.creator-content-review-cover {
  float: left;
  width: 112px;
  aspect-ratio: 2 / 3;
  margin: 0 14px 10px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
}

.creator-content-review-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.creator-content-review-manuscript {
  clear: both;
}

.creator-content-review-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.creator-content-review-section-head span,
.creator-content-review-notice {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.creator-content-review-manuscript > article {
  max-height: 320px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 10px;
  background: #f7f8fa;
}

.creator-content-review-manuscript > article p {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.8;
  white-space: pre-wrap;
}

.creator-content-review-manuscript > article p:last-child {
  margin-bottom: 0;
}

.creator-content-review-notice {
  min-height: 18px;
  margin: 10px 2px 0;
  line-height: 1.5;
}

.creator-content-review-actions {
  grid-template-columns: 0.8fr 1fr 1fr 1.2fr;
}

.creator-content-review-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .creator-review-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .creator-review-meta,
  .creator-review-checklist,
  .creator-review-actions,
  .creator-content-review-actions {
    grid-template-columns: 1fr;
  }

  .creator-content-review-cover {
    float: none;
    width: 96px;
  }
}

.studio-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.studio-row-actions button,
.studio-row-actions b {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.studio-row-actions button {
  border: 1px solid #d9e0ee;
  background: #fff;
  color: var(--accent);
}

.studio-row-actions b {
  display: inline-flex;
  align-items: center;
  background: #f2f4f7;
  color: var(--text-secondary);
}

.author-application-row small {
  display: block;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: var(--text-2xs);
  word-break: break-all;
}

.studio-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.studio-panel-heading h3,
.studio-panel-heading p {
  margin: 0;
}

.studio-panel-heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.studio-panel-heading > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.creator-content-review-row {
  cursor: default;
}

.auth-form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-form-actions button,
.adult-verify-panel button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
}

.auth-form-actions button:first-child {
  background: #fff;
  color: var(--accent);
}

.adult-verify-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.adult-verify-panel > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adult-verify-panel span {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.adult-verify-panel strong {
  color: var(--muted);
  font-size: var(--text-sm);
}

.adult-verify-panel.verified strong {
  color: var(--accent);
}

.adult-verify-panel p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.adult-verify-panel button:disabled {
  border-color: #d7dce7;
  background: #d7dce7;
  color: #fff;
}

.creator-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  background: #f7f8fa;
}

.creator-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.creator-panel-head div {
  display: grid;
  gap: 3px;
}

.creator-panel-head span,
.creator-revenue span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.creator-panel-head strong {
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: 1.35;
}

.creator-panel-head em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #69707c;
  font-size: var(--text-2xs);
  font-style: normal;
  font-weight: var(--fw-bold);
}

.creator-panel-head em.active {
  background: #e8edf6;
  color: var(--text-secondary);
}

.creator-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.creator-flow span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #59606b;
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  text-align: center;
}

.creator-revenue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.creator-revenue div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.creator-revenue strong {
  color: var(--accent);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.creator-panel p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.creator-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.creator-actions button {
  min-height: 38px;
  border: 1px solid var(--color-accent);
  border-radius: 10px;
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.creator-actions button:nth-child(2) {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.creator-actions button:disabled {
  border-color: #e6eaf2;
  background: #e6eaf2;
  color: #8992a1;
}

.creator-published-shelf {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 8px solid #f2f4f8;
}

.auth-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--text-2xs);
  line-height: 1.45;
}

.onboarding-flow[hidden] {
  display: none;
}

.onboarding-flow {
  position: fixed;
  inset: 0;
  z-index: 42;
  isolation: isolate;
  display: grid;
  place-items: center;
  background: rgba(247, 249, 255, 0.98);
  touch-action: manipulation;
}

.onboarding-screen {
  position: relative;
  display: none;
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 86px 22px 26px;
  overflow-y: auto;
  background: #f8fafc;
  pointer-events: none;
}

.onboarding-screen.active {
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.onboarding-skip,
.onboarding-back {
  position: absolute;
  top: 54px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1;
  touch-action: manipulation;
}

.onboarding-skip {
  right: 24px;
}

.onboarding-back {
  left: 22px;
  color: var(--ink);
  font-size: var(--text-lg);
}

.onboarding-copy {
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.onboarding-copy h2 {
  margin: 6px 0 12px;
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: 1.22;
  word-break: keep-all;
}

.onboarding-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.onboarding-choice-status {
  display: inline-flex;
  min-height: 28px;
  margin-top: 10px;
  padding: 0 10px;
  align-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.onboarding-choice-status.warning {
  background: #fff4e6;
  color: #9b5b00;
}

.taste-card-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
}

.taste-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 104px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.taste-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 10px 24px rgba(36, 87, 214, 0.08);
}

.taste-icon {
  grid-row: 1 / 3;
  color: var(--accent);
  font-size: var(--text-display);
  font-weight: var(--fw-regular);
  line-height: 1;
}

.taste-card strong {
  justify-self: end;
  font-size: var(--text-lg);
}

.taste-card small {
  justify-self: end;
  color: var(--muted);
  font-size: var(--text-sm);
}

.genre-chip-grid {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  padding-bottom: 24px;
}

.genre-chip-grid p {
  flex: 0 0 100%;
  margin: 14px 0 0;
  color: #6b7280;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.genre-chip-grid button {
  position: relative;
  z-index: 1;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  touch-action: manipulation;
}

.genre-chip-grid button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.genre-chip-grid button.hot.active::after {
  content: "  HOT";
  color: #ff6b3d;
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
}

.onboarding-primary {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 58px;
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  box-shadow: 0 18px 34px rgba(36, 87, 214, 0.22);
}

.onboarding-recommend {
  background: #f8fafc;
}

.recommend-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 228px;
  background: linear-gradient(135deg, rgba(36, 87, 214, 0.18), rgba(17, 24, 39, 0.12));
  pointer-events: none;
}

.recommend-cover-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  margin: 44px -22px 24px 0;
  padding-left: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.recommend-cover-row::-webkit-scrollbar {
  display: none;
}

.recommend-cover {
  flex: 0 0 118px;
  height: 158px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.16);
  opacity: 0.76;
}

.recommend-cover.active {
  flex-basis: 144px;
  height: 196px;
  opacity: 1;
}

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

.recommend-copy {
  position: relative;
  z-index: 2;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.recommend-copy h2 {
  margin: 6px 0 10px;
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: 1.24;
}

.recommend-meta {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 14px;
  padding: 0 12px;
  border: 1px solid #d9e4ff;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.recommend-copy p {
  color: #4b5563;
  font-size: var(--text-base);
  line-height: 1.62;
}

.onboarding-preview {
  max-height: 178px;
  overflow: hidden;
  margin-top: 14px;
  padding: 14px 0 44px;
  border-top: 1px solid #eef2f7;
  color: #606773;
  font-size: var(--text-md);
  line-height: 1.85;
  mask-image: linear-gradient(#000 65%, transparent);
}

.onboarding-preview.expanded {
  max-height: none;
  mask-image: none;
  padding-bottom: 0;
}

.onboarding-preview p {
  margin: 0 0 10px;
}

.onboarding-synopsis-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid #d9e4ff;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.all-works {
  order: 5;
}

.ranking-section {
  order: 6;
}

.genre-strip {
  order: 7;
}

.hero {
  order: 99;
}

.home-section-head h2 {
  color: var(--ink);
  font-size: var(--text-lg);
}

.home-section-head > span {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: var(--fw-semibold);
}

.work-filter button {
  border-color: var(--line);
  color: #59606b;
}

.work-filter button.active {
  border-color: var(--ink);
  background: var(--ink);
}

.work-row {
  background: #fff;
}

.work-info strong {
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.28;
}

.work-info em,
.work-info small {
  font-weight: var(--fw-medium);
}

.work-row b {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}

.rank-num {
  color: var(--accent);
  font-weight: var(--fw-bold);
}

.rank-row strong {
  font-weight: var(--fw-bold);
}

.rank-row small {
  font-weight: var(--fw-medium);
}

.rank-row b {
  color: var(--accent);
}

.genre-strip-label {
  color: var(--ink);
  font-weight: var(--fw-bold);
}

.genre-card {
  border-color: var(--line);
}

.genre-card span {
  color: #4b5563;
  font-weight: var(--fw-semibold);
}

.result-hero h2 {
  font-family: 'Pretendard Variable', "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

.tags span,
.meta-pill {
  border-color: #d9e4ff;
  background: var(--accent-soft);
}

.book-card,
.rank-row,
.work-row {
  transition: background 140ms ease;
}

.book-card:hover,
.rank-row:hover,
.work-row:hover {
  transform: none;
  background: #fbfcff;
}

.book-body button,
.chapter-btn,
.reader-next-block button {
  background: var(--accent);
  color: #fff;
}

.dialog-close {
  color: var(--accent);
}

.app-shell :is(h1, h2, h3, h4, strong, b, button, .rank-num, .brand-mark, .wallet strong) {
  font-weight: var(--fw-semibold) !important;
}

.app-shell :is(p, span, small, em, input) {
  letter-spacing: 0;
}

.app-shell :is(.work-info em, .rank-row b, .hero-content > .eyebrow, .genre-strip-label, .reader-eyebrow, .book-topline strong) {
  color: var(--accent) !important;
}

.app-shell .brand-mark,
#intro :is(.home-tabs button, .home-section-head h2, .continue-copy strong, .work-info strong, .rank-row strong, .work-row b, .rank-row b, .reward-mini span, .reward-mini button, .work-filter button, .genre-card span),
.topbar :is(.brand-sub, .wallet strong) {
  font-weight: var(--fw-semibold) !important;
}

.featured-copy strong {
  font-weight: var(--fw-semibold) !important;
}

.featured-copy em,
.featured-copy small,
.work-info em,
.work-info small,
.rank-row small,
.continue-copy span,
.continue-copy small {
  font-weight: var(--fw-medium) !important;
}

.book-topline strong:empty {
  display: none;
}

.book-body button,
.book-body button.episode-lock-btn,
.chapter-btn,
.reader-next-block button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0;
  color: #fff !important;
  line-height: 1 !important;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.book-body button {
  height: 34px;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--ink) !important;
}

.book-body button.episode-lock-btn {
  background: var(--ink) !important;
  box-shadow: none !important;
}

.book-body button:hover,
.book-body button.episode-lock-btn:hover,
.chapter-btn:hover,
.reader-next-block button:hover {
  background: var(--accent) !important;
  color: #fff !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 430px) {
  .featured-banner {
    aspect-ratio: 430 / 306;
  }

  .featured-copy {
    right: 76px;
    bottom: 31px;
  }

  .featured-copy strong {
    font-size: var(--text-xl);
  }

  .featured-copy small {
    font-size: var(--text-sm);
  }
}

@media (max-width: 360px) {
  .featured-copy {
    right: 52px;
  }

  .featured-copy strong {
    font-size: var(--text-xl);
  }
}

/* ════════════════ BOTTOM GLOBAL NAVIGATION ════════════════ */
.quiz-panel {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.bottom-gnb {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 36;
  width: min(430px, 100vw);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-gnb button {
  min-width: 0;
  min-height: 52px;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 5px 0 3px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #8d949f;
  font-size: var(--text-2xs);
  line-height: 1;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-gnb button:hover,
.bottom-gnb button:focus-visible {
  background: rgba(36, 87, 214, 0.06);
  color: var(--accent);
}

.bottom-gnb button.active {
  background: rgba(36, 87, 214, 0.08);
  color: var(--accent);
}

.bottom-gnb-icon {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.bottom-gnb-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
}

.bottom-gnb-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-gnb button.active .bottom-gnb-icon path {
  stroke-width: 2;
}

.bottom-gnb strong {
  overflow: hidden;
  max-width: 100%;
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold) !important;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-nav-actions button.saved {
  border-color: rgba(36, 87, 214, 0.18);
  background: var(--accent-soft);
  color: var(--accent);
}

.library-page {
  min-height: calc(100vh - 64px);
  padding: var(--page-top-gap) var(--page-gutter) var(--page-bottom-gap);
  background: #fff;
}

.library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}

.library-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.library-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.recent-read-panel {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.recent-read-panel[hidden] {
  display: none !important;
}

.library-recent-panel {
  margin: 0 0 18px;
  padding: 12px;
}

.recent-read-panel img {
  width: 48px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: var(--neutral-100);
}

.recent-read-panel span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.recent-read-panel em {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-medium);
  line-height: 1.3;
}

.recent-read-panel strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-read-panel small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-read-panel button,
.recent-read-panel b {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.recent-read-panel:hover,
.recent-read-panel:focus-visible {
  border-color: var(--brand-primary-border);
  background: #fbfcff;
  transform: none;
}

.library-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.library-empty {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 72px 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.library-empty strong {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.library-empty p {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.library-empty button {
  height: 36px;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.library-empty .library-empty-secondary {
  margin-top: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-primary);
}

.library-empty small {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.library-work {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.library-work:hover,
.library-work:focus-visible {
  background: #fbfcff;
  transform: none;
}

.library-work img {
  width: 58px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
}

.library-work span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.library-work em,
.library-work small {
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-medium);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-work strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-work b {
  height: 30px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold) !important;
}

.auth-dialog,
.credit-dialog,
.reward-ad-dialog,
.onboarding-flow {
  z-index: 44;
}

@media (min-width: 431px) {
  .bottom-gnb {
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
}

/* ════════════════ PAGEON TYPE/COLOR NORMALIZATION ════════════════ */
:root {
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-display: 44px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 800;

  --color-accent: #1e4640;
  --text-primary: #17181d;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --subtle: var(--text-tertiary);
  --accent: var(--color-accent);
  --rose: var(--color-accent);
  --wine: var(--color-accent);
  --font-display: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-serif: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
}

html,
body,
button,
input,
textarea,
select {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
}

body {
  font-weight: var(--fw-regular);
}

.wallet strong,
#creditBalance,
.rank-num,
.work-info em,
.rank-row small,
.rank-row b,
.meta-pill,
.featured-meta,
.hero-meta,
.book-topline,
.library-count,
.creator-revenue strong,
.dialog-balance strong {
  font-variant-numeric: tabular-nums;
}

.app-shell :is(h1, h2, h3, h4, strong, b, button, .rank-num, .brand-mark, .wallet strong) {
  font-weight: var(--fw-semibold) !important;
}

.featured-copy strong,
.hero-content h1,
.result-hero h2,
.home-section-head h2,
.library-head h2 {
  font-weight: var(--fw-bold) !important;
}

.app-shell :is(p, small, em, span, input) {
  font-weight: var(--fw-regular);
}

.app-shell :is(button, .meta-pill, .work-row b, .rank-row b, .reward-mini button, .continue-reading button) {
  font-weight: var(--fw-medium) !important;
}

.work-info em,
.rank-row small,
.book-topline strong,
.library-work em,
.library-work small,
.featured-mini-info p,
.continue-copy small,
.result-author,
.result-summary,
.recommend-meta,
#bundleMeta,
#storyMeta,
#readerChapMeta,
#interactiveStepMeta,
#libraryCount {
  color: var(--text-secondary) !important;
}

.work-info em,
.rank-row small,
.recommend-meta,
.meta-pill {
  background: transparent;
  border-color: var(--line);
}

.work-info em:has(+ small),
.rank-row small,
.recommend-meta,
.meta-pill {
  font-weight: var(--fw-medium) !important;
}

.work-info em,
.rank-row small,
.recommend-meta,
.meta-pill,
.library-work em {
  color: var(--text-secondary) !important;
}

.rank-num {
  color: var(--text-primary) !important;
}

/* PAGEON DESIGN POLISH 20260624A */
:root {
  --brand-primary: #1e4640;
  --brand-primary-hover: #173a35;
  --brand-primary-soft: #e4edea;
  --brand-primary-border: #cbdcd6;
  --credit: #9b7322;
  --credit-strong: #7b5a16;
  --credit-soft: #f4ecd6;
  --credit-border: #e7d6a8;
  --promo: #b5402f;
  --promo-soft: #f7e9e5;
  --neutral-950: #17181d;
  --neutral-800: #2b2c32;
  --neutral-700: #4b4d55;
  --neutral-600: #62656f;
  --neutral-500: #81848d;
  --neutral-300: #e4e6eb;
  --neutral-200: #eff1f4;
  --neutral-100: #f7f8fa;
  --color-accent: var(--brand-primary);
  --accent: var(--brand-primary);
  --accent-soft: var(--brand-primary-soft);
  --wine: var(--brand-primary);
  --rose: var(--brand-primary);
  --gold: var(--credit);
  --ink: var(--neutral-950);
  --muted: var(--neutral-600);
  --line: var(--neutral-300);
  --wash: var(--neutral-100);
  --text-primary: var(--neutral-950);
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
}

body {
  background: #d9dadd !important;
}

.app-shell,
.quiz-panel {
  background: #fff !important;
}

.topbar {
  border-bottom-color: var(--neutral-200) !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

.brand-mark {
  color: var(--neutral-950) !important;
  font-weight: var(--fw-bold) !important;
  letter-spacing: 0 !important;
}

.brand-sub,
.brand-sep {
  color: var(--neutral-500) !important;
}

.wallet {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 5px 11px 5px 6px !important;
  border: 1px solid var(--credit-border) !important;
  border-radius: 999px !important;
  background: var(--credit-soft) !important;
  color: var(--credit-strong) !important;
  box-shadow: none !important;
}

.wallet::before {
  content: "C";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--credit);
  color: #fff;
  font-size: 9px;
  font-weight: var(--fw-bold);
  line-height: 1;
}

.wallet span {
  display: none !important;
}

.wallet strong,
#creditBalance {
  color: var(--credit-strong) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--fw-bold) !important;
}

.auth-entry {
  border-color: var(--neutral-200) !important;
  background: #fff !important;
  color: var(--neutral-800) !important;
}

.auth-entry:hover,
.auth-entry:focus-visible {
  border-color: var(--brand-primary-border) !important;
  color: var(--brand-primary) !important;
}

#intro .featured-banner {
  order: 1 !important;
}

.featured-banner {
  margin: 14px 16px 8px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 18px !important;
  aspect-ratio: 390 / 360 !important;
  background: #0d1413 !important;
  box-shadow: 0 16px 34px rgba(23, 24, 29, 0.12) !important;
}

.featured-banner img {
  object-position: center 18% !important;
  transform: scale(1.01);
}

.featured-shade {
  background:
    linear-gradient(180deg, rgba(9, 14, 13, 0.02) 0%, rgba(9, 14, 13, 0.08) 38%, rgba(9, 14, 13, 0.9) 100%),
    linear-gradient(90deg, rgba(9, 14, 13, 0.56) 0%, rgba(9, 14, 13, 0.1) 58%, rgba(9, 14, 13, 0.02) 100%) !important;
}

.featured-copy {
  right: 20px !important;
  bottom: 92px !important;
  left: 20px !important;
  gap: 8px !important;
}

.featured-copy em {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: var(--text-2xs) !important;
  font-weight: var(--fw-semibold) !important;
}

.featured-copy strong {
  max-width: 280px;
  font-size: 26px !important;
  line-height: 1.12 !important;
}

.featured-copy small {
  max-width: 300px;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--fw-medium) !important;
}

.featured-meta {
  bottom: 70px !important;
  left: 20px !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-medium) !important;
}

.featured-cta {
  position: absolute;
  right: 20px;
  bottom: 18px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  background: #fff;
  color: var(--brand-primary);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

#intro .continue-reading {
  order: 2 !important;
}

.continue-reading {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 10px 16px !important;
  border: 1px solid var(--neutral-200) !important;
  border-radius: 16px !important;
  background: var(--neutral-100) !important;
  box-shadow: none !important;
}

.continue-copy {
  min-width: 0;
}

.continue-copy span:first-child {
  color: var(--neutral-500) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-medium) !important;
}

.continue-copy strong {
  color: var(--neutral-950) !important;
  font-size: var(--text-base) !important;
  font-weight: var(--fw-semibold) !important;
}

.continue-copy small {
  color: var(--neutral-600) !important;
  font-size: var(--text-xs) !important;
}

.continue-progress {
  display: block !important;
  width: min(170px, 100%);
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e6eb;
}

.continue-progress i {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
}

.continue-reading button,
.featured-cta,
.chapter-btn,
.checkout-btn,
.dialog-primary,
.pay-btn,
.reader-next-block button,
.reader-paywall button,
.primary,
.primary.large {
  background: var(--brand-primary) !important;
  color: #fff !important;
}

.continue-reading button:hover,
.featured-cta:hover,
.chapter-btn:hover,
.checkout-btn:hover,
.dialog-primary:hover,
.pay-btn:hover,
.reader-next-block button:hover,
.reader-paywall button:hover,
.primary:hover,
.primary.large:hover {
  background: var(--brand-primary-hover) !important;
  color: #fff !important;
}

.featured-banner .featured-cta {
  background: #fff !important;
  color: var(--brand-primary) !important;
}

#intro .reward-mini {
  order: 9 !important;
}

.reward-mini {
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 12px 16px 18px !important;
  padding: 12px !important;
  border: 1px solid var(--neutral-200) !important;
  border-radius: 14px !important;
  background: var(--neutral-100) !important;
  box-shadow: none !important;
}

.reward-mini span {
  color: var(--neutral-800) !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--fw-semibold) !important;
}

.reward-mini button {
  min-height: 30px !important;
  padding: 0 10px !important;
  border-color: var(--brand-primary-border) !important;
  background: #fff !important;
  color: var(--brand-primary) !important;
}

.reward-mini button#adHomeBtn {
  border-color: var(--credit-border) !important;
  background: var(--credit-soft) !important;
  color: var(--credit-strong) !important;
}

.rail-badge,
.meta-pill,
.plan-badge {
  border-radius: 999px !important;
  font-weight: var(--fw-semibold) !important;
}

.rail-badge.free,
.work-row b,
.rank-row b,
.library-work b,
.book-body button,
.book-body button.episode-lock-btn,
.dialog-secondary,
.test-credit-pack {
  border-color: var(--brand-primary-border) !important;
  background: var(--brand-primary-soft) !important;
  color: var(--brand-primary) !important;
}

.rail-badge.complete {
  border-color: var(--neutral-300) !important;
  background: var(--neutral-100) !important;
  color: var(--neutral-700) !important;
}

.rail-badge.new,
.plan-badge {
  border-color: var(--credit-border) !important;
  background: var(--credit-soft) !important;
  color: var(--credit-strong) !important;
}

.interactive-new {
  background: var(--promo-soft) !important;
  color: var(--promo) !important;
}

.work-info em,
.rank-row small,
.recommend-meta,
.hero-meta span,
.featured-meta,
.meta-pill,
.result-author,
.result-summary,
.book-topline strong,
.library-work em,
.library-work small {
  color: var(--text-secondary) !important;
}

.rank-row b,
.work-row b,
.library-work b {
  border-radius: 999px !important;
  background: #fff !important;
}

.work-row:hover b,
.rank-row:hover b,
.library-work:hover b {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary-soft) !important;
  color: var(--brand-primary) !important;
}

.bottom-gnb {
  border-top-color: var(--neutral-200) !important;
  background: rgba(255, 255, 255, 0.98) !important;
}

.bottom-gnb button {
  color: var(--neutral-500) !important;
}

.bottom-gnb button.active,
.bottom-gnb button:hover,
.bottom-gnb button:focus-visible {
  color: var(--brand-primary) !important;
}

.bottom-gnb button.active .bottom-gnb-icon {
  background: var(--brand-primary-soft) !important;
}

.bottom-gnb button.active .bottom-gnb-icon path {
  stroke: var(--brand-primary) !important;
}

.dialog-primary {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary) !important;
}

.dialog-primary:disabled {
  border-color: var(--neutral-300) !important;
  background: var(--neutral-300) !important;
  color: #fff !important;
}

.dialog-secondary {
  border-color: var(--brand-primary-border) !important;
  background: #fff !important;
  color: var(--brand-primary) !important;
}

.dialog-balance,
.test-credit-note {
  background: var(--credit-soft) !important;
  color: var(--neutral-700) !important;
}

.dialog-balance strong,
.test-credit-pack span,
.plan-price,
.wallet strong {
  color: var(--credit-strong) !important;
}

.plan {
  border-color: var(--neutral-200) !important;
  background: #fff !important;
  box-shadow: none !important;
}

.plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.plan.active {
  border-color: var(--brand-primary) !important;
  background: linear-gradient(180deg, #fff, var(--brand-primary-soft)) !important;
}

.plan.disabled,
.plan:disabled {
  cursor: not-allowed !important;
  color: var(--text-tertiary) !important;
  background: var(--neutral-50) !important;
  border-color: var(--neutral-200) !important;
  opacity: 0.72;
}

.plan.disabled:hover,
.plan:disabled:hover {
  transform: none !important;
  border-color: var(--neutral-200) !important;
}

.plan.disabled .plan-badge,
.plan:disabled .plan-badge {
  background: var(--neutral-200) !important;
  color: var(--text-secondary) !important;
}

.plan.disabled .plan-name,
.plan:disabled .plan-name,
.plan.disabled .plan-price,
.plan:disabled .plan-price {
  color: var(--text-secondary) !important;
}

.my-menu-section {
  border-top: 8px solid var(--neutral-100);
  padding-top: 16px;
}

.my-menu-section h3 {
  color: var(--neutral-700) !important;
  font-size: var(--text-sm) !important;
}

.my-menu-list {
  border: 1px solid var(--neutral-200) !important;
  border-radius: 16px !important;
  overflow: hidden;
  background: #fff !important;
}

.my-menu-list button {
  border-bottom-color: var(--neutral-200) !important;
}

.my-menu-list button:last-child {
  border-bottom: 0 !important;
}

.my-menu-icon {
  background: var(--neutral-100) !important;
  color: var(--neutral-700) !important;
}

.creator-revenue strong,
.studio-primary,
.studio-secondary:hover {
  color: var(--brand-primary) !important;
}

/* MY PAGE / CATALOG READABILITY POLISH 20260624A */
.my-page {
  background: #fff !important;
}

.my-guest-card,
.my-account-summary {
  margin-bottom: var(--section-gap) !important;
  border-color: var(--neutral-200) !important;
  border-radius: 18px !important;
  background: var(--neutral-100) !important;
  box-shadow: none !important;
}

.my-guest-card strong,
.my-account-summary strong {
  font-size: 18px !important;
  line-height: 1.32 !important;
}

.my-guest-actions button {
  border-radius: 12px !important;
}

.my-menu-section {
  margin: 0 -16px !important;
  padding: 16px 16px 0 !important;
  border-top: 8px solid var(--neutral-100) !important;
}

.my-menu-section h3 {
  margin: 0 0 8px !important;
  color: var(--neutral-600) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-semibold) !important;
}

.my-menu-list {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.my-menu-list :is(button, a) {
  min-height: 54px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--neutral-200) !important;
  background: transparent !important;
}

.my-menu-list :is(button, a):last-child {
  border-bottom: 0 !important;
}

.my-menu-icon {
  width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
}

.my-menu-list strong {
  font-size: var(--text-sm) !important;
}

.my-menu-list small,
.my-menu-list em {
  color: var(--neutral-500) !important;
  font-size: var(--text-xs) !important;
}

.catalog-page {
  background: #fff !important;
}

.catalog-head {
  align-items: center !important;
  border-bottom: 0 !important;
}

.catalog-head .eyebrow {
  display: none !important;
}

.catalog-head h2 {
  font-size: 30px !important;
}

.catalog-head .meta-pill {
  border-color: var(--neutral-200) !important;
  background: var(--neutral-100) !important;
  color: var(--neutral-600) !important;
}

.catalog-page .work-filter {
  margin: 2px -16px 0 !important;
  padding: 0 16px 12px !important;
  border-bottom: 8px solid var(--neutral-100);
}

.catalog-page .work-filter button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 13px !important;
  border-color: var(--neutral-200) !important;
  background: #fff !important;
  color: var(--neutral-600) !important;
  font-size: var(--text-xs) !important;
}

.catalog-page .work-filter button.active {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary) !important;
  color: #fff !important;
}

.catalog-page .work-list {
  gap: 0 !important;
}

.catalog-page .work-row {
  grid-template-columns: 56px minmax(0, 1fr) 24px !important;
  gap: 12px !important;
  min-height: 92px !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid var(--neutral-200) !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.catalog-page .work-row img {
  width: 56px !important;
  height: 84px !important;
  border-radius: 8px !important;
}

.catalog-page .work-info {
  align-self: center;
  gap: 5px !important;
  min-width: 0;
}

.catalog-page .work-info strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: var(--neutral-950) !important;
  font-size: 15px !important;
  font-weight: var(--fw-semibold) !important;
  line-height: 1.25 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.catalog-page .work-info em {
  display: block !important;
  overflow: hidden !important;
  max-width: 100%;
  color: var(--neutral-600) !important;
  font-size: var(--text-xs) !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.catalog-page .work-info small {
  display: none !important;
}

.catalog-page .work-row b {
  position: relative;
  align-self: center;
  width: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
}

.catalog-page .work-row b::after {
  content: "›";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--neutral-400, #a1a1aa);
  font-size: 22px;
  font-weight: var(--fw-medium);
}

.catalog-page .work-row:hover b,
.catalog-page .work-row:focus-visible b {
  background: transparent !important;
}

.catalog-page .work-row:hover b::after,
.catalog-page .work-row:focus-visible b::after {
  color: var(--brand-primary);
}

.adult-category-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 28px 0 8px;
  padding: 34px 24px;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: var(--neutral-50);
  text-align: center;
}

.adult-category-empty[hidden] {
  display: none !important;
}

.adult-category-empty span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(30, 70, 64, 0.08);
  color: var(--brand-primary);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.adult-category-empty strong {
  color: var(--neutral-950);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

.adult-category-empty p {
  max-width: 280px;
  margin: 0;
  color: var(--neutral-600);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.adult-category-empty button {
  min-height: 40px;
  margin-top: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.reader-active .bottom-gnb {
  display: none;
}

.reader-page-topbar {
  top: 0 !important;
  z-index: 40 !important;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.06);
}

#reader.screen {
  padding-bottom: 94px !important;
}

.reader-next-block {
  align-items: stretch !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  border-radius: 16px !important;
  background: #f7f8fa !important;
  box-shadow: none !important;
}

.reader-next-summary {
  min-width: 0;
}

.reader-next-cta {
  align-self: center;
  min-height: 38px !important;
  min-width: 104px;
  padding: 0 15px !important;
  border-radius: 999px !important;
  border: 1px solid var(--color-accent) !important;
  background: #fff !important;
  color: var(--color-accent) !important;
  box-shadow: none !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-semibold) !important;
  white-space: nowrap;
}

.reader-floating-nav {
  position: fixed;
  right: max(60px, calc((100vw - 430px) / 2 + 60px));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(60px, calc((100vw - 430px) / 2 + 60px));
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  gap: 4px;
  max-width: 310px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(23, 24, 29, 0.9);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.16);
  backdrop-filter: blur(14px);
}

.reader-floating-nav[hidden] {
  display: none !important;
}

.reader-floating-nav button {
  width: 100%;
  min-height: 34px;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.reader-floating-nav .reader-nav-secondary,
.reader-floating-nav .reader-nav-ghost {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.reader-floating-nav .reader-nav-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.reader-floating-nav button:not(.reader-nav-secondary):not(.reader-nav-ghost) {
  color: var(--text-primary);
}

.reader-floating-nav button:disabled {
  background: transparent;
  color: rgba(255, 255, 255, 0.34);
}

.test-credit-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.credit-benefit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.credit-benefit-actions .dialog-secondary {
  min-height: 42px;
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.test-credit-pack {
  min-height: 74px !important;
  border: 1px solid #d9e0ee;
  border-radius: 14px !important;
  background: #f7f8fa;
  color: var(--text-primary);
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  font-weight: var(--fw-semibold) !important;
}

.test-credit-pack span {
  color: var(--credit);
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}

.test-credit-pack small {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.test-credit-note {
  margin: 2px 0 0 !important;
  color: var(--text-tertiary) !important;
  font-size: var(--text-xs);
  line-height: 1.45 !important;
  text-align: center;
}

.topbar-brand {
  gap: 7px !important;
}

.brand-logo {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  display: block;
  box-shadow: 0 5px 12px rgba(36, 87, 214, 0.18);
}

.auth-entry {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 58px !important;
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 999px !important;
  border-color: #d8dde7 !important;
  background: #fff !important;
  text-align: center !important;
}

.auth-entry span {
  font-size: var(--text-sm) !important;
  font-weight: var(--fw-semibold) !important;
  line-height: 1 !important;
}

.auth-entry strong,
.auth-entry strong[hidden] {
  display: none !important;
}

.auth-entry.verified {
  border-color: rgba(36, 87, 214, 0.2) !important;
  background: #f2f5ff !important;
  color: var(--color-accent) !important;
}

/* ════════════════ PAGEON UX POLISH PASS 2 ════════════════ */
.app-shell .work-info em,
.app-shell .rank-row small,
.app-shell .recommend-meta,
.app-shell .meta-pill,
.app-shell .hero-meta span,
.app-shell .featured-meta,
.app-shell .book-topline span,
.app-shell .book-topline strong,
.app-shell .tags span,
.app-shell .library-work em,
.app-shell .library-work small {
  color: var(--text-secondary) !important;
}

.app-shell :is(.tags span, .meta-pill) {
  border-color: var(--line) !important;
  background: #f7f8fa !important;
  font-weight: var(--fw-medium) !important;
}

.preview-text-col .reader {
  position: relative;
  max-height: 142px;
  overflow: hidden !important;
  overscroll-behavior: auto;
  scrollbar-width: none;
}

.preview-text-col .reader::-webkit-scrollbar {
  display: none;
}

.preview-text-col .reader::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 48px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(250, 250, 250, 0), #fafafa 84%);
}

.chapter-btn,
.checkout-btn,
.dialog-primary,
.pay-btn,
.reader-next-block button,
.reader-paywall button,
.primary,
.primary.large {
  background: var(--color-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

.chapter-btn:hover,
.checkout-btn:hover,
.dialog-primary:hover,
.pay-btn:hover,
.reader-next-block button:hover,
.reader-paywall button:hover,
.primary:hover,
.primary.large:hover {
  background: #1f4bbb !important;
  color: #fff !important;
}

.book-body button,
.book-body button.episode-lock-btn {
  border: 1px solid #d9e0ee !important;
  background: #fff !important;
  color: var(--color-accent) !important;
  box-shadow: none !important;
}

.book-body button:hover,
.book-body button.episode-lock-btn:hover {
  border-color: var(--color-accent) !important;
  background: #f5f8ff !important;
  color: var(--color-accent) !important;
}

.result-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.result-nav-actions button {
  min-height: 38px;
  padding: 0 14px;
  border-color: #d9e0ee !important;
  background: #fff !important;
  color: var(--color-accent) !important;
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

.result-nav-actions #resultWorksBtn {
  border-color: var(--ink) !important;
  background: var(--ink) !important;
  color: #fff !important;
}

.result-nav-actions #resultSaveBtn {
  border-color: var(--color-accent) !important;
  background: #f5f8ff !important;
}

.result-nav-actions #resultSaveBtn.saved {
  border-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: #fff !important;
}

.result-nav-actions #resultLibraryBtn {
  min-width: 104px;
}

.result-nav-actions #resultLibraryBtn[hidden] {
  display: none;
}

.result-continue-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 14px 0 var(--section-gap);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.result-continue-panel[hidden] {
  display: none !important;
}

.result-continue-panel span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.result-continue-panel em {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-medium);
}

.result-continue-panel strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-continue-panel small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-continue-panel button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--brand-primary);
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

/* ════════════════ ACCOUNT / MY PAGE POLISH ════════════════ */
.my-page {
  min-height: calc(100vh - 64px);
  padding: var(--page-top-gap) var(--page-gutter) var(--page-bottom-gap);
  background: #f7f8fa;
}

.my-desc {
  margin: 14px 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.my-guest-card {
  display: grid;
  gap: 14px;
  margin: 0 0 var(--section-gap);
  padding: var(--card-padding);
  border: 1px solid #e1e6ef;
  border-radius: 16px;
  background: #fff;
}

.my-guest-card[hidden] {
  display: none;
}

.my-guest-card span {
  display: inline-flex;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.my-guest-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}

.my-guest-card p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-regular);
  line-height: 1.55;
}

.my-guest-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.my-guest-actions button {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.my-guest-actions button:nth-child(2) {
  background: #fff;
  color: var(--color-accent);
}

.my-account-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 14px;
  margin: 0 0 var(--section-gap);
  padding: 24px;
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: var(--neutral-100);
}

.my-account-summary[hidden] {
  display: none;
}

.my-account-avatar {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #e8f0ed;
  color: var(--brand-primary);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.my-account-main {
  min-width: 0;
}

.my-account-main span {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.my-account-main strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
}

.my-account-main p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: 1.45;
}

.my-account-main small {
  display: block;
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.my-account-actions {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.my-account-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #d8dde7;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.my-account-actions button[hidden] {
  display: none;
}

.my-account-actions button:first-child {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.my-wallet-panel {
  overflow: hidden;
  margin: 0 0 var(--section-gap);
  border: 1px solid var(--neutral-200);
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.my-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
}

.my-wallet-head div {
  min-width: 0;
}

.my-wallet-head span {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.my-wallet-head strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

.my-wallet-head small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: 1.4;
}

.my-wallet-head button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--brand-primary-border);
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.my-pass-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--neutral-100);
}

.my-pass-empty {
  margin: 0;
  padding: 14px 20px 16px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
}

.my-pass-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--neutral-100);
  background: #fff;
}

.my-pass-item:last-child {
  border-bottom: 0;
}

.my-pass-item strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}

.my-pass-item small,
.my-pass-item span {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: 1.35;
}

.my-pass-item span {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.my-pass-item .mini-link {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  line-height: 1;
}

.my-pass-item .subscription-cancelled {
  padding: 0;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.my-panel {
  margin-top: 12px;
}

.my-menu-section {
  margin: 16px 0 0;
}

.my-menu-section h3 {
  margin: 0 2px 8px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.my-recent-panel {
  min-height: 72px;
  padding: 12px;
  border-color: #e1e6ef;
}

.my-recent-panel b {
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}

.my-menu-list {
  display: grid;
  border: 1px solid #e1e6ef;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.my-menu-list :is(button, a) {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.my-menu-list :is(button, a):last-child {
  border-bottom: 0;
}

.my-menu-list button:disabled {
  color: var(--text-secondary);
  cursor: default;
}

.my-menu-list.compact :is(button, a) {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
}

.my-menu-list.no-icon :is(button, a) {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-left: 0;
}

.my-menu-list.no-icon em {
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.my-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f0f3f8;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.my-menu-list strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  line-height: 1.35;
}

.my-menu-list small {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: 1.35;
}

.my-menu-list b,
.my-menu-list em {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--fw-medium);
}

.my-menu-list em {
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  font-size: var(--text-2xs);
}

.my-menu-list em.active {
  background: transparent;
  color: var(--brand-primary);
}

.qa-role-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #c8d4ea;
  border-radius: 14px;
  background: #f8faff;
}

.qa-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qa-role-head span,
.qa-role-card p {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
  line-height: 1.45;
}

.qa-role-head strong {
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.qa-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.qa-role-grid button {
  min-height: 34px;
  border: 1px solid #dce3f0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.qa-role-grid button.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

.qa-role-card p {
  margin: 0;
}

.legal-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.legal-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.legal-panel-head div {
  display: grid;
  gap: 4px;
}

.legal-panel-head span,
.legal-panel-head em {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-medium);
}

.legal-panel-head strong {
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
}

.legal-link-list {
  display: grid;
  gap: 8px;
}

.legal-link-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.legal-link-list button::after {
  content: "›";
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  line-height: 1;
}

.legal-link-list span {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

.legal-link-list small {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
}

.policy-page {
  min-height: calc(100vh - 64px);
  padding: var(--page-top-gap) var(--page-gutter) var(--page-bottom-gap);
  background: #fff;
}

.policy-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.policy-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.policy-head h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.policy-head p:last-child {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.policy-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  padding: 4px;
  border-radius: 12px;
  background: #f4f6fa;
}

.policy-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.policy-tabs button.active {
  background: #fff;
  color: var(--color-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.policy-content {
  border-top: 1px solid var(--line);
}

.policy-content section {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.policy-content h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: 1.45;
}

.policy-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.65;
  word-break: keep-all;
}

.policy-content p + p {
  margin-top: 8px;
}

.policy-business-info dl {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.policy-business-info div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.policy-business-info div:last-child {
  border-bottom: 0;
}

.policy-business-info dt,
.policy-business-info dd {
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.45;
}

.policy-business-info dt {
  color: var(--text-tertiary);
  font-weight: var(--fw-medium);
}

.policy-business-info dd {
  color: var(--text-secondary);
  font-weight: var(--fw-regular);
  word-break: keep-all;
}

.policy-updated {
  padding-top: 16px;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--fw-regular);
}

/* ════════════════ CREATOR STUDIO ════════════════ */
.creator-studio-page {
  min-height: calc(100vh - 64px);
  padding: var(--page-top-gap) var(--page-gutter) var(--page-bottom-gap);
  background: #fff;
}

.studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.studio-hero {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #fff);
  margin-bottom: 14px;
}

.studio-hero h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: var(--text-xl);
  line-height: 1.18;
}

.studio-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.48;
}

.studio-status-card {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: #f7f9ff;
}

.studio-status-card span,
.studio-status-card small {
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
}

.studio-status-card strong {
  color: var(--accent);
  font-size: var(--text-lg);
  line-height: 1;
}

.studio-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.studio-nav button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-nav button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.studio-nav button:disabled {
  opacity: 0.42;
}

.studio-view {
  display: none;
}

.studio-view.active {
  display: block;
}

.studio-apply-card,
.studio-dashboard-head {
  margin-bottom: 14px;
}

.studio-apply-card h3,
.studio-dashboard-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.studio-apply-card p,
.studio-dashboard-head p,
.studio-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.studio-primary {
  min-height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-secondary {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe4f5;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-secondary:hover {
  border-color: #b8c7e6;
  background: #f8fbff;
}

.studio-dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f8fa;
}

.studio-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.studio-action-row button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-series-list,
.episode-manager-list {
  display: grid;
  gap: 10px;
}

.studio-empty {
  display: grid;
  gap: 8px;
  padding: 22px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}

.studio-empty strong {
  color: var(--ink);
  font-size: var(--text-md);
}

.studio-empty p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.studio-empty button {
  justify-self: start;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: var(--text-sm);
}

.studio-series-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.studio-series-card img {
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
}

.studio-series-card div {
  min-width: 0;
}

.studio-series-card span,
.studio-series-card small,
.episode-manager-row p {
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.studio-series-card strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.32;
}

.studio-series-card p {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.studio-series-card button,
.episode-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.episode-manager-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.episode-manager-row strong {
  color: var(--ink);
  font-size: var(--text-sm);
}

.episode-manager-row p {
  margin: 4px 0 0;
}

.episode-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.episode-state.published {
  background: #eaf2ff;
  color: var(--accent);
}

.episode-state.scheduled {
  background: #fff7e8;
  color: #b45309;
}

.episode-state.hidden {
  background: #f3f4f6;
  color: #6b7280;
}

.episode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.studio-check-label {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.studio-check-label input {
  width: 18px;
  height: 18px;
}

.author-note-box {
  display: grid;
  gap: 8px;
}

.author-note-box summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.editor-toolbar {
  grid-template-columns: auto auto 1fr auto auto auto;
}

.word-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.word-guide.good {
  background: #ecfdf3;
  color: #15803d;
}

.word-guide.long {
  background: #fffbeb;
  color: #b45309;
}

.author-note-preview {
  margin-top: 18px !important;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

@media (min-width: 900px) {
  .studio-editor-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  }

  .studio-preview {
    position: sticky;
    top: 84px;
  }
}

@media (max-width: 520px) {
  .studio-dashboard-head,
  .studio-series-card,
  .episode-manager-row {
    grid-template-columns: 1fr;
  }

  .studio-action-row,
  .episode-actions {
    justify-content: stretch;
  }

  .editor-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.studio-form,
.studio-preview {
  display: grid;
  gap: 12px;
}

.studio-preview {
  position: static;
}

.studio-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.studio-card-head {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
}

.studio-card-head.compact {
  grid-template-columns: 38px 1fr;
}

.studio-card-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.studio-card-head h3,
.checklist-card h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: var(--text-md);
}

.studio-card-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.45;
}

.studio-card label {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.studio-card input,
.studio-card select,
.studio-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  outline: none;
}

.studio-card input,
.studio-card select {
  height: 44px;
  padding: 0 12px;
}

.studio-card textarea {
  min-height: 126px;
  padding: 12px;
  line-height: 1.62;
  resize: vertical;
}

.studio-card input:focus,
.studio-card select:focus,
.studio-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.studio-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.thumbnail-uploader {
  grid-template-columns: 76px 1fr;
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
}

.thumbnail-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.thumbnail-uploader img {
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
}

.thumbnail-uploader span {
  display: grid;
  gap: 5px;
}

.thumbnail-uploader strong {
  color: var(--ink);
  font-size: var(--text-base);
}

.thumbnail-uploader small {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.studio-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 8px;
  align-items: center;
}

.studio-toolbar span {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.studio-toolbar button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-toolbar button:last-child {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.studio-toolbar button:disabled {
  border-color: #d7dce7;
  background: #d7dce7;
  color: #fff;
}

.creator-work-preview {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: start;
}

.creator-work-preview img {
  width: 82px;
  aspect-ratio: 2 / 3;
  border-radius: 11px;
  object-fit: cover;
}

.creator-work-preview strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.28;
}

.creator-work-preview span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.38;
}

.creator-work-preview p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.creator-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.creator-keywords span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.creator-episode-preview {
  max-height: 260px;
  overflow: hidden;
  color: #3f4652;
  font-size: var(--text-base);
  line-height: 1.85;
  mask-image: linear-gradient(#000 78%, transparent);
}

.creator-episode-preview p {
  margin: 0 0 12px;
}

.checklist-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist-card li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.checklist-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.checklist-card li.done {
  color: var(--accent);
}

.checklist-card li.done::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}

.checklist-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.creator-actions button:nth-child(2) {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

@media (max-width: 900px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .studio-preview {
    position: static;
  }
}

@media (max-width: 430px) {
  .creator-studio-page {
    padding: 16px 14px 104px;
  }

  .studio-hero,
  .studio-layout,
  .studio-form,
  .studio-preview {
    gap: 10px;
  }

  .studio-hero {
    grid-template-columns: 1fr;
  }

  .studio-card {
    padding: 14px;
    border-radius: 14px;
  }

  .studio-grid-2,
  .studio-toolbar {
    grid-template-columns: 1fr;
  }

  .studio-toolbar button {
    width: 100%;
  }
}

#intro #allWorks {
  display: none;
}

#intro .hero {
  display: none;
}

#intro .featured-banner { order: 1; }

/* ════════════════ PAGEON STUDIO DESKTOP CONSOLE ════════════════ */
body.studio-mode {
  background: #f5f7fb;
}

body.studio-mode .app-shell {
  display: block;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

body.studio-mode .quiz-panel {
  height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f5f7fb;
  box-shadow: none;
  overflow: auto;
}

body.studio-mode .insight-panel,
body.studio-mode .topbar,
body.studio-mode .progress,
body.studio-mode .bottom-gnb {
  display: none;
}

body.studio-mode .screen.active {
  min-height: 100vh;
}

body.studio-mode .creator-studio-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  padding: 0;
  background: #f5f7fb;
}

.studio-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.studio-home-link {
  align-self: flex-start;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.studio-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 2px 10px;
}

.studio-brand img {
  width: 34px;
  height: 34px;
}

.studio-brand strong {
  display: block;
  color: #0f172a;
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.studio-brand span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: var(--text-xs);
}

body.studio-mode .studio-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
}

body.studio-mode .studio-nav[hidden],
body.studio-mode .studio-side-note[hidden] {
  display: none !important;
}

body.studio-mode .studio-nav button {
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  text-align: left;
  font-size: var(--text-sm);
}

body.studio-mode .studio-nav button.active {
  background: #eef4ff;
  color: var(--accent);
}

body.studio-mode .studio-nav button:disabled {
  opacity: 0.45;
}

.studio-side-note {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: #f8fbff;
}

.studio-side-note span,
.studio-side-note small {
  color: #64748b;
  font-size: var(--text-xs);
  line-height: 1.45;
}

.studio-side-note strong {
  color: #0f172a;
  font-size: var(--text-sm);
}

.studio-main {
  width: min(1180px, 100%);
  padding: 32px;
}

body.studio-mode .studio-hero {
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
}

body.studio-mode .studio-hero h2 {
  font-size: var(--text-xl);
}

/* ════════════════ PAGEON OPERATIONS ADMIN ════════════════ */
body.admin-mode {
  background: #f4f6f8;
}

body.admin-mode .app-shell {
  display: block;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

body.admin-mode .quiz-panel {
  height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f4f6f8;
  box-shadow: none;
  overflow: auto;
}

body.admin-mode .insight-panel,
body.admin-mode .topbar,
body.admin-mode .progress,
body.admin-mode .bottom-gnb {
  display: none;
}

body.admin-mode .screen.active {
  min-height: 100vh;
}

.reader-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.reader-report-btn {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.reader-report-btn:hover {
  border-color: #aab4b1;
  background: #f7f8f8;
  color: var(--text-secondary);
}

.service-request-dialog[hidden],
.admin-case-dialog[hidden],
.announcement-dialog[hidden] {
  display: none;
}

.service-request-dialog,
.admin-case-dialog,
.announcement-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.service-request-backdrop,
.admin-case-backdrop,
.notice-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 26, 0.5);
  backdrop-filter: blur(5px);
}

.service-request-card,
.admin-case-card,
.notice-dialog-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 28px;
  border: 1px solid #dde3e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(21, 32, 29, 0.22);
}

.service-request-card h3,
.admin-case-card h3,
.notice-dialog-card h3 {
  margin: 0;
  padding-right: 52px;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

.service-request-card > p {
  margin: 8px 0 20px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.service-request-form {
  display: grid;
  gap: 15px;
}

.service-request-form label,
.admin-case-field {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.service-request-form input,
.service-request-form select,
.service-request-form textarea,
.admin-case-field select,
.admin-case-field textarea {
  width: 100%;
  border: 1px solid #d9dfdd;
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  font-weight: var(--fw-regular);
}

.notice-reader-list {
  display: grid;
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.notice-reader-item {
  border-bottom: 1px solid #e5e7eb;
}

.notice-reader-item summary {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.notice-reader-item summary::-webkit-details-marker {
  display: none;
}

.notice-reader-item summary span {
  display: grid;
  gap: 5px;
}

.notice-reader-item summary strong {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.notice-reader-item summary small {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.notice-reader-item summary b {
  color: var(--text-tertiary);
  font-weight: var(--fw-medium);
  transform: rotate(90deg);
  transition: transform 160ms ease;
}

.notice-reader-item[open] summary b {
  transform: rotate(-90deg);
}

.notice-reader-item > p {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.notice-admin-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.notice-admin-form label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.notice-admin-form input[type="text"],
.notice-admin-form textarea {
  width: 100%;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  font: inherit;
  font-weight: var(--fw-regular);
  padding: 13px 14px;
}

.notice-admin-form textarea {
  resize: vertical;
  line-height: 1.65;
}

.notice-admin-form .notice-publish-check {
  display: flex;
  align-items: center;
  grid-template-columns: none;
  gap: 9px;
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}

.notice-publish-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

.service-request-form input,
.service-request-form select,
.admin-case-field select {
  min-height: 44px;
  padding: 0 12px;
}

.service-request-form textarea,
.admin-case-field textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.service-request-confirm {
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: start;
  gap: 10px !important;
  padding: 12px;
  border-radius: 8px;
  background: #f7f8f8;
  font-weight: var(--fw-regular) !important;
  line-height: 1.55;
}

.service-request-confirm input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.service-request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.service-request-actions button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
}

.service-request-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e9e7;
}

.service-request-history-head,
.service-request-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.service-request-history-head {
  margin-bottom: 8px;
}

.service-request-history-head strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.service-request-history-head span,
.service-request-history-row small {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.service-request-history-row {
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ef;
}

.service-request-history-row > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.service-request-history-row strong {
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-request-history-row em {
  flex: 0 0 auto;
  color: #315a53;
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: var(--fw-semibold);
}

.service-request-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--text-tertiary);
  text-align: center;
  font-size: var(--text-sm);
}

.service-request-cancel-btn {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 1px solid #d8dedc;
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.admin-deletion-surface {
  margin-top: 18px;
}

.admin-case-open-btn {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #ccd6d3;
  border-radius: 6px;
  background: #fff;
  color: #27534b;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.admin-case-open-btn:hover {
  background: #edf3f1;
}

.admin-case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
  border: 1px solid #e1e6e4;
  border-radius: 8px;
  overflow: hidden;
}

.admin-case-meta > div {
  padding: 12px;
}

.admin-case-meta > div + div {
  border-left: 1px solid #e1e6e4;
}

.admin-case-meta dt {
  color: #7a8582;
  font-size: var(--text-xs);
}

.admin-case-meta dd {
  margin: 4px 0 0;
  color: #26312e;
  font-size: var(--text-sm);
  word-break: break-all;
}

.admin-case-content {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #f6f8f7;
}

.admin-case-content h4 {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.admin-case-content p {
  margin: 0;
  color: #55615e;
  font-size: var(--text-sm);
  line-height: 1.7;
  white-space: pre-wrap;
}

.admin-case-field + .admin-case-field {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .reader-page-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .reader-top-actions .meta-pill {
    display: none;
  }

  .service-request-dialog,
  .admin-case-dialog,
  .announcement-dialog {
    align-items: end;
    padding: 0;
  }

  .service-request-card,
  .admin-case-card,
  .notice-dialog-card {
    width: 100%;
    max-height: 92vh;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  .admin-case-meta {
    grid-template-columns: 1fr;
  }

  .admin-case-meta > div + div {
    border-top: 1px solid #e1e6e4;
    border-left: 0;
  }
}

.admin-console-page {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  color: #17201e;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid #e1e6e4;
  background: #fff;
}

.admin-home-link,
.admin-refresh-btn {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d9dfdd;
  border-radius: 8px;
  background: #fff;
  color: #42504c;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.admin-home-link {
  align-self: flex-start;
}

.admin-home-link:hover,
.admin-refresh-btn:hover {
  border-color: #9eb1ac;
  background: #f7faf9;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
}

.admin-brand img {
  width: 36px;
  height: 36px;
}

.admin-brand strong,
.admin-brand span {
  display: block;
}

.admin-brand strong {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
}

.admin-brand span {
  margin-top: 2px;
  color: #7a8582;
  font-size: var(--text-xs);
}

.admin-console-nav {
  display: grid;
  gap: 4px;
}

.admin-console-nav button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #52605c;
  text-align: left;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
}

.admin-console-nav button:hover {
  background: #f3f6f5;
}

.admin-console-nav button.active {
  background: #e7efec;
  color: #1e5048;
  font-weight: var(--fw-semibold);
}

.admin-side-status {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid #e4e9e7;
}

.admin-side-status span,
.admin-side-status small {
  color: #77827f;
  font-size: var(--text-xs);
  line-height: 1.5;
}

.admin-side-status strong {
  color: #244b45;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.admin-console-main {
  width: min(1320px, 100%);
  padding: 28px 32px 64px;
}

.admin-console-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dfe5e3;
}

.admin-kicker {
  margin: 0 0 6px;
  color: #55716a;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.admin-console-header h2 {
  margin: 0;
  color: #17201e;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
}

.admin-console-header p:not(.admin-kicker) {
  margin: 6px 0 0;
  color: #6c7774;
  font-size: var(--text-sm);
}

.admin-console-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-range-control {
  display: flex;
  padding: 3px;
  border: 1px solid #d9dfdd;
  border-radius: 8px;
  background: #fff;
}

.admin-range-control button {
  min-width: 54px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #697572;
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
}

.admin-range-control button.active {
  background: #244f48;
  color: #fff;
}

.admin-console-feedback {
  min-height: 20px;
  margin: 12px 0 10px;
  color: #7b8582;
  font-size: var(--text-xs);
}

.admin-console-feedback.error {
  color: #b42318;
}

.admin-live-data-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #f2f8f6;
  color: #47615c;
  font-size: var(--text-sm);
}

.admin-live-data-notice[hidden] {
  display: none;
}

.admin-live-data-notice strong {
  flex: 0 0 auto;
  color: var(--color-primary, #1e5149);
  font-weight: var(--fw-semibold);
}

.admin-console-panel {
  display: none;
}

.admin-console-panel.active {
  display: block;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dfe5e3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #e5e9e7;
  border-bottom: 1px solid #e5e9e7;
}

.admin-metric:nth-child(3n) {
  border-right: 0;
}

.admin-metric:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.admin-metric span,
.admin-metric small {
  color: #77827f;
  font-size: var(--text-xs);
}

.admin-metric strong {
  color: #18221f;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-surface {
  border: 1px solid #dfe5e3;
  border-radius: 8px;
  background: #fff;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.admin-section-head h3 {
  margin: 0;
  color: #1d2825;
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

.admin-section-head p {
  margin: 4px 0 0;
  color: #7a8582;
  font-size: var(--text-xs);
}

.admin-page-section-head {
  padding: 12px 0 18px;
}

.admin-page-section-head h3 {
  font-size: var(--text-lg);
}

.admin-funnel-list {
  display: grid;
  gap: 11px;
  padding: 2px 20px 20px;
}

.admin-funnel-row {
  display: grid;
  grid-template-columns: 108px minmax(80px, 1fr) 58px 42px;
  align-items: center;
  gap: 10px;
  color: #596460;
  font-size: var(--text-xs);
}

.admin-funnel-track {
  height: 8px;
  border-radius: 4px;
  background: #edf1f0;
  overflow: hidden;
}

.admin-funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3d6d64;
}

.admin-funnel-row strong,
.admin-funnel-row small {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-funnel-row strong {
  color: #26312e;
  font-weight: var(--fw-semibold);
}

.admin-daily-chart {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 228px;
  padding: 12px 18px 20px;
  overflow-x: auto;
}

.admin-daily-column {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-width: 28px;
  flex: 1 0 28px;
  text-align: center;
}

.admin-daily-column > div {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 150px;
  border-bottom: 1px solid #e2e7e5;
}

.admin-daily-column i {
  width: 62%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: #62877f;
}

.admin-daily-column span {
  color: #818b88;
  font-size: var(--text-2xs);
  white-space: nowrap;
}

.admin-alert-surface {
  margin-top: 14px;
}

.admin-ops-alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e6eae8;
}

.admin-ops-alerts > div {
  display: grid;
  gap: 5px;
  padding: 16px 20px;
  border-right: 1px solid #e6eae8;
}

.admin-ops-alerts > div:last-child {
  border-right: 0;
}

.admin-ops-alerts span,
.admin-ops-alerts small {
  color: #737e7a;
  font-size: var(--text-xs);
}

.admin-ops-alerts strong {
  color: #27322f;
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #35403d;
  font-size: var(--text-xs);
  white-space: nowrap;
}

.admin-table th,
.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #e8ecea;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.admin-table th {
  background: #f7f9f8;
  color: #697571;
  font-weight: var(--fw-semibold);
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table-empty,
.admin-empty {
  color: #8b9491;
  text-align: center !important;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #edf1f0;
  color: #57625f;
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
}

.admin-status.status-paid {
  background: #e5f1ed;
  color: #266052;
}

.admin-status.status-failed,
.admin-status.status-cancelled {
  background: #f8e9e7;
  color: #9c3b30;
}

.admin-guidance {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #dfe5e3;
  border-radius: 8px;
  background: #fff;
}

.admin-guidance strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.admin-guidance code {
  padding: 10px 12px;
  border-radius: 6px;
  background: #f2f5f4;
  color: #31544d;
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
}

.admin-guidance p {
  margin: 0;
  color: #737e7a;
  font-size: var(--text-xs);
  line-height: 1.6;
}

.admin-member-surface {
  margin-bottom: 14px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.admin-member-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.admin-member-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 560px);
}

.admin-member-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d7dedb;
  border-radius: 6px;
  background: #fff;
  color: #1d2825;
  font: inherit;
  font-size: var(--text-sm);
}

.admin-member-search input:focus-visible {
  border-color: #52786f;
  outline: 2px solid #dcebe7;
  outline-offset: 1px;
}

.admin-member-search button,
.admin-member-export,
.admin-member-pagination button {
  min-height: 40px;
  border: 1px solid #ced8d5;
  border-radius: 6px;
  background: #fff;
  color: #244f48;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.admin-member-search button,
.admin-member-pagination button {
  padding: 0 14px;
}

.admin-member-export {
  padding: 0 16px;
  background: #244f48;
  color: #fff;
}

.admin-member-search button:disabled,
.admin-member-export:disabled,
.admin-member-pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.admin-member-privacy {
  margin: 0;
  padding: 0 16px 14px;
  color: #7a8582;
  font-size: var(--text-2xs);
}

.admin-member-table {
  min-width: 1320px;
}

.admin-member-table td {
  vertical-align: top;
}

.admin-member-identity,
.admin-member-access {
  max-width: 260px;
  white-space: normal;
}

.admin-member-identity strong,
.admin-member-access strong {
  display: block;
  margin-bottom: 4px;
  color: #26312e;
  font-weight: var(--fw-semibold);
}

.admin-member-identity small,
.admin-member-access small,
.admin-member-role {
  display: block;
  color: #818b88;
  font-size: var(--text-2xs);
  line-height: 1.45;
}

.admin-member-access small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-member-class {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #edf1f0;
  color: #57625f;
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
}

.admin-member-class.class-internal {
  background: #e5f1ed;
  color: #266052;
}

.admin-member-class.class-test {
  background: #f5eee0;
  color: #81601d;
}

.admin-member-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid #e8ecea;
}

.admin-member-pagination span {
  min-width: 130px;
  color: #697571;
  font-size: var(--text-xs);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-content-summary,
.admin-user-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid #dfe5e3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.admin-user-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-content-summary > div,
.admin-user-summary > div {
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  border-right: 1px solid #e5e9e7;
}

.admin-content-summary > div:last-child,
.admin-user-summary > div:last-child {
  border-right: 0;
}

.admin-content-summary span,
.admin-user-summary span,
.admin-user-summary small {
  color: #77827f;
  font-size: var(--text-xs);
}

.admin-content-summary strong,
.admin-user-summary strong {
  color: #18221f;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .admin-console-page {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .admin-console-main {
    padding: 24px 20px 56px;
  }

  .admin-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-metric {
    border-right: 1px solid #e5e9e7;
    border-bottom: 1px solid #e5e9e7;
  }

  .admin-metric:nth-child(3n) {
    border-right: 1px solid #e5e9e7;
  }

  .admin-metric:nth-child(2n) {
    border-right: 0;
  }

  .admin-metric:nth-last-child(-n + 3) {
    border-bottom: 1px solid #e5e9e7;
  }

  .admin-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.admin-mode .app-shell,
  body.admin-mode .quiz-panel {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .admin-console-page {
    display: block;
  }

  .admin-sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e1e6e4;
  }

  .admin-brand,
  .admin-side-status {
    display: none;
  }

  .admin-console-nav {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    overflow-x: auto;
  }

  .admin-console-nav button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .admin-console-main {
    padding: 20px 14px 64px;
  }

  .admin-console-header {
    display: grid;
    align-items: start;
  }

  .admin-console-actions {
    justify-content: space-between;
  }

  .admin-metric-grid,
  .admin-ops-alerts,
  .admin-content-summary,
  .admin-user-summary {
    grid-template-columns: 1fr;
  }

  .admin-metric,
  .admin-metric:nth-child(2n),
  .admin-metric:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid #e5e9e7;
  }

  .admin-metric:last-child {
    border-bottom: 0;
  }

  .admin-metric,
  .admin-ops-alerts > div,
  .admin-content-summary > div,
  .admin-user-summary > div {
    border-right: 0;
    border-bottom: 1px solid #e5e9e7;
  }

  .admin-funnel-row {
    grid-template-columns: 88px minmax(70px, 1fr) 46px;
  }

  .admin-funnel-row small {
    display: none;
  }

  .admin-member-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-member-search {
    width: 100%;
  }

  .admin-member-export {
    align-self: flex-start;
  }
}

body.studio-mode .studio-status-card {
  border-color: #dbe4f5;
  background: #f8fbff;
}

.studio-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.studio-metric-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.studio-metric-card span,
.studio-metric-card small {
  color: #64748b;
  font-size: var(--text-xs);
}

.studio-metric-card strong {
  color: #0f172a;
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

body.studio-mode .studio-dashboard-head,
body.studio-mode .studio-card,
body.studio-mode .studio-series-card,
body.studio-mode .episode-manager-row {
  border-color: #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

body.studio-mode .studio-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 16px;
}

body.studio-mode .studio-preview {
  position: sticky;
  top: 24px;
  align-self: start;
}

.upload-drop input[type="file"] {
  height: auto;
  padding: 13px;
  border-style: dashed;
  background: #f8fafc;
}

.bulk-upload-list,
.studio-table-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.bulk-upload-row,
.studio-table-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.bulk-upload-row > span,
.studio-table-row > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.bulk-upload-row strong,
.studio-table-row strong {
  display: block;
  color: #0f172a;
  font-size: var(--text-sm);
}

.bulk-upload-row p,
.studio-table-row p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: var(--text-xs);
  line-height: 1.45;
}

.studio-table-row b {
  color: #0f172a;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.studio-settlement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: #f8fbff;
}

.studio-settlement-summary div {
  display: grid;
  gap: 4px;
}

.studio-settlement-summary span {
  color: #64748b;
  font-size: var(--text-xs);
}

.studio-settlement-summary strong {
  color: #0f172a;
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}

.studio-policy-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbe4f5;
  border-radius: 14px;
  background: #f8fbff;
}

.studio-policy-panel strong {
  color: #0f172a;
  font-size: var(--text-md);
}

.studio-policy-panel p,
.studio-policy-panel li {
  color: #475569;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.studio-policy-panel ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.episode-state.submitted {
  background: #eef4ff;
  color: var(--accent);
}

.episode-state.revision_requested {
  background: #fff7e8;
  color: #b45309;
}

.episode-state.approved {
  background: #ecfdf3;
  color: #15803d;
}

@media (max-width: 980px) {
  body.studio-mode .creator-studio-page {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  body.studio-mode .studio-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .studio-side-note {
    display: none;
  }

  .studio-main {
    padding: 22px 16px 96px;
  }

  .studio-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.studio-mode .studio-layout,
  body.studio-mode .studio-hero,
  .studio-settlement-summary,
  .bulk-upload-row,
  .studio-table-row {
    grid-template-columns: 1fr;
  }

  body.studio-mode .studio-preview {
    position: static;
  }
}

/* Studio stays a wide workspace even when opened from the mobile service shell. */
body.studio-mode {
  min-width: 0;
  overflow: hidden;
}

body.studio-mode .app-shell,
body.studio-mode .quiz-panel {
  width: 100vw;
  max-width: none;
}

body.studio-mode .creator-studio-page {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
  overflow-x: hidden;
}

body.studio-mode .studio-sidebar,
body.studio-mode .studio-main,
body.studio-mode .studio-hero > div:first-child {
  min-width: 0;
}

body.studio-mode .studio-main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

body.studio-mode .studio-home-link,
body.studio-mode .studio-nav button {
  white-space: nowrap;
}

body.studio-mode .studio-hero {
  grid-template-columns: minmax(320px, 1fr) minmax(170px, 210px);
}

body.studio-mode .studio-hero h2,
body.studio-mode .studio-hero p,
body.studio-mode .studio-status-card {
  word-break: keep-all;
  overflow-wrap: break-word;
}

@media (max-width: 1100px) {
  body.studio-mode .creator-studio-page {
    grid-template-columns: minmax(196px, 212px) minmax(0, 1fr);
  }

  body.studio-mode .studio-sidebar {
    padding: 20px 14px;
  }

  body.studio-mode .studio-main {
    padding: 24px;
  }

  body.studio-mode .studio-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.studio-mode .app-shell,
  body.studio-mode .quiz-panel {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body.studio-mode .creator-studio-page {
    display: block;
  }

  body.studio-mode .studio-sidebar {
    position: static;
    height: auto;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  body.studio-mode .studio-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  body.studio-mode .studio-nav button {
    flex: 0 0 auto;
  }

  body.studio-mode .studio-main {
    padding: 20px 16px 96px;
  }
}

/* Operations console must escape the reader shell's 430px mobile width. */
body.admin-mode {
  min-width: 0;
  overflow: hidden;
}

body.admin-mode .app-shell,
body.admin-mode .quiz-panel {
  width: 100vw;
  max-width: none;
  margin: 0;
}

body.admin-mode #adminConsole.screen {
  padding: 0;
}
#intro .continue-reading { order: 2; }
#intro #rankingSection { order: 3; }
#intro .home-rail-mini { order: 4; }
#intro #genreSection { order: 5; }
#intro .home-rail-free { order: 6; }
#intro .home-rail-complete { order: 7; }
#intro .home-rail-new { order: 8; }
#intro .reward-mini { order: 9; }

.section-more {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.home-rail {
  padding: 18px 0 20px;
  border-bottom: 8px solid var(--wash);
  background: #fff;
}

.home-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 116px;
  gap: 12px;
  overflow-x: auto;
  padding: 0 var(--page-gutter) 4px;
  scrollbar-width: none;
}

.home-scroll::-webkit-scrollbar {
  display: none;
}

.home-mini-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.home-mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 8px 18px rgba(23, 24, 29, 0.1);
}

.home-mini-card strong {
  min-height: 34px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.28;
  word-break: keep-all;
}

.rail-badge {
  width: fit-content;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
}

.rail-badge.free {
  background: var(--accent-soft);
  color: var(--accent);
}

.rail-badge.complete {
  background: #f2f4f7;
  color: var(--text-secondary);
}

.rail-badge.mini {
  background: #f8f0df;
  color: #8a641a;
}

.rail-badge.new {
  background: #fff7ed;
  color: #b45309;
}

.catalog-page {
  min-height: calc(100vh - 64px);
  padding: var(--page-top-gap) var(--page-gutter) var(--page-bottom-gap);
  background: #fff;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.catalog-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.2;
}

.catalog-page .work-filter {
  margin: 14px calc(var(--page-gutter) * -1) 4px;
  padding: 0 var(--page-gutter) 14px;
  gap: 8px;
}

.catalog-page .work-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-height: 34px;
  min-width: max-content;
  padding: 0 15px;
  line-height: 1;
}

.catalog-page .work-list,
.ranking-page {
  display: grid;
  gap: 0;
}

.ranking-page .rank-row:first-of-type {
  border-top: 0;
}

.auth-form-actions button:first-child {
  border-color: var(--color-accent) !important;
  background: var(--color-accent) !important;
  color: #fff !important;
}

.auth-form-actions button:nth-child(2) {
  border-color: var(--line) !important;
  background: #fff !important;
  color: var(--ink) !important;
}

.social-login.kakao {
  border-color: #fee500 !important;
  background: #fee500 !important;
  color: #111 !important;
}

.social-login.kakao span {
  background: #111 !important;
  color: #fee500 !important;
}


.rank-row b,
.work-row b,
.dialog-close,
.bottom-gnb button.active,
.bottom-gnb button:hover,
.bottom-gnb button:focus-visible,
.creator-revenue strong {
  color: var(--color-accent) !important;
}

.work-info em,
.rank-row small,
.recommend-meta,
.hero-meta span,
.featured-meta {
  color: var(--text-secondary) !important;
}

.dialog-close {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px;
  overflow: hidden;
}

.dialog-close::before,
.dialog-close::after {
  content: "" !important;
  grid-area: 1 / 1 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 16px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: var(--color-accent) !important;
  transform-origin: 50% 50% !important;
}

.dialog-close::before {
  transform: rotate(45deg) !important;
}

.dialog-close::after {
  transform: rotate(-45deg) !important;
}

/* Creator workspace and operations admin share one product language. */
body.studio-mode,
body.studio-mode .quiz-panel,
body.studio-mode .creator-studio-page {
  background: #f4f6f8;
}

body.studio-mode .creator-studio-page {
  grid-template-columns: 232px minmax(0, 1fr);
  color: #17201e;
}

body.studio-mode .studio-sidebar {
  gap: 18px;
  padding: 22px 16px;
  border-right-color: #e1e6e4;
}

body.studio-mode .studio-home-link {
  min-height: 38px;
  padding: 0 12px;
  border-color: #d9dfdd;
  border-radius: 8px;
  color: #42504c;
}

body.studio-mode .studio-home-link:hover {
  border-color: #9eb1ac;
  background: #f7faf9;
}

body.studio-mode .studio-brand {
  gap: 10px;
  padding: 4px 4px 12px;
}

body.studio-mode .studio-brand img {
  width: 36px;
  height: 36px;
}

body.studio-mode .studio-brand strong {
  color: #17201e;
}

body.studio-mode .studio-brand span {
  color: #7a8582;
}

body.studio-mode .studio-nav {
  gap: 4px;
}

body.studio-mode .studio-nav button {
  min-height: 42px;
  border-radius: 8px;
  color: #52605c;
  font-weight: var(--fw-medium);
}

body.studio-mode .studio-nav button:hover {
  background: #f3f6f5;
}

body.studio-mode .studio-nav button.active {
  background: #e7efec;
  color: #1e5048;
  font-weight: var(--fw-semibold);
}

body.studio-mode .studio-side-note {
  gap: 5px;
  padding: 14px 12px;
  border: 0;
  border-top: 1px solid #e4e9e7;
  border-radius: 0;
  background: transparent;
}

body.studio-mode .studio-side-note span,
body.studio-mode .studio-side-note small {
  color: #77827f;
}

body.studio-mode .studio-side-note strong {
  color: #244b45;
}

body.studio-mode .studio-main {
  width: min(1320px, 100%);
  max-width: 1320px;
  padding: 28px 32px 64px;
}

body.studio-mode .studio-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
  padding: 0 0 20px;
  border-bottom: 1px solid #dfe5e3;
  border-radius: 0;
  background: transparent;
}

body.studio-mode .studio-hero .eyebrow {
  margin-bottom: 6px;
  color: #55716a;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

body.studio-mode .studio-hero h2 {
  color: #17201e;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
}

body.studio-mode .studio-hero p:not(.eyebrow) {
  margin-top: 6px;
  color: #6c7774;
}

body.studio-mode .studio-status-card {
  min-width: 154px;
  padding: 4px 0 4px 20px;
  border: 0;
  border-left: 1px solid #dfe5e3;
  border-radius: 0;
  background: transparent;
}

body.studio-mode .studio-status-card span,
body.studio-mode .studio-status-card small {
  color: #77827f;
}

body.studio-mode .studio-status-card strong {
  color: #244f48;
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
}

body.studio-mode .studio-dashboard-head {
  align-items: center;
  margin-bottom: 14px;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #e1e6e4;
  border-radius: 0;
  background: transparent;
}

body.studio-mode .studio-dashboard-head h3 {
  color: #1d2825;
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
}

body.studio-mode .studio-dashboard-head p {
  margin-top: 4px;
  color: #7a8582;
  font-size: var(--text-xs);
}

body.studio-mode .studio-primary,
body.studio-mode .studio-empty button,
body.studio-mode .studio-toolbar button:last-child {
  border-color: #244f48;
  border-radius: 8px;
  background: #244f48;
  color: #fff;
}

body.studio-mode .studio-secondary,
body.studio-mode .studio-action-row button,
body.studio-mode .studio-series-card button,
body.studio-mode .episode-actions button {
  border-color: #d9dfdd;
  border-radius: 8px;
  color: #42504c;
}

body.studio-mode .studio-secondary:hover,
body.studio-mode .studio-action-row button:hover,
body.studio-mode .studio-series-card button:hover,
body.studio-mode .episode-actions button:hover {
  border-color: #9eb1ac;
  background: #f7faf9;
}

body.studio-mode .studio-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid #dfe5e3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

body.studio-mode .studio-metric-card {
  padding: 18px;
  border: 0;
  border-right: 1px solid #e5e9e7;
  border-radius: 0;
}

body.studio-mode .studio-metric-card:last-child {
  border-right: 0;
}

body.studio-mode .studio-metric-card span,
body.studio-mode .studio-metric-card small {
  color: #77827f;
}

body.studio-mode .studio-metric-card strong {
  color: #18221f;
}

body.studio-mode .studio-card,
body.studio-mode .studio-series-card,
body.studio-mode .episode-manager-row,
body.studio-mode .bulk-upload-row,
body.studio-mode .studio-table-row,
body.studio-mode .studio-settlement-summary,
body.studio-mode .studio-policy-panel,
body.studio-mode .studio-empty {
  border-color: #dfe5e3;
  border-radius: 8px;
  background: #fff;
}

body.studio-mode .studio-card input,
body.studio-mode .studio-card select,
body.studio-mode .studio-card textarea,
body.studio-mode .thumbnail-uploader {
  border-color: #d9dfdd;
  border-radius: 8px;
}

body.studio-mode .studio-card input:focus,
body.studio-mode .studio-card select:focus,
body.studio-mode .studio-card textarea:focus {
  border-color: #52786f;
  box-shadow: 0 0 0 3px #dcebe7;
}

body.studio-mode .studio-card-head > span,
body.studio-mode .bulk-upload-row > span,
body.studio-mode .studio-table-row > span {
  border-radius: 6px;
  background: #e7efec;
  color: #1e5048;
}

.admin-creator-queue-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-queue-feedback {
  min-height: 20px;
  margin: -8px 0 12px;
  color: #7b8582;
  font-size: var(--text-xs);
}

.admin-queue-feedback.error {
  color: #b42318;
}

.admin-count-label {
  flex: 0 0 auto;
  color: #55716a;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.admin-table-title {
  display: block;
  color: #26312e;
  font-weight: var(--fw-semibold);
  white-space: normal;
}

.admin-table-title + small {
  display: block;
  margin-top: 4px;
  color: #818b88;
  font-size: var(--text-2xs);
  white-space: normal;
}

.admin-table-action {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #ced8d5;
  border-radius: 6px;
  background: #fff;
  color: #244f48;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.admin-table-action:hover {
  border-color: #829b95;
  background: #f2f8f6;
}

.admin-content-status-head {
  margin-top: 4px;
  border-top: 1px solid #dfe5e3;
  padding-top: 22px;
}

@media (max-width: 980px) {
  body.studio-mode .creator-studio-page {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  body.studio-mode .studio-main {
    padding: 24px 20px 56px;
  }

  body.studio-mode .studio-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.studio-mode .studio-metric-card:nth-child(2n) {
    border-right: 0;
  }

  body.studio-mode .studio-metric-card {
    border-bottom: 1px solid #e5e9e7;
  }

  body.studio-mode .studio-metric-card:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  body.studio-mode .creator-studio-page {
    display: block;
  }

  body.studio-mode .studio-sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e1e6e4;
  }

  body.studio-mode .studio-brand,
  body.studio-mode .studio-side-note {
    display: none;
  }

  body.studio-mode .studio-nav {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    overflow-x: auto;
  }

  body.studio-mode .studio-nav button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  body.studio-mode .studio-main {
    padding: 20px 14px 64px;
  }

  body.studio-mode .studio-metric-grid {
    grid-template-columns: 1fr;
  }

  body.studio-mode .studio-metric-card,
  body.studio-mode .studio-metric-card:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid #e5e9e7;
  }

  body.studio-mode .studio-metric-card:last-child {
    grid-column: auto;
    border-bottom: 0;
  }

  body.studio-mode .studio-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.studio-mode .studio-status-card {
    padding: 12px 0 0;
    border-top: 1px solid #dfe5e3;
    border-left: 0;
  }

  body.studio-mode .studio-dashboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.studio-mode .studio-action-row {
    justify-content: flex-start;
  }
}

.work-info em::first-letter {
  color: inherit;
}

.continue-reading,
.reward-mini {
  margin: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: #f7f8fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.continue-reading {
  padding: 14px 14px;
}

.reward-mini {
  padding: 12px 14px;
}

.work-row b,
.rank-row b,
.library-work b {
  min-height: 32px;
  padding-right: 15px;
  padding-left: 15px;
  font-weight: var(--fw-medium) !important;
}

.work-row b,
.rank-row b {
  border-color: #d9e0ee;
  background: #fff;
}

.work-row:hover b,
.rank-row:hover b,
.library-work:hover b {
  border-color: var(--color-accent);
}

.app-shell :is(.work-info em, .rank-row small, .recommend-meta, .meta-pill, .book-topline strong, .library-work em, .library-work small, .featured-mini-info p, .continue-copy small, .result-author, .result-summary) {
  color: var(--text-secondary) !important;
}

.wallet strong,
#creditBalance,
.dialog-balance strong {
  color: var(--credit) !important;
}

.wallet.guest-wallet strong,
.wallet.guest-wallet #creditBalance {
  color: var(--text-secondary) !important;
}

.wallet[hidden] {
  display: none !important;
}

.rank-num {
  color: var(--text-primary) !important;
}

/* Keep catalog filters authoritative over repeated card display overrides. */
.work-list .work-row[hidden],
.ranking-page .rank-row[hidden] {
  display: none !important;
}

/* Final paywall override: keep pass cards readable in the payment sheet. */
.credit-dialog {
  align-items: end !important;
  padding: 14px !important;
}

.credit-dialog-card {
  width: min(420px, 100%) !important;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 22px 20px 20px !important;
  border-radius: 24px 24px 18px 18px !important;
}

.credit-dialog-card h3 {
  padding-right: 54px !important;
  margin: 8px 0 10px !important;
  color: var(--text-primary) !important;
  font-size: var(--text-xl) !important;
  line-height: 1.16 !important;
  font-weight: var(--fw-bold) !important;
  word-break: keep-all;
}

.credit-dialog-card > p {
  margin-bottom: 16px !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-base) !important;
  line-height: 1.55 !important;
  word-break: keep-all;
}

.dialog-balance {
  margin-bottom: 14px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: #f7f8fa !important;
}

.dialog-balance span {
  color: var(--text-tertiary) !important;
  font-size: var(--text-2xs) !important;
  font-weight: var(--fw-medium) !important;
}

.dialog-balance strong {
  color: var(--text-secondary) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.25 !important;
  font-weight: var(--fw-medium) !important;
}

.paywall-product-grid {
  display: grid !important;
  gap: 9px !important;
}

.dialog-actions .paywall-product-card,
.paywall-product-card {
  width: 100% !important;
  min-height: 76px !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) auto !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 10px !important;
  padding: 12px 13px !important;
  border: 1px solid var(--line) !important;
  border-radius: 17px !important;
  background: #fff !important;
  color: var(--text-primary) !important;
  text-align: left !important;
  box-shadow: none !important;
}

.dialog-actions .paywall-product-card.active,
.paywall-product-card.active,
.paywall-product-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(30, 70, 64, 0.14) !important;
}

.paywall-product-card .product-badge {
  width: 76px !important;
  min-height: 34px !important;
  grid-column: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 8px !important;
  border-radius: 999px !important;
  background: #f5eff1 !important;
  color: var(--accent) !important;
  font-size: var(--text-2xs) !important;
  font-weight: var(--fw-semibold) !important;
  line-height: 1.22 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: keep-all;
}

.paywall-product-card .product-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.paywall-product-card .product-copy strong {
  display: block !important;
  color: var(--text-primary) !important;
  font-size: var(--text-md) !important;
  line-height: 1.25 !important;
  font-weight: var(--fw-bold) !important;
  word-break: keep-all;
}

.paywall-product-card .product-copy small {
  display: block !important;
  grid-column: auto !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-xs) !important;
  line-height: 1.35 !important;
  font-weight: var(--fw-regular) !important;
  word-break: keep-all;
}

.paywall-product-card b {
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: center !important;
  color: var(--text-primary) !important;
  font-size: var(--text-md) !important;
  line-height: 1.15 !important;
  font-weight: var(--fw-bold) !important;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dialog-actions > .dialog-ghost,
.dialog-actions > .dialog-primary {
  min-height: 50px !important;
  height: auto !important;
  border-radius: 18px !important;
}

@media (max-width: 360px) {
  .dialog-actions .paywall-product-card,
  .paywall-product-card {
    grid-template-columns: 66px minmax(0, 1fr) 64px !important;
    gap: 8px !important;
  }

  .paywall-product-card .product-badge {
    width: 66px !important;
    padding: 6px 7px !important;
  }

  .paywall-product-card b {
    font-size: var(--text-sm) !important;
  }
}

/* Paywall v2: vertical product cards, no squeezed columns. */
.credit-dialog-card h3 {
  font-size: 22px !important;
  line-height: 1.25 !important;
  font-weight: var(--fw-semibold) !important;
}

.credit-dialog-card > p {
  font-size: var(--text-base) !important;
  line-height: 1.55 !important;
  font-weight: var(--fw-regular) !important;
}

.paywall-product-grid {
  gap: 10px !important;
}

.dialog-actions .paywall-product-card,
.paywall-product-card {
  min-height: 94px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "badge price"
    "title price"
    "desc price" !important;
  align-items: center !important;
  gap: 5px 14px !important;
  padding: 15px 16px !important;
  border-radius: 18px !important;
}

.paywall-product-card .product-badge {
  grid-area: badge !important;
  width: fit-content !important;
  max-width: 128px !important;
  min-height: 27px !important;
  padding: 5px 10px !important;
  font-size: var(--text-2xs) !important;
  line-height: 1.2 !important;
  font-weight: var(--fw-medium) !important;
}

.paywall-product-card .product-copy {
  display: contents !important;
}

.paywall-product-card .product-copy strong {
  grid-area: title !important;
  min-width: 0 !important;
  font-size: var(--text-base) !important;
  line-height: 1.25 !important;
  font-weight: var(--fw-semibold) !important;
  white-space: normal !important;
}

.paywall-product-card .product-copy small {
  grid-area: desc !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: var(--text-xs) !important;
  line-height: 1.38 !important;
  color: var(--text-secondary) !important;
  font-weight: var(--fw-regular) !important;
}

.paywall-product-card b {
  grid-area: price !important;
  align-self: center !important;
  min-width: 76px !important;
  font-size: var(--text-md) !important;
  line-height: 1.12 !important;
  font-weight: var(--fw-semibold) !important;
}

.credit-dialog .checkout-method-selector {
  grid-template-columns: 1fr;
  margin: -2px 0 14px;
}

.credit-dialog .checkout-method-label {
  grid-column: 1 / -1;
}

.credit-dialog .checkout-method {
  min-height: 50px;
  padding: 9px 10px;
  border-radius: 14px;
}

.paywall-product-card.disabled,
.paywall-product-card:disabled {
  cursor: not-allowed !important;
  background: var(--neutral-50) !important;
  border-color: var(--neutral-200) !important;
  color: var(--text-secondary) !important;
  opacity: 0.72;
}

.paywall-product-card.disabled:hover,
.paywall-product-card:disabled:hover {
  transform: none !important;
  border-color: var(--neutral-200) !important;
}

.paywall-product-card.disabled .product-badge,
.paywall-product-card:disabled .product-badge {
  background: var(--neutral-200) !important;
  color: var(--text-secondary) !important;
}

.paywall-product-card.disabled b,
.paywall-product-card:disabled b,
.paywall-product-card.disabled .product-copy strong,
.paywall-product-card:disabled .product-copy strong {
  color: var(--text-secondary) !important;
}

@media (max-width: 360px) {
  .dialog-actions .paywall-product-card,
  .paywall-product-card {
    grid-template-columns: minmax(0, 1fr) 66px !important;
    padding: 14px 13px !important;
    gap: 5px 10px !important;
  }

  .paywall-product-card .product-badge {
    max-width: 112px !important;
    font-size: var(--text-2xs) !important;
  }

  .paywall-product-card b {
    min-width: 66px !important;
    font-size: var(--text-md) !important;
  }

  .checkout-method-selector {
    grid-template-columns: 1fr;
  }

  .checkout-method-label {
    margin-bottom: -2px;
  }
}

/* Notice dialog: simple 안내/고객센터/준비중 모달은 구매 모달보다 낮은 톤으로 표시한다. */
.credit-dialog.notice-dialog {
  align-items: center !important;
  padding: 18px !important;
}

.credit-dialog.notice-dialog .credit-dialog-card {
  width: min(360px, 100%) !important;
  max-height: calc(100dvh - 36px) !important;
  padding: 22px 20px 18px !important;
  border-radius: 22px !important;
}

.credit-dialog.notice-dialog .credit-dialog-card .eyebrow {
  margin-bottom: 8px !important;
  color: var(--text-tertiary) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-medium) !important;
}

.credit-dialog.notice-dialog .credit-dialog-card h3 {
  margin: 4px 0 8px !important;
  padding-right: 48px !important;
  font-size: var(--text-lg) !important;
  line-height: 1.34 !important;
  font-weight: var(--fw-semibold) !important;
}

.credit-dialog.notice-dialog .credit-dialog-card > p {
  margin-bottom: 18px !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.65 !important;
  font-weight: var(--fw-regular) !important;
}

.credit-dialog.notice-dialog .dialog-actions {
  gap: 0 !important;
}

.credit-dialog.notice-dialog .dialog-actions > button {
  min-height: 44px !important;
  border-radius: 14px !important;
  font-size: var(--text-sm) !important;
  font-weight: var(--fw-medium) !important;
}

.credit-dialog-card #creditDialogBody {
  margin: 0 0 16px !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-base) !important;
  line-height: 1.55 !important;
  word-break: keep-all;
}

.credit-dialog.notice-dialog .credit-dialog-card #creditDialogBody {
  margin-bottom: 18px !important;
  color: var(--text-secondary) !important;
  font-size: var(--text-sm) !important;
  line-height: 1.65 !important;
  font-weight: var(--fw-regular) !important;
}

.history-dialog-content {
  display: grid;
  gap: 16px;
}

.history-section {
  display: grid;
  gap: 8px;
}

.history-section h4 {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.3;
  font-weight: var(--fw-semibold);
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.history-item.compact {
  align-items: start;
}

.history-item-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.history-item-main strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: var(--fw-semibold);
}

.history-item-main small,
.history-item-main em {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.4;
  font-style: normal;
  font-weight: var(--fw-regular);
}

.history-item-main em {
  color: var(--text-tertiary);
}

.history-item-main p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.5;
  font-weight: var(--fw-regular);
}

.history-item > b {
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: var(--fw-semibold);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--text-secondary);
  font-size: var(--text-2xs);
  line-height: 1;
  font-weight: var(--fw-semibold);
}

.history-status.paid {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}

.history-status.pending {
  background: var(--credit-soft);
  color: var(--credit-strong);
}

.history-status.failed {
  background: var(--promo-soft);
  color: var(--promo);
}

.history-status.muted {
  background: var(--neutral-100);
  color: var(--text-secondary);
}

.history-empty {
  display: grid;
  gap: 6px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--neutral-100);
  text-align: center;
}

.history-empty strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: var(--fw-semibold);
}

.history-empty p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  line-height: 1.5;
  font-weight: var(--fw-regular);
}

/* PAGEON CANON DESIGN TOKENS
   Source of truth: docs/design-system.md. Earlier :root blocks remain for legacy compatibility. */
:root {
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-serif: var(--font-sans); /* legacy alias; do not use for new UI */

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-display: 44px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 800;

  --brand-primary: #1e4640;
  --brand-primary-hover: #173a35;
  --brand-primary-soft: #e4edea;
  --brand-primary-border: #cbdcd6;

  --credit: #9b7322;
  --credit-strong: #7b5a16;
  --credit-soft: #f4ecd6;
  --credit-border: #e7d6a8;

  --promo: #b5402f;
  --promo-soft: #f7e9e5;
  --rating: #f59e0b;
  --rating-soft: #fff7ed;

  --neutral-950: #17181d;
  --neutral-900: #1f2026;
  --neutral-800: #2b2c32;
  --neutral-700: #4b4d55;
  --neutral-600: #62656f;
  --neutral-500: #81848d;
  --neutral-400: #b4b8c2;
  --neutral-300: #e4e6eb;
  --neutral-200: #eff1f4;
  --neutral-100: #f7f8fa;
  --neutral-0: #ffffff;

  --color-accent: var(--brand-primary);
  --accent: var(--brand-primary);
  --accent-strong: var(--brand-primary-hover);
  --accent-soft: var(--brand-primary-soft);
  --ink: var(--neutral-950);
  --muted: var(--neutral-600);
  --subtle: var(--neutral-500);
  --line: var(--neutral-300);
  --wash: var(--neutral-100);
  --surface: var(--neutral-0);
  --paper: var(--neutral-0);
  --text-primary: var(--neutral-950);
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;

  /* Legacy aliases only; do not use in new CSS. */
  --rose: var(--brand-primary);
  --wine: var(--brand-primary);
  --gold: var(--credit);

  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --card-radius: var(--radius-lg);

  --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.04);
  --elevation-2: 0 8px 18px rgba(23, 24, 29, 0.1);
  --elevation-3: 0 28px 70px rgba(17, 18, 23, 0.18);
  --shadow: var(--elevation-3);
  --soft-shadow: var(--elevation-1);

  --motion-fast: 140ms;
  --motion-base: 280ms;
  --motion-ease: cubic-bezier(0.2, 0, 0, 1);

  --focus-ring: 0 0 0 3px rgba(30, 70, 64, 0.18);
  --focus-offset: 2px;

  --z-base: 1;
  --z-sticky: 20;
  --z-bottom-nav: 44;
  --z-modal: 60;
  --z-toast: 70;
}

html,
body,
button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

.app-shell :where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.auth-dialog,
.credit-dialog,
.reward-ad-dialog,
.onboarding-flow,
.creator-review-dialog {
  z-index: var(--z-modal);
}

.bottom-gnb {
  z-index: var(--z-bottom-nav);
}

body.onboarding-open .app-topbar,
body.onboarding-open .bottom-gnb,
body.onboarding-open .app-shell {
  pointer-events: none;
}

body.onboarding-open .onboarding-flow,
body.onboarding-open .onboarding-flow * {
  pointer-events: auto;
}

/* PAGEON ACTION ALIGNMENT
   Keep hover/focus states from shifting small CTA and close-button glyphs. */
.rank-row b,
.library-work b,
#allWorks .work-row b {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 48px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 14px !important;
  border: 1px solid var(--brand-primary-border) !important;
  border-radius: var(--radius-pill) !important;
  background: #fff !important;
  color: var(--brand-primary) !important;
  font-size: var(--text-xs) !important;
  font-weight: var(--fw-medium) !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  transform: none !important;
}

.rank-row:hover b,
.rank-row:focus-visible b,
.library-work:hover b,
.library-work:focus-visible b,
#allWorks .work-row:hover b,
#allWorks .work-row:focus-visible b {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary-soft) !important;
  color: var(--brand-primary) !important;
  transform: none !important;
}

.catalog-page .work-row b {
  display: inline-grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
}

.catalog-page .work-row:hover b,
.catalog-page .work-row:focus-visible b {
  background: transparent !important;
  transform: none !important;
}

.catalog-page .work-row b::after {
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
}

.dialog-close {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: var(--radius-pill) !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-align: center !important;
  text-indent: 0 !important;
  overflow: hidden !important;
  transform: none !important;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  color: transparent !important;
  transform: none !important;
}

.dialog-close::before,
.dialog-close::after {
  content: "" !important;
  grid-area: 1 / 1 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 17px !important;
  height: 2px !important;
  border-radius: var(--radius-pill) !important;
  background: var(--brand-primary) !important;
  transform-origin: 50% 50% !important;
}

.dialog-close::before {
  transform: rotate(45deg) !important;
}

.dialog-close::after {
  transform: rotate(-45deg) !important;
}
