/* ══════════════════════════════════════════════════════════════
   SALAH SAMBUNG — base.css
   Layar: splash, menu, profil, chapter, setelan, tentang
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #05070a;
  --bg-2: #090d12;
  --panel: #0d131a;
  --panel-2: #111a23;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --ink: #e9eef2;
  --muted: #8a97a3;
  --muted-2: #61707c;
  --red: #e23b3b;
  --red-deep: #8f1620;
  --red-glow: rgba(226, 59, 59, .35);
  --green: #00a884;
  --green-soft: #06cf9c;
  --amber: #e5b454;
  --cyan: #58d7e8;
  --font-ui: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-type: "Special Elite", "Courier New", monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
*::selection { background: var(--red); color: #fff; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  touch-action: manipulation;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin: 0; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; color: var(--cyan); }
[hidden] { display: none !important; }

/* ── layar ─────────────────────────────────────────────────── */
#app { position: fixed; inset: 0; overflow: hidden; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.012);
  transition: opacity .38s var(--ease), visibility .38s, transform .5s var(--ease);
  overflow: hidden;
}
.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 2;
}
.screen.is-leaving { opacity: 0; transform: scale(.985); z-index: 1; }

/* grain + scanline generik */
.fx-noise, .fx-scan { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.fx-noise {
  opacity: .05;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(3) infinite;
}
.fx-scan {
  opacity: .22;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .45) 2px 3px);
  mix-blend-mode: multiply;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ── logo & glitch ─────────────────────────────────────────── */
.logo {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .82;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: #f2f5f7;
  margin: 0;
  text-shadow: 0 0 34px rgba(255, 255, 255, .08);
  user-select: none;
}
.logo span { color: #cbd4da; }
.logo::before, .logo::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .8;
  clip-path: inset(0 0 55% 0);
}
.logo::before { color: var(--red); transform: translate(-2px, -2px); animation: glitch-a 5.2s infinite steps(1); }
.logo::after { color: #2bb3c7; transform: translate(2px, 1px); animation: glitch-b 4.1s infinite steps(1); }
@keyframes glitch-a {
  0%, 88%, 100% { opacity: .55; transform: translate(-1px, 0); clip-path: inset(0 0 100% 0); }
  89% { opacity: .75; transform: translate(-6px, -1px); clip-path: inset(8% 0 62% 0); }
  90% { transform: translate(3px, 1px); clip-path: inset(48% 0 30% 0); }
  91% { transform: translate(-2px, -2px); clip-path: inset(20% 0 66% 0); }
  92% { transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-b {
  0%, 79%, 100% { opacity: .4; transform: translate(1px, 0); clip-path: inset(0 0 100% 0); }
  80% { transform: translate(5px, 2px); clip-path: inset(62% 0 10% 0); }
  81% { transform: translate(-4px, -1px); clip-path: inset(34% 0 46% 0); }
  82% { transform: translate(0, 0); clip-path: inset(0 0 100% 0); }
}
.logo--splash { font-size: clamp(3.4rem, 17vw, 6.2rem); margin-inline: auto; }
.logo--splash span { display: inline-block; }
.logo--menu { font-size: clamp(2.7rem, 12.4vw, 4.1rem); }
.logo--about { font-size: clamp(2.4rem, 10vw, 3.2rem); margin-bottom: 10px; }

.brand-mark { width: 74px; height: 74px; color: var(--red); margin-bottom: 6px; filter: drop-shadow(0 0 18px rgba(226, 59, 59, .4)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark--small { width: 52px; height: 52px; opacity: .9; }

/* ── splash ────────────────────────────────────────────────── */
.screen--splash {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 8%, #17242c 0%, #0a0f14 44%, #05070a 100%);
  padding: calc(24px + var(--safe-t)) 22px calc(24px + var(--safe-b));
}
.splash-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, .55), rgba(5, 7, 10, .96) 78%),
    radial-gradient(60% 40% at 50% 34%, rgba(63, 90, 100, .32), transparent 70%);
  opacity: .9;
}
.splash-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 78px, rgba(255, 255, 255, .028) 78px 79px);
  mask-image: linear-gradient(transparent, #000 30%, transparent 90%);
}
.splash-inner {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 460px;
  animation: splash-in 1.1s var(--ease) both;
}
@keyframes splash-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.splash-eyebrow {
  font-size: .6rem;
  letter-spacing: .34em;
  color: var(--muted);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.splash-tagline {
  font-family: var(--font-type);
  font-size: .82rem;
  color: #9fadb7;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 300px;
}
.splash-version { margin-top: 20px; font-size: .62rem; letter-spacing: .18em; color: var(--muted-2); text-transform: uppercase; }
.splash-warn { margin-top: 26px; font-size: .64rem; color: #756a6a; letter-spacing: .08em; }

.btn-start {
  position: relative;
  margin-top: 38px;
  padding: 15px 30px;
  border: 1px solid rgba(226, 59, 59, .5);
  border-radius: 2px;
  color: #f3d9d9;
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: .28em;
  background: linear-gradient(180deg, rgba(85, 16, 20, .55), rgba(30, 8, 10, .65));
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .2s;
  animation: start-glow 2.8s infinite;
}
.btn-start:hover { border-color: var(--red); box-shadow: 0 0 34px rgba(226, 59, 59, .28); transform: translateY(-1px); }
.btn-start__pulse {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(226, 59, 59, .18), transparent);
  transform: translateX(-100%);
  animation: sweep 3.4s infinite;
}
.btn-start__label { position: relative; }
@keyframes sweep { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }
@keyframes start-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(226, 59, 59, 0); }
  50% { box-shadow: 0 0 26px rgba(226, 59, 59, .16); }
}

