/* ============================================================
   စာသံ · SarThan — styles
   Warm paper-on-charcoal editorial theme, Burmese-first type.
   ============================================================ */

@font-face {
  font-family: "Zawgyi";
  src: url("../fonts/z.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zawgyi";
  src: url("../fonts/z.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Padauk";
  src: url("../fonts/Padauk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Padauk";
  src: url("../fonts/Padauk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0a08;
  --bg-soft: #12100d;
  --card: #191510;
  --card-2: #201a14;
  --line: rgba(246, 239, 230, 0.09);
  --line-strong: rgba(246, 239, 230, 0.16);
  --text: #f6efe6;
  --muted: #a99e91;
  --muted-2: #7d746a;
  --accent: #f2a33c;
  --accent-soft: #f7c47a;
  --accent-deep: #b96a1f;
  --accent-rgb: 242, 163, 60;
  --accent-light: #ffd08a;
  --on-accent: #1b1308;
  --green: #6fca9f;
  --green-rgb: 111, 202, 159;
  --text-soft: #d7cdbf;
  --text-dim: #8f8579;
  --text-faint: #6d655c;
  --danger: #ef7b6b;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Zawgyi", "Padauk", "Noto Sans Myanmar", "Myanmar Text", "Pyidaungsu", system-ui, sans-serif;
  --header-h: 68px;
  --nav-h: 64px;
}

html.font-unicode {
  --font: "Padauk", "Noto Sans Myanmar", "Myanmar Text", "Pyidaungsu", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }
body.sheet-open, body.player-open { overflow: hidden; }
body.player-open .mini-player, body.player-open .bottomnav { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(var(--accent-rgb), 0.13), transparent 62%),
    radial-gradient(700px 460px at -8% 22%, rgba(var(--green-rgb), 0.07), transparent 60%),
    linear-gradient(180deg, #0d0b09 0%, #0b0a08 46%, #0a0907 100%);
  z-index: -2;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(11, 10, 8, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1220px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(145deg, var(--accent-soft), var(--accent));
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.28);
}
.brand-word {
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 9px 2px;
  line-height: 1.7;
  transform: translateY(-1px);
}
.brand-small .brand-word { font-size: 20px; }

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.topnav a {
  padding: 7px 13px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  transition: color .18s, background .18s;
}
.topnav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.topnav a.active { color: var(--text); background: rgba(var(--accent-rgb), 0.13); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  transition: border-color .2s, background .2s;
}
.search-pill:focus-within { border-color: rgba(var(--accent-rgb),.45); background: rgba(255,255,255,0.05); }
.search-pill input {
  width: 178px;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.search-pill input::placeholder { color: var(--muted-2); }
.install-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .18s, border-color .18s, background .18s;
}
.install-chip:hover { color: var(--accent-soft); border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.06); }
.install-chip svg { flex-shrink: 0; }
.premium-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.22);
}
.premium-chip.is-active {
  color: var(--accent-soft);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: none;
}

/* ---------------- layout ---------------- */
#app { min-height: calc(100vh - var(--header-h)); }
.page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 24px 120px;
}
.page-narrow { max-width: 860px; }
.page-head { margin-bottom: 26px; }
.page-eyebrow {
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.page-title {
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.45;
}
.page-sub { color: var(--muted); margin-top: 6px; max-width: 62ch; }

.section { margin-top: 42px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-title .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb),.1);
}
.section-link { color: var(--muted); font-size: 14px; }
.section-link:hover { color: var(--accent-soft); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4.6vw, 54px);
  overflow: hidden;
  background:
    radial-gradient(700px 320px at 86% 0%, rgba(var(--accent-rgb), 0.17), transparent 65%),
    linear-gradient(140deg, #1d1711, #12100c 60%);
}
.hero::after {
  content: "“";
  position: absolute;
  right: 36px;
  bottom: -66px;
  font-size: 260px;
  line-height: 1;
  color: rgba(var(--accent-rgb), 0.07);
  font-family: Georgia, serif;
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.005em;
  max-width: 24ch;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
  font-size: 16.5px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-stat strong { display: block; font-size: 22px; line-height: 1.4; }
.hero-stat span { font-size: 13px; color: var(--muted); }

/* ---------------- discover toolbar ---------------- */
.discover-tools {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  color: var(--muted);
  max-width: 460px;
  transition: border-color .2s, background .2s;
}
.search-box:focus-within { border-color: rgba(var(--accent-rgb),.45); background: rgba(255,255,255,.05); }
.search-box input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  min-width: 0;
}
.search-box input::placeholder { color: var(--muted-2); }

/* ---------------- how it works ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb),.35);
  background: rgba(var(--accent-rgb),.1);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 10px;
}
.step strong { display: block; font-size: 16px; }
.step p { color: var(--muted); font-size: 13.5px; line-height: 1.8; margin-top: 5px; }

/* ---------------- plan side features ---------------- */
.plan-side-list { display: grid; gap: 10px; }
.mini-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.028);
  color: var(--accent);
  font-size: 14px;
}
.mini-feature span { color: var(--text-soft); font-size: 13.5px; line-height: 1.6; }
.mini-feature strong { color: var(--text); }

/* ---------------- back link ---------------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 20px;
  padding: 6px 12px 6px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .18s, background .18s;
}
.back-link:hover { color: var(--text); background: rgba(255,255,255,.04); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  transition: transform .16s ease, background .18s, border-color .18s, opacity .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.22);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.3); }
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.07); }
.btn-quiet { background: none; height: auto; padding: 0; color: var(--muted); font-weight: 400; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 42px; height: 42px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.icon-btn:hover { background: rgba(var(--accent-rgb),.1); border-color: rgba(var(--accent-rgb),.4); }
.icon-btn.is-on { color: var(--accent); border-color: rgba(var(--accent-rgb),.5); background: rgba(var(--accent-rgb),.1); }

/* ---------------- chips / search ---------------- */
.chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all .18s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active {
  color: var(--on-accent);
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  font-weight: 700;
}

