:root {
  --bg: #0E1430;
  --surface: #18214A;
  --surface-2: #222D60;
  --text: #EEF1FF;
  --muted: #A9B3D9;
  --ink: #05081A;
  --bolt: #FFD23F;
  --sky: #7FC8F8;
  --white: #FFFFFF;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --pop: 6px 6px 0 var(--ink);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFF8E6;
    --surface: #FFFFFF;
    --surface-2: #FFF1C9;
    --text: #0F1633;
    --muted: #4A5378;
    --ink: #0F1633;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--sky); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: 0.5px; text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--bolt); color: #0F1633; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--bolt); outline-offset: 3px; }

/* ---------- logo ---------- */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-family: var(--display);
  color: var(--bolt);
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0.06em 0.06em 0 var(--ink);
}
.wordmark .eye {
  flex: 0 0 auto;
  position: relative;
  width: 0.54em;
  height: 0.54em;
  margin: 0 0.012em;
  border-radius: 50%;
  background: #fff;
  border: 0.06em solid #0F1633;
  box-shadow: 0.06em 0.06em 0 var(--ink);
}
.wordmark .eye::after {
  content: "";
  position: absolute;
  width: 0.2em;
  height: 0.2em;
  top: 0.08em;
  right: 0.06em;
  border-radius: 50%;
  background: #0F1633;
}

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: #1E2A5A; border-bottom: 4px solid var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { width: 26px; height: auto; }
.top .wordmark { font-size: 28px; }
nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: #fff; font-weight: 800; text-decoration: none; }
nav a:hover { background: rgba(255, 255, 255, 0.12); }
nav a.cta { background: var(--bolt); color: #0F1633; border: 3px solid #05081A; padding: 5px 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  font-family: var(--body); font-weight: 800; font-size: 17px; text-decoration: none;
  color: #0F1633; background: var(--bolt);
  border: 3px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn.ghost { background: var(--surface); color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 32px; background: radial-gradient(1200px 500px at 85% 0%, rgba(127, 200, 248, 0.16), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero-copy { container-type: inline-size; min-width: 0; }
.hero h1 .wordmark { font-size: 64px; font-size: min(100px, 17cqi); }
.hero h1 small { display: block; margin-top: 10px; font-family: var(--body); font-weight: 800; font-size: 15px; letter-spacing: 0.6em; color: var(--sky); }
.tagline { font-size: 22px; font-weight: 800; margin: 18px 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; transform: rotate(-1.5deg); }
.strip img { display: block; width: 100%; height: auto; border: 4px solid var(--ink); border-radius: 6px; box-shadow: var(--pop); background: var(--surface); }
.strip img:nth-child(2) { transform: translateY(18px) rotate(2deg); }
.cast-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cast-row img { width: 100%; height: auto; }

/* ---------- sections ---------- */
.block { padding: 48px 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 24px; }
.sec-head h2, .synopsis h2 { font-size: clamp(34px, 5vw, 50px); color: var(--bolt); text-shadow: 3px 3px 0 var(--ink); }
.sec-head p { margin: 0; color: var(--muted); }
.synopsis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.synopsis p { margin: 0 0 14px; font-size: 19px; max-width: 62ch; }
.synopsis p:first-child { color: var(--text); }
.synopsis p + p { color: var(--muted); }
.empty { color: var(--muted); }
.sub { font-size: 28px; margin: 40px 0 18px; color: var(--sky); }

/* ---------- episode grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.grid.small { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  color: var(--text); text-decoration: none;
  background: var(--surface); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop);
  transition: transform .15s, box-shadow .15s;
}
a.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--bolt); }
.thumb { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2); border-bottom: 4px solid var(--ink); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb img.char { object-fit: contain; padding: 10%; }
.badge { position: absolute; top: 12px; left: 12px; padding: 2px 12px; font-weight: 800; font-size: 14px; color: #0F1633; background: var(--bolt); border: 3px solid #05081A; border-radius: 999px; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.meta { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sky); margin: 0; }
.card-title { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.card-text { color: var(--muted); font-size: 15px; }
.card.soon { opacity: 0.85; }
.card.soon .card-title { font-size: 22px; }

/* ---------- characters ---------- */
.cast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.who {
  --accent: var(--bolt);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 14px 14px 18px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--pop);
  transition: transform .15s, box-shadow .15s;
}
.who:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--accent); }
.who img { width: 100%; max-width: 220px; height: auto; }
.who-name { font-family: var(--display); font-size: 26px; margin-top: 4px; }
.who-role { color: var(--muted); font-size: 15px; }

/* ---------- character page ---------- */
.profile { padding: 40px 0 16px; background: radial-gradient(900px 420px at 20% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.profile-art { background: var(--surface); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--accent); padding: 24px; }
.profile-art img { display: block; width: 100%; height: auto; }
.profile-copy h1 { font-size: clamp(48px, 7vw, 80px); color: var(--bolt); text-shadow: 4px 4px 0 var(--ink); margin: 4px 0; }
.profile-copy .role { font-size: 20px; font-weight: 800; margin: 0 0 16px; }
.profile-copy p { max-width: 58ch; }
.traits { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; list-style: none; }
.traits li { padding: 6px 14px; font-weight: 800; font-size: 15px; background: var(--surface-2); border: 3px solid var(--ink); border-radius: 999px; }
.back { display: inline-block; margin-bottom: 10px; font-weight: 800; text-decoration: none; }
.others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 44px; }
.who.mini img { max-width: 140px; }
.who.mini .who-name { font-size: 21px; }

