/* Risha website — colors follow the app's own theme. */
:root {
  --bg: #F1F4F8;
  --bg2: #E7EDF5;
  --surface: #FFFFFF;
  --surface2: #F6F8FB;
  --line: #E0E6EE;
  --text: #14181B;
  --muted: #57636C;
  --brand: #4F7FA3;
  --brand-2: #72A2C2;
  --brand-soft: #E3EEF6;
  --brand-ink: #FFFFFF;
  --accent: #3F51B5;
  --grad: linear-gradient(135deg, #5814B3 0%, #3F51B5 55%, #2253BE 100%);
  --like: #F83B46;
  --like-bg: #FDECEC;
  --teal: #0E8078;
  --teal-bg: #E2FCFB;
  --amber: #A5520E;
  --amber-bg: #FDF1E3;
  --gold: #A16207;
  --gold-bg: #FEF6DC;
  --verified: #1D9BF0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 30px rgba(31, 55, 90, .10);
  --shadow-lg: 0 24px 60px rgba(31, 55, 90, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 64px;
  --ui: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --read: "Noto Naskh Arabic", "Amiri", "Traditional Arabic", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101213; --bg2: #14181B; --surface: #1A1F24; --surface2: #20262C; --line: #2A323A;
    --text: #F2F4F6; --muted: #9AA6B1; --brand: #8FB8D6; --brand-2: #72A2C2; --brand-soft: #1E2C38;
    --brand-ink: #0C1822; --accent: #8C9EFF; --like-bg: #3A1D20; --teal: #5EE3D6; --teal-bg: #133331;
    --amber: #F4B26B; --amber-bg: #3A2A18; --gold: #F2C94C; --gold-bg: #3A3216;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101213; --bg2: #14181B; --surface: #1A1F24; --surface2: #20262C; --line: #2A323A;
  --text: #F2F4F6; --muted: #9AA6B1; --brand: #8FB8D6; --brand-2: #72A2C2; --brand-soft: #1E2C38;
  --brand-ink: #0C1822; --accent: #8C9EFF; --like-bg: #3A1D20; --teal: #5EE3D6; --teal-bg: #133331;
  --amber: #F4B26B; --amber-bg: #3A2A18; --gold: #F2C94C; --gold-bg: #3A3216;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui);
  font-size: 16px; line-height: 1.7; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
p { margin: 0 0 .8em; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.wrap.narrow { max-width: 780px; }
.block { margin-block: 40px; }

/* icons */
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.i.big { width: 48px; height: 48px; stroke-width: 1.5; color: var(--brand); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 20px; border-radius: 14px; border: 1.5px solid transparent; font-weight: 600; line-height: 1.2;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgba(79, 127, 163, .35); }
.btn-primary:hover { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand-2); }
.btn-light { background: #fff; color: #2B2F7A; }
.btn-light:hover { color: #2B2F7A; box-shadow: var(--shadow); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; border-radius: 12px; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; border-radius: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.icon-btn:hover { border-color: var(--brand-2); color: var(--brand); }

/* store buttons */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-block: 18px; }
.store-row.center { justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 18px 8px 20px;
  border-radius: 14px; background: #0B0D0F; color: #fff; border: 1px solid #2C3136; line-height: 1.15;
}
.store-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.store-btn small { display: block; font-size: .72rem; opacity: .85; font-weight: 500; }
.store-btn b { display: block; font-size: 1.12rem; }
.store-btn .play-logo { width: 26px; height: 28px; }
.store-btn .i { width: 26px; height: 26px; }
.store-btn.soon { background: transparent; color: var(--text); border: 1.5px dashed var(--muted); cursor: default; }
.store-btn.soon:hover { transform: none; box-shadow: none; color: var(--text); }
.store-btn.lg { min-height: 62px; padding-inline: 24px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  /* no backdrop blur: it forces a repaint on every scroll frame and caused the stutter */
  background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  transition: transform .25s ease;
}
.header-in { display: flex; align-items: center; gap: 18px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.3rem; color: var(--text); }
.brand img { border-radius: 11px; box-shadow: var(--shadow-sm); }
.main-nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.header-search { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding-inline: 12px 4px; height: 44px; }
.header-search input { border: 0; background: transparent; outline: none; width: 190px; font-size: .95rem; }
.header-search button { border: 0; background: transparent; width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.only-mobile { display: none; }

/* smart banner */
.smart-banner { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.smart-banner[hidden] { display: none; }
.smart-banner img { border-radius: 10px; }
.sb-text { flex: 1; min-width: 0; line-height: 1.3; }
.sb-text strong { display: block; }
.sb-sub { font-size: .8rem; color: var(--muted); }
.sb-close { border: 0; background: transparent; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }

/* hero */
.hero { position: relative; padding-block: 36px 12px; overflow: hidden; }
/* clip sideways only, so the search suggestions can open below the hero */
@supports (overflow: clip) { .hero { overflow-x: clip; overflow-y: visible; } }
.hero-copy { position: relative; z-index: 20; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 620px; z-index: -1;
  background: radial-gradient(40% 50% at 80% 30%, color-mix(in srgb, var(--brand-2) 35%, transparent), transparent 70%),
              radial-gradient(35% 45% at 15% 20%, color-mix(in srgb, #7C4DFF 22%, transparent), transparent 70%);
}
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero-in > *, .showcase-in > *, .dl-in > *, .novel-head > *, .novel-body > *, .footer-grid > * { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--brand); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -.5px; margin-top: 16px; }
:root[data-theme="dark"] .grad { --grad: linear-gradient(90deg, #9CC7E6, #B39DFF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad { --grad: linear-gradient(90deg, #9CC7E6, #B39DFF); } }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px 6px 6px; box-shadow: var(--shadow); }
.hero-search > .i { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; height: 44px; font-size: 1rem; }
.hero-art { position: relative; min-height: 520px; display: grid; place-items: center; }
.phone {
  position: relative; width: 250px; aspect-ratio: 600 / 1298; border-radius: 40px; padding: 8px;
  background: linear-gradient(145deg, #30353C, #0B0D10); box-shadow: 0 30px 60px rgba(20, 30, 50, .28), inset 0 0 0 1.5px #474D55;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 33px; background: #F1F4F8; }
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; width: 76px; height: 20px; margin-left: -38px; border-radius: 12px; background: #0B0D10; z-index: 1; }
.float-cover { position: absolute; width: 112px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; box-shadow: 0 18px 36px rgba(20, 30, 50, .3); z-index: 1; will-change: transform; animation: floaty 8s ease-in-out infinite; }
.fc1, .fc3 { animation-delay: -4s; }
.fc0 { top: 30px; inset-inline-start: 0; transform: rotate(-8deg); }
.fc1 { bottom: 40px; inset-inline-start: 18px; transform: rotate(6deg); z-index: 3; }
.fc2 { top: 60px; inset-inline-end: 0; transform: rotate(8deg); }
.fc3 { bottom: 20px; inset-inline-end: 24px; transform: rotate(-6deg); z-index: 3; }
@keyframes floaty { 50% { translate: 0 -10px; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0 0; }
.stats > div { background: var(--surface); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.stats dd { margin: 0; font-size: 1.7rem; font-weight: 700; color: var(--brand); order: -1; }
.stats dt { color: var(--muted); font-size: .92rem; }
.stats > div { display: flex; flex-direction: column; }

/* sections & rails */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin: 0; }
.section-head h2 .i { color: var(--brand); }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 600; font-size: .95rem; }
.rail-section { margin-block: 36px; }
.rail-wrap { position: relative; max-width: 1200px; margin-inline: auto; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 4px 16px 14px; scrollbar-width: none; scroll-padding-inline: 16px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > .card { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: 34%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text); opacity: 0; transition: opacity .2s;
}
.rail-wrap:hover .rail-btn { opacity: 1; }
.rail-btn.prev { inset-inline-start: 4px; }
.rail-btn.next { inset-inline-end: 4px; }
.rail-btn[disabled] { opacity: 0 !important; pointer-events: none; }

/* novel card */
.card { display: flex; flex-direction: column; min-width: 0; }
.card-cover { position: relative; display: block; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--bg2), var(--brand-soft)); box-shadow: 0 3px 10px rgba(31, 55, 90, .12); aspect-ratio: 2 / 3; }
.card-cover .cover { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .cover { transform: scale(1.04); }
.card-likes {
  position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #14181B; font-size: .8rem; font-weight: 700;
}
.card-likes .i { color: var(--like); width: 14px; height: 14px; }
.card-flag { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 999px; background: #FDE68A; color: #6B4E00; font-size: .75rem; font-weight: 700; }
.card-flag .i { width: 13px; height: 13px; }
.card-body { padding: 10px 2px 0; }
.card-title { font-size: 1rem; margin: 0 0 2px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: 0; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { font-size: .85rem; color: var(--muted); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.card-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; font-size: .78rem; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tg, var(--brand)) 13%, transparent); color: color-mix(in srgb, var(--tg, var(--brand)) 80%, var(--text)); font-weight: 600; }
.tag:hover { color: var(--tg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px 18px; }

/* promo */
.promo-card {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 28px; border-radius: 24px;
  background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); flex-wrap: wrap;
}
.promo-card h2 { font-size: 1.45rem; display: flex; gap: 10px; align-items: center; }
.promo-card p { opacity: .9; margin: 0; max-width: 62ch; }
.promo-card a:not(.btn):not(.store-btn) { color: #fff; text-decoration: underline; }
.promo-card.alt { background: linear-gradient(135deg, #0F2A43, #33658A); }
.promo-band { margin-block: 12px 36px; }

/* categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 92px; padding: 14px 16px;
  border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--tg), color-mix(in srgb, var(--tg) 55%, #000));
  box-shadow: var(--shadow-sm); transition: transform .2s ease;
}
.cat-tile::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .12); top: -30px; inset-inline-end: -20px; }
.cat-tile:hover { color: #fff; transform: translateY(-3px); }
.ct-name { font-weight: 700; font-size: 1.1rem; }
.ct-count { font-size: .85rem; opacity: .85; }

/* authors */
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.author-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.author-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.ac-name { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.ac-user { color: var(--muted); font-size: .85rem; }
.ac-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold-bg); color: var(--gold); font-size: .78rem; font-weight: 700; }
.ac-stats { display: flex; gap: 12px; margin-top: 8px; color: var(--muted); font-size: .85rem; }
.ac-stats span { display: inline-flex; gap: 4px; align-items: center; }
/* Avatar exactly like the app: light outer circle with a faint ring and soft shadow,
   inner circle tinted with the user's colour, a 2px border and the letter in that colour. */
/* display is forced so that no page-level rule for spans can ever reshape an avatar */
.avatar {
  --s: 44px; --ink: var(--av);
  display: inline-grid !important; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  padding: 3px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--av) 20%, transparent);
  box-shadow: 0 4px 8px color-mix(in srgb, var(--av) 15%, transparent);
}
.avatar > span {
  display: grid !important; place-items: center; width: 100%; height: 100%; border-radius: 50%; gap: 0 !important;
  background: color-mix(in srgb, var(--av) 10%, var(--surface)); border: 2px solid var(--ink); color: var(--ink);
  font-family: "Outfit", var(--ui); font-weight: 700; font-size: calc(var(--s) * .36); line-height: 1;
}
.avatar.xs { --s: 30px; padding: 2px; }
.avatar.xs > span { border-width: 1.5px; }
.avatar.sm { --s: 34px; padding: 2px; }
.avatar.lg { --s: 72px; }
.avatar.xl { --s: 116px; padding: 4px; box-shadow: 0 8px 22px color-mix(in srgb, var(--av) 22%, transparent); }
.avatar.xl > span { border-width: 3px; }
:root[data-theme="dark"] .avatar { --ink: color-mix(in srgb, var(--av) 62%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { --ink: color-mix(in srgb, var(--av) 62%, #fff); } }
/* The app's verified badge: blue 12-point seal with a white tick */
.verified { display: inline-flex; align-items: center; color: #1D9BF0; }
.verified .i { width: 1.05em; height: 1.05em; min-width: 16px; min-height: 16px; vertical-align: middle; }

/* showcase */
.showcase { margin-block: 56px; padding-block: 48px; background: var(--surface); border-block: 1px solid var(--line); }
.showcase-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.showcase h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-top: 14px; }
.features { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features li > .i { width: 42px; height: 42px; padding: 10px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.features b { display: block; }
.features span { color: var(--muted); font-size: .92rem; line-height: 1.6; display: block; }
.phones { position: relative; display: flex; justify-content: center; min-height: 480px; }
.phones .phone { width: 230px; }
.phones .p1 { transform: rotate(-5deg) translateX(-40px); z-index: 1; }
.phones .p2 { position: absolute; top: 48px; transform: rotate(5deg) translateX(70px); z-index: 2; }

.writers-band .wb-in { display: flex; gap: 20px; align-items: center; padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.writers-band .wb-in > div { flex: 1; min-width: 220px; }
.writers-band h2 { font-size: 1.35rem; }
.writers-band p { margin: 0; color: var(--muted); }

/* faq */
.faq h2 { font-size: 1.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 14px; margin: 0; }

/* crumbs & page heads */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; font-size: .88rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "‹"; margin-inline-start: 6px; opacity: .6; }
.crumbs a:hover { color: var(--brand); }
.page-head { padding-top: 28px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.narrow-head { max-width: 820px; text-align: center; }
.narrow-head .crumbs ol { justify-content: center; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 16px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--muted); }
.chip:hover { color: var(--tg, var(--brand)); border-color: var(--tg, var(--brand)); }
.chip.on { background: var(--tg, var(--brand)); border-color: var(--tg, var(--brand)); color: #fff; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg a { padding: 6px 12px; border-radius: 10px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.seg a.on { background: var(--brand); color: var(--brand-ink); }
.seg.small a { font-size: .82rem; padding: 5px 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 30px; }
.empty { text-align: center; padding: 50px 16px; background: var(--surface); border-radius: 24px; border: 1px dashed var(--line); }
.empty .i.big { margin: 0 auto 10px; }

/* novel page */
.novel-hero { position: relative; overflow: hidden; padding-block: 24px 36px; isolation: isolate; }
.novel-bg { position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center; filter: blur(28px) saturate(1.3); opacity: .5; transform: scale(1.15); will-change: transform; }
.novel-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 30%, transparent), var(--bg) 96%); }
.novel-head { display: grid; grid-template-columns: 270px 1fr; gap: 36px; align-items: start; }
.novel-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow-lg); }
.novel-info h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 8px 0 12px; }
.novel-author { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.novel-author > span:not(.avatar) { display: inline-flex; align-items: center; gap: 4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--text); margin: 0; }
.pill .i { width: 16px; height: 16px; }
.pill-like { background: var(--like-bg); border-color: transparent; color: var(--like); }
.pill-cat { background: var(--teal-bg); border-color: transparent; color: var(--teal); }
.pill-ch { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
.pill-gold { background: var(--gold-bg); border-color: transparent; color: var(--gold); }
.novel-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.novel-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.panel h2 { font-size: 1.25rem; }
.summary { font-size: 1.05rem; line-height: 2; }
.summary p { margin-bottom: .6em; }
.series { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.series a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface2); }
.series .current a { outline: 2px solid var(--brand-2); }
.chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.chapter a {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "num title state" "num meta state"; column-gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); transition: border-color .2s, transform .15s;
}
.chapter a:hover { border-color: var(--brand-2); color: inherit; }
.ch-num { grid-area: num; padding: 4px 10px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.ch-title { grid-area: title; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-meta { grid-area: meta; color: var(--muted); font-size: .82rem; display: inline-flex; gap: 4px; align-items: center; }
.ch-meta .i { width: 14px; height: 14px; }
.ch-state { grid-area: state; font-size: .82rem; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.ch-state.free { color: #fff; background: var(--brand); padding: 5px 12px; border-radius: 999px; }
.ch-state.app { color: var(--muted); }
.ch-state .i { width: 15px; height: 15px; }
.is-app .ch-title { opacity: .8; }
.gate-inline { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--brand-soft); }
.gate-inline p { margin: 0; }
.author-box .ab-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.author-box .ab-head b { display: inline-flex; gap: 4px; align-items: center; }
.author-box .ab-head > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.4; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; text-align: center; }
.mini-stats div { display: flex; flex-direction: column; padding: 8px; border-radius: 12px; background: var(--surface2); }
.mini-stats dd { margin: 0; font-weight: 700; order: -1; }
.mini-stats dt { font-size: .8rem; color: var(--muted); }
.app-box { text-align: center; }
.app-box img { margin: 0 auto 10px; border-radius: 14px; }
.app-box .store-btn { margin: 6px auto 0; width: 100%; justify-content: center; }
.checks { list-style: none; padding: 0; margin: 0 0 12px; text-align: start; }
.checks li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.checks .i { color: var(--teal); }
.novel-side { position: sticky; top: calc(var(--header-h) + 16px); }
.sticky-cta { display: none; }

/* reader */
.page-read { --fs: 21px; }
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--grad); transform-origin: right; }
.reader { padding-top: 22px; }
.reader-head { text-align: center; padding: 24px 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 26px; }
.rh-novel { display: inline-flex; align-items: center; gap: 12px; text-align: start; margin-bottom: 14px; }
.rh-novel img { border-radius: 8px; width: 48px; height: 72px; object-fit: cover; }
.rh-novel span { display: flex; flex-direction: column; line-height: 1.4; }
.reader-head h1 { font-family: var(--read); font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 10px 0 6px; }
.reader-tools { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px; border-radius: 16px; background: var(--surface2); }
.reader-tools .icon-btn { width: 38px; height: 38px; border-radius: 12px; }
.rt-label { color: var(--muted); display: inline-flex; }
.rt-sep { width: 1px; height: 24px; background: var(--line); margin-inline: 4px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); }
.sw-light { background: #FFFFFF; }
.sw-sepia { background: #F4ECD8; }
.sw-dark { background: #1A1F24; }
.swatch[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chapter-text {
  font-family: var(--read); font-size: var(--fs); line-height: 2.1; text-align: justify; text-justify: inter-word;
  padding: 28px clamp(18px, 4vw, 44px); border-radius: 24px; background: var(--paper, var(--surface)); color: var(--ink, var(--text));
  border: 1px solid var(--line); word-wrap: break-word; overflow-wrap: anywhere;
}
.chapter-text p { margin: 0 0 1em; }
.paper-sepia .chapter-text { --paper: #F4ECD8; --ink: #3B2F20; }
.paper-dark .chapter-text { --paper: #15191D; --ink: #DCDCDC; }
.paper-light .chapter-text { --paper: #FFFFFF; --ink: #14181B; }
.reader-end { margin-top: 26px; }
.next-card { text-align: center; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.gate { position: relative; }
.gate-fade { display: grid; gap: 14px; padding: 10px 30px 0; filter: blur(3px); opacity: .6; user-select: none; }
.gate-fade span { height: 14px; border-radius: 8px; background: var(--line); }
.gate-fade span:nth-child(2) { width: 88%; }
.gate-fade span:nth-child(3) { width: 94%; }
.gate-fade span:nth-child(4) { width: 70%; }
.gate-card { position: relative; margin-top: -20px; text-align: center; padding: 30px 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.gate-card h1, .gate-card h2 { font-size: clamp(1.35rem, 3.4vw, 1.8rem); margin-top: 12px; }
.gate-card > p:not(.pill) { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.gate-cover { width: 140px; margin: 0 auto 14px; border-radius: 14px; box-shadow: var(--shadow-lg); aspect-ratio: 2 / 3; object-fit: cover; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 4px; }
.gate-page { padding-block: 36px; }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* profile */
.profile-hero { position: relative; padding-block: 40px 30px; isolation: isolate; }
.profile-hero::before { content: ""; position: absolute; inset: 0 0 45%; z-index: -1; background: linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 40%, var(--accent))); opacity: .85; }
.profile-in { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; padding-top: 50px; }
.profile-info { flex: 1; min-width: 260px; background: var(--surface); border-radius: 24px; padding: 20px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.profile-info h1 { display: flex; align-items: center; gap: 6px; font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 0; }
.profile-info h1 .verified .i { width: 24px; height: 24px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.profile-stats div { display: flex; flex-direction: column; min-width: 84px; padding: 8px 14px; border-radius: 14px; background: var(--surface2); text-align: center; }
.profile-stats dd { margin: 0; font-weight: 700; font-size: 1.2rem; order: -1; }
.profile-stats dt { font-size: .82rem; color: var(--muted); }
.profile-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* download & writers */
.dl-hero { padding-block: 28px 20px; }
.dl-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; }
.dl-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.dl-icon { border-radius: 24px; box-shadow: var(--shadow-lg); margin-bottom: 18px; }
.dl-qr { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); max-width: 460px; }
.dl-qr img { border-radius: 10px; background: #fff; padding: 6px; }
.dl-qr p { margin: 0; color: var(--muted); }
.dl-facts { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.dl-facts li { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.dl-facts b { font-size: 1.2rem; color: var(--brand); }
.dl-facts span { font-size: .82rem; color: var(--muted); }
.center-title { text-align: center; font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.feature { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.feature > .i { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 10px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }
.cover-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 12px; }
.cover-wall img { border-radius: 14px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: var(--shadow); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps li { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.steps h2 { font-size: 1.08rem; margin: 10px 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; }

/* error */
.error-page { text-align: center; padding-block: 50px 30px; }
.error-art span { font-size: 6rem; font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .lead { margin-inline: auto; }
.big-search { display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 22px auto 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 16px 6px 6px; box-shadow: var(--shadow); }
.big-search > .i { color: var(--muted); }
.big-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; height: 48px; font-size: 1.05rem; }

/* footer */
.site-footer { margin-top: 60px; padding-block: 40px 20px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h2 { font-size: 1rem; margin-bottom: 10px; }
.footer-grid nav a { display: block; padding: 4px 0; color: var(--muted); font-size: .93rem; }
.footer-grid nav a:hover { color: var(--brand); }
.footer-brand p { color: var(--muted); font-size: .93rem; margin-top: 12px; max-width: 46ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

/* bottom nav (phones), modal, toast */
.bottom-nav { display: none; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 20, .62); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(420px, 100%); text-align: center; padding: 28px 22px 20px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-lg); animation: pop .22s ease; }
.modal-card > img:first-of-type { margin: 0 auto 10px; border-radius: 16px; }
.modal-card h2 { font-size: 1.3rem; }
.modal-card p { color: var(--muted); }
.modal-card .qr { margin: 6px auto 4px; background: #fff; padding: 8px; border-radius: 14px; }
.modal-close { position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; }
.modal .modal-ios, .modal .modal-desktop { display: none; }
.modal.is-ios .modal-ios, .modal.is-desktop .modal-desktop { display: block; }
.modal.is-ios .qr { display: none; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 95; padding: 10px 18px; border-radius: 14px; background: #14181B; color: #fff; box-shadow: var(--shadow-lg); font-size: .95rem; }
.toast[hidden] { display: none; }

/* responsive */
@media (max-width: 1080px) {
  .main-nav a:nth-child(n+4) { display: none; }
  .header-search input { width: 150px; }
}
@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .main-nav, .header-search { display: none; }
  .only-mobile { display: inline-grid; }
  .header-cta span { display: none; }
  .header-cta { width: 44px; padding: 0; }
  .hero-in, .showcase-in, .dl-in { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 22px; }
  .hero-art { min-height: 400px; margin-top: 4px; }
  .phone-stack { height: 390px; }
  .phone-stack .phone { width: 172px; border-radius: 30px; padding: 6px; }
  .phone-stack .phone img { border-radius: 25px; }
  .phone-stack .phone::before { top: 11px; width: 54px; height: 14px; margin-left: -27px; }
  .float-cover { width: 76px; }
  .fc0 { top: 20px; } .fc2 { top: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .novel-head { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 20px; }
  .novel-cover { width: min(240px, 62vw); margin-inline: auto; }
  .novel-author, .pills, .novel-actions { justify-content: center; }
  .novel-info .crumbs ol { justify-content: center; }
  .novel-body { grid-template-columns: minmax(0, 1fr); }
  .novel-side { position: static; }
  .features { grid-template-columns: 1fr; }
  .phones { min-height: 420px; }
  .phones .phone { width: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cover-wall { grid-template-columns: repeat(3, 1fr); }
  body { padding-bottom: 84px; }
  .bottom-nav {
    display: flex; position: fixed; z-index: 50; bottom: max(10px, env(safe-area-inset-bottom)); left: 12px; right: 12px; height: 64px;
    align-items: center; justify-content: space-around; border-radius: 26px; background: var(--surface);
    box-shadow: 0 10px 30px rgba(20, 30, 50, .18); border: 1px solid var(--line);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; color: var(--muted); min-width: 52px; }
  .bottom-nav a .i { width: 22px; height: 22px; }
  .bottom-nav .bn-main { width: 54px; height: 54px; border-radius: 50%; background: var(--brand-2); color: #fff; justify-content: center; margin-top: -26px; box-shadow: 0 10px 22px rgba(79, 127, 163, .45); }
  .bottom-nav .bn-main .i { width: 24px; height: 24px; }
  .page-novel .sticky-cta, .page-read .sticky-cta {
    display: flex; gap: 8px; position: fixed; z-index: 51; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom));
    padding: 8px; border-radius: 22px; background: var(--surface);
    box-shadow: 0 10px 30px rgba(20, 30, 50, .2); border: 1px solid var(--line); transform: translateY(140%); transition: transform .25s ease;
  }
  .sticky-cta .btn { flex: 1; }
  .sticky-cta.show { transform: none; }
  .page-novel.sticky-on .bottom-nav { transform: translateY(160%); }
  .bottom-nav { transition: transform .25s ease; }
}
@media (max-width: 640px) {
  .block { margin-block: 30px; }
  .rail { grid-auto-columns: 40vw; gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .author-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-card { padding: 16px 10px; }
  .ac-stats { gap: 8px; font-size: .78rem; }
  .promo-card { padding: 22px 18px; }
  .panel { padding: 18px 14px; border-radius: 20px; }
  .chapter a { grid-template-columns: auto 1fr; grid-template-areas: "num title" "num meta" "state state"; row-gap: 2px; }
  .ch-state { justify-self: start; margin-top: 6px; }
  .steps { grid-template-columns: 1fr; }
  .store-row .store-btn { flex: 1 1 150px; justify-content: center; }
  .chapter-text { padding: 20px 16px; border-radius: 18px; line-height: 2; }
  .page-read { --fs: 19px; }
  .reader-head { padding: 18px 12px; }
  .profile-in { justify-content: center; text-align: center; padding-top: 24px; }
  .profile-info h1, .profile-tags, .profile-stats, .profile-actions { justify-content: center; }
  .novel-actions .btn-lg { flex: 1 1 100%; }
  .gate-card { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .bottom-nav, .smart-banner, .sticky-cta, .reader-tools, .reader-end { display: none !important; }
}

/* ═════════════ Round 2: motion, smarter sections, speed ═════════════ */

/* Sections far below the fold are not laid out or painted until they come near. */
/* (not on sections with tilted phones: this containment clips anything reaching past the section) */
.rail-section, .numbers-block, .taste, .faq, .final-cta, .site-footer {
  content-visibility: auto; contain-intrinsic-size: auto 640px;
}

/* smooth page-to-page transitions (supported browsers only) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-group(novel-cover) { animation-duration: .35s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.novel-cover img { view-transition-name: novel-cover; }

/* reveal on scroll (only when scripts run, so nothing is ever hidden without them) */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .card .cover { opacity: 0; transition: opacity .45s ease, transform .35s ease; }
html.js .card .cover.ld { opacity: 1; }
/* safety net: if the script never runs, everything still appears after a moment */
html.js:not(.js-ok) .reveal, html.js:not(.js-ok) .card .cover { animation: show-anyway 0s 2.5s forwards; }
@keyframes show-anyway { to { opacity: 1; transform: none; } }

/* hero: three phones that take turns in front */
.phone-stack { position: relative; width: 100%; height: 560px; }
.phone-stack .ps { position: absolute; top: 50%; left: 50%; margin: 0; transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .9s ease, filter .9s ease; will-change: transform; }
.phone-stack .ps-front { transform: translate(-50%, -50%) scale(1); z-index: 3; }
.phone-stack .ps-l { transform: translate(-112%, -46%) rotate(-8deg) scale(.82); z-index: 1; opacity: .9; }
.phone-stack .ps-r { transform: translate(12%, -46%) rotate(8deg) scale(.82); z-index: 2; opacity: .9; }
.hero-art .float-cover { z-index: 4; }
.fc0 { top: 26px; inset-inline-start: 2%; rotate: -9deg; }
.fc1 { bottom: 34px; inset-inline-start: 8%; rotate: 7deg; }
.fc2 { top: 56px; inset-inline-end: 0; rotate: 9deg; }
.fc3 { bottom: 16px; inset-inline-end: 10%; rotate: -6deg; }
.fc0, .fc1, .fc2, .fc3 { transform: none; }
.proof { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: .95rem; flex-wrap: wrap; }
.proof b { color: var(--text); }
.faces { display: inline-flex; }
.faces .avatar { margin-inline-start: -10px; }
.faces .avatar:first-child { margin-inline-start: 0; }
.store-btn.lg b { font-size: 1.2rem; }

/* live ticker of new chapters */
.ticker { display: flex; align-items: center; gap: 14px; margin: 26px auto 0; max-width: 1200px; padding: 10px 16px; overflow: hidden; }
.ticker-label { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--like-bg); color: var(--like); font-weight: 700; font-size: .88rem; }
.ticker-label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--like); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
/* edge fades are two small overlays instead of a mask: a mask over moving text is repainted every frame */
.ticker-track { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.ticker-track::before, .ticker-track::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; pointer-events: none; }
.ticker-track::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker-track::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.is-off .ticker-move, .is-off .float-cover, .is-off .ticker-label .dot { animation-play-state: paused; }
.ticker-move { display: flex; gap: 34px; width: max-content; animation: tick 60s linear infinite; will-change: transform; }
.ticker:hover .ticker-move { animation-play-state: paused; }
.ticker-move a { white-space: nowrap; font-size: .93rem; color: var(--text); }
.ticker-move a b { color: var(--brand); }
@keyframes tick { to { transform: translateX(50%); } }

/* "continue where you stopped" (filled in by the script from this browser's history) */
.continue-wrap { margin-top: 30px; }
.continue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cont { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cont img { width: 52px; height: 78px; border-radius: 10px; object-fit: cover; flex: none; }
.cont b { display: block; line-height: 1.4; }
.cont .muted { font-size: .85rem; }
.cont .rm-bar { margin-top: 6px; }

/* platform numbers */
.numbers-head { text-align: center; margin-bottom: 18px; }
.numbers-head h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin-bottom: 4px; }
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.num-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.num-card::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; top: -70px; inset-inline-end: -50px; background: radial-gradient(circle, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%); }
.num-card > .i { width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.num-card .nv { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.num-card .nv b { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .num-card .nv b { background-image: linear-gradient(90deg, #9CC7E6, #B39DFF); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num-card .nv b { background-image: linear-gradient(90deg, #9CC7E6, #B39DFF); } }
.num-card .nl { color: var(--muted); font-size: .95rem; }

/* "pick your taste" tabs */
.taste-chips { margin-top: 0; }
.taste-chips .chip { cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; }
.taste-grid { transition: opacity .25s ease; }
.taste-grid.loading { opacity: .35; }

/* search suggestions */
.js-suggest { position: relative; }
.suggest { position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 70; min-width: 300px; padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 44px rgba(20, 30, 50, .22); max-height: 70vh; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest .sg-h { padding: 6px 10px 2px; font-size: .78rem; color: var(--muted); font-weight: 600; }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.suggest a:hover, .suggest a.act { background: var(--surface2); color: inherit; }
.suggest img { width: 36px; height: 54px; border-radius: 7px; object-fit: cover; flex: none; background: var(--bg2); }
.suggest .sg-t { display: block; font-weight: 600; line-height: 1.35; }
.suggest .sg-s { display: block; font-size: .8rem; color: var(--muted); }
.suggest .sg-all { justify-content: center; color: var(--brand); font-weight: 600; font-size: .9rem; }
.suggest .sg-none { padding: 12px; color: var(--muted); text-align: center; font-size: .9rem; }

/* share buttons */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.sh { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; color: #fff; transition: transform .15s ease; }
.sh:hover { transform: translateY(-2px); color: #fff; }
.sh .i { width: 20px; height: 20px; }
.sh-wa { background: #25D366; } .sh-tg { background: #229ED9; } .sh-x { background: #111; } .sh-fb { background: #1877F2; }
.sh-copy { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.sh-copy:hover { color: var(--brand); }

/* first-chapter hook on the novel page */
.hook { position: relative; overflow: hidden; }
.hook::before { content: "”"; position: absolute; top: -30px; inset-inline-start: 14px; font-size: 9rem; line-height: 1; color: var(--brand-soft); font-family: Georgia, serif; pointer-events: none; }
.hook h2 { font-family: var(--read); margin-top: 10px; }
.hook-text { font-family: var(--read), var(--ui); font-size: 1.1rem; line-height: 2.05; text-align: justify; max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent); mask-image: linear-gradient(to bottom, #000 65%, transparent); margin-bottom: 14px; }
.hook-text p { margin: 0 0 .7em; }
.split-bar, .rm-bar { height: 8px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.split-bar span, .rm-bar span { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.split-text { margin: 8px 0 14px; }
.read-meter { max-width: 420px; margin: 4px auto 14px; }
.read-meter p { margin: 6px 0 0; }

/* writers */
.writers-hero { padding-block: 50px; background: radial-gradient(60% 80% at 85% 20%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%), radial-gradient(50% 70% at 10% 90%, color-mix(in srgb, #7C4DFF 12%, transparent), transparent 70%); }
.writers-hero.top { padding-top: 26px; }
.writers-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
.writers-in > * { min-width: 0; }
.writers-copy h1, .writers-copy h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-top: 14px; }
.writers-art { display: flex; justify-content: center; }
.p-writer { width: 260px; transform: rotate(-3deg); }
.checks.big li { font-size: 1.02rem; padding: 6px 0; }
.gate-actions.start { justify-content: flex-start; }
.spotlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.spotlight { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-align: center; }
.spotlight:hover { color: inherit; box-shadow: var(--shadow); }
.sp-stats { display: flex; gap: 18px; }
.sp-stats span { display: flex; flex-direction: column; color: var(--muted); font-size: .85rem; }
.sp-stats b { color: var(--text); font-size: 1.25rem; }

/* closing call to action */
.final-card { text-align: center; padding: 40px 20px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.final-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 0%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 70%); pointer-events: none; }
.final-card > * { position: relative; }
.final-card > img:first-child { margin: 0 auto 12px; border-radius: 18px; box-shadow: var(--shadow); }
.final-card > .i.big { margin: 0 auto 8px; }
.final-card h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
.final-card .qr { margin: 8px auto 0; background: #fff; padding: 6px; border-radius: 12px; }
/* two phones side by side, slightly tilted, the second a little lower: both fully visible */
.phones { display: flex; justify-content: center; align-items: flex-start; gap: 26px; min-height: 0; padding: 12px 0 44px; }
.phones .phone { position: relative; top: auto; width: 222px; z-index: auto; }
.phones .p1 { transform: rotate(-4deg); }
.phones .p2 { transform: rotate(4deg); margin-top: 58px; }

.page-head .intro { max-width: 72ch; font-size: 1.04rem; margin-bottom: 4px; }

/* search results */
.search-head { padding-bottom: 6px; }
.search-head .big-search { margin-top: 14px; }
.results { margin-top: 18px; }
.results-sum { font-size: 1.02rem; color: var(--muted); margin-bottom: 10px; }
.results-sum b { color: var(--text); }
.results-sec { margin-top: 26px; }
.results .chips { margin-top: 4px; }
.big-search .suggest { top: calc(100% + 6px); }

/* reader: the header slides away while reading down */
.page-read.head-away .site-header { transform: translateY(-100%); }
.read-progress span { width: 100%; transform: scaleX(0); will-change: transform; }

@media (max-width: 900px) {
  .phone-stack { height: 390px; }
  .fc0 { top: 18px; } .fc2 { top: 34px; }
  .numbers { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .num-card { padding: 16px 10px; }
  .writers-in { grid-template-columns: minmax(0, 1fr); }
  .writers-art { order: 2; }
  .p-writer { width: 200px; }
  .spotlights { grid-template-columns: 1fr; }
  .phones { gap: 14px; padding-bottom: 34px; }
  .phones .phone { width: min(46%, 190px); border-radius: 30px; padding: 6px; }
  .phones .phone img { border-radius: 25px; }
  .phones .phone::before { top: 11px; width: 54px; height: 14px; margin-left: -27px; }
  .phones .p2 { margin-top: 40px; }
  .ticker { margin-top: 14px; }
  .suggest { min-width: 0; }
  .only-desktop { display: none !important; }
}
@media (max-width: 640px) {
  .ticker-label { font-size: .8rem; padding: 5px 10px; }
  .continue-list { grid-template-columns: 1fr; }
  .gate-actions.start { justify-content: stretch; }
  .gate-actions.start .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .reveal, html.js .card .cover { opacity: 1 !important; transform: none !important; }
  .ticker-track { overflow-x: auto; }
}