.splash-corner {
  position: absolute;
  z-index: 4;
  font-family: var(--font-type);
  font-size: .62rem;
  letter-spacing: .14em;
  color: rgba(224, 235, 240, .55);
  display: flex; align-items: center; gap: 7px;
  text-shadow: 0 1px 4px #000;
}
.splash-corner--tl { top: calc(18px + var(--safe-t)); left: 18px; }
.splash-corner--tr { top: calc(18px + var(--safe-t)); right: 18px; }
.splash-corner--bl { bottom: calc(16px + var(--safe-b)); left: 18px; }
.splash-corner--br { bottom: calc(16px + var(--safe-b)); right: 18px; }
.corner-time { color: var(--red); }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ── menu ──────────────────────────────────────────────────── */
.screen--menu { justify-content: space-between; background: #06090c; }
.menu-bg { position: absolute; inset: 0; overflow: hidden; }
.menu-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: grayscale(.45) contrast(1.06) brightness(.5) sepia(.12);
  transform: scale(1.04);
  animation: bg-drift 26s ease-in-out infinite alternate;
}
@keyframes bg-drift { to { transform: scale(1.1) translateY(-1.2%); } }
.menu-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, .72) 0%, rgba(5, 7, 10, .3) 34%, rgba(5, 7, 10, .88) 74%, #05070a 100%),
    radial-gradient(80% 60% at 50% 45%, transparent 20%, rgba(5, 7, 10, .55) 100%);
}
.menu-top, .menu-body, .menu-foot { position: relative; z-index: 4; }
.menu-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(16px + var(--safe-t)) 22px 0;
}
.chip-version {
  font-family: var(--font-type); font-size: .6rem; letter-spacing: .16em;
  color: rgba(228, 237, 242, .55);
  border: 1px solid rgba(255, 255, 255, .13);
  padding: 4px 9px; border-radius: 2px; text-transform: uppercase;
  background: rgba(5, 7, 10, .35);
}
.menu-body {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 14px 24px;
  width: 100%; max-width: 460px; margin-inline: auto;
}
.menu-tagline {
  font-family: var(--font-type);
  font-size: .8rem; line-height: 1.65; color: #9dabb5;
  margin: 14px 0 30px;
}
.menu-actions { display: flex; flex-direction: column; gap: 9px; }
.menu-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(18, 26, 33, .86), rgba(11, 16, 21, .7));
  backdrop-filter: blur(9px);
  border-radius: 4px;
  text-align: left;
  transition: border-color .25s, background .25s, transform .18s;
  position: relative;
  overflow: hidden;
}
.menu-btn::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--red); opacity: 0; transition: opacity .25s;
}
.menu-btn:hover { border-color: rgba(255, 255, 255, .22); background: rgba(26, 37, 46, .9); transform: translateX(3px); }
.menu-btn:hover::before { opacity: 1; }
.menu-btn:active { transform: scale(.99); }
.menu-btn--primary { border-color: rgba(226, 59, 59, .42); background: linear-gradient(100deg, rgba(72, 15, 19, .82), rgba(24, 10, 12, .8)); }
.menu-btn--primary::before { opacity: 1; box-shadow: 0 0 14px var(--red); }
.menu-btn--primary .menu-btn__ico { color: #ffb9b9; border-color: rgba(226, 59, 59, .4); }
.menu-btn--danger { opacity: .72; }
.menu-btn--danger:hover { opacity: 1; border-color: rgba(226, 59, 59, .3); }
.menu-btn__ico {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 3px;
  font-size: .92rem; color: #c3ced6;
  background: rgba(0, 0, 0, .25);
}
.menu-btn__text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu-btn__text b { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; letter-spacing: .12em; }
.menu-btn__text small { font-size: .66rem; color: var(--muted); letter-spacing: .03em; }
.menu-btn__chev { color: var(--muted-2); font-size: 1.2rem; }
.menu-profile {
  display: flex; align-items: center; gap: 11px;
  margin-top: 22px; padding: 11px 13px;
  border: 1px dashed rgba(255, 255, 255, .13);
  border-radius: 4px;
  background: rgba(8, 12, 16, .5);
}
.menu-profile b { display: block; font-size: .82rem; }
.menu-profile small { font-size: .63rem; color: var(--muted); }
.avatar-mini {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #25323c, #10161c);
  border: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--font-display); font-size: 1rem; letter-spacing: .04em;
  color: #d7e0e6;
}
.avatar-mini--lg { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.2rem; }
.menu-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px calc(16px + var(--safe-b));
  font-size: .57rem; letter-spacing: .18em; color: var(--muted-2);
}
.menu-foot__signal { display: flex; gap: 3px; align-items: flex-end; }
.menu-foot__signal i { width: 3px; background: var(--muted-2); border-radius: 1px; }
.menu-foot__signal i:nth-child(1) { height: 4px; }
.menu-foot__signal i:nth-child(2) { height: 7px; }
.menu-foot__signal i:nth-child(3) { height: 10px; }
.menu-foot__signal i.off { background: rgba(255, 255, 255, .12); }