/* ---------------- book grid / covers ---------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 26px 20px;
}
.book-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  cursor: pointer;
  position: relative;
}
.book-card .cover-wrap { position: relative; }
.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  padding: 16px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(120% 78% at 18% 0%, rgba(255,255,255,0.23), transparent 55%),
    linear-gradient(160deg, var(--from), var(--to));
  box-shadow: 0 16px 38px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.09);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s;
  isolation: isolate;
  color: #fff;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.34));
  z-index: -1;
}
.book-card:hover .cover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: 0 28px 54px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.14);
}
.cover-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.cover-top .seal {
  width: 22px; height: 22px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 8px;
  letter-spacing: 0;
}
.cover-title {
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 2px 18px rgba(0,0,0,.3);
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cover-author {
  font-size: 11.5px;
  color: rgba(255,255,255,.78);
  margin-top: 7px;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}
.cover-shape {
  position: absolute;
  right: -6px;
  top: 26%;
  font-size: 92px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,.14);
  pointer-events: none;
  user-select: none;
}
.cover-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: rgba(0,0,0,.22);
}
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.cover.has-image { padding: 0; }
.cover.has-image::after { background: none; }
.cover-actions {
  position: absolute;
  inset: auto 10px 10px auto;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s, transform .2s;
}
.book-card:hover .cover-actions { opacity: 1; transform: none; }
.cover-play {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: rgba(18, 14, 9, 0.9);
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  backdrop-filter: blur(6px);
}
.cover-play:hover { transform: scale(1.06); }

.book-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0,0,0,.3);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.book-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}
.badge-premium {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 2;
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-light), #f2a33c);
  border-radius: 999px;
  padding: 2px 9px 3px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.book-info { min-width: 0; }
.book-info h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-info .author {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-info .meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 5px;
}
.book-info .meta i {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--muted-2);
  display: inline-block;
}

/* ---------------- continue listening ---------------- */
.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 12px;
}
.continue-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.continue-card:hover { border-color: rgba(var(--accent-rgb),.35); background: rgba(var(--accent-rgb),.05); }
.continue-card .cover { width: 58px; aspect-ratio: 3/4; border-radius: 8px; padding: 0; flex-shrink: 0; box-shadow: none; }
.continue-card .cover-title { display: none; }
.continue-card .cover-top { display: none; }
.continue-text { min-width: 0; flex: 1; }
.continue-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-text small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}
.mini-bar {
  height: 3px;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  margin-top: 9px;
  overflow: hidden;
}
.mini-bar span {
  display: block; height: 100%;
  background: var(--accent);
}
.continue-play {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,.25);
  display: grid; place-items: center;
  color: var(--accent);
  cursor: pointer;
}

/* ---------------- book detail ---------------- */
.detail-top {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 46px);
  align-items: start;
}
.detail-cover-col { position: relative; }
.detail-cover-col .cover {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.1);
}
.detail-cover-col .cover-shape { font-size: 112px; }
.detail-cover-col .cover-title { font-size: 27px; }
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb),.3);
  background: rgba(var(--accent-rgb),.08);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 14px;
}
.detail-title {
  font-size: clamp(27px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.45;
}
.detail-en {
  color: var(--muted-2);
  font-size: 15px;
  margin-top: 2px;
  letter-spacing: .01em;
}
.detail-author {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
}
.detail-blurb {
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.95;
  max-width: 64ch;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.detail-progress-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.takeaways {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: linear-gradient(150deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}
.takeaways h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.takeaways h3::before { content: "✦"; color: var(--accent); font-size: 14px; }
.takeaways ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.takeaways li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.7;
}
.takeaways li::before {
  content: "";
  position: absolute;
  left: 2px; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.1);
}

.chapter-list { display: grid; gap: 9px; }
.chapter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.022);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.chapter-row:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.chapter-row.is-current { border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.07); }
.chapter-row.is-locked { opacity: .78; }
.chapter-num {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.chapter-row.is-current .chapter-num { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.chapter-body { min-width: 0; flex: 1; }
.chapter-body strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
}
.chapter-body small { color: var(--muted-2); font-size: 12px; }
.chapter-tail { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 12.5px; flex-shrink: 0; }
.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--accent-soft);
  background: rgba(var(--accent-rgb),.1);
  border: 1px solid rgba(var(--accent-rgb),.28);
  border-radius: 999px;
  padding: 2px 9px 3px;
}
.chapter-teaser {
  margin: 2px 0 0 48px;
  padding: 14px 16px;
  border-left: 2px solid rgba(var(--accent-rgb),.35);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  background: rgba(255,255,255,.02);
  border-radius: 0 12px 12px 0;
  position: relative;
}
.chapter-teaser .fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--bg));
}
.premium-banner {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(var(--accent-rgb),.25);
  border-radius: var(--radius);
  padding: 20px 22px;
  background:
    radial-gradient(400px 140px at 90% 0%, rgba(var(--accent-rgb),.16), transparent 70%),
    linear-gradient(140deg, #1d1711, #14110d);
}
.premium-banner .pb-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb),.14);
  color: var(--accent);
  flex-shrink: 0;
}
.premium-banner div { flex: 1; min-width: 190px; }
.premium-banner strong { display: block; font-size: 16px; }
.premium-banner p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* ---------------- library ---------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(150deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
}
.stat-card span { font-size: 12.5px; color: var(--muted); }
.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.5;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat-card strong small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }

.empty {
  text-align: center;
  padding: 46px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty .empty-ico { font-size: 32px; color: var(--accent); margin-bottom: 8px; }
.empty strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* ---------------- plans ---------------- */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.plan-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: linear-gradient(155deg, rgba(255,255,255,.05), rgba(255,255,255,.012));
  display: flex;
  flex-direction: column;
}
.plan-card.best {
  border-color: rgba(var(--accent-rgb),.5);
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(var(--accent-rgb),.2), transparent 70%),
    linear-gradient(155deg, #211910, #14110c);
  box-shadow: 0 24px 60px rgba(var(--accent-rgb),.09);
}
.plan-flag {
  position: absolute;
  top: -11px; right: 22px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  border-radius: 999px;
  padding: 2px 11px 3px;
}
.plan-name { font-size: 15px; color: var(--muted); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}
.plan-price strong { font-size: 40px; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--muted); font-size: 13px; }
.plan-note { color: var(--muted-2); font-size: 12.5px; margin-top: 3px; }
.plan-card .btn { margin-top: 20px; }
.plan-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.plan-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-soft);
}
.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--accent);
  font-size: 14px;
}

.plans-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(600px 280px at 88% 10%, rgba(var(--accent-rgb),.17), transparent 65%),
    linear-gradient(140deg, #1d1711, #100e0a);
}
.plans-hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.45; }
.plans-hero h1 em { font-style: normal; color: var(--accent); }
.plans-hero p { color: var(--muted); margin-top: 12px; max-width: 48ch; }
.current-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(var(--green-rgb),.35);
  background: rgba(var(--green-rgb),.08);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 20px;
}
.current-plan .dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(var(--green-rgb),.15); }
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  background: rgba(255,255,255,.02);
}
.faq summary { cursor: pointer; font-size: 15px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 18px; line-height: 1.2; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.8; }

/* ---------------- account ---------------- */
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: 18px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(155deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
}
.panel + .panel { margin-top: 16px; }
.panel h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.panel h3 .accent { color: var(--accent); }
.panel .panel-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.profile-head { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 25px;
  font-weight: 700;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent-light), var(--accent));
  flex-shrink: 0;
}
.profile-head strong { display: block; font-size: 19px; }
.profile-head span { color: var(--muted); font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(0,0,0,.22);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .18s, background .18s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(var(--accent-rgb),.55);
  background: rgba(0,0,0,.32);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.8; }
.field-hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }

