/* Cuddle Comics: Captain Cuddle comic style. Royal blue + white, yellow starbursts, ink outlines, halftone dots.
   Layout: blue app header · library shelf of covers · full-screen dark reader.
   The comic theme layer at the end of this file overrides the base tokens and components. */

:root {
  --brand: #F5B700; --brand-dark: #D4A000; --brand-light: #FDE68A; --brand-darker: #A37A00;
  --on-brand: #0f172a;
  --header: #1e1e1e; --header-raise: #363636; --header-hover: #484848; --overlay: #1a1a1a;
  --reader-bg: #111111;

  /* light surfaces */
  --bg: #F1F5F9; --panel: #FFFFFF; --card: #F8FAFC; --raise: #FFFFFF; --hover: #E2E8F0;
  --border: #E2E8F0; --text: #1e293b; --text-2: #64748b; --text-3: #94a3b8;
  --shadow: 0 1px 2px rgb(15 23 42 / .06), 0 8px 24px rgb(15 23 42 / .08);

  --font-head: 'Lubalin Graph', Rockwell, 'Roboto Slab', Georgia, serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 12px; --radius-lg: 16px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #2a2a2a; --panel: #232323; --card: #2f2f2f; --raise: #363636; --hover: #484848;
  --border: #3a3a3a; --text: #FFFFFF; --text-2: #a3a3a3; --text-3: #737373;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 30px rgb(0 0 0 / .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.dot { color: var(--brand); }

/* ---------- Header (always dark) ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header); color: #fff;
  display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-badge {
  background: var(--brand); color: var(--on-brand); border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; font-size: 11px; font-weight: 800; letter-spacing: .1em; flex-shrink: 0;
}
.brand-badge.small { width: auto; height: auto; padding: 2px 6px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; white-space: nowrap; }
.header-nav { display: flex; gap: 4px; margin-left: 12px; }
.header-nav a { color: #cbd5e1; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.header-nav a:hover { color: #fff; background: var(--header-raise); }
.header-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--header-raise); color: #cbd5e1; transition: background .15s, color .15s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="true"] { background: var(--header-hover); color: #fff; }

.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 240px; z-index: 50;
  background: var(--overlay); color: #fff; border: 1px solid #333; border-radius: var(--radius);
  box-shadow: 0 20px 40px rgb(0 0 0 / .45); overflow: hidden;
}
.menu-section { padding: 12px 14px; display: grid; gap: 8px; }
.menu-section + .menu-section { border-top: 1px solid #333; }
.menu-section .eyebrow { color: #8a8a8a; }
.menu-item { text-align: left; width: 100%; border: 0; background: #2a2a2a; color: #d4d4d4; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.menu-item:hover { background: var(--header-raise); color: #fff; }
.menu-note { margin: 0; font-size: 13px; color: #86efac; }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 64px var(--gutter); }
main:focus { outline: none; }
.app-footer { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px 16px 32px; font-size: 13px; color: var(--text-3); }
.section { display: grid; gap: 18px; }
.section + .section, .hero + .section, .teaser + .section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; }
.muted { color: var(--text-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius); padding: 12px 22px; font-weight: 700; font-size: 16px;
  text-decoration: none; transition: background .15s, transform .1s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--hover); color: var(--text); }
:root[data-theme="dark"] .btn-secondary { background: var(--raise); }
.btn-secondary:hover { background: var(--border); }
:root[data-theme="dark"] .btn-secondary:hover { background: var(--hover); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero (latest issue) ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: center;
  background: var(--panel); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow);
}
.hero-cover { border-radius: 8px; overflow: hidden; box-shadow: 0 18px 40px rgb(0 0 0 / .35); aspect-ratio: 1122 / 1402; background: var(--card); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-body { display: grid; gap: 16px; min-width: 0; }
.hero-body h1 { font-size: clamp(30px, 4.5vw, 46px); }
.hero-body p { margin: 0; max-width: 60ch; color: var(--text-2); font-size: 17px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card); color: var(--text-2); border: 1px solid var(--border); }
.chip.brand { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.chip.soft { background: rgb(245 183 0 / .16); color: var(--text); border-color: transparent; }
:root[data-theme="dark"] .chip.soft { color: var(--brand); }
.chip.done { background: rgb(34 197 94 / .15); color: #15803d; border-color: transparent; }
:root[data-theme="dark"] .chip.done { color: #4ade80; }

/* ---------- Shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 22px; }
.issue-card { display: grid; gap: 10px; text-decoration: none; color: inherit; }
.issue-card .cover {
  position: relative; aspect-ratio: 1122 / 1402; border-radius: 8px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.issue-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.issue-card:hover .cover { transform: translateY(-4px); box-shadow: 0 16px 34px rgb(0 0 0 / .3); }
.issue-card:focus-visible { outline: none; }
.issue-card:focus-visible .cover { outline: 3px solid var(--brand); outline-offset: 3px; }
.issue-num {
  position: absolute; top: 8px; left: 8px; background: var(--header); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px;
}
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgb(0 0 0 / .45); }
.progress > span { display: block; height: 100%; background: var(--brand); }
.issue-card h3 { font-size: 17px; }
.issue-meta { font-size: 13px; color: var(--text-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Continue reading ---------- */
.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.continue-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px 10px 10px; text-decoration: none; color: inherit; transition: border-color .15s;
}
.continue-card:hover { border-color: var(--brand); }
.continue-card img { width: 64px; aspect-ratio: 1122 / 1402; object-fit: cover; border-radius: 4px; }
.continue-card strong { display: block; font-family: var(--font-head); font-size: 16px; line-height: 1.2; }
.continue-card small { color: var(--text-2); font-size: 13px; }
.bar { height: 4px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.continue-card .go { font-weight: 700; font-size: 14px; color: var(--text); }

/* ---------- Issue page ---------- */
.crumbs { font-size: 14px; color: var(--text-2); margin-bottom: 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; }
.issue-detail { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 44px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-width: 560px; }
.facts div { background: var(--panel); padding: 10px 14px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 16px; }
.page-tile { display: grid; gap: 6px; text-decoration: none; font-size: 13px; color: var(--text-2); font-weight: 600; }
.page-tile .thumb { aspect-ratio: 1122 / 1402; border-radius: 6px; overflow: hidden; background: var(--card); border: 2px solid transparent; transition: border-color .15s; }
.page-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-tile:hover .thumb { border-color: var(--brand); }
.page-tile.read .thumb { opacity: .75; }
.page-tile.current .thumb { border-color: var(--brand); }
.issue-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.issue-nav a { text-decoration: none; display: grid; gap: 2px; max-width: 48%; }
.issue-nav a:last-child { text-align: right; margin-left: auto; }
.issue-nav small { color: var(--text-2); font-size: 13px; font-weight: 600; }
.issue-nav strong { font-family: var(--font-head); font-size: 18px; }
.issue-nav a:hover strong { text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 4px; }

.prose { max-width: 65ch; display: grid; gap: 14px; }
.prose p { margin: 0; }
.prose h1 { font-size: 36px; }
.prose h2 { font-size: 22px; margin-top: 16px; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-2); background: var(--panel); border-radius: var(--radius-lg); }