/* ── halaman form ──────────────────────────────────────────── */
.screen--form {
  background:
    radial-gradient(90% 55% at 50% -10%, #16222a 0%, transparent 60%),
    linear-gradient(180deg, #080c10, #05070a);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.form-wrap {
  width: 100%; max-width: 540px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-t)) 22px calc(34px + var(--safe-b));
}
.form-wrap--wide { max-width: 600px; }
.page-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 26px;
}
.page-head--fixed {
  position: relative; z-index: 2;
  padding: calc(16px + var(--safe-t)) 20px 12px;
  margin: 0;
  background: linear-gradient(180deg, rgba(5, 7, 10, .96), rgba(5, 7, 10, .72) 70%, transparent);
}
.page-head > div { flex: 1; }
.icon-btn {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, .03);
  font-size: 1.05rem; color: var(--ink);
  transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .07); border-color: var(--line-strong); }
.icon-btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.kicker { font-size: .58rem; letter-spacing: .3em; color: var(--red); text-transform: uppercase; margin-bottom: 7px; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; letter-spacing: .05em; line-height: 1; }
.form-lead { font-size: .84rem; line-height: 1.7; color: var(--muted); margin-bottom: 26px; max-width: 46ch; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field__label { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: #aab6bf; }
.field__hint { font-size: .64rem; line-height: 1.55; color: var(--muted-2); }
.field input[type="text"], .field input[type="password"], .field textarea, .select {
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-size: .9rem;
  transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .74rem; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #4e5c67; }
.field input:focus, .field textarea:focus, .select:focus {
  border-color: rgba(226, 59, 59, .6);
  background: rgba(226, 59, 59, .04);
  outline: none;
}
.field--radio { border: 0; padding: 0; margin-inline: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gender-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gender-opt__box {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, .025);
  font-size: .82rem;
  transition: border-color .2s, background .2s;
}
.gender-opt__ico { font-size: 1.1rem; color: var(--muted); }
.gender-opt input:checked + .gender-opt__box {
  border-color: rgba(226, 59, 59, .65);
  background: rgba(226, 59, 59, .08);
  box-shadow: inset 0 0 22px rgba(226, 59, 59, .06);
}
.gender-opt input:checked + .gender-opt__box .gender-opt__ico { color: var(--red); }
.form-note { font-size: .68rem; color: var(--muted-2); margin: 2px 0 24px; line-height: 1.6; }

/* ── tombol ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, .045);
  font-family: var(--font-display);
  font-size: .98rem; letter-spacing: .16em;
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: rgba(255, 255, 255, .085); border-color: var(--line-strong); }
.btn:active { transform: scale(.985); }
.btn--block { width: 100%; padding: 15px; }
.btn--primary {
  background: linear-gradient(180deg, #9c222b, #6c1219);
  border-color: rgba(255, 120, 120, .32);
  color: #fff;
  box-shadow: 0 10px 30px -14px rgba(226, 59, 59, .8);
}
.btn--primary:hover { background: linear-gradient(180deg, #b02a34, #7d161e); box-shadow: 0 12px 34px -12px rgba(226, 59, 59, .75); }
.btn--ghost { background: transparent; border-color: var(--line); color: #c8d2d9; }
.btn--danger-ghost { border-color: rgba(226, 59, 59, .34); color: #f0b5b5; }
.btn--quiet { border-color: transparent; color: var(--muted); }
.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-text { font-size: .68rem; color: var(--muted); }
.status-text.is-ok { color: var(--green-soft); }
.status-text.is-err { color: #ff8e8e; }

/* ── daftar chapter ────────────────────────────────────────── */
.screen--chapters { background: #05070a; }
.chapters-bg {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 40% at 78% 8%, rgba(81, 17, 22, .22), transparent 65%),
    radial-gradient(80% 60% at 10% 100%, rgba(20, 42, 52, .4), transparent 65%),
    linear-gradient(180deg, #060a0d, #05070a);
}
.chapters-scroll {
  position: relative; z-index: 2;
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 20px calc(40px + var(--safe-b));
  width: 100%; max-width: 640px; margin-inline: auto;
}
.player-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(15, 22, 28, .6);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
}
.player-strip__text { flex: 1; min-width: 0; }
.player-strip__text .kicker { margin-bottom: 2px; font-size: .5rem; }
.player-strip__text b { font-size: .88rem; }
.trust-meter { width: 112px; flex: 0 0 auto; }
.trust-meter > span { font-size: .47rem; letter-spacing: .14em; color: var(--muted-2); display: block; margin-bottom: 5px; text-align: right; }
.trust-meter__bar { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 2px; overflow: hidden; }
.trust-meter__bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--red-deep), var(--red));
  box-shadow: 0 0 10px var(--red-glow);
  transition: width .8s var(--ease);
}
.chapter-intro {
  font-size: .74rem; line-height: 1.7; color: var(--muted);
  border-left: 2px solid rgba(226, 59, 59, .5);
  padding-left: 13px;
  margin-bottom: 22px;
}
.chapter-intro .red { color: #ff9b9b; font-weight: 600; letter-spacing: .04em; }
.chapter-list { display: flex; flex-direction: column; gap: 14px; }

.chapter-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #0b1116;
  text-align: left;
  width: 100%;
  display: block;
  transition: border-color .25s, transform .2s, box-shadow .25s;
}
.chapter-card:hover { border-color: rgba(255, 255, 255, .23); transform: translateY(-2px); box-shadow: 0 18px 40px -24px #000; }
.chapter-card__media { position: relative; height: 138px; overflow: hidden; background: #0a1014; }
.chapter-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3) brightness(.66); transition: transform .5s var(--ease), filter .5s; }
.chapter-card:hover .chapter-card__media img { transform: scale(1.045); filter: grayscale(.1) brightness(.8); }
.chapter-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 7, 10, .05) 30%, rgba(11, 17, 22, .96) 100%);
}
.chapter-card__num {
  position: absolute; right: 10px; top: 2px; z-index: 2;
  font-family: var(--font-display); font-size: 4.4rem; line-height: 1;
  color: rgba(255, 255, 255, .13);
  letter-spacing: .02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}