.sub-card {
  border-radius: 16px;
  padding: 20px;
  background:
    radial-gradient(300px 150px at 100% 0%, rgba(var(--accent-rgb),.18), transparent 70%),
    linear-gradient(145deg, #221a11, #15110c);
  border: 1px solid rgba(var(--accent-rgb),.28);
}
.sub-card .sub-state { font-size: 12px; color: var(--accent-soft); letter-spacing: .08em; }
.sub-card .sub-plan { font-size: 24px; font-weight: 700; margin-top: 4px; }
.sub-card .sub-until { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.sub-card .btn { margin-top: 16px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.setting-row:first-of-type { border-top: 0; }
.setting-row strong { display: block; font-size: 14.5px; font-weight: 700; }
.setting-row small { display: block; color: var(--muted); font-size: 12.5px; }
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  flex-shrink: 0;
}
.segmented button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  padding: 5px 12px 6px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.segmented button.active { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* ---------------- player ---------------- */
.player-view {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(800px 480px at 50% -10%, rgba(var(--accent-rgb),.13), transparent 60%),
    linear-gradient(180deg, #12100c, #0a0907);
  animation: slideUp .32s cubic-bezier(.2,.8,.25,1);
}
@keyframes slideUp { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.player-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 20px 12px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}
.player-bar .eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.player-bar .title { font-size: 13px; color: var(--muted); margin-left: 4px; }
.player-close { margin-left: auto; }
.player-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  overflow: hidden;
}
.player-side { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 20px; }
.player-side .cover {
  width: 100%;
  max-width: 270px;
  aspect-ratio: 3/4;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.1);
}
.player-side .cover-shape { font-size: 100px; }
.player-side .cover-title { font-size: 24px; }
.player-side h2 {
  font-size: 21px;
  line-height: 1.55;
  margin-top: 18px;
  font-weight: 700;
}
.player-side .player-chapter { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

.transcript-wrap {
  position: relative;
  height: min(62vh, 620px);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  mask-image: linear-gradient(180deg, transparent, #000 9%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 9%, #000 88%, transparent);
}
.transcript {
  overflow-y: auto;
  padding: 46% 8px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  position: relative;
  height: 100%;
}
.transcript::-webkit-scrollbar { display: none; }
.transcript-line {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 2.05;
  padding: 10px 16px 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: color .3s, background .3s, opacity .3s;
  position: relative;
}
.transcript-line:hover { color: var(--text-soft); background: rgba(255,255,255,.025); }
.transcript-line.past { color: var(--text-faint); }
.transcript-line.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(var(--accent-rgb),.12), rgba(var(--accent-rgb),.02));
}
.transcript-line.active::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb),.6);
}
.transcript-line .word { transition: color .2s, text-shadow .2s; }
.transcript-line.active .word.current {
  color: var(--accent-light);
  text-shadow: 0 0 18px rgba(var(--accent-rgb),.35);
}

.player-controls {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px max(18px, env(safe-area-inset-bottom));
}
.pc-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.pc-track {
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}
.pc-track::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.1);
}
.pc-fill {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  width: 0;
  pointer-events: none;
}
.pc-fill::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(var(--accent-rgb),.5);
}
.pc-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 26px);
  margin-top: 10px;
}
.ctl {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid; place-items: center;
  cursor: pointer;
  transition: color .18s, background .18s;
}
.ctl:hover { color: var(--text); background: rgba(255,255,255,.05); }
.ctl:disabled { opacity: .3; cursor: default; }
.ctl.rate {
  width: auto;
  min-width: 46px;
  padding: 0 10px;
  font-size: 12.5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  height: 32px;
  font-variant-numeric: tabular-nums;
}
.big-play {
  width: 66px; height: 66px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  color: var(--on-accent);
  background: linear-gradient(145deg, var(--accent-light), var(--accent));
  box-shadow: 0 12px 34px rgba(var(--accent-rgb),.28);
  cursor: pointer;
  transition: transform .16s;
}
.big-play:hover { transform: scale(1.045); }
.big-play.is-loading { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 12px rgba(var(--accent-rgb),.08); } }
.player-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .18s;
}
.chip-btn:hover { color: var(--text); border-color: var(--line-strong); }
.chip-btn.on { color: var(--accent-soft); border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.1); }

