:root {
  --bg: #0B0C10;
  --bg2: #101116;
  --surface: #14151C;
  --surface2: #161821;
  --border: #23252E;
  --border2: #2A2D38;
  --text: #F2F2F4;
  --muted: #9CA0AC;
  --muted2: #6F7380;
  --accent: #EF9F27;
  --accent-soft: #FAC775;
  --accent-ink: #412402;
  --patreon: #E24B4A;
  --patreon-soft: #F09595;
  --patreon-ink: #FCEBEB;
  --teal: #5DCAA5;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1 { font-size: 28px; font-weight: 800; margin: 8px 0; letter-spacing: -0.01em; }
h2 { font-size: 19px; font-weight: 700; margin: 0 0 14px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.spacer { flex: 1; }
.ti { vertical-align: -2px; }

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.head-row { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.logo-word { font-weight: 800; font-size: 15px; letter-spacing: 0.06em; }
.site-head nav { display: flex; gap: 16px; }
.site-head nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.site-head nav a:hover { color: var(--text); }
.chip-18 { border: 1px solid #3A3D49; color: var(--muted); font-size: 11px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 13.5px; font-family: inherit;
  padding: 9px 15px; border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; transition: filter 0.15s, transform 0.05s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.07); }
.btn-ghost { border-color: #3A3D49; color: #C7CAD4; background: transparent; }
.btn-ghost:hover { border-color: #555A6B; color: var(--text); }
.btn-patreon { background: var(--patreon); color: var(--patreon-ink); }
.btn-patreon:hover { filter: brightness(1.07); }
.btn-link { color: var(--patreon-soft); border: none; padding: 9px 4px; background: transparent; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}
.badge-new { background: var(--accent); color: var(--accent-ink); }
.badge-lock { background: var(--border2); color: #C7CAD4; }
.badge-status { background: var(--border2); color: #C7CAD4; text-transform: capitalize; }

.cover { display: flex; align-items: center; justify-content: center; border-radius: 10px; overflow: hidden; flex: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-initial { font-weight: 800; letter-spacing: 0.04em; }
.cover-hero { width: 220px; aspect-ratio: 3 / 4; }
.cover-hero .cover-initial { font-size: 44px; }
.cover-thumb { width: 56px; height: 74px; border-radius: 7px; }
.cover-thumb .cover-initial { font-size: 15px; }
.cover-grid { width: 100%; aspect-ratio: 3 / 4; }
.cover-grid .cover-initial { font-size: 30px; }

.hero {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; margin: 26px 0;
}
.hero-info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-meta { color: var(--muted); font-size: 13px; margin: 0; }
.hero-teaser { color: #B6BAC6; font-size: 14.5px; margin: 10px 0 0; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }

.row-section { margin: 30px 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; }
.row-head .more { color: var(--muted); font-size: 13px; }
.row-head .more:hover { color: var(--text); }
.sub { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 8px; }

.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.progress-card { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.progress-card:hover { border-color: #3A3D49; }
.pc-body { min-width: 0; flex: 1; }
.pc-title { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar { display: block; height: 4px; border-radius: 999px; background: var(--border); margin: 8px 0 6px; }
.pbar-fill { display: block; height: 4px; border-radius: 999px; background: var(--teal); }
.pc-meta { color: var(--muted); font-size: 11.5px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; margin: 10px 0 30px; }

.feed-day { color: var(--muted2); font-size: 12px; font-weight: 600; margin: 16px 0 8px; }
.feed-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 14px; margin-bottom: 9px;
}
.feed-card:hover { border-color: #3A3D49; }
.fc-body { flex: 1; min-width: 0; }
.fc-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fc-teaser { color: var(--muted2); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.read-link { color: var(--accent-soft); font-size: 13px; font-weight: 600; white-space: nowrap; }
.read-locked { color: var(--patreon-soft); }

.side { display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); padding: 15px; }
.panel h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.panel p { margin: 0; color: var(--muted); font-size: 12.5px; }
.panel .btn { width: 100%; justify-content: center; margin-top: 12px; }
.sched-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 4px 0; }
.sched-done { color: var(--teal); }
.sched-wait { color: var(--accent-soft); }
.follow-row { display: flex; gap: 8px; }
.follow-row a {
  width: 34px; height: 34px; border: 1px solid var(--border2); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px;
}
.follow-row a:hover { color: var(--text); border-color: #3A3D49; }

.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.series-card .sc-cover { position: relative; }
.sc-badge { position: absolute; top: 8px; left: 8px; }
.sc-title { display: block; font-size: 13.5px; font-weight: 600; margin-top: 8px; }
.sc-meta { color: var(--muted); font-size: 12px; }
.series-card:hover .sc-title { color: var(--accent-soft); }

.about p { color: var(--muted); font-size: 14px; max-width: 640px; }
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 26px 0 40px; }
.foot-brand { font-weight: 800; letter-spacing: 0.05em; font-size: 14px; }
.foot-note { color: var(--muted2); font-size: 12.5px; max-width: 560px; }
.foot-links { color: var(--muted); font-size: 13px; display: flex; gap: 14px; margin-top: 10px; }
.foot-links a:hover { color: var(--text); }

.parts-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; }
.part-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.part-row:last-child { border-bottom: none; }
.part-row:hover { background: var(--surface2); }
.pr-title { font-size: 14px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.part-archive .pr-title { color: var(--muted); font-weight: 500; }

.reader-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 12, 16, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.rt-row { display: flex; align-items: center; gap: 14px; height: 54px; }
.rt-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-count { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.reader-pages { max-width: 860px; margin: 0 auto; padding: 18px 12px 10px; }
img.page { display: block; width: 100%; border-radius: 6px; margin-bottom: 10px; background: var(--surface); cursor: pointer; scroll-margin-top: 60px; }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; max-width: 860px; margin: 0 auto; padding: 0 12px 36px; }
.end-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 34px 24px; text-align: center; margin: 20px 0; scroll-margin-top: 60px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.end-card h2 { margin: 0; }
.end-card p { margin: 0; color: var(--muted); font-size: 14px; }
.end-icon { font-size: 34px; color: var(--muted); }

body.gated { overflow: hidden; }
body.gated main, body.gated .site-head, body.gated footer, body.gated .reader-top { filter: blur(16px); pointer-events: none; user-select: none; }
.gate-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 9, 12, 0.78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 18px; padding: 34px 30px; max-width: 430px; text-align: center; }
.gate-logo {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 14px;
}
.gate-card h2 { font-size: 21px; }
.gate-card p { color: var(--muted); font-size: 14px; }
.gate-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 150px minmax(0, 1fr); padding: 18px; gap: 18px; }
  .cover-hero { width: 150px; }
  .cover-hero .cover-initial { font-size: 32px; }
  h1 { font-size: 22px; }
}
@media (max-width: 600px) {
  .site-head nav { display: none; }
  .hero { grid-template-columns: 110px minmax(0, 1fr); }
  .cover-hero { width: 110px; }
  .cover-hero .cover-initial { font-size: 24px; }
  .hero-actions .btn { padding: 8px 12px; font-size: 12.5px; }
  .series-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .fc-teaser { display: none; }
  .card-row { grid-auto-columns: 230px; }
  .pr-meta { display: none; }
}

/* clickable reader pages (tap to advance) + comments */
img.page { cursor: pointer; }
.comments { margin: 10px auto 64px; max-width: 860px; }
.cm-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.cm-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 22px; }
.cm-form .cm-name { display: block; width: 100%; max-width: 260px; margin-bottom: 8px; background: var(--bg2); border: 1px solid var(--border2); color: var(--text); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px; }
.cm-form .cm-text { display: block; width: 100%; background: var(--bg2); border: 1px solid var(--border2); color: var(--text); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 14px; resize: vertical; }
.cm-form .cm-name:focus, .cm-form .cm-text:focus { outline: none; border-color: var(--accent); }
.cm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.cm-note { font-size: 12.5px; }
.cm-locked { background: var(--surface); border: 1px dashed var(--border2); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.cm-locked .ti { color: var(--accent-soft); margin-right: 6px; }
.cm-list { display: flex; flex-direction: column; gap: 12px; }
.cm { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.cm-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.cm-head strong { font-size: 13.5px; font-weight: 600; }
.cm-head .muted { font-size: 12px; }
.cm-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cm-empty { font-size: 13.5px; }
.cm-member { color: var(--accent-soft); }
.cm-verified { color: var(--teal); font-size: 13px; margin-left: -4px; }
.cm-asyou { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cm-asyou strong { font-weight: 600; }
.cm-signin-link { background: none; border: none; padding: 0; color: var(--accent-soft); font: inherit; font-size: inherit; cursor: pointer; text-decoration: underline; }

/* ---- account control + auth modal ---------------------------------------- */
.acct-slot { display: inline-flex; align-items: center; }
.acct-menu { position: relative; }
.acct-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border2); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.acct-chip:hover { border-color: #555A6B; }
.acct-chip .ti { color: var(--accent-soft); font-size: 16px; }
.acct-drop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 10px; min-width: 190px; z-index: 60; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.acct-id { font-size: 12.5px; color: var(--muted); padding: 2px 4px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.acct-id strong { color: var(--text); }
.acct-tag { display: inline-block; background: rgba(93,202,165,.16); color: var(--teal); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 4px; text-transform: uppercase; letter-spacing: .03em; }
.acct-link { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); font: inherit; font-size: 13.5px; padding: 7px 4px; border-radius: 7px; cursor: pointer; text-decoration: none; }
.acct-link:hover { background: var(--surface2); }

.acct-overlay { position: fixed; inset: 0; background: rgba(5,6,9,.72); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 200; }
.acct-modal { position: relative; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 26px; width: 100%; max-width: 380px; box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.acct-x { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.acct-x:hover { color: var(--text); }
.acct-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.acct-tabs button { flex: 1; background: var(--bg2); border: 1px solid var(--border); color: var(--muted); border-radius: 9px; padding: 9px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.acct-tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.acct-err { background: rgba(226,75,74,.14); color: var(--patreon-soft); border: 1px solid rgba(226,75,74,.3); padding: 9px 12px; border-radius: 9px; font-size: 13px; margin-bottom: 12px; }
.acct-form label { display: block; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.acct-form input { display: block; width: 100%; margin-top: 5px; background: var(--bg2); border: 1px solid var(--border2); color: var(--text); border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 14px; }
.acct-form input:focus { outline: none; border-color: var(--accent); }
.acct-form .btn { width: 100%; justify-content: center; margin-top: 18px; }
.acct-fine { font-size: 11.5px; color: var(--muted2); margin: 10px 0 0; }

/* ---- banner hero (poster + plate) ---------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Poster: whole art, blurred fill behind, chrome on a bottom scrim */
.hero.is-banner { display: block; position: relative; padding: 0; overflow: hidden; background: #070809; height: clamp(220px, 42vw, 470px); }
.hero.is-banner .bn-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(30px) brightness(0.45); transform: scale(1.12); }
.hero.is-banner .bn-img { position: relative; z-index: 1; display: block; height: 100%; width: 100%; object-fit: contain; margin: 0 auto; }
.poster-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 48px 26px 18px; background: linear-gradient(to top, rgba(7,8,9,0.95) 6%, rgba(7,8,9,0.55) 48%, rgba(7,8,9,0)); }
.poster-cap .poster-meta { color: #C7CAD4; font-size: 13.5px; }
.poster-cap .spacer { flex: 1; }
.poster-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Plate: cover-cropped wide art behind an overlaid title */
.hero.is-plate { display: flex; align-items: center; position: relative; padding: 0; overflow: hidden; min-height: 300px; background-size: cover; background-position: center; }
.hero.is-plate .plate-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,12,16,0.92) 0%, rgba(11,12,16,0.72) 32%, rgba(11,12,16,0.15) 62%, rgba(11,12,16,0) 100%); }
.hero.is-plate .plate-info { position: relative; z-index: 1; padding: 0 44px; max-width: 620px; }

@media (max-width: 720px) {
  .hero.is-plate { min-height: 240px; }
  .hero.is-plate .plate-info { padding: 0 20px; }
  .poster-cap { padding: 40px 16px 14px; }
}

/* ---- featured row (curated posters) -------------------------------------- */
.feature-row { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.feature-card { scroll-snap-align: start; }
.ft-imgwrap { position: relative; }
.ft-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: var(--radius); border: 1px solid var(--border); }
.ft-fallback { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 38px; letter-spacing: 0.04em; }
.ft-badge { position: absolute; top: 8px; left: 8px; }
.ft-cap { display: block; padding: 8px 2px 0; }
.ft-title { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-meta { display: block; font-size: 12px; color: var(--muted); }
.feature-card:hover .ft-img { border-color: #3A3D49; }
.feature-card:hover .ft-title { color: var(--accent-soft); }
@media (max-width: 720px) { .feature-row { grid-auto-columns: 260px; } }


/* Reader: "tap to advance" hint pill (auto-dismisses) */
.tap-hint{position:fixed;left:50%;bottom:22px;transform:translateX(-50%) translateY(10px);z-index:60;display:flex;align-items:center;gap:7px;padding:9px 16px;border-radius:999px;background:rgba(17,18,24,.92);color:#fff;border:1px solid rgba(255,255,255,.14);font-size:13.5px;font-weight:600;letter-spacing:.2px;box-shadow:0 8px 28px rgba(0,0,0,.45);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);opacity:0;pointer-events:none;transition:opacity .35s ease,transform .35s ease}
.tap-hint.show{opacity:1;transform:translateX(-50%) translateY(0)}
.tap-hint .ti{font-size:16px;color:var(--accent,#EF9F27)}
@media (max-width:640px){.tap-hint{bottom:16px;font-size:12.5px;padding:8px 14px}}
