:root {
  --ink: #080b14;
  --panel: #111729;
  --panel-2: #182038;
  --line: #2a3354;
  --text: #e9e6dc;
  --muted: #9ea3b8;
  --gold: #e3bd6a;
  --gold-2: #f6dda0;
  --jade: #5fc2a8;
  --serif: "Noto Serif", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font: 400 16px/1.65 "Be Vietnam Pro", system-ui, sans-serif;
  background: var(--ink) radial-gradient(1200px 600px at 75% -10%, #1d2a52 0%, transparent 60%) no-repeat;
}
body::after { /* a faint line of mountains at the foot of the page */
  content: ""; position: fixed; inset: auto 0 0 0; height: 180px; z-index: -1; opacity: 0.35;
  background: #1a2344;
  clip-path: polygon(0 100%, 0 70%, 8% 45%, 15% 68%, 26% 20%, 34% 62%, 45% 38%, 55% 74%, 66% 12%, 76% 58%, 86% 34%, 94% 66%, 100% 50%, 100% 100%);
}
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; text-wrap: balance; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: 1.35rem; color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 9; background: var(--panel); padding: 8px 12px; }

.top, main, footer { width: min(1180px, 100% - 32px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--serif); color: var(--text); }
.brand:hover { text-decoration: none; }
.seal { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(150deg, #b3382f, #7c1f1c); color: var(--gold-2); box-shadow: 0 0 0 1px #d9a95b66 inset; }
.top nav { display: flex; gap: 20px; white-space: nowrap; }
.brand { white-space: nowrap; }
@media (max-width: 440px) { .top nav { gap: 14px; font-size: 0.9rem; } .brand { font-size: 1.02rem; } .seal { width: 32px; height: 32px; } }
.top nav a { color: var(--muted); }
.block { margin-top: 48px; }
h1.h2 { font-size: 1.35rem; color: var(--gold); }
.hero-title { font: 700 clamp(1.7rem, 4vw, 2.6rem)/1.3 var(--serif); margin: 0 0 0.5em; }
.intro { color: var(--muted); max-width: 75ch; }
.notice { margin-top: 40px; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 0.92rem; }
.contents details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.contents summary { cursor: pointer; }
.contents ul { columns: 2 280px; color: var(--muted); font-size: 0.9rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold-2); font: inherit; cursor: pointer; }
.consent { position: fixed; z-index: 10; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin-inline: auto; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--gold); background: var(--panel); box-shadow: 0 16px 50px #000a; }
.consent p { margin: 0 0 12px; font-size: 0.92rem; }
.consent div { display: flex; gap: 10px; flex-wrap: wrap; }
footer { margin-top: 64px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 20px; border: 1px solid var(--gold); border-radius: 999px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #241a05; font: 600 0.95rem "Be Vietnam Pro", sans-serif; cursor: pointer; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold-2); border-color: var(--line); }
.btn:disabled { opacity: 0.4; cursor: default; }

.hero { display: grid; gap: 28px; align-items: center; margin-top: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.kicker { margin: 0; color: var(--jade); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem; }
.zh { margin: -0.3em 0 0.8em; color: var(--gold); opacity: 0.8; letter-spacing: 0.3em; }
.zh:empty { display: none; }
.lead { color: var(--muted); }
.stats { color: var(--muted); font-size: 0.9rem; }
.hero-art img { width: 100%; border-radius: 16px; border: 1px solid #d9a95b55; box-shadow: 0 24px 60px #0009; }

.tools { display: grid; gap: 12px; margin-bottom: 22px; }
input[type="search"] { width: 100%; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 0.9rem; cursor: pointer; }
.chip i { font-style: normal; opacity: 0.6; }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #241a05; font-weight: 600; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); list-style: none; padding: 0; margin: 0; }
.card a { display: block; height: 100%; padding: 10px 10px 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: transform 0.15s, border-color 0.15s; }
.card a:hover { transform: translateY(-3px); border-color: var(--gold); text-decoration: none; }
.card h3 { font-size: 1.05rem; margin: 10px 4px 2px; }
.meta { color: var(--muted); font-size: 0.88rem; }
.card .meta { margin: 0 4px 8px; }
.art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 9px; background: var(--panel-2); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; height: 100%; font-size: 3rem; color: var(--gold); opacity: 0.5; }
.badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px; background: #080b14cc; font-size: 0.78rem; color: var(--gold-2); }
.empty { color: var(--muted); text-align: center; padding: 32px; }

.resume { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.resume a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.resume img { width: 108px; border-radius: 8px; }
.resume span { display: block; color: var(--muted); font-size: 0.85rem; }

.crumb { margin-top: 20px; color: var(--muted); font-size: 0.9rem; }
.story { display: grid; gap: 28px; margin-top: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .story { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.cover img { width: 100%; border-radius: 14px; border: 1px solid #d9a95b55; }
.cover:empty { display: none; }
.desc p { margin: 0 0 0.7em; }
.desc.clamp { max-height: 9.9em; overflow: hidden; mask-image: linear-gradient(#000 60%, transparent); }
.more { background: none; border: 0; padding: 0; color: var(--jade); font: inherit; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.listen { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .listen { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.frame { position: relative; aspect-ratio: 16 / 9; min-height: 200px; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }
.now { font-weight: 600; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chapters, .episodes { list-style: none; padding: 0; margin: 0; max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.chapters li + li, .episodes li + li { border-top: 1px solid var(--line); }
.chapters button, .ep { display: flex; width: 100%; gap: 12px; align-items: baseline; justify-content: space-between; padding: 11px 14px; background: none; border: 0; color: var(--text); font: inherit; font-size: 0.93rem; text-align: left; cursor: pointer; }
.chapters button b, .ep b { font-weight: 500; }
.chapters button:hover, .ep:hover { background: var(--panel-2); }
.chapters span, .ep span { color: var(--muted); font-size: 0.83rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chapters [aria-current="true"], .ep[aria-current="true"] { background: #e3bd6a1f; box-shadow: inset 3px 0 var(--gold); }

.prose { max-width: 70ch; }
.todo { color: #ff9d8a; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card a { transition: none; } }