/* ---------------- mini player ---------------- */
.mini-player {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 0;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(28, 23, 17, 0.94);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
  overflow: hidden;
  animation: miniIn .3s cubic-bezier(.2,.8,.25,1);
}
@keyframes miniIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.mini-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.08); }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.mini-body {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 10px 8px 10px 11px;
  cursor: pointer;
  text-align: left;
}
.mini-cover {
  width: 40px; height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(150deg, var(--from, #f7b05b), var(--to, #5f2f0e));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.mini-text { min-width: 0; flex: 1; }
.mini-text strong { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mini-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; margin-right: 4px; }
.mini-eq i { width: 2px; height: 5px; background: var(--accent); border-radius: 2px; animation: eq 900ms ease-in-out infinite; }
.mini-eq i:nth-child(2) { animation-delay: 150ms; }
.mini-eq i:nth-child(3) { animation-delay: 300ms; }
.mini-eq.paused i { animation-play-state: paused; height: 5px; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 15px; } }
.eq-mini { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq-mini i { width: 2px; height: 4px; background: var(--accent); border-radius: 2px; animation: eq 900ms ease-in-out infinite; }
.eq-mini i:nth-child(2) { animation-delay: 140ms; }
.eq-mini i:nth-child(3) { animation-delay: 280ms; }
.mini-play {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb),.14);
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.mini-play .ico-pause { display: none; }
.mini-player.playing .mini-play .ico-pause { display: block; }
.mini-player.playing .mini-play .ico-play { display: none; }
.mini-player .ico-pause { display: none; }
.mini-player.playing .ico-pause { display: block; }
.mini-player.playing .ico-play { display: none; }

/* ---------------- bottom nav ---------------- */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 65;
  display: none;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 11, 9, .93);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.bottomnav a.active { color: var(--accent); }
.bottomnav a span { padding-bottom: 2px; }

/* ---------------- sheet / modal ---------------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 4, 3, .68);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  position: fixed;
  z-index: 101;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #17130e;
  padding: 24px 24px max(24px, env(safe-area-inset-bottom));
  box-shadow: 0 -24px 70px rgba(0,0,0,.6);
  animation: sheetIn .28s cubic-bezier(.2,.8,.25,1);
}
@keyframes sheetIn { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-handle {
  width: 38px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.16);
  margin: -8px auto 16px;
}
.sheet h2 { font-size: 21px; line-height: 1.5; }
.sheet .sheet-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.sheet .btn-block { margin-top: 16px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.06);
  display: grid; place-items: center;
  cursor: pointer; color: var(--muted);
}
.sheet-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.sheet-list li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text-soft); }
.sheet-list li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); font-size: 12px; top: 2px; }
.pay-methods { display: grid; gap: 9px; margin-top: 16px; }
.pay-method {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color .18s, background .18s;
}
.pay-method:hover, .pay-method.selected { border-color: rgba(var(--accent-rgb),.5); background: rgba(var(--accent-rgb),.07); }
.pay-method .pm-logo {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.pm-logo.kbz { background: #0b4da2; color: #fff; }
.pm-logo.wave { background: #f5c400; color: #1a1400; }
.pm-logo.card { background: rgba(255,255,255,.1); color: var(--text); }
.pay-method strong { display: block; font-size: 14.5px; }
.pay-method small { color: var(--muted); font-size: 12px; }
.pay-method .check { margin-left: auto; color: var(--accent); opacity: 0; }
.pay-method.selected .check { opacity: 1; }
.pay-total {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 16px; padding-top: 14px;
  font-size: 14px; color: var(--muted);
}
.pay-total strong { color: var(--text); font-size: 18px; }
.receipt {
  text-align: center;
  padding: 12px 0 0;
}
.receipt .ok-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  color: #10251c;
  background: linear-gradient(145deg, #a5ebc9, var(--green));
  box-shadow: 0 0 0 10px rgba(var(--green-rgb),.08);
}

/* ---------------- studio ---------------- */
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.studio-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: rgba(255,255,255,.02);
  max-height: 640px;
  overflow-y: auto;
}
.studio-preview h4 { font-size: 15px; margin-top: 18px; color: var(--accent-soft); }
.studio-preview h4:first-child { margin-top: 0; }
.studio-preview p { font-size: 14px; color: var(--text-soft); line-height: 1.9; margin-top: 6px; }
.studio-preview .draft-line { padding: 4px 0 4px 14px; border-left: 1px solid var(--line); font-size: 14px; color: var(--text-soft); }
.code-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(0,0,0,.3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--accent-soft);
  white-space: pre-wrap;
  line-height: 1.7;
}
.studio-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.studio-stats strong { color: var(--text); }
.studio-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.studio-book {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.02);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.studio-book-cover .cover { aspect-ratio: 3/4; padding: 9px; border-radius: 8px; box-shadow: none; }
.studio-book-cover .cover-title { font-size: 11px; -webkit-line-clamp: 2; }
.studio-book-cover .cover-shape { font-size: 38px; }
.studio-book-cover .cover-top { font-size: 7px; }
.studio-book-cover .cover-author { font-size: 8px; margin-top: 3px; }
.studio-book strong {
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-book small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-book .btn { height: 30px; font-size: 11px; padding: 0 8px; margin-top: auto; }
.cover-edit-preview { width: 150px; margin: 12px auto 18px; }
.cover-edit-preview .cover { aspect-ratio: 3/4; border-radius: 10px; padding: 12px; box-shadow: 0 16px 36px rgba(0,0,0,.4); }
.cover-edit-preview .cover-title { font-size: 15px; }
.cover-edit-preview .cover-shape { font-size: 50px; }
.studio-draft-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.studio-draft-head strong { display: block; font-size: 15px; line-height: 1.6; }
.studio-cover {
  width: 54px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
}
.studio-cover-auto {
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #f7b05b, #5f2f0e);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.studio-warn {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-top: 10px;
}
.studio-image-preview { margin-top: 10px; }
.studio-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.studio-thumb {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0e0c0a;
}
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-thumb button {
  position: absolute;
  top: 3px; right: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 12, 9, .82);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.studio-thumb-static {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}

.cover-preview { display: flex; align-items: center; gap: 11px; margin-top: 8px; }
.cover-preview img {
  width: 74px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
}
.cover-preview span { font-size: 12px; color: var(--muted); }
.field input[type="file"] {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
}

/* ---------------- toast ---------------- */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 88px);
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}
.toast {
  background: rgba(34, 28, 21, .97);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px;
  box-shadow: 0 14px 30px rgba(0,0,0,.4);
  animation: toastIn .25s ease;
  text-align: center;
}
.toast.ok { border-color: rgba(var(--green-rgb),.4); }
.toast.err { border-color: rgba(239,123,107,.45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 36px 24px 110px;
  color: var(--muted);
}
.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px;
}
.footer-inner p { max-width: 42ch; font-size: 13.5px; margin-top: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; align-self: flex-start; }
.footer-links a:hover { color: var(--accent-soft); }
.footer-copy {
  max-width: 1220px;
  margin: 26px auto 0;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------------- misc states ---------------- */
.skeleton {
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.04) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-cover { aspect-ratio: 3/4; border-radius: 14px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}


/* ---------------- auth / welcome ---------------- */
body.auth-mode .topbar,
body.auth-mode .site-footer,
body.auth-mode .bottomnav,
body.auth-mode .mini-player,
body.auth-mode #playerView { display: none !important; }
body.auth-mode #app { min-height: 100dvh; }

.offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 123, 107, .4);
  color: #ffb3a7;
  background: rgba(239, 123, 107, .1);
  font-size: 11.5px;
  white-space: nowrap;
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px clamp(28px, 4.6vw, 70px);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 420px at 12% 6%, rgba(var(--accent-rgb), .18), transparent 62%),
    linear-gradient(150deg, #1c1610, #0b0a08 70%);
}
.auth-aside::after {
  content: "“";
  position: absolute;
  right: 20px;
  bottom: -110px;
  font-family: Georgia, serif;
  font-size: 340px;
  line-height: 1;
  color: rgba(var(--accent-rgb), .06);
  pointer-events: none;
}
.auth-brand { align-self: flex-start; position: relative; z-index: 1; }
.auth-aside-copy { position: relative; z-index: 1; max-width: 560px; margin: 36px 0; }
.auth-aside-copy h1 {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.48;
  margin-top: 18px;
}
.auth-aside-copy h1 em { font-style: normal; color: var(--accent); }
.auth-aside-copy p { color: var(--muted); margin-top: 16px; max-width: 46ch; font-size: 14.5px; }
.auth-covers { display: flex; align-items: flex-end; gap: 12px; margin-top: 30px; }
.auth-mini-cover {
  width: 88px;
  height: 122px;
  border-radius: 10px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, var(--from), var(--to));
  box-shadow: 0 14px 32px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.12);
  color: #fff;
}
.auth-mini-cover strong {
  font-size: 11px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.auth-mini-cover span { font-size: 8px; opacity: .75; margin-top: 3px; }
.auth-mini-cover.c1 { transform: translateY(-14px) rotate(-4deg); }
.auth-mini-cover.c2 { transform: rotate(4deg); }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; color: var(--text-soft); font-size: 13px; }
.auth-points li::before { content: "✓"; color: var(--accent); margin-right: 8px; }
.auth-aside-foot { position: relative; z-index: 1; color: var(--muted-2); font-size: 11px; }