.chapter-card__body { padding: 12px 15px 15px; }
.chapter-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.chapter-card__who { font-size: .56rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.chapter-card__title { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .05em; line-height: 1.05; margin-bottom: 4px; }
.chapter-card__desc { font-size: .7rem; line-height: 1.55; color: var(--muted); max-width: 52ch; }
.chapter-card__status {
  display: flex; align-items: center; gap: 7px;
  margin-top: 11px;
  font-size: .58rem; letter-spacing: .12em; text-transform: uppercase;
  color: #b9c6ce;
}
.chapter-card__status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green-soft); box-shadow: 0 0 8px rgba(6, 207, 156, .7); }
.chapter-card__status.is-done::before { background: var(--amber); box-shadow: 0 0 8px rgba(229, 180, 84, .6); }
.chapter-card__status.is-locked::before { background: #59646c; box-shadow: none; }
.chapter-card__go { position: absolute; right: 14px; bottom: 14px; color: var(--muted); font-size: 1.1rem; transition: transform .2s, color .2s; }
.chapter-card:hover .chapter-card__go { transform: translateX(3px); color: var(--ink); }
.chapter-card--locked { cursor: not-allowed; }
.chapter-card--locked .chapter-card__media img { filter: grayscale(1) brightness(.25) blur(2px); }
.chapter-card--locked:hover { transform: none; border-color: var(--line); box-shadow: none; }
.chapter-card--locked:hover .chapter-card__media img { transform: none; }
.chapter-card--soon .chapter-card__media img { filter: grayscale(1) brightness(.2); }
.lock-tag {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .52rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(5, 7, 10, .68); color: #c3ced5; border-radius: 2px;
  backdrop-filter: blur(6px);
}
.ending-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .5rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px;
  border: 1px solid currentColor;
  margin-left: auto;
}
.ending-badge--saved { color: #66d9a5; }
.ending-badge--missing { color: #e5b454; }
.ending-badge--dead { color: #ff7373; }
.ending-badge--escaped { color: #66d9a5; }
.ending-badge--trapped { color: #e5b454; }
.ending-badge--possessed { color: #ff7373; }
.chapter-foot {
  text-align: center; margin-top: 26px;
  font-family: var(--font-type); font-size: .62rem; letter-spacing: .3em; color: var(--muted-2);
}

/* ── setelan ───────────────────────────────────────────────── */
.screen--settings .page-head { margin-bottom: 20px; }
.settings-group {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 15px 15px 17px;
  margin-bottom: 14px;
  background: rgba(13, 19, 26, .55);
}
.settings-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.14rem; letter-spacing: .08em; margin-bottom: 12px;
}
.settings-desc { font-size: .7rem; line-height: 1.65; color: var(--muted); margin-bottom: 12px; }
.settings-hint { font-size: .62rem; line-height: 1.6; color: var(--muted-2); margin-top: 10px; }
.settings-version { text-align: center; font-size: .6rem; color: var(--muted-2); letter-spacing: .1em; margin-top: 22px; }
.badge {
  font-family: var(--font-ui);
  font-size: .48rem; letter-spacing: .14em; font-weight: 600;
  padding: 3px 6px; border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, .16);
  color: var(--muted); margin-left: auto;
}
.badge.is-on { color: #7de3b8; border-color: rgba(6, 207, 156, .45); background: rgba(6, 207, 156, .08); }
.badge.is-err { color: #ff9b9b; border-color: rgba(226, 59, 59, .4); background: rgba(226, 59, 59, .08); }
.switch-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  cursor: pointer;
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-row > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch-row b { font-size: .8rem; font-weight: 500; }
.switch-row small { font-size: .62rem; color: var(--muted-2); line-height: 1.45; }
.switch-row--select { cursor: default; }
.switch {
  appearance: none;
  width: 40px; height: 22px; flex: 0 0 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  position: relative;
  transition: background .2s;
  cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #c4cfd6; transition: transform .2s var(--ease), background .2s;
}
.switch:checked { background: rgba(226, 59, 59, .7); }
.switch:checked::after { transform: translateX(18px); background: #fff; }
.select { width: auto; padding: 8px 10px; font-size: .74rem; }
.settings-group .field { margin-bottom: 12px; }
.settings-group .field-row { margin-bottom: 4px; }

/* ── tentang ───────────────────────────────────────────────── */
.about-logo { text-align: center; padding: 6px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.about-logo p { font-family: var(--font-type); font-size: .72rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.prose p { font-size: .8rem; line-height: 1.8; color: #a9b6bf; margin-bottom: 14px; }
.prose h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: .06em; margin: 22px 0 7px; color: #e6edf1; }
.prose-warn { color: #ff9b9b !important; }
.about-meta {
  margin: 26px 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.about-meta > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: .68rem;
}
.about-meta > div:last-child { border-bottom: 0; }
.about-meta span { color: var(--muted-2); letter-spacing: .06em; }
.about-meta b { font-weight: 500; color: #c9d5dd; text-align: right; }
.about-foot { font-family: var(--font-type); font-size: .68rem; line-height: 1.7; color: var(--muted-2); text-align: center; margin: 10px 0 20px; }

/* ── overlay umum ──────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(3, 5, 7, .82);
  backdrop-filter: blur(8px);
  animation: overlay-in .28s var(--ease);
}
@keyframes overlay-in { from { opacity: 0; } }
.overlay--modal { align-items: flex-end; }
@media (min-width: 620px) { .overlay--modal { align-items: center; } }
.modal-card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, #121a22, #0b1116);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 22px 20px 20px;
  box-shadow: 0 30px 80px -30px #000;
  animation: card-in .35s var(--ease);
}
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; letter-spacing: .05em; margin-bottom: 8px; }
.modal-card p { font-size: .76rem; line-height: 1.65; color: var(--muted); }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
.modal-card--sheet { max-width: 440px; }
.sheet-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.sheet-btn {
  text-align: left; padding: 13px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: .82rem; color: #cfdae1;
  transition: color .2s, padding-left .2s;
}
.sheet-btn:hover { color: #fff; padding-left: 8px; }
.sheet-btn--quiet { border-bottom: 0; color: var(--muted); }

/* ── lightbox ──────────────────────────────────────────────── */
.overlay--lightbox { flex-direction: column; background: rgba(0, 0, 0, .94); z-index: 70; }
.overlay--lightbox img {
  max-width: min(92vw, 760px); max-height: 78vh;
  object-fit: contain; border-radius: 4px;
  box-shadow: 0 0 80px rgba(0, 0, 0, .9);
  animation: card-in .3s var(--ease);
}
.lightbox-caption { margin-top: 16px; font-size: .72rem; color: var(--muted); max-width: 70ch; text-align: center; line-height: 1.6; }
.lightbox-close {
  position: absolute; top: calc(16px + var(--safe-t)); right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .06);
  font-size: 1rem;
}

/* ── ending ────────────────────────────────────────────────── */
.overlay--ending { z-index: 65; background: rgba(2, 4, 6, .9); }
.ending-card {
  width: 100%; max-width: 460px;
  border: 1px solid rgba(255, 255, 255, .14);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(80, 18, 22, .35), transparent 60%),
    linear-gradient(180deg, #10171e, #070b0e);
  border-radius: 6px;
  padding: 26px 22px 22px;
  position: relative;
  box-shadow: 0 40px 100px -30px #000;
  animation: card-in .45s var(--ease);
  max-height: 92dvh;
  overflow-y: auto;
}
.ending-stamp {
  position: absolute; top: 20px; right: 20px;
  font-family: var(--font-display);
  font-size: .82rem; letter-spacing: .22em;
  color: rgba(226, 59, 59, .85);
  border: 1.5px solid rgba(226, 59, 59, .6);
  padding: 4px 9px;
  transform: rotate(8deg);
  border-radius: 2px;
}
.ending-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 9vw, 2.8rem); letter-spacing: .04em; line-height: 1; margin: 4px 0 10px; }
.ending-desc { font-size: .78rem; line-height: 1.75; color: #a9b6bf; margin-bottom: 18px; }
.ending-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.ending-stats > div { background: #0c1218; padding: 10px 11px; display: flex; flex-direction: column; gap: 3px; }
.ending-stats span { font-size: .46rem; letter-spacing: .16em; color: var(--muted-2); }
.ending-stats b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: .06em; color: #e3ebf0; }
.ending-note { font-size: .64rem; line-height: 1.6; color: var(--muted-2); margin: 14px 0 0; padding-left: 10px; border-left: 1px solid rgba(226, 59, 59, .4); }
.ending-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }

/* ── closed screen ─────────────────────────────────────────── */
.closed-screen {
  position: fixed; inset: 0; z-index: 80;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px;
  animation: overlay-in .6s;
}
.closed-inner { max-width: 380px; }
.closed-inner h2 { font-family: var(--font-display); font-weight: 400; font-size: 2.5rem; line-height: 1; letter-spacing: .04em; margin: 8px 0 16px; }
.closed-inner p { font-size: .74rem; line-height: 1.7; color: var(--muted); margin-bottom: 24px; }
.closed-ver { margin-top: 40px !important; font-size: .56rem !important; letter-spacing: .24em; color: #3c474f !important; }

/* ── toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-b));
  transform: translate(-50%, 20px);
  z-index: 90;
  background: #e9eef2; color: #0a0f14;
  font-size: .72rem; font-weight: 500;
  padding: 10px 16px; border-radius: 3px;
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, .8);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-err { background: #f2c6c6; }
.toast.is-dark { background: #16212a; color: #dfe8ee; border: 1px solid var(--line-strong); }

/* ── responsif ─────────────────────────────────────────────── */
@media (max-height: 700px) {
  .splash-tagline { margin-top: 10px; }
  .btn-start { margin-top: 26px; }
  .brand-mark { width: 58px; height: 58px; }
  .menu-tagline { margin: 10px 0 18px; }
  .menu-btn { padding: 11px 12px; }
}
@media (min-width: 760px) {
  .screen--form { background: radial-gradient(60% 50% at 50% 0%, #14212a, #05070a 65%); }
  .screen--form .form-wrap { padding-top: calc(48px + var(--safe-t)); }
  .screen--chapters .page-head--fixed {
    width: 100%; max-width: 640px; margin-inline: auto;
    background: none;
  }
  .chapters-scroll { padding-top: 18px; }
  .menu-body { padding-bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .08s !important; }
  .fx-noise { display: none; }
}
