:root {
  --bg: #0c121c;
  --bg-2: #121a27;
  --card: #172131;
  --line: #2c3c54;
  --ink: #e8eef8;
  --muted: #93a0b5;
  --blue: #3b82f6;
  --blue-2: #1d4ed8;
  --xp: #f5b942;
  --good: #3dd68c;
  --bad: #ff5d73;
  --bad-bg: #3a1822;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, "Noto Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(59, 130, 246, 0.18), transparent 60%),
    linear-gradient(180deg, #101826 0%, var(--bg) 40%, #0b1018 100%);
  font-size: 18px;
  line-height: 1.45;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 18px 16px 36px;
  min-height: 100vh;
}
body.admin .wrap { width: min(760px, 100%); }
.net {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 10px 14px;
  background: #243044;
  color: var(--ink);
  text-align: center;
  font-weight: 700;
}
.net[hidden] { display: none; }

.top, .tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.top strong, .tools h1 { font-size: 20px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }
.tools h1 { flex: 1; font-size: 26px; letter-spacing: 0; text-transform: none; }
.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(160deg, #60a5fa, var(--blue-2));
  color: white;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.icon, .nav {
  margin-left: auto;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.nav { margin: 0; font-size: 20px; }
.nav:disabled { opacity: 0.35; }

.hero, .card, .stat, .path, details.day, .row, .mission {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.hero { display: flex; gap: 12px; align-items: center; padding: 14px; margin-bottom: 12px; }
.speech b { display: block; font-size: 26px; }
.speech span { color: var(--muted); }
.rank { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.rank b { font-size: 18px; color: var(--xp); }
.rank span { color: var(--muted); font-size: 14px; font-weight: 700; }
.bar { height: 8px; border-radius: 99px; background: #0d1522; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--xp)); }
.stats, .summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.stat { text-align: center; padding: 10px 6px; }
.stat em { display: block; font-style: normal; font-size: 13px; color: var(--muted); font-weight: 700; }
.stat strong { font-size: 20px; }
.path { list-style: none; display: flex; gap: 6px; margin: 12px 0; padding: 12px; align-items: flex-end; }
.path li { flex: 1 1 0; min-width: 0; text-align: center; }
.dot {
  width: 28px; height: 28px; margin: 0 auto 4px;
  border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.path .done .dot { background: var(--blue); border-color: var(--blue); }
.path .today .dot { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35); }
.path .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.path .prize { flex: 0 0 52px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.path .prize.yes { color: var(--good); }
.week-line, .quiet, .help, .note { color: #c5d0e0; }
.card { padding: 16px; margin: 12px 0; }
.card h2 { margin: 0 0 8px; font-size: 26px; }
.kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #8eb6ff; }
.passage {
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  background: #10192a;
  white-space: pre-wrap;
  font-size: 17px;
}
.prompt { font-size: 22px; font-weight: 750; margin: 8px 0 4px; }
.btn {
  display: flex; width: 100%; min-height: 60px; align-items: center; justify-content: center;
  margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 0;
  background: var(--blue); color: white; font-weight: 800; font-size: 20px;
  text-decoration: none; box-sizing: border-box;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.good { background: #147a4b; }
.btn:disabled { opacity: 0.45; }
header.tools .btn.nav {
  width: 52px;
  min-width: 52px;
  flex: 0 0 52px;
  margin-top: 0;
  padding: 0;
}
.texty {
  border: 0; background: transparent; color: #9db7e4; font-weight: 700; padding: 6px 0;
}
.mission { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; margin: 8px 0; font-weight: 700; }
.mission.done { border-color: #1f6b45; }
.mission i { font-style: normal; color: var(--good); }
.banner { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: #ffb3be; font-weight: 700; }
.answer, textarea.answer {
  width: 100%; min-height: 88px; margin-top: 8px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: #10192a; font-size: 20px;
}
.listen { display: flex; gap: 8px; }
.listen .btn { flex: 1; }
.celebrate { border-color: #1f6b45; text-align: center; }
.gain { color: var(--xp); font-size: 28px; font-weight: 800; margin: 4px 0 0; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-weight: 700; background: #121b2b; }
.mock { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; color: var(--muted); font-size: 14px; }
.mock a, .tools a, a { color: #9dc2ff; }
.big-score { font-size: 42px; font-weight: 800; margin: 0; text-align: center; }
.prize.yes { color: var(--good); }
.prize.no { color: var(--bad); }
.alert { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: #9f1239; color: white; font-weight: 800; }
.pill { display: inline-block; margin: 4px 6px 4px 0; padding: 4px 10px; border-radius: 999px; background: #9f1239; color: white; font-weight: 800; font-size: 14px; }
.pill.soft { background: #92400e; }
details.day { padding: 12px 14px; margin: 10px 0; }
details.day.bad { border-color: #9f1239; }
summary { font-weight: 800; cursor: pointer; }
.answer-text { font-size: 20px; font-weight: 700; white-space: pre-wrap; word-break: break-word; }
ol.timeline { list-style: none; padding: 0; margin: 8px 0; }
ol.timeline li { padding: 6px 8px; border-bottom: 1px solid #243246; font-size: 15px; }
ol.timeline li.paste, ol.timeline li.large { background: #3a1822; font-weight: 700; }
audio { width: 100%; margin-top: 8px; }
.section-label { margin: 14px 0 4px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #8eb6ff; }
@media (max-width: 700px) {
  .summary, .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