.auth-main { display: grid; place-items: center; padding: 36px 24px; }
.auth-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(var(--accent-rgb), .1), transparent 70%),
    linear-gradient(155deg, #1b1611, #110e0a);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.auth-step-label { font-size: 10.5px; letter-spacing: .14em; color: var(--accent); text-transform: uppercase; }
.auth-step h2 { font-size: 23px; line-height: 1.5; margin-top: 5px; }
.auth-step p { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 7px; }
.auth-form { margin-top: 18px; }
.auth-form .field { margin-bottom: 12px; }
.phone-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  overflow: hidden;
  transition: border-color .18s;
}
.phone-field:focus-within { border-color: rgba(var(--accent-rgb), .55); }
.phone-field .cc {
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}
.phone-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 12px;
  outline: 0;
}
.otp-input {
  text-align: center;
  font-size: 25px;
  letter-spacing: .48em;
  padding-left: .48em !important;
  font-variant-numeric: tabular-nums;
}
.auth-demo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  border: 1px dashed rgba(var(--accent-rgb), .45);
  background: rgba(var(--accent-rgb), .08);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
}
.auth-demo span { font-size: 9.5px; letter-spacing: .1em; color: var(--accent); align-self: center; text-transform: uppercase; }
.auth-demo strong { font-size: 22px; letter-spacing: .18em; color: var(--accent-soft); text-align: right; }
.auth-demo small { grid-column: 1 / -1; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted-2); font-size: 11.5px; }
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.btn-google { background: #f7f2ea; color: #1b1308; border: 1px solid #fff; gap: 10px; }
.btn-google:hover { background: #fff; }
.auth-google-hint { text-align: center; margin-top: 8px; }
.auth-guest {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-terms { color: var(--muted-2); font-size: 10.5px; line-height: 1.7; text-align: center; margin-top: 14px; }
.auth-error {
  border: 1px solid rgba(239, 123, 107, .4);
  background: rgba(239, 123, 107, .08);
  color: #ffb3a7;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.7;
  margin-top: 12px;
}
.auth-phone-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.auth-link { border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; }
.auth-link:disabled { color: var(--muted-2); cursor: default; }
.auth-resend-line { text-align: center; margin-top: 10px; }
.auth-readonly { border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; color: var(--muted); font-size: 13.5px; background: rgba(0, 0, 0, .16); }
.auth-guest-box { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: rgba(255, 255, 255, .03); }
.auth-guest-box strong { display: block; font-size: 14.5px; }
.auth-guest-box p { color: var(--muted); font-size: 12.5px; line-height: 1.8; margin: 4px 0 12px; }

/* ---------------- custom voice ---------------- */
.voice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid rgba(var(--green-rgb), .35);
  background: rgba(var(--green-rgb), .07);
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 14px;
}
.voice-card strong { display: block; font-size: 14.5px; }
.voice-card small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.voice-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.voice-upload { margin-top: 16px; }
.voice-upload .field { margin-bottom: 10px; }
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.75;
  margin: 4px 0 12px;
  cursor: pointer;
}
.consent-check input { margin-top: 4px; accent-color: var(--accent); flex-shrink: 0; }
.segmented { flex-wrap: wrap; justify-content: flex-end; }
.voice-advanced { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.voice-advanced summary { cursor: pointer; color: var(--accent-soft); font-size: 12px; line-height: 1.8; }
.voice-advanced .field { margin-top: 10px; }


/* ---------------- library tabs / badges ---------------- */
.library-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 22px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.library-tabs::-webkit-scrollbar { display: none; }
.library-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .18s;
}
.library-tab svg { width: 14px; height: 14px; }
.library-tab em { font-style: normal; font-size: 10.5px; opacity: .65; }
.library-tab:hover { color: var(--text); border-color: var(--line-strong); }
.library-tab.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.library-tab.active em { opacity: .8; }
.badge-offline,
.badge-finished {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  line-height: 1.6;
  border-radius: 999px;
  padding: 2px 8px 3px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.badge-offline { top: 8px; left: 8px; color: #10251c; background: rgba(165, 235, 201, .92); }
.badge-finished { bottom: 8px; left: 8px; color: var(--on-accent); background: rgba(255, 215, 155, .94); }
.badge-offline svg,
.badge-finished svg { width: 10px; height: 10px; }
.offline-note {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 255, 255, .02);
}
.offline-note svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.progress-toast { display: flex; align-items: center; gap: 9px; }
.progress-toast .spinner { width: 14px; height: 14px; color: var(--accent); }

/* ---------------- install banner & guides ---------------- */
.install-label { white-space: nowrap; }
.install-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--accent-rgb),.28);
  border-radius: 16px;
  background:
    radial-gradient(360px 120px at 90% 0%, rgba(var(--accent-rgb),.14), transparent 70%),
    rgba(255,255,255,.025);
}
.install-banner-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--accent);
  background: rgba(var(--accent-rgb),.12);
}
.install-banner-text { flex: 1; min-width: 0; }
.install-banner-text strong { display: block; font-size: 14.5px; line-height: 1.5; }
.install-banner-text span { display: block; color: var(--muted); font-size: 12px; line-height: 1.7; }
.install-banner .btn { flex-shrink: 0; }

.install-guide { display: grid; gap: 8px; margin: 18px 0; }
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255,255,255,.025);
}
.install-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: rgba(var(--accent-rgb),.14);
  border: 1px solid rgba(var(--accent-rgb),.35);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.install-step-body { flex: 1; min-width: 0; }
.install-step-body strong { display: block; font-size: 14px; line-height: 1.6; }
.install-step-body p { color: var(--muted); font-size: 12px; line-height: 1.75; margin-top: 4px; }
.ios-share-visual {
  width: 57px; height: 57px;
  display: grid; place-items: center;
  margin: 9px 0 4px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.035);
  color: var(--accent-soft);
}
.install-arrow { text-align: center; color: var(--muted-2); font-size: 18px; line-height: 1; }

@media (max-width: 560px) {
  .install-banner { align-items: flex-start; flex-wrap: wrap; padding: 13px 14px; }
  .install-banner-text { flex-basis: calc(100% - 56px); }
  .install-banner .btn { width: 100%; margin-top: 2px; }
  .install-chip { height: 31px; padding: 0 9px; font-size: 11px; }
  .install-chip svg { width: 13px; height: 13px; }
}
@media (max-width: 380px) {
  .install-label { display: none; }
  .install-chip { padding: 0 10px; }
}

/* ---------------- admin ---------------- */
body.admin-mode .topbar,
body.admin-mode .site-footer,
body.admin-mode .bottomnav,
body.admin-mode .mini-player,
body.admin-mode #playerView { display: none !important; }
body.admin-mode #app { min-height: 100dvh; }

