/* Design v2 (2026-10-12): Pocket FM + Kuku FM dark app shell, Storytel cream "paper" for reading.
   Previous light design is saved in design-backup/v1-light-plum/. */
:root {
  /* dark shell (Pocket FM / Kuku FM) */
  --bg: #0C0B10;
  --surface: #17151E;
  --surface-2: #221F2B;
  --line: rgba(255, 255, 255, .09);
  --text: #F4F1F7;
  --muted: #A49DB0;
  /* brand */
  --rose: #E11D48;
  --flame: #FF5A36;
  --grad: linear-gradient(100deg, #E11D48 0%, #FF4A3D 60%, #FF6A33 100%);
  --gold: #E9B44C;
  --gold-soft: #FFF4DC;
  /* reading paper (Storytel cream) */
  --paper: #FFFBF6;
  --ink: #1A1523;
  --body: #2E2838;
  --paper-muted: #6E6878;
  --paper-line: #EEE5DF;
  --rose-soft: #FFE4EA;
  --ad: #1A1822;
  --ad-paper: #F3EDEA;

  --ui: "Figtree", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; /* headlines, buttons, labels */
  --read: "Lora", Georgia, serif;                                        /* story text */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--flame); }
em { font-style: italic; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); }

/* header + Kuku style tab row */
.site-header { background: rgba(12, 11, 16, .94); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 54px; }
/* burger menu with genres + drama types */
/* ">" so these burger-icon rules never reach the Categories <summary> inside the panel */
.menu > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; margin-right: -8px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu[open] > summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu[open] > summary span:nth-child(2) { opacity: 0; }
.menu[open] > summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-panel { position: absolute; left: 0; right: 0; top: 54px; z-index: 55; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0, 0, 0, .6); max-height: calc(100vh - 54px); max-height: calc(100dvh - 54px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 0 18px; }
.menu-head { margin: 14px 0 6px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
/* header right: Sign in pill or the reader's picture, then the burger */
.hdr-right { display: flex; align-items: center; gap: 6px; }
.hdr-account { display: flex; align-items: center; text-decoration: none; color: #fff; }
.hdr-signin { padding: 7px 14px; border-radius: 999px; background: var(--grad); font-size: 14px; font-weight: 800; }
.hdr-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--grad); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }
.hdr-avatar img, .menu-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* menu: account block on top */
.menu-acc { margin: 10px 0 6px; }
.menu-acc-out p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.menu-acc-btns { display: flex; gap: 8px; }
.menu-acc-btns > * { flex: 1; justify-content: center; text-align: center; }
.menu-btn-line { padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); color: #fff; text-decoration: none; font-size: 14px; font-weight: 800; }
.menu-acc-in { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); color: #fff; text-decoration: none; }
.menu-acc-in[hidden], .menu-acc-out[hidden] { display: none; }
.menu-avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; }
.menu-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-go { flex-shrink: 0; color: var(--flame); font-size: 13px; font-weight: 800; }