/* ---------- Reader ---------- */
body.reading { overflow: hidden; }
body.reading .app-header, body.reading main, body.reading .app-footer { display: none; }
.reader {
  position: fixed; inset: 0; z-index: 40; background: var(--reader-bg); color: #e5e5e5;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  touch-action: pan-y pinch-zoom;
}
.r-bar {
  display: flex; align-items: center; gap: 8px; background: rgb(17 17 17 / .92);
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  transition: opacity .25s, transform .25s; z-index: 2;
}
.r-bottom { padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); flex-direction: column; align-items: stretch; gap: 8px; }
.reader.chrome-hidden .r-bar { opacity: 0; pointer-events: none; }
.reader.chrome-hidden .r-top { transform: translateY(-100%); }
.reader.chrome-hidden .r-bottom { transform: translateY(100%); }
.r-title { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.r-title strong { font-family: var(--font-head); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.r-title small { font-size: 12px; color: #a3a3a3; font-variant-numeric: tabular-nums; }
.r-group { display: flex; gap: 4px; }
.seg { display: flex; background: #262626; border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: transparent; color: #a3a3a3; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 6px; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.seg button:not([aria-pressed="true"]):hover { color: #fff; }

.r-stage { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; }
.r-pages { display: flex; align-items: center; justify-content: center; gap: 2px; height: 100%; width: 100%; padding: 8px; transform-origin: center; transition: transform .2s ease; }
.r-pages img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgb(0 0 0 / .6); background: #1f1f1f; }
.r-pages.spread img { max-width: 50%; }
.r-pages.fit-width { align-items: flex-start; overflow-y: auto; height: 100%; }
.r-pages.fit-width img { max-height: none; width: min(100%, 1200px); }
.r-pages.fit-width.spread img { width: min(50%, 900px); }
.r-stage.zoomed { cursor: grab; }
.r-stage.zoomed .r-pages { transition: none; }

.r-tap { position: absolute; top: 0; bottom: 0; width: 28%; border: 0; background: transparent; z-index: 1; }
.r-tap.prev { left: 0; cursor: w-resize; }
.r-tap.next { right: 0; cursor: e-resize; }
.r-tap:focus-visible { outline: none; background: linear-gradient(90deg, rgb(245 183 0 / .15), transparent); }
.r-tap.next:focus-visible { background: linear-gradient(-90deg, rgb(245 183 0 / .15), transparent); }
.r-stage.zoomed .r-tap { display: none; }

.r-scroll { overflow-y: auto; height: 100%; padding: 12px 8px 40px; display: grid; justify-items: center; gap: 12px; scroll-behavior: smooth; }
.r-scroll img { width: min(100%, 900px); height: auto; background: #1f1f1f; }
.r-scroll .end-card { width: min(100%, 900px); }

.r-scrub { display: flex; align-items: center; gap: 12px; }
.r-scrub input[type="range"] { flex: 1; accent-color: var(--brand); height: 24px; }
.r-scrub output { font-size: 13px; font-weight: 700; color: #d4d4d4; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.r-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: thin; }
.r-strip button { flex: 0 0 auto; width: 52px; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #222; opacity: .6; overflow: hidden; }
.r-strip button img { width: 100%; aspect-ratio: 1122 / 1402; object-fit: cover; }
.r-strip button[aria-current="true"] { border-color: var(--brand); opacity: 1; }
.r-strip button:hover { opacity: 1; }

.end-card {
  margin: auto; max-width: 520px; width: calc(100% - 32px); background: #1e1e1e; border-radius: var(--radius-lg);
  padding: 32px; display: grid; gap: 16px; text-align: center; justify-items: center; color: #e5e5e5;
}
.end-card h2 { font-size: 28px; color: #fff; }
.end-card p { margin: 0; color: #a3a3a3; }
.end-card .next-cover { width: 140px; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
.end-card .btn-secondary { background: #363636; color: #fff; }
.end-card .btn-secondary:hover { background: #484848; }

.r-help {
  position: absolute; inset: 0; z-index: 5; background: rgb(0 0 0 / .7); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.r-help-card { background: #1e1e1e; border-radius: var(--radius-lg); padding: 24px 28px; max-width: 420px; width: 100%; display: grid; gap: 14px; }
.r-help-card h2 { font-size: 22px; color: #fff; }
.r-help-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.r-help-card dt { font-weight: 700; color: var(--brand); white-space: nowrap; }
.r-help-card dd { margin: 0; color: #d4d4d4; }
kbd { font: 700 12px var(--font-body); background: #363636; border-radius: 4px; padding: 1px 6px; color: #fff; }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 99px; z-index: 60;
  box-shadow: 0 8px 24px rgb(0 0 0 / .4);
}


/* ---------- Accounts, teaser, subscribe, ratings, comments ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-btn { background: var(--brand); color: var(--on-brand); text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.header-btn:hover { background: var(--brand-dark); }
.menu-user { margin: 0; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; font-size: 14px; text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer; }
.link:hover { color: var(--brand-darker); }
:root[data-theme="dark"] .link:hover { color: var(--brand); }
.link.danger { color: var(--text-2); text-decoration-color: #ef4444; margin-left: auto; font-size: 13px; }
.btn-block { width: 100%; padding-block: 16px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: default; }

.input {
  width: 100%; background: var(--panel); color: var(--text); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; font: inherit; transition: border-color .15s;
}
:root[data-theme="dark"] .input { background: var(--card); }
.input:focus { outline: none; border-color: var(--brand); }
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; min-height: 84px; }
.form-msg { margin: 0; font-size: 14px; min-height: 1.2em; }
.form-msg.error, .signin .form-msg { color: #dc2626; }
:root[data-theme="dark"] .form-msg.error, :root[data-theme="dark"] .signin .form-msg { color: #f87171; }
.form-msg.ok { color: #15803d; font-weight: 600; }
:root[data-theme="dark"] .form-msg.ok { color: #4ade80; }

.soon-ribbon { position: absolute; left: 0; right: 0; bottom: 0; background: var(--brand); color: var(--on-brand); text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 0; }
.issue-card.soon .cover img { filter: saturate(.85); }
.soon-cover { position: relative; }
.soon-cover .soon-ribbon { font-size: 14px; padding: 10px 0; }

.teaser {
  margin-top: 28px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center;
  border: 2px dashed var(--brand); border-radius: var(--radius-lg); padding: 24px; background: var(--panel);
}
.teaser-cover img { border-radius: 6px; box-shadow: var(--shadow); width: 100%; height: auto; }
.teaser-body { display: grid; gap: 10px; min-width: 0; }
.teaser-body h2 { font-size: 28px; }
.teaser-body > p { margin: 0; max-width: 65ch; }

.subscribe { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.subscribe h3 { font-size: 20px; }
.subscribe p { margin: 4px 0 0; }
.subscribe.compact { background: transparent; border: 0; padding: 6px 0 0; }
.subscribe.compact h3 { font-size: 17px; }
.subscribe-row { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.subscribe-row .input { flex: 1 1 220px; min-width: 0; }
.subscribe.done { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.prose .subscribe { margin-top: 12px; }

.signin { max-width: 400px; margin: 24px auto 0; display: grid; gap: 14px; }
.signin h1 { font-size: 30px; }
.signin p { margin: 0; }
.signin form { display: grid; gap: 6px; margin-top: 18px; }
.signin label { font-weight: 600; font-size: 15px; color: var(--text-2); margin-top: 14px; }
.underline { background: transparent; border: 0; border-bottom: 2px solid var(--border); color: var(--text); font: inherit; font-size: 20px; padding: 8px 0; caret-color: var(--brand); transition: border-color .15s; }
.underline:focus { outline: none; border-color: var(--brand); }
.signin .btn-block { margin-top: 18px; }
.fine { font-size: 13px; color: var(--text-3); }
.notice-card { max-width: 520px; margin: 40px auto; background: var(--panel); border-radius: var(--radius-lg); padding: 32px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.notice-card h1 { font-size: 28px; }
.notice-card p { margin: 0; color: var(--text-2); }
.notice-card form { margin: 0; }

.chip.rating { color: var(--text); }
.chip.rating span[aria-hidden] { color: var(--brand); }
.rate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 6px; font-size: 14px; }
.rate-avg strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.rate-avg span[aria-hidden] { color: var(--brand); letter-spacing: 1px; }
.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars button { background: none; border: 0; padding: 2px; font-size: 26px; line-height: 1; color: var(--border); transition: color .1s, transform .1s; }
:root[data-theme="dark"] .stars button { color: #4a4a4a; }
.stars button.on { color: var(--brand) !important; }
.stars:hover button { color: var(--brand) !important; }
.stars button:hover ~ button { color: var(--border) !important; }
:root[data-theme="dark"] .stars button:hover ~ button { color: #4a4a4a !important; }
.stars button:hover { transform: scale(1.15); }
.stars .muted { margin-left: 8px; font-size: 13px; }
.stars .link { margin-left: 8px; font-size: 13px; }

.comments-wrap { display: grid; gap: 22px; max-width: 760px; }
.comment-signin { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.comment-signin p { margin: 0; }
.comment-form { display: grid; gap: 10px; }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment { background: var(--panel); border-radius: var(--radius); padding: 14px 18px; display: grid; gap: 6px; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.comment-head time { font-size: 13px; }
.comment p { margin: 0; overflow-wrap: anywhere; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; text-transform: uppercase; }
.empty-comments { padding: 8px 0; }

.end-card hr { width: 100%; border: 0; border-top: 1px solid #333; margin: 4px 0; }
.end-card .link { color: #e5e5e5; }
.end-stars button { font-size: 34px; color: #4a4a4a; }
.end-stars:hover button { color: var(--brand) !important; }
.end-stars button:hover ~ button { color: #4a4a4a !important; }

@media (max-width: 600px) {
  .teaser { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .teaser-body h2 { font-size: 22px; }
  .teaser-body > p { display: none; }
  .subscribe.done { grid-template-columns: minmax(0, 1fr); }
  .header-btn { padding: 5px 10px; }
}


/* ---------- Sign-in gate: Captain Cuddle comic style (sunburst, halftone, ink outlines, speech bubble) ---------- */
body.locked .app-header, body.locked .app-footer { display: none; }
body.locked main { max-width: none; padding: 0; display: flex; }
.gate {
  --ink: #0b0f1a; --cc-blue: #1d4ed8; --cc-navy: #0b1f5c; --cc-yellow: #FFD400;
  --ray-a: #2459e6; --ray-b: #1a45c4;
  position: relative; overflow: hidden; isolation: isolate;
  flex: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-block: 40px 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  color: #fff;
  background:
    radial-gradient(circle, rgb(255 255 255 / .14) 1.3px, transparent 1.8px) 0 0 / 12px 12px,
    radial-gradient(ellipse at 50% 30%, transparent 25%, rgb(3 10 40 / .6) 100%),
    repeating-conic-gradient(from -3deg at 50% 28%, var(--ray-a) 0 6deg, var(--ray-b) 6deg 12deg);
}
:root[data-theme="dark"] .gate { --ray-a: #16318f; --ray-b: #0f2470; }
.gate-hearts span {
  position: absolute; z-index: -1; color: #fff; font-size: 34px; line-height: 1; opacity: .9;
  text-shadow: 2px 2px 0 var(--ink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
}
.gate-hearts span:nth-child(1) { top: 12%; left: 8%; transform: rotate(-14deg); }
.gate-hearts span:nth-child(2) { top: 22%; right: 10%; font-size: 24px; transform: rotate(12deg); color: #93c5fd; }
.gate-hearts span:nth-child(3) { bottom: 18%; left: 12%; font-size: 22px; color: #93c5fd; }
.gate-hearts span:nth-child(4) { bottom: 10%; right: 14%; font-size: 40px; transform: rotate(-8deg); }
.gate-hearts span:nth-child(5) { top: 50%; left: 4%; font-size: 18px; }
.gate-hearts span:nth-child(6) { top: 58%; right: 5%; font-size: 20px; color: #93c5fd; }
.gate-theme {
  position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  width: 38px; height: 38px; border: 2px solid rgb(255 255 255 / .5); border-radius: 50%; background: rgb(11 15 26 / .25); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.gate-theme:hover { background: rgb(11 15 26 / .45); }
.gate-inner { width: 100%; max-width: 400px; display: grid; gap: 8px; }

.gate-logo { display: grid; justify-items: center; }
.gate-emblem { width: 84px; height: 78px; margin-bottom: 4px; filter: drop-shadow(4px 4px 0 var(--ink)); }
.gate-title {
  margin: 0; text-align: center; font-family: 'Bangers', Impact, 'Arial Black', sans-serif; font-weight: 400;
  font-size: clamp(56px, 16vw, 88px); line-height: .84; letter-spacing: .02em; text-transform: uppercase;
  transform: rotate(-4deg) skewX(-6deg);
}
.gate-title span { display: block; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink); }
.gate-title span:first-child { color: #fff; font-size: .72em; }
.gate-title span:last-child { color: var(--cc-yellow); }
.gate-caption {
  margin: 14px 0 0; padding: 3px 14px; background: var(--cc-yellow); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: rotate(2deg);
  font-family: 'Bangers', Impact, sans-serif; font-size: 21px; letter-spacing: .05em; text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  .gate-emblem { animation: gate-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
  .gate-title { animation: gate-zoom .45s .1s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes gate-pop { from { transform: scale(.5) rotate(-15deg); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes gate-zoom { from { transform: rotate(-4deg) skewX(-6deg) scale(.7); opacity: 0; } to { opacity: 1; } }
}

/* The form sits in a white comic panel. */
.gate-panel {
  position: relative; margin-top: 46px; padding: 30px 24px 22px;
  background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 4px; box-shadow: 9px 9px 0 var(--ink);
}
.gate-bubble {
  position: absolute; top: -34px; right: -12px; margin: 0; max-width: 220px;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 50% / 48%; padding: 10px 20px;
  font-family: 'Bangers', Impact, sans-serif; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05;
  text-align: center; transform: rotate(4deg);
}
.gate-bubble::after { /* tail */
  content: ""; position: absolute; bottom: -14px; left: 26%; width: 18px; height: 18px; background: #fff;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(30deg) rotate(30deg);
}
.gate-bubble .say-signup, .gate[data-mode="signup"] .gate-bubble .say-signin { display: none; }
.gate[data-mode="signup"] .gate-bubble .say-signup { display: inline; }
.gate-burst { display: none; position: absolute; top: -30px; left: -26px; filter: drop-shadow(3px 3px 0 var(--ink)); transform: rotate(-14deg); }
.gate[data-mode="signup"] .gate-burst { display: block; }
.gate-burst span {
  display: grid; place-items: center; width: 88px; height: 88px; padding: 18px; text-align: center; line-height: .95;
  background: var(--cc-yellow); color: #d62828; font-family: 'Bangers', Impact, sans-serif; font-size: 19px; letter-spacing: .03em; text-transform: uppercase;
  clip-path: polygon(50% 0, 60% 22%, 84% 10%, 78% 36%, 100% 44%, 80% 58%, 92% 82%, 66% 76%, 58% 100%, 46% 80%, 22% 94%, 24% 68%, 0 60%, 20% 44%, 6% 20%, 32% 24%);
}
.gate h1 {
  text-align: center; margin: 0 0 6px; color: var(--cc-navy);
  font-family: 'Bangers', Impact, sans-serif; font-weight: 400; font-size: 36px; letter-spacing: .03em; text-transform: uppercase;
}
.gate h1 .dot { color: var(--cc-blue); }
.gate-note { margin: 0 0 4px; text-align: center; font-size: 14px; color: var(--ink); background: #FEF3C7; border: 2px solid var(--ink); border-radius: 4px; padding: 6px 12px; }
.gate form { display: grid; gap: 6px; }
.gate label { font-weight: 700; font-size: 14px; color: #1e293b; margin-top: 12px; }
.gate .underline {
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 9px 12px; font-size: 18px; caret-color: var(--cc-blue);
}
.gate .underline:focus { border-color: var(--cc-blue); box-shadow: 0 0 0 3px var(--cc-yellow); }
.gate .auth-form .underline[aria-invalid="true"] { border-color: #dc2626; }
.gate .auth-form .hint { color: #475569; }
.gate .form-msg { color: #dc2626; margin-top: 6px; font-weight: 600; }
.gate .btn-block {
  margin-top: 16px; background: var(--cc-yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink); font-family: 'Bangers', Impact, sans-serif; font-weight: 400; font-size: 28px;
  letter-spacing: .05em; text-transform: uppercase; padding-block: 8px; transition: transform .08s, box-shadow .08s;
}
.gate .btn-block:hover { background: #ffdd33; transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.gate .btn-block:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.gate .btn-block:disabled { opacity: .8; cursor: progress; }
.gate :focus-visible { outline-color: var(--cc-blue); }
.gate .fine { text-align: center; margin: 8px 0 0; color: #475569; }
.gate .link { color: var(--cc-blue); text-decoration-color: var(--cc-yellow); text-decoration-thickness: 3px; }
.gate .link:hover { color: var(--cc-navy); }
.gate-foot {
  margin-top: 40px; font-family: 'Bangers', Impact, sans-serif; font-size: 17px; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; text-shadow: 2px 2px 0 var(--ink);
}
@media (max-width: 460px) {
  .gate-panel { padding-inline: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .gate-bubble { right: 4px; font-size: 17px; }
  .gate-burst { left: -12px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero, .issue-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero { padding: 20px; }
  .hero-cover, .issue-detail .hero-cover { max-width: 300px; }
}
@media (max-width: 600px) {
  main { padding-top: 20px; }
  .header-nav { margin-left: 0; }
  .brand-name { font-size: 16px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .pages-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .r-hide-sm { display: none !important; }
  .r-pages.spread img { max-width: 100%; }
}
@media (max-width: 400px) { .brand-name { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Sign in / create account */
.auth-form { display: grid; gap: 6px; }
.auth-form .hint { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.auth-form .underline[aria-invalid="true"] { border-color: #dc2626; }
:root[data-theme="dark"] .auth-form .underline[aria-invalid="true"] { border-color: #f87171; }
.auth-switch { margin-top: 14px; }
.auth-switch .link { font-size: 13px; }
.gate .auth-form { margin-top: 0; }
/* Hidden field that only spam bots fill in. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }


/* =====================================================================================================
   Comic theme layer: Captain Cuddle look for the whole site (header, library, issue pages, reader).
   ===================================================================================================== */
:root {
  --ink: #0b0f1a; --cc-blue: #1d4ed8; --cc-blue-2: #2459e6; --cc-navy: #0b1f5c; --cc-yellow: #FFD400; --cc-sky: #93c5fd;
  --brand: #FFD400; --brand-dark: #F2C200; --brand-light: #FFF3A3; --brand-darker: #1d4ed8; --on-brand: #0b0f1a;
  --header: #1d4ed8; --header-raise: #2459e6; --header-hover: #1a45c4; --overlay: #0b1f5c; --reader-bg: #070b18;
  --bg: #E8F0FF; --panel: #FFFFFF; --card: #F3F7FF; --raise: #FFFFFF; --hover: #DCE7FF;
  --border: #BFD0F2; --text: #0b1f3a; --text-2: #3b4a6b; --text-3: #6b7a99;
  --font-head: 'Bangers', Impact, 'Arial Black', sans-serif;
  --pop: 6px 6px 0 var(--ink); --pop-sm: 4px 4px 0 var(--ink);
  --dots: rgb(29 78 216 / .10);
}
:root[data-theme="dark"] {
  --bg: #081230; --panel: #112052; --card: #16285f; --raise: #1b3070; --hover: #22397f;
  --border: #2a4088; --text: #FFFFFF; --text-2: #c0cbea; --text-3: #8592bd;
  --dots: rgb(147 197 253 / .08);
}
body { background: radial-gradient(circle, var(--dots) 1.3px, transparent 1.8px) 0 0 / 14px 14px fixed, var(--bg); }
h1, h2, h3 { font-weight: 400; letter-spacing: .03em; }
.dot { color: var(--cc-blue); }
:root[data-theme="dark"] .dot { color: var(--cc-yellow); }
:focus-visible { outline-color: var(--cc-blue); }
:root[data-theme="dark"] :focus-visible { outline-color: var(--cc-yellow); }

/* Header: comic blue with halftone and an ink rule */
.app-header {
  background: radial-gradient(circle, rgb(255 255 255 / .13) 1.2px, transparent 1.7px) 0 0 / 10px 10px, var(--cc-blue);
  border-bottom: 4px solid var(--ink);
}
.brand-badge { background: var(--cc-yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; width: 30px; height: 26px; transform: rotate(-8deg); box-shadow: 2px 2px 0 var(--ink); }
.brand-name {
  font-family: var(--font-head); font-weight: 400; font-size: 27px; letter-spacing: .04em; color: #fff;
  -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); line-height: 1;
}
.brand-name .dot { color: var(--cc-yellow); }
.header-nav a { color: #fff; font-family: var(--font-head); font-size: 19px; letter-spacing: .05em; font-weight: 400; text-shadow: 2px 2px 0 var(--ink); }
.header-nav a:hover { background: rgb(11 15 26 / .25); }
.header-nav a[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--cc-yellow); }
.icon-btn { background: rgb(255 255 255 / .16); color: #fff; border: 2px solid var(--ink); }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--cc-yellow); color: var(--ink); }
.header-btn { background: var(--cc-yellow); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-head); font-weight: 400; font-size: 17px; letter-spacing: .05em; }
.header-btn:hover { background: #ffdd33; }
.menu-panel { background: var(--cc-navy); border: 3px solid var(--ink); border-radius: 6px; box-shadow: var(--pop); }
.menu-section + .menu-section { border-top: 2px solid #1a3380; }
.menu-section .eyebrow { color: var(--cc-sky); }
.menu-item { background: #142a6e; color: #fff; }
.menu-item:hover { background: var(--cc-yellow); color: var(--ink); }

/* Narration caption boxes for the small labels above titles */
main .eyebrow {
  justify-self: start; width: fit-content; background: var(--cc-yellow); color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); padding: 2px 10px; letter-spacing: .06em; transform: rotate(-1deg);
}

/* Headings */
.hero-body h1, .issue-detail h1, .prose h1 { font-size: clamp(38px, 5.5vw, 60px); line-height: .95; }
.issue-detail h1, .prose h1, .section-head h2, .teaser-body h2 { color: var(--cc-navy); text-shadow: 3px 3px 0 var(--cc-yellow); }
:root[data-theme="dark"] .issue-detail h1, :root[data-theme="dark"] .prose h1,
:root[data-theme="dark"] .section-head h2, :root[data-theme="dark"] .teaser-body h2 { color: #fff; text-shadow: 3px 3px 0 var(--cc-blue); }
.section-head h2 { font-size: 34px; }
.prose h2 { font-size: 26px; color: var(--cc-blue); }
:root[data-theme="dark"] .prose h2 { color: var(--cc-yellow); }
.issue-card h3 { font-size: 21px; line-height: 1.05; }
.continue-card strong, .issue-nav strong, .r-title strong { font-weight: 400; letter-spacing: .03em; }
.continue-card strong { font-size: 19px; }
.issue-nav strong { font-size: 22px; }

/* Buttons: yellow, ink outline, press in */
.btn {
  border: 3px solid var(--ink); border-radius: 10px; box-shadow: var(--pop-sm);
  font-family: var(--font-head); font-weight: 400; font-size: 21px; letter-spacing: .05em; text-transform: uppercase;
  padding: 8px 20px; transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--cc-yellow); color: var(--ink); }
.btn-primary:hover { background: #ffdd33; }
.btn-secondary, :root[data-theme="dark"] .btn-secondary { background: var(--panel); color: var(--text); }
.btn-secondary:hover, :root[data-theme="dark"] .btn-secondary:hover { background: var(--hover); }
.btn:disabled { transform: none; box-shadow: var(--pop-sm); }
.link { text-decoration-color: var(--cc-yellow); text-decoration-thickness: 3px; }
.link:hover, :root[data-theme="dark"] .link:hover { color: var(--cc-blue); }
:root[data-theme="dark"] .link:hover { color: var(--cc-yellow); }

/* Latest issue: blue sunburst panel like the sign-in screen */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  border: 4px solid var(--ink); border-radius: 6px; box-shadow: 9px 9px 0 var(--ink);
  background:
    radial-gradient(circle, rgb(255 255 255 / .13) 1.3px, transparent 1.8px) 0 0 / 12px 12px,
    radial-gradient(ellipse at 22% 50%, transparent 20%, rgb(3 10 40 / .55) 100%),
    repeating-conic-gradient(from -3deg at 22% 50%, #2459e6 0 6deg, #1a45c4 6deg 12deg);
}
:root[data-theme="dark"] .hero { background:
    radial-gradient(circle, rgb(255 255 255 / .10) 1.3px, transparent 1.8px) 0 0 / 12px 12px,
    radial-gradient(ellipse at 22% 50%, transparent 20%, rgb(3 10 40 / .65) 100%),
    repeating-conic-gradient(from -3deg at 22% 50%, #16318f 0 6deg, #0f2470 6deg 12deg); }
.hero-body h1 { color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 4px 5px 0 var(--ink); transform: rotate(-2deg); transform-origin: left; }
.hero-body h1 .dot { color: var(--cc-yellow); }
.hero-body p { color: #e6edff; text-shadow: 0 1px 2px rgb(0 0 0 / .4); }
.hero .chip { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.hero .chip.brand { background: var(--cc-yellow); }
.hero .chip.soft, .hero .chip.done, .hero .chip.rating { background: #fff; color: var(--ink); }
.hero-cover {
  position: relative; overflow: visible; border-radius: 3px; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-2deg); transition: transform .2s;
}
.hero-cover img { border-radius: 0; }
a.hero-cover:hover { transform: rotate(0deg) scale(1.02); }
.hero .hero-cover::before, .hero .hero-cover::after {
  content: ""; position: absolute; top: -26px; right: -26px; width: 96px; height: 96px;
  clip-path: polygon(50% 0, 60% 22%, 84% 10%, 78% 36%, 100% 44%, 80% 58%, 92% 82%, 66% 76%, 58% 100%, 46% 80%, 22% 94%, 24% 68%, 0 60%, 20% 44%, 6% 20%, 32% 24%);
}
.hero .hero-cover::before { background: var(--ink); transform: translate(4px, 4px) rotate(12deg); }
.hero .hero-cover::after {
  content: "New!"; background: var(--cc-yellow); color: #d62828; transform: rotate(12deg);
  display: grid; place-items: center; font-family: var(--font-head); font-size: 25px; letter-spacing: .03em; text-transform: uppercase;
}
.issue-detail .hero-cover { transform: rotate(-1.5deg); }
.issue-detail .hero-cover.soon-cover { overflow: hidden; }

/* Chips */
.chip { border: 2px solid var(--ink); color: var(--text); background: var(--panel); }
.chip.brand { background: var(--cc-yellow); color: var(--ink); border-color: var(--ink); }
.chip.soft { background: #DCE7FF; color: var(--ink); border-color: var(--ink); }
:root[data-theme="dark"] .chip.soft { background: var(--raise); color: var(--cc-yellow); }
.chip.done { background: #dcfce7; color: #14532d; border-color: var(--ink); }
:root[data-theme="dark"] .chip.done { background: #14532d; color: #bbf7d0; }

/* Covers on the shelf: ink frame, pop on hover */
.issue-card .cover { border: 3px solid var(--ink); border-radius: 3px; box-shadow: var(--pop); transition: transform .15s, box-shadow .15s; }
.issue-card:hover .cover { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 10px 10px 0 var(--ink); }
.issue-card:nth-child(even):hover .cover { transform: translate(-3px, -3px) rotate(1deg); }
.issue-card:focus-visible .cover { outline: 3px solid var(--cc-yellow); outline-offset: 4px; }
.issue-num {
  top: 6px; left: 6px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 2px;
  font-family: var(--font-head); font-weight: 400; font-size: 18px; letter-spacing: .04em; padding: 0 7px; box-shadow: 2px 2px 0 var(--ink);
}
.progress { height: 7px; background: rgb(11 15 26 / .6); border-top: 2px solid var(--ink); }
.progress > span, .bar > span { background: var(--cc-yellow); }
.soon-ribbon {
  background: var(--cc-yellow); color: var(--ink); border-top: 3px solid var(--ink);
  font-family: var(--font-head); font-weight: 400; font-size: 18px; letter-spacing: .1em;
}
.soon-cover .soon-ribbon { font-size: 22px; }

/* Panels: white comic panels with ink outlines */
.continue-card, .subscribe, .comment-signin, .empty, .notice-card, .teaser {
  border: 3px solid var(--ink); border-radius: 4px; box-shadow: var(--pop); background: var(--panel);
}
.subscribe.compact { border: 0; box-shadow: none; background: transparent; }
.continue-card { transition: transform .12s, box-shadow .12s; }
.continue-card:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.continue-card img { border: 2px solid var(--ink); border-radius: 2px; }
.continue-card .go { font-family: var(--font-head); font-weight: 400; font-size: 20px; letter-spacing: .05em; text-transform: uppercase; color: var(--cc-blue); }
:root[data-theme="dark"] .continue-card .go { color: var(--cc-yellow); }
.bar { height: 7px; background: var(--hover); border: 2px solid var(--ink); }
.teaser { background: radial-gradient(circle, rgb(29 78 216 / .14) 1.3px, transparent 1.8px) 0 0 / 10px 10px, #FFF6C2; }
:root[data-theme="dark"] .teaser { background: radial-gradient(circle, rgb(255 212 0 / .12) 1.3px, transparent 1.8px) 0 0 / 10px 10px, var(--panel); }
.teaser-cover img { border: 3px solid var(--ink); border-radius: 2px; box-shadow: var(--pop-sm); transform: rotate(-3deg); }
.teaser-body .muted, .teaser-body p { color: var(--text-2); }
.subscribe h3 { font-size: 26px; color: var(--cc-navy); }
:root[data-theme="dark"] .subscribe h3 { color: #fff; }
.input { border: 3px solid var(--ink); border-radius: 8px; }
.input:focus { border-color: var(--cc-blue); box-shadow: 0 0 0 3px var(--cc-yellow); }

/* Issue page */
.crumbs a { color: var(--cc-blue); }
:root[data-theme="dark"] .crumbs a { color: var(--cc-sky); }
.facts { background: var(--ink); border: 3px solid var(--ink); border-radius: 4px; gap: 2px; box-shadow: var(--pop-sm); }
.facts dt { color: var(--cc-blue); }
:root[data-theme="dark"] .facts dt { color: var(--cc-sky); }
.facts dd { font-family: var(--font-head); font-weight: 400; font-size: 21px; letter-spacing: .03em; }
.page-tile { color: var(--text-2); }
.page-tile .thumb { border: 3px solid var(--ink); border-radius: 2px; box-shadow: var(--pop-sm); transition: transform .12s, box-shadow .12s; }
.page-tile:hover .thumb { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.page-tile.current .thumb { border-color: var(--cc-yellow); box-shadow: 0 0 0 3px var(--ink), var(--pop-sm); }
.issue-nav { border-top: 3px solid var(--ink); }
.issue-nav small { text-transform: uppercase; letter-spacing: .06em; }
.issue-nav a:hover strong { text-decoration-color: var(--cc-yellow); text-decoration-thickness: 3px; }

/* Ratings */
.stars button { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; color: #fff; }
:root[data-theme="dark"] .stars button { color: #24346b; }
.stars button.on, .stars:hover button { color: var(--cc-yellow) !important; }
.stars button:hover ~ button { color: #fff !important; }
:root[data-theme="dark"] .stars button:hover ~ button { color: #24346b !important; }
.rate-avg span[aria-hidden], .chip.rating span[aria-hidden] { color: #e0a800; }
:root[data-theme="dark"] .rate-avg span[aria-hidden], :root[data-theme="dark"] .chip.rating span[aria-hidden] { color: var(--cc-yellow); }
.rate-avg strong { font-family: var(--font-head); font-weight: 400; font-size: 26px; }

/* Comments as speech bubbles */
.comments { gap: 26px; }
.comment { position: relative; background: var(--panel); border: 3px solid var(--ink); border-radius: 20px; box-shadow: var(--pop-sm); padding: 14px 20px 16px; }
.comment::after {
  content: ""; position: absolute; left: 30px; bottom: -13px; width: 18px; height: 18px; background: var(--panel);
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(30deg) rotate(30deg);
}
.comment-head strong { font-family: var(--font-head); font-weight: 400; font-size: 19px; letter-spacing: .04em; }
.avatar { background: var(--cc-blue); color: #fff; border: 2px solid var(--ink); width: 32px; height: 32px; font-family: var(--font-head); font-weight: 400; font-size: 17px; }

/* Footer */
.app-footer { font-family: var(--font-head); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }

/* Reader: dark stage so the pages shine, comic-style chrome */
.r-bar { background: rgb(11 31 92 / .96); }
.r-top { border-bottom: 3px solid var(--ink); }
.r-bottom { border-top: 3px solid var(--ink); }
.r-title strong { font-size: 21px; }
.r-title small { color: var(--cc-sky); }
.seg { background: #071540; border: 2px solid var(--ink); }
.seg button { color: #c0cbea; }
.seg button[aria-pressed="true"] { background: var(--cc-yellow); color: var(--ink); }
.reader .icon-btn { background: #142a6e; }
.reader .icon-btn:hover, .reader .icon-btn[aria-pressed="true"] { background: var(--cc-yellow); color: var(--ink); }
.r-pages img, .r-scroll img { border: 3px solid var(--ink); box-shadow: 0 10px 40px rgb(0 0 0 / .6); }
.r-scrub input[type="range"] { accent-color: var(--cc-yellow); }
.r-scrub output { color: #fff; font-family: var(--font-head); font-weight: 400; font-size: 18px; letter-spacing: .04em; }
.r-strip button { border: 2px solid var(--ink); }
.r-strip button[aria-current="true"] { border-color: var(--cc-yellow); }
.r-tap:focus-visible { background: linear-gradient(90deg, rgb(255 212 0 / .18), transparent); }
.r-tap.next:focus-visible { background: linear-gradient(-90deg, rgb(255 212 0 / .18), transparent); }
.end-card, .r-help-card {
  background: radial-gradient(circle, rgb(29 78 216 / .10) 1.3px, transparent 1.8px) 0 0 / 12px 12px, #fff;
  color: var(--ink); border: 4px solid var(--ink); border-radius: 4px; box-shadow: 9px 9px 0 #000;
}
.end-card h2, .r-help-card h2 { color: var(--cc-navy); font-size: 38px; text-shadow: 3px 3px 0 var(--cc-yellow); }
.end-card p { color: #3b4a6b; }
.end-card .next-cover { border: 3px solid var(--ink); border-radius: 2px; box-shadow: var(--pop-sm); transform: rotate(-2deg); }
.end-card .btn-secondary { background: #fff; color: var(--ink); }
.end-card .btn-secondary:hover { background: #DCE7FF; }
.end-card hr { border-top: 2px dashed #9fb3e0; }
.end-card .link { color: var(--cc-blue); }
.end-stars button { color: #fff; }
.end-stars button:hover ~ button { color: #fff !important; }
.r-help-card dt { color: var(--cc-blue); }
.r-help-card dd { color: #1e293b; }
.r-help-card kbd { background: var(--cc-navy); }
.toast {
  background: var(--cc-yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; box-shadow: var(--pop-sm);
  font-family: var(--font-head); font-weight: 400; font-size: 20px; letter-spacing: .05em; text-transform: uppercase;
}
.notice-card h1 { color: var(--cc-navy); text-shadow: 3px 3px 0 var(--cc-yellow); }

@media (max-width: 600px) {
  .brand-name { font-size: 22px; }
  .header-nav a { font-size: 17px; padding: 6px 7px; }
  .section-head h2 { font-size: 28px; }
  .hero { box-shadow: 6px 6px 0 var(--ink); }
  .hero .hero-cover::before, .hero .hero-cover::after { width: 78px; height: 78px; top: -20px; right: -16px; }
  .hero .hero-cover::after { font-size: 20px; }
}