.admin-page { max-width: 1220px; margin: 0 auto; padding: 24px; }
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.admin-top-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.admin-user { color: var(--muted); font-size: 12px; margin-right: 4px; }
.admin-stats { margin-bottom: 28px; }
.admin-section { margin-top: 28px; }
.admin-books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.admin-book {
  display: flex;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.022);
  min-width: 0;
}
.admin-book-cover { width: 78px; flex-shrink: 0; }
.admin-book-cover .cover { aspect-ratio: 3/4; padding: 7px; border-radius: 7px; box-shadow: none; }
.admin-book-cover .cover-top, .admin-book-cover .cover-author { display: none; }
.admin-book-cover .cover-title { font-size: 9px; -webkit-line-clamp: 2; }
.admin-book-cover .cover-shape { font-size: 30px; }
.admin-book-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.admin-book-body strong { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-book-body small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-book-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.admin-book-actions .btn { height: 28px; font-size: 10.5px; padding: 0 8px; }
.admin-preg-status { margin-top: 3px; font-size: 10px; }
.admin-reviews { display: grid; gap: 9px; }
.admin-review {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
}
.admin-review p { color: var(--text-soft); font-size: 13px; line-height: 1.8; margin-top: 3px; }
.admin-review .review-top { flex-wrap: wrap; }
.admin-review .review-date { margin-left: auto; }
.admin-review .auth-link { margin-top: 5px; text-decoration: underline; text-underline-offset: 2px; }
.admin-login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.admin-login { width: min(390px, 100%); }
.admin-login .brand { margin-bottom: 18px; }
.admin-login h1 { font-size: 24px; line-height: 1.5; }
.admin-login > p { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.admin-login .field { margin-bottom: 12px; }
.admin-login .auth-guest { margin-top: 16px; }

@media (max-width: 860px) {
  .admin-page { padding: 16px; }
  .admin-top { align-items: flex-start; }
  .admin-top-actions { gap: 5px; }
  .admin-top-actions .btn { height: 32px; font-size: 11.5px; padding: 0 10px; }
  .admin-books { grid-template-columns: 1fr; }
  .admin-book-cover { width: 70px; }
}

/* ---------------- ratings & reviews ---------------- */
.book-rating-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.stars { display: inline-flex; gap: 1px; letter-spacing: .5px; color: #4a423a; }
.stars .on { color: var(--accent); }
.review-count { color: var(--muted); font-size: 12px; }
.review-empty { color: var(--muted-2); font-size: 12.5px; }
.reviews-section {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: linear-gradient(150deg, rgba(255,255,255,.032), rgba(255,255,255,.01));
}
.reviews-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.reviews-head h2 { font-size: 19px; line-height: 1.5; }
.review-summary { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.review-summary strong { color: var(--text); }
.reviews-list { display: grid; gap: 0; margin-top: 14px; }
.review-item { border-top: 1px solid var(--line); padding: 13px 0; }
.review-item:first-child { border-top: 0; padding-top: 0; }
.review-top { display: flex; align-items: center; gap: 7px; }
.review-top strong { font-size: 13.5px; }
.you-pill { font-size: 9px; font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 1px 7px 2px; }
.review-date { margin-left: auto; color: var(--muted-2); font-size: 10.5px; }
.review-stars { font-size: 12px; margin-top: 1px; }
.review-item p { color: var(--text-soft); font-size: 13.5px; line-height: 1.85; margin-top: 5px; }
.review-empty-box {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.card-rating { color: var(--accent-soft); }
.star-picker { display: flex; justify-content: center; gap: 7px; margin: 18px 0 20px; }
.star-picker button {
  border: 0;
  background: none;
  color: rgba(255,255,255,.18);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s, color .15s;
  padding: 0 2px;
}
.star-picker button.active { color: var(--accent); text-shadow: 0 0 16px rgba(var(--accent-rgb),.45); }
.star-picker button:hover { transform: scale(1.1); }

/* chapter picker inside player */
.sheet-chapters {
  display: grid;
  gap: 6px;
  margin: 14px 0 10px;
  overflow: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sheet-chapters::-webkit-scrollbar { display: none; }
.sheet-chapters.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sheet-chapters.compact .sheet-chapter { padding: 8px 10px; gap: 8px; }
.sheet-chapters.compact .sc-num { width: 28px; height: 28px; border-radius: 8px; }
.sheet-chapters.compact .sc-body strong { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.sheet-chapters.compact .sc-body small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sheet-chapters.compact .sc-tail { display: none; }
.sheet-chapter {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.022);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s;
}
.sheet-chapter:hover { border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.sheet-chapter.current { border-color: rgba(var(--accent-rgb),.4); background: rgba(var(--accent-rgb),.07); }
.sheet-chapter.locked { opacity: .74; }
.sc-num {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 12px;
}
.sheet-chapter.current .sc-num { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.sc-body { flex: 1; min-width: 0; }
.sc-body strong { display: block; font-size: 13.5px; line-height: 1.55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-body small { color: var(--muted); font-size: 11px; }
.sc-tail { flex-shrink: 0; color: var(--muted); }

/* ---------------- reader ---------------- */
.reader-page { max-width: 900px; padding-bottom: 150px; }

.reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.reader-bar .back-link { margin-bottom: 0; }
.reader-bar-actions { display: flex; align-items: center; gap: 7px; }
.reader-bar-actions .icon-btn { width: 38px; height: 38px; }

.reader-hero {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  background:
    radial-gradient(500px 240px at 95% 0%, rgba(var(--accent-rgb), .09), transparent 70%),
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
}
.reader-cover .cover { aspect-ratio: 3/4; border-radius: 12px; padding: 13px; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.reader-cover .cover-title { font-size: 17px; }
.reader-cover .cover-shape { font-size: 62px; }
.reader-cover .cover-top { font-size: 8px; }
.reader-cover .cover-author { font-size: 9px; }
.reader-meta h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.5; margin-top: 8px; }
.reader-meta .detail-badge { margin-bottom: 4px; }
.reader-meta .detail-meta { margin-top: 12px; }

.reader-toc {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 14px;
  padding: 10px 0;
  background: rgba(11, 10, 8, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.toc-label { flex-shrink: 0; font-size: 11px; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.toc-scroll { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.toc-scroll::-webkit-scrollbar { display: none; }
.toc-chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--muted);
  border-radius: 999px;
  height: 32px;
  padding: 0 13px;
  font-size: 12px;
  cursor: pointer;
  transition: all .18s;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toc-chip:hover { color: var(--text); border-color: var(--line-strong); }
.toc-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }

.read-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(255,255,255,.03), rgba(255,255,255,.008));
  margin-bottom: 10px;
  scroll-margin-top: 120px;
  overflow: hidden;
}
.read-section[open] { border-color: rgba(var(--accent-rgb),.24); background: rgba(255,255,255,.025); }
.read-section summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  cursor: pointer;
  user-select: none;
}
.read-section summary::-webkit-details-marker { display: none; }
.rs-num {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.read-section[open] .rs-num { background: rgba(var(--accent-rgb),.14); border-color: rgba(var(--accent-rgb),.4); color: var(--accent); }
.rs-head { flex: 1; min-width: 0; }
.rs-head strong { display: block; font-size: 15.5px; line-height: 1.55; }
.rs-head small { display: block; color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }
.rs-chev { color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.read-section[open] .rs-chev { transform: rotate(180deg); color: var(--accent); }
.rs-body { padding: 4px 20px 22px 65px; }
.read-text p {
  font-size: 17.5px;
  line-height: 2.05;
  color: #d8cec1;
  margin: 0 0 14px;
}
.read-text p:last-child { margin-bottom: 0; }
.read-play { margin-bottom: 18px; }
.read-keypoints {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 18px;
  background: rgba(var(--accent-rgb),.045);
}
.read-keypoints > strong { font-size: 13.5px; color: var(--accent-soft); }
.read-keypoints ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 7px; }
.read-keypoints li { position: relative; padding-left: 16px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.read-keypoints li::before { content: "◆"; position: absolute; left: 0; color: var(--accent); font-size: 7px; top: 7px; }
.read-locked { display: flex; gap: 12px; color: var(--muted); }
.read-locked svg { flex-shrink: 0; margin-top: 8px; color: var(--accent); }
.read-locked p { font-size: 15px; line-height: 1.9; color: var(--muted); margin: 0 0 8px; }
.read-lock-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--accent-rgb),.28);
  border-radius: 12px;
  background: rgba(var(--accent-rgb),.07);
}
.read-lock-cta strong { font-size: 14px; }
.read-lock-cta span { color: var(--muted); font-size: 12px; }
.read-lock-cta .btn { margin-top: 7px; }
.read-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.read-figure {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0e0c0a;
  padding: 0;
  cursor: zoom-in;
  transition: border-color .18s, transform .18s;
}
.read-figure:hover { border-color: rgba(var(--accent-rgb),.4); transform: translateY(-1px); }
.read-figure img { width: 100%; height: auto; display: block; }
.lightbox-img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }

.reader-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 12px;
}

@media (max-width: 860px) {
  .reader-page { padding-bottom: 180px; }
  .reviews-section { padding: 18px 16px; }
  .reviews-head h2 { font-size: 17px; }
  .review-date { display: none; }
  .reader-hero { grid-template-columns: 105px minmax(0, 1fr); gap: 15px; padding: 14px; align-items: start; }
  .reader-cover .cover { padding: 9px; border-radius: 9px; }
  .reader-cover .cover-title { font-size: 11px; }
  .reader-cover .cover-shape { font-size: 38px; }
  .reader-cover .cover-top, .reader-cover .cover-author { display: none; }
  .reader-meta h1 { font-size: 19px; }
  .reader-meta .detail-en { font-size: 12px; }
  .reader-meta .detail-author { font-size: 12.5px; margin-top: 4px; }
  .reader-meta .detail-meta { gap: 5px; margin-top: 8px; }
  .reader-meta .meta-pill { font-size: 10.5px; padding: 2px 8px; }
  .reader-meta .hero-actions { margin-top: 10px !important; gap: 7px; }
  .reader-meta .hero-actions .btn { height: 36px; padding: 0 12px; font-size: 12.5px; }
  .reader-toc { margin: 16px -16px 10px; padding: 9px 16px; }
  .rs-body { padding: 2px 16px 18px; }
  .read-text p { font-size: 16.5px; line-height: 2; }
  .read-section summary { padding: 13px 14px; gap: 10px; }
  .rs-num { width: 30px; height: 30px; }
  .reader-foot { flex-direction: column; align-items: flex-start; }
}

/* ---------------- responsive ---------------- */
@media (min-width: 861px) {
  .mini-player {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: 400px;
  }
  .toast-wrap { bottom: 100px; }
}

@media (max-width: 1024px) {
  .detail-top { grid-template-columns: 200px minmax(0, 1fr); }
  .detail-cover-col .cover-title { font-size: 22px; }
  .player-body { grid-template-columns: 230px minmax(0, 1fr); }
  .player-side .cover { max-width: 210px; }
  .plans-hero { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .topnav { display: none; }
  .search-pill { display: none; }
  .premium-chip { margin-left: 0; height: 34px; padding: 0 13px; font-size: 13px; }
  .install-chip { height: 32px; padding: 0 10px; font-size: 11.5px; }
  .brand-tag { display: none; }
  .bottomnav { display: flex; }
  .site-footer { padding-bottom: calc(var(--nav-h) + 64px); }
  .page { padding: 22px 16px 60px; }
  .hero { padding: 26px 20px; border-radius: 22px; }
  .hero-sub { font-size: 15px; }
  .hero-stats { gap: 20px; }
  .hero-stat strong { font-size: 19px; }
  .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 13px; }
  .cover { padding: 12px 11px; border-radius: 12px; }
  .cover-title { font-size: 16px; line-height: 1.5; }
  .cover-author { font-size: 10px; }
  .cover-shape { font-size: 62px; }
  .cover-top { font-size: 8px; }
  .cover-top .seal { width: 17px; height: 17px; font-size: 6px; }
  .cover-actions { opacity: 1; transform: none; inset: auto 7px 7px auto; }
  .cover-play { width: 34px; height: 34px; }
  .book-info h3 { font-size: 14.5px; }
  .detail-top { grid-template-columns: 1fr; gap: 24px; }
  .detail-cover-col { display: flex; gap: 18px; align-items: flex-start; }
  .detail-cover-col .cover { width: 148px; flex-shrink: 0; border-radius: 12px; padding: 13px; }
  .detail-cover-col .cover-title { font-size: 17px; }
  .detail-cover-col .cover-shape { font-size: 54px; }
  .detail-cover-col .cover-top { font-size: 8px; }
  .detail-cover-col .cover-top .seal { display: none; }
  .detail-cover-col .cover-author { font-size: 9px; }
  .detail-title { font-size: 24px; }
  .detail-blurb { font-size: 15px; }
  .chapter-teaser { margin-left: 0; }
  .plan-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-preview { max-height: none; }
  .plans-hero { padding: 24px 20px; }
  .steps { grid-template-columns: 1fr; }
  .search-box { max-width: none; }
  .player-view { height: 100dvh; }
  .player-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    padding-top: 4px;
    gap: 8px;
  }
  .player-side {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding-bottom: 0;
  }
  .player-side .cover { width: 78px; max-width: 78px; border-radius: 10px; padding: 8px; }
  .player-side .cover-title { display: none; }
  .player-side .cover-shape { font-size: 36px; }
  .player-side .cover-top { display: none; }
  .player-side .cover-author { display: none; }
  .player-side h2 { font-size: 16.5px; margin-top: 0; }
  .player-side .player-chapter { font-size: 12px; }
  .transcript-wrap { height: auto; flex: 1; min-height: 0; }
  .transcript { padding: 34% 0; }
  .transcript-line { font-size: 19px; padding: 9px 14px 10px 16px; }
  .player-controls { padding-top: 4px; }
  .pc-row { gap: 8px; }
  .big-play { width: 58px; height: 58px; }
  .mini-player { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); }
  .toast-wrap { bottom: calc(var(--nav-h) + 86px); }
  .site-footer { padding-left: 16px; padding-right: 16px; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-aside { padding: 22px 20px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-aside-copy { margin: 16px 0 2px; }
  .auth-aside-copy h1 { font-size: 31px; line-height: 1.5; }
  .auth-aside-copy p { font-size: 13px; margin-top: 8px; }
  .auth-covers, .auth-points, .auth-aside-foot { display: none; }
  .auth-main { padding: 20px 16px 40px; }
  .auth-card { padding: 22px; border-radius: 20px; }
  .auth-step h2 { font-size: 21px; }
  .library-tabs { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 360px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .cover-actions { display: none; }
}

@media (min-width: 600px) and (max-width: 860px) {
  .detail-top { grid-template-columns: 200px minmax(0, 1fr); }
  .detail-cover-col { display: block; }
  .detail-cover-col .cover { width: 100%; border-radius: 16px; padding: 16px; }
  .detail-cover-col .cover-title { font-size: 19px; }
  .detail-cover-col .cover-shape { font-size: 72px; }
  .detail-cover-col .cover-top { font-size: 9px; }
}

@media (max-width: 599px) {
  .detail-cover-col { justify-content: center; padding: 4px 0 2px; }
  .detail-cover-col .cover { width: 164px; }
  .detail-cover-col .cover-title { font-size: 18px; }
}

@media (max-width: 560px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 11px; }
  .hero-title { font-size: 27px; }
  .hero { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Paper theme — white + red
   ============================================================ */
html[data-theme="paper"] {
  color-scheme: light;
  --bg: #f7f2ec;
  --bg-soft: #fffaf5;
  --card: #ffffff;
  --card-2: #fff7f3;
  --line: rgba(48, 26, 22, 0.11);
  --line-strong: rgba(48, 26, 22, 0.20);
  --text: #241714;
  --muted: #6f5a54;
  --muted-2: #9a827a;
  --accent: #d92d20;
  --accent-soft: #f04438;
  --accent-deep: #a91d14;
  --accent-rgb: 217, 45, 32;
  --accent-light: #ff8a80;
  --on-accent: #ffffff;
  --green: #12805c;
  --green-rgb: 18, 128, 92;
  --text-soft: #4a3732;
  --text-dim: #7a625b;
  --text-faint: #9a827a;
  --danger: #b42318;
  --shadow: 0 24px 60px rgba(80, 25, 20, 0.12);
}

html[data-theme="paper"] body::before {
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(var(--accent-rgb), 0.10), transparent 62%),
    radial-gradient(700px 460px at -8% 22%, rgba(var(--accent-rgb), 0.05), transparent 60%),
    linear-gradient(180deg, #fffdfa 0%, #f7f2ec 46%, #f1e9e2 100%);
}

html[data-theme="paper"] .topbar { background: rgba(255, 250, 245, 0.88); }
html[data-theme="paper"] .topnav a:hover,
html[data-theme="paper"] .back-link:hover,
html[data-theme="paper"] .chapter-row:hover,
html[data-theme="paper"] .sheet-chapter:hover,
html[data-theme="paper"] .transcript-line:hover,
html[data-theme="paper"] .ctl:hover { background: rgba(48, 26, 22, 0.05); }

html[data-theme="paper"] .hero,
html[data-theme="paper"] .plans-hero,
html[data-theme="paper"] .premium-banner,
html[data-theme="paper"] .sub-card,
html[data-theme="paper"] .auth-card,
html[data-theme="paper"] .reader-hero {
  background:
    radial-gradient(600px 300px at 88% 0%, rgba(var(--accent-rgb), 0.10), transparent 65%),
    linear-gradient(145deg, #fffdfb, #f6ece6);
}
html[data-theme="paper"] .plan-card.best {
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(var(--accent-rgb), 0.13), transparent 70%),
    linear-gradient(155deg, #fff9f6, #f8e9e3);
}
html[data-theme="paper"] .auth-aside {
  background:
    radial-gradient(700px 420px at 12% 6%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    linear-gradient(150deg, #fffaf6, #f3e8e1 70%);
}
html[data-theme="paper"] .player-view {
  background:
    radial-gradient(800px 480px at 50% -10%, rgba(var(--accent-rgb), 0.09), transparent 60%),
    linear-gradient(180deg, #fffdfb, #f4ebe5);
}

html[data-theme="paper"] .sheet,
html[data-theme="paper"] .mini-player,
html[data-theme="paper"] .bottomnav,
html[data-theme="paper"] .toast { background: rgba(255, 250, 245, 0.97); }
html[data-theme="paper"] .mini-player { box-shadow: 0 18px 40px rgba(80, 25, 20, 0.16); }
html[data-theme="paper"] .sheet { box-shadow: 0 -24px 70px rgba(80, 25, 20, 0.18); }
html[data-theme="paper"] .sheet-backdrop { background: rgba(40, 20, 15, 0.35); }

html[data-theme="paper"] .step,
html[data-theme="paper"] .mini-feature,
html[data-theme="paper"] .stat-card,
html[data-theme="paper"] .plan-card,
html[data-theme="paper"] .panel,
html[data-theme="paper"] .reviews-section,
html[data-theme="paper"] .continue-card,
html[data-theme="paper"] .faq details,
html[data-theme="paper"] .offline-note,
html[data-theme="paper"] .install-step,
html[data-theme="paper"] .auth-guest-box,
html[data-theme="paper"] .studio-preview,
html[data-theme="paper"] .studio-book,
html[data-theme="paper"] .admin-book,
html[data-theme="paper"] .admin-review,
html[data-theme="paper"] .sheet-chapter:not(.current),
html[data-theme="paper"] .pay-method:not(.selected),
html[data-theme="paper"] .search-pill,
html[data-theme="paper"] .search-box,
html[data-theme="paper"] .install-chip,
html[data-theme="paper"] .icon-btn:not(.is-on),
html[data-theme="paper"] .chip:not(.active),
html[data-theme="paper"] .chip-btn:not(.on),
html[data-theme="paper"] .library-tab:not(.active),
html[data-theme="paper"] .chapter-row:not(.is-current),
html[data-theme="paper"] .chapter-teaser { background: rgba(48, 26, 22, 0.035); }

html[data-theme="paper"] .btn:not(.btn-primary):not(.btn-google):not(.btn-quiet) {
  background: rgba(48, 26, 22, 0.05);
}
html[data-theme="paper"] .segmented { background: rgba(48, 26, 22, 0.06); }
html[data-theme="paper"] .install-banner {
  background:
    radial-gradient(360px 120px at 90% 0%, rgba(var(--accent-rgb), 0.09), transparent 70%),
    rgba(48, 26, 22, 0.025);
}
html[data-theme="paper"] .field input,
html[data-theme="paper"] .field textarea,
html[data-theme="paper"] .field select,
html[data-theme="paper"] .phone-field { background: rgba(255, 255, 255, 0.82); }
html[data-theme="paper"] .field input:focus,
html[data-theme="paper"] .field textarea:focus,
html[data-theme="paper"] .field select:focus { background: #fff; }
html[data-theme="paper"] .auth-readonly { background: rgba(48, 26, 22, 0.04); }
html[data-theme="paper"] .code-note { background: #fff; }
html[data-theme="paper"] .studio-thumb,
html[data-theme="paper"] .read-figure { background: #f1e8e2; }
html[data-theme="paper"] .continue-play { background: rgba(48, 26, 22, 0.05); }
html[data-theme="paper"] .mini-bar,
html[data-theme="paper"] .mini-progress,
html[data-theme="paper"] .pc-track::before { background: rgba(48, 26, 22, 0.12); }
html[data-theme="paper"] .sheet-handle { background: rgba(48, 26, 22, 0.18); }
html[data-theme="paper"] .sheet-close { background: rgba(48, 26, 22, 0.06); }

html[data-theme="paper"] .chapter-row.is-current,
html[data-theme="paper"] .sheet-chapter.current,
html[data-theme="paper"] .pay-method.selected { background: rgba(var(--accent-rgb), 0.08); }

html[data-theme="paper"] .stars { color: #d8c9c2; }
html[data-theme="paper"] .star-picker button { color: rgba(48, 26, 22, 0.20); }
html[data-theme="paper"] .badge-finished { color: #1b1308; }
html[data-theme="paper"] .btn-google { color: #1b1308; }
html[data-theme="paper"] .offline-pill,
html[data-theme="paper"] .auth-error { color: var(--danger); }
html[data-theme="paper"] .transcript-line { color: var(--text-dim); }
html[data-theme="paper"] .transcript-line.active .word.current { color: var(--accent-deep); }

html[data-theme="paper"] .skeleton {
  background: linear-gradient(100deg, rgba(48, 26, 22, 0.05) 30%, rgba(48, 26, 22, 0.09) 50%, rgba(48, 26, 22, 0.05) 70%);
  background-size: 200% 100%;
}
html[data-theme="paper"] .spinner { border-color: rgba(48, 26, 22, 0.2); border-top-color: currentColor; }

@media (max-height: 700px) {
  .sheet-chapters { gap: 5px; margin: 12px 0 8px; }
  .sheet-chapter { padding: 8px 11px; }
  .sheet-chapter .sc-num { width: 29px; height: 29px; }
  .sheet-chapter .sc-body small { font-size: 10.5px; }
}