/* menu: collapsible A-Z categories that open in place and scroll inside */
.menu-group { margin: 12px 0 0; border-top: 1px solid var(--line); }
.menu-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 13px 2px; font-weight: 800; font-size: 16px; }
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group summary small { color: var(--muted); font-size: 12px; font-weight: 700; background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.menu-group summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.menu-group[open] summary::after { transform: rotate(-135deg); }
/* grid (not CSS columns): columns + max-height would overflow sideways instead of scrolling down */
.menu-cats { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; max-height: 46vh; max-height: 46dvh; overflow-y: auto; overscroll-behavior: contain; }
.menu-cats li { min-width: 0; }
.menu-cats a { display: block; padding: 8px 2px; border-bottom: 1px solid var(--line); color: #E8E4EE; text-decoration: none; font-weight: 600; font-size: 14px; }
.menu-cats a.menu-on { color: var(--flame); }
@media (min-width: 640px) { .menu-cats { grid-template-columns: repeat(4, 1fr); max-height: none; } }

/* login + profile */
.account { max-width: 560px; margin: 0 auto; }
.acc-lead { color: var(--muted); margin: -4px 0 20px; }
.acc-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px; border: 0; border-radius: 999px; background: #fff; color: #1F1F1F; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.acc-google svg { width: 22px; height: 22px; }
.acc-inapp { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(233, 180, 76, .12); color: var(--gold); font-size: 14px; }
.acc-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acc-form { display: grid; gap: 10px; }
.acc-form input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: #fff; font: inherit; font-size: 16px; }
.acc-form input:focus { outline: 2px solid var(--rose); border-color: transparent; }
.acc-secondary { width: 100%; padding: 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.acc-link { justify-self: center; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.account button:disabled { opacity: .45; cursor: not-allowed; }
.acc-msg { min-height: 1.5em; margin: 12px 0 0; color: #FF8A8A; font-size: 14px; text-align: center; }
.acc-msg.acc-ok { color: var(--gold); }
.acc-loading { color: var(--muted); }
.acc-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; }
.acc-avatar { width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-name { margin: 0; font-size: 22px; font-weight: 800; }
.acc-email { margin: 0; color: var(--muted); font-size: 14px; }
.acc-empty { color: var(--muted); }
.acc-logout { margin: 28px 0 0; }
.hist { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 0 10px; border-radius: 14px; background: var(--surface); color: #fff; text-decoration: none; }
.hist img { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.hist-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hist-txt b { font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hist-txt small { color: var(--muted); font-size: 12px; }
.hist-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; margin: 2px 0; }
.hist-bar span { display: block; height: 100%; background: var(--grad); }
.hist-btn { flex-shrink: 0; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; font-weight: 800; }
.hist-time { color: var(--gold) !important; }
/* profile totals: reading time, listening time, stories */
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.acc-stat { padding: 12px 8px; border-radius: 14px; background: var(--surface); text-align: center; }
.acc-stat small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.acc-stat b { display: block; margin-top: 4px; font-size: 18px; font-weight: 800; }
/* history link opened while the browser blocked autoplay: point at the Resume button */
.player.resume-ready .player-big { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(225, 29, 72, .25), 0 10px 28px rgba(225, 29, 72, .35); } }
.soon { color: var(--muted); margin: -4px 0 18px; }
.recs-note { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }

/* logged-in timeline on the homepage */
.timeline { margin: 8px 0 0; }
.tl-list { position: relative; padding-left: 18px; border-left: 2px solid var(--surface-2); margin-left: 6px; }
.tl-day { position: relative; margin: 14px 0 8px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tl-day::before { content: ""; position: absolute; left: -25px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px var(--bg); }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 0 8px; border-radius: 12px; background: var(--surface); color: #fff; text-decoration: none; }
.tl-item img { width: 40px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.tl-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tl-txt b { font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-txt small { color: var(--muted); font-size: 12px; }
.tl-all { display: inline-block; margin: 6px 0 0; }
.logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.2px; }
.logo em, .footer-logo em { color: var(--flame); font-style: normal; }
.tabs-row { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.tabs-row::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 9px 0 11px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.tab-on { color: #fff; }
.tab-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); }

/* layout */
.layout { padding-top: 6px; padding-bottom: 40px; }
.content { min-width: 0; }
.sidebar { display: none; }

/* headings with accent + see more */
.section-title { font-weight: 800; font-size: 24px; line-height: 1.2; margin: 24px 0 12px; color: #fff; letter-spacing: -.3px; }
.section-title em { color: var(--flame); font-style: normal; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-head .section-title { margin: 0; white-space: nowrap; }
.see-more { flex-shrink: 0; color: #fff; background: var(--surface-2); text-decoration: none; font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 999px; }
.see-more:active { background: var(--rose); }

/* chips */
.chip { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 6px; text-decoration: none; letter-spacing: .2px; }
.chip-hot { background: var(--rose); color: #fff; }
.chip-cat { background: rgba(233, 180, 76, .14); color: var(--gold); }
.chip-new { background: rgba(255, 255, 255, .12); color: #fff; }
a.chip:active { filter: brightness(1.2); }

/* the dominant gradient pill (Pocket FM "Play Ep-1") */
.cta-pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font: inherit; font-size: 17px; font-weight: 800; padding: 15px 18px; text-decoration: none; cursor: pointer; box-shadow: 0 10px 28px rgba(225, 29, 72, .35); }
.cta-pill svg { width: 20px; height: 20px; fill: #fff; }
.cta-pill:active { filter: brightness(.92); }
.cta-sm { display: inline-flex; width: auto; font-size: 14px; padding: 10px 18px; }

/* homepage */
.home-h1 { font-weight: 800; font-size: 32px; line-height: 1.08; letter-spacing: -.8px; margin: 18px 0 16px; color: #fff; }
.home-h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; color: #fff; text-decoration: none; background: var(--surface); }
.slide-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(12, 11, 16, .92) 88%); pointer-events: none; }
.slide-txt { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.slide-title { font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -.3px; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 0; }
.dot { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: width .25s; }
.dot-on { width: 22px; background: var(--rose); }
.marquee { display: flex; overflow: hidden; margin: 26px -16px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.marquee span { flex-shrink: 0; padding-right: 0; animation: tick 28s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; } }

/* 9:16 cover cards (Pocket FM grid: title, gold genre, meta) */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.pcard { display: flex; flex-direction: column; text-decoration: none; color: #fff; min-width: 0; }
.pcard-cover { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface); }
.pcard-img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; transition: transform .3s; }
.pcard:hover .pcard-img { transform: scale(1.03); }
.pcard-hot { position: absolute; left: 8px; top: 8px; z-index: 1; background: var(--rose); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 5px; }
.pcard-audio { position: absolute; right: 8px; top: 8px; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: rgba(12, 11, 16, .72); display: flex; align-items: center; justify-content: center; font-size: 14px; backdrop-filter: blur(4px); }
.pcard h3 { font-weight: 700; font-size: 15px; line-height: 1.3; margin: 10px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-genre { margin: 0; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pcard-meta { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.grid-ad { grid-column: 1 / -1; }
.grid-ad .ad { margin: 14px auto; }

/* single swipeable row (Latest) */
.hrow { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
.hrow::-webkit-scrollbar { display: none; }
.hrow .pcard { scroll-snap-align: start; }

.show-more { display: block; text-align: center; margin: 22px 0 6px; background: var(--grad); color: #fff; text-decoration: none; font-weight: 800; padding: 14px; border-radius: 999px; }
.pager { display: flex; flex-direction: column; gap: 8px; }

/* story: dark "show" header with blurred cover backdrop */
.story { max-width: 720px; margin: 0 auto; }
.show { position: relative; margin: 0 -16px; padding: 20px 16px 18px; overflow: hidden; isolation: isolate; }
/* cover backdrop without CSS blur (blur made phones and screenshots stall) */
.show::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--cover) center 20% / cover; opacity: .3; }
.show::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 50% 0%, rgba(225, 29, 72, .28), transparent 70%), linear-gradient(180deg, rgba(12, 11, 16, .55), var(--bg) 85%); }
.show-cover { width: 70%; max-width: 280px; margin: 0 auto 16px; border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, .5); }
.show-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.story-title { font-weight: 800; font-size: 28px; line-height: 1.14; letter-spacing: -.5px; margin: 0 0 16px; color: #fff; }

/* Storytel style stats row */
.stats { display: flex; margin: 16px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { flex: 1; padding: 10px 6px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat b { font-size: 15px; }

/* segmented Part tabs */
.ptabs { display: flex; gap: 6px; margin: 14px 0 0; padding: 4px; background: var(--surface); border-radius: 999px; }
.ptab { flex: 1; text-align: center; padding: 9px 4px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 800; font-size: 14px; }
.ptab-on { background: #fff; color: var(--ink); }
.ptab-locked { color: var(--gold); }

/* audio player: pill first, slim bar after first play */
.player-bar { display: none; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px 6px 6px; }
.player.started .player-big { display: none; }
.player.started .player-bar { display: flex; }
.player-toggle { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--grad); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.player-toggle svg { width: 20px; height: 20px; fill: #fff; }
.player-toggle .i-pause, .player.playing .player-toggle .i-play { display: none; }
.player.playing .player-toggle .i-pause { display: block; }
.player-skip, .player-speed { flex-shrink: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer; padding: 6px 2px; }
.player-speed { color: var(--gold); min-width: 36px; }
.player-track { flex: 1; height: 6px; background: rgba(255, 255, 255, .12); border-radius: 999px; cursor: pointer; overflow: hidden; }
.player-track span { display: block; height: 100%; width: 0; background: var(--grad); }
.player-status { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin: 8px 6px 0; }
.player-meta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.ai-note { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }

/* sticky mini-player above the sticky ad */
.mini-player { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 45; display: flex; align-items: center; gap: 10px; background: var(--surface-2); color: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-width: 560px; margin: 0 auto; }
.mini-player[hidden] { display: none; }
body.has-sticky .mini-player { bottom: 66px; }
.mini-toggle { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mini-toggle svg { width: 18px; height: 18px; fill: #fff; }
.mini-toggle .i-pause, .mini-player.playing .mini-toggle .i-play { display: none; }
.mini-player.playing .mini-toggle .i-pause { display: block; }
.mini-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mini-bar { position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; width: 0; background: var(--gold); }
.mini-close { flex-shrink: 0; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 0 4px; }

/* cream reading paper (Storytel) */
.paper { background: var(--paper); color: var(--ink); margin: 8px -16px 0; padding: 26px 18px 8px; border-radius: 22px 22px 0 0; scroll-margin-top: 110px; }
.paper a { color: var(--rose); }
.prev-part { display: inline-block; margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--paper-muted) !important; text-decoration: none; }
.dek { font-family: var(--read); font-style: italic; font-size: 19px; line-height: 1.5; color: var(--body); margin: 0 0 22px; padding-left: 14px; border-left: 3px solid var(--gold); }
.story-body p { font-family: var(--read); font-size: 19px; line-height: 1.7; color: var(--body); margin: 0 0 18px; }
.story-img { margin: 24px 0; }
.story-img img { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; }
.story-img figcaption { font-family: var(--read); font-style: italic; font-size: 14px; color: var(--paper-muted); margin: 8px auto 0; max-width: 480px; text-align: center; }

/* next part button: kept clear of ads */
.next-wrap { margin: 32px 0; padding: 20px 0; text-align: center; }
.next-btn { display: block; background: var(--grad); color: #fff !important; text-decoration: none; font-size: 18px; font-weight: 800; padding: 18px 16px; border-radius: 999px; box-shadow: 0 10px 24px rgba(225, 29, 72, .3); }
.next-btn:active { filter: brightness(.92); }
.next-hint { margin: 10px 0 0; font-family: var(--read); font-style: italic; font-size: 15px; color: var(--paper-muted); }

/* poll */
.poll { background: var(--gold-soft); border: 1px solid #F3D9A4; border-radius: 16px; padding: 18px; margin: 0 0 28px; }
.poll-q { font-weight: 800; font-size: 21px; margin: 0 0 12px; color: var(--ink); }
.poll-opts { display: grid; gap: 8px; }
.poll-opt { font: inherit; font-size: 16px; font-weight: 600; text-align: left; background: #fff; border: 1px solid var(--paper-line); border-radius: 12px; padding: 13px 14px; cursor: pointer; color: var(--ink); }
.poll-opt.picked { border-color: var(--rose); background: var(--rose-soft); }
.poll-thanks { margin: 12px 0 0; font-size: 15px; }
.fiction-note { font-size: 13px; font-style: italic; color: var(--paper-muted); border-top: 1px solid var(--paper-line); padding-top: 12px; margin: 0 0 20px; }

/* Pocket FM episode list */
.episodes { margin: 8px 0 0; }
.ep { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: #fff; text-decoration: none; }
.ep-no { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted); }
.ep-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ep-txt b { font-size: 16px; }
.ep-txt small { color: var(--muted); font-size: 13px; }
.ep-btn { flex-shrink: 0; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.ep-on .ep-no { background: var(--grad); color: #fff; }
.ep-on .ep-btn { border-color: var(--rose); color: var(--flame); }
.ep-locked .ep-btn { border-color: var(--gold); }
.ep-locked small { color: var(--gold); }

/* ads */
.ad { background: var(--ad); border-radius: 10px; margin: 26px auto; padding: 6px 0 10px; text-align: center; max-width: 336px; }
.ad-label { display: block; font-size: 10px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.ad-ph { margin: 0 auto; display: flex; align-items: center; justify-content: center; border: 1px dashed rgba(255, 255, 255, .2); color: var(--muted); font-size: 14px; width: 300px; max-width: 100%; }
.paper .ad { background: var(--ad-paper); }
.paper .ad-label, .paper .ad-ph { color: var(--paper-muted); }
.paper .ad-ph { border-color: #CFC5C0; }
.ad-banner_300x250 .ad-ph { height: 250px; }
.ad-tall_300x600 .ad-ph { height: 600px; }
.ad-native .ad-ph { height: 180px; }
.ad-sidebar_300x600 .ad-ph { height: 600px; }
.ad-desktop_728x90 .ad-ph { width: 728px; height: 90px; }
.ad-sticky_320x50 .ad-ph { width: 320px; height: 50px; }
.ad-mobile_320x100 .ad-ph { width: 320px; height: 100px; }
.top-ad { max-width: 760px; margin: 12px auto 0; }
.desktop-only { display: none; }
.mobile-only { margin-left: auto; margin-right: auto; }
.sticky-bottom { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; max-width: none; border-radius: 0; padding: 2px 0 4px; z-index: 40; background: #121118; box-shadow: 0 -1px 0 var(--line); }
.sticky-bottom .ad-label { display: none; }
.sticky-close { position: absolute; top: -22px; right: 8px; width: 28px; height: 22px; border: 0; border-radius: 6px 6px 0 0; background: #121118; color: var(--muted); font-size: 16px; cursor: pointer; }
body.has-sticky { padding-bottom: 60px; }

/* static pages */
.static { max-width: 720px; margin: 16px auto 0; border-radius: 22px; padding-bottom: 20px; }
.static h1 { font-size: 30px; font-weight: 800; letter-spacing: -.4px; margin: 0 0 12px; }
.static h2 { font-weight: 800; font-size: 21px; }
.static p { font-family: var(--read); font-size: 17px; line-height: 1.75; color: var(--body); }

/* footer */
.site-footer { background: #08070B; border-top: 1px solid var(--line); color: var(--muted); padding: 30px 0 40px; font-size: 14px; }
.footer-logo { font-weight: 800; color: #fff; font-size: 21px; margin: 0 0 6px; }
.footer-tag { font-family: var(--read); font-style: italic; }
.footer-links { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: #fff; text-decoration: none; }
.copy { margin: 0; opacity: .7; }

/* tablet */
@media (min-width: 640px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hrow { grid-auto-columns: 30%; }
  .story-title { font-size: 36px; }
  .home-h1 { font-size: 44px; }
  .slide-img { aspect-ratio: 16 / 9; object-position: center 25%; }
  .slide-title { font-size: 32px; max-width: 70%; }
  .pager { flex-direction: row; justify-content: center; }
  .pager .show-more { padding: 14px 28px; }
  .show, .paper { margin-left: 0; margin-right: 0; border-radius: 22px; }
  .show { margin-top: 12px; }
  .paper { padding: 34px 40px 12px; }
  /* cover fills the left column top to bottom, so it never hangs below the box or leaves a gap */
  .show { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: stretch; padding: 24px; }
  .show .show-cover { width: 100%; height: 100%; min-height: 280px; margin: 0; aspect-ratio: auto; object-fit: cover; object-position: center 25%; }
  .show-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
}

/* desktop: sidebar ad + top banner */
@media (min-width: 1024px) {
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  .with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .sidebar { display: block; }
  .sticky-side { position: sticky; top: 110px; margin-top: 18px; }
  .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hrow { grid-auto-columns: calc(25% - 9px); margin-right: 0; padding-right: 0; }
  .marquee { margin-left: 0; margin-right: 0; }
  .sticky-bottom { display: none; }
  body.has-sticky { padding-bottom: 0; }
  .section-title { font-size: 28px; }
}