/* ---------- reader ---------- */
.page-episode main { padding-bottom: 96px; }
.reader { max-width: 720px; margin: 0 auto; }
.chapter-head { padding: 28px 20px 24px; }
.chapter-head h1 { font-size: clamp(42px, 9vw, 68px); color: var(--bolt); text-shadow: 4px 4px 0 var(--ink); margin: 6px 0 8px; }
.summary { color: var(--muted); margin: 0 0 12px; }
.mini-cast { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mini-cast a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; font-weight: 800; font-size: 14px; color: var(--text); text-decoration: none; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; }
.mini-cast img { width: 26px; height: auto; }

.panels { display: block; background: #000; cursor: pointer; }
.panels img { display: block; width: 100%; height: auto; margin: 0; border: 0; }

.chapter-end { padding: 36px 20px 20px; text-align: center; }
.the-end { font-family: var(--display); font-size: 30px; color: var(--bolt); margin: 0 0 24px; }
.end-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

.short { max-width: 340px; margin: 0 auto 28px; }
.reader > .short { margin-top: 0; padding: 0 20px; }
.short-play, .short iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0;
  background: #000; border: 4px solid var(--ink); border-radius: 14px; box-shadow: var(--pop); overflow: hidden; cursor: pointer;
}
.short-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; inset: 0; margin: auto; width: 76px; height: 54px; background: #FF0033; border-radius: 16px; }
.play::after { content: ""; position: absolute; left: 30px; top: 15px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.short-label { margin: 10px 0 0; font-weight: 800; color: var(--muted); font-size: 15px; }

.reader-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(14, 20, 48, 0.94); backdrop-filter: blur(8px);
  border-top: 3px solid #05081A;
  transition: transform .25s ease;
}
.reader-bar.is-hidden { transform: translateY(110%); }
.rb-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 14px;
  font-weight: 800; color: #0F1633; text-decoration: none; background: var(--bolt); border: 3px solid #05081A; border-radius: 12px;
}
.rb-btn.off { background: #2A3566; color: #6E7AAE; }
.rb-title { display: flex; flex-direction: column; align-items: center; min-width: 0; text-decoration: none; color: #fff; line-height: 1.2; }
.rb-series { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.rb-ep { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.rb-progress { position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: transparent; }
.rb-progress span { display: block; height: 100%; width: 0; background: var(--bolt); }

/* ---------- footer, 404 ---------- */
.foot { margin-top: 40px; padding: 30px 0; background: #070B1F; color: #C9D1F0; border-top: 4px solid var(--ink); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.foot .wordmark { font-size: 24px; }
.foot p { margin: 0; font-size: 15px; }
.social { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.social a { color: var(--bolt); font-weight: 800; }
.lost { text-align: center; }
.lost h1 { font-size: 48px; color: var(--bolt); margin: 10px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .synopsis, .profile-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .strip { max-width: 560px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.small, .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-art { max-width: 380px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .top .wrap { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .top .wordmark { font-size: 21px; }
  .brand { gap: 6px; }
  .brand img { width: 18px; }
  nav ul { gap: 0; }
  nav a { padding: 6px 7px; font-size: 13px; }
  nav a.cta { padding: 3px 9px; margin-left: 4px; }
  .grid { grid-template-columns: 1fr; }
  .cast, .grid.small { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .who-name { font-size: 21px; }
  .who-role { font-size: 13px; }
  .others { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .who.mini .who-name { font-size: 16px; }
  .rb-btn span { display: none; }
}
@media (max-width: 480px) {
  nav li.opt { display: none; }
}

/* ---------- signup ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 36px; align-items: center;
  padding: 32px; color: #0F1633; background: var(--bolt);
  border: 4px solid var(--ink); border-radius: 16px; box-shadow: 8px 8px 0 var(--ink);
}
.signup h2 { font-size: clamp(32px, 4.6vw, 46px); color: #0F1633; text-shadow: none; }
.signup p { margin: 8px 0 0; font-size: 18px; }
.perks { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-weight: 800; }
.perks li::before { content: "\2713"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; font-size: 13px; color: var(--bolt); background: #0F1633; border-radius: 50%; }
.signup-form { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-form input {
  flex: 1 1 220px; min-height: 52px; padding: 0 16px; font: inherit; font-size: 17px; color: #0F1633;
  background: #fff; border: 3px solid #0F1633; border-radius: 12px;
}
.signup-form .btn { background: #1E2A5A; color: #fff; border-color: #0F1633; box-shadow: 4px 4px 0 #0F1633; }
.signup-msg { flex-basis: 100%; margin: 0; font-weight: 800; min-height: 1.2em; }
.signup-form.done input, .signup-form.done .btn { display: none; }
.signup-off { font-weight: 800; }
.signup.compact { grid-template-columns: 1fr; text-align: left; padding: 24px; margin-top: 36px; }
.signup.compact h2 { font-size: 30px; }
.join .wrap { max-width: 920px; }
.join-art { display: flex; justify-content: center; gap: 4%; margin-bottom: -10px; }
.join-art img { width: 22%; max-width: 150px; height: auto; position: relative; z-index: 1; }
.early-badge { display: inline-block; margin: 0 0 6px; padding: 4px 12px; font-weight: 800; font-size: 14px; color: #0F1633; background: var(--bolt); border: 3px solid #05081A; border-radius: 999px; }
@media (max-width: 760px) { .signup { grid-template-columns: 1fr; padding: 24px; } }
