:root {
  --bg: #0b0f1c;
  --card: #141a2e;
  --card2: #1b2340;
  --line: #27304f;
  --text: #e8ecf8;
  --muted: #9aa4c3;
  --good: #7cf29c;
  --ok: #ffd166;
  --bad: #ff8a5c;
  --awful: #ff5c7a;
  --accent: #7cf29c;
  --down: #5cc8ff;
  --up: #c792ff;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 500px at 50% -200px, #1a2552 0%, transparent 70%) no-repeat, var(--bg);
  min-height: 100vh;
}
[hidden] { display: none !important; }
.top { max-width: 760px; margin: 0 auto; padding: 20px 20px 0; display: flex; align-items: center; gap: 14px; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.tag { color: var(--muted); font-size: 14px; }
main { max-width: 760px; margin: 0 auto; padding: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; margin: 4px 0 12px; letter-spacing: -0.03em; }
h2 { font-size: 26px; line-height: 1.2; margin: 4px 0 10px; letter-spacing: -0.02em; }
h3 { font-size: 17px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 24px; max-width: 580px; }
.fine { color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }
.center { text-align: center; }

.question { margin-bottom: 20px; }
.q-label { display: block; font-weight: 600; margin-bottom: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices button, select {
  font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; cursor: pointer;
}
.choices button:hover { border-color: #3a4672; }
.choices button.on { border-color: var(--accent); background: #1c3a2c; color: #d9ffe4; }
select { width: 100%; max-width: 460px; appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

button.big {
  font: inherit; font-weight: 700; font-size: 18px; color: #06210f; background: var(--accent);
  border: 0; border-radius: 12px; padding: 14px 28px; cursor: pointer; box-shadow: 0 6px 24px #7cf29c33;
}
button.big:hover { filter: brightness(1.06); }
button.big:disabled { opacity: 0.6; cursor: default; }
button.ghost { font: inherit; font-weight: 600; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 12px; padding: 13px 22px; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* running */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; }
.steps div { font-size: 13px; color: var(--muted); border-top: 3px solid var(--line); padding-top: 8px; }
.steps b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card2); font-size: 12px; margin-right: 4px; }
.steps .now { color: var(--text); border-color: var(--accent); }
.steps .done { border-color: #3c6b4c; }
.live { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.live-now { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.live-now small { font-size: 18px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.live-sub { color: var(--muted); }
canvas { width: 100%; height: 160px; display: block; background: #0f1426; border-radius: 10px; }
.bar { height: 6px; background: var(--card2); border-radius: 3px; margin-top: 16px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s linear; }

/* result */
.report-meta { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.verdict { border-left: 6px solid var(--good); }
.verdict.ok { border-left-color: var(--ok); }
.verdict.bad { border-left-color: var(--bad); }
.verdict-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--muted); }
.verdict p { margin: 0; font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.tile .t-name { font-size: 13px; color: var(--muted); }
.tile .t-val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .t-val small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.tile .t-grade { font-size: 13px; font-weight: 700; }
.g-good { color: var(--good); } .g-ok { color: var(--ok); } .g-bad { color: var(--bad); } .g-awful { color: var(--awful); }
.finding { padding: 12px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; padding-top: 0; }
.finding b { display: block; margin-bottom: 2px; }
.finding p { margin: 0; color: var(--muted); }
.regions { margin-top: 14px; display: grid; gap: 8px; }
.region { display: grid; grid-template-columns: 150px 1fr 60px; align-items: center; gap: 12px; font-size: 14px; }
.region .r-bar { height: 10px; border-radius: 5px; background: var(--card2); overflow: hidden; }
.region .r-bar div { height: 100%; border-radius: 5px; }
.region .r-ms { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.region.target .r-name { font-weight: 700; }
.region.target .r-name::after { content: " ← your game"; color: var(--accent); font-weight: 600; font-size: 12px; }
.legend { color: var(--muted); font-size: 13px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.legend .k { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-left: 10px; }
.legend .k:first-child { margin-left: 0; }
.k.idle { background: var(--accent); } .k.down { background: var(--down); } .k.up { background: var(--up); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 4px; }
.hdr-dl { margin-left: auto; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px; }
.hdr-dl:hover { border-color: var(--accent); }
a.btn { display: inline-block; text-decoration: none; text-align: center; font-weight: 700; font-size: 17px; color: #06210f; background: var(--accent); border-radius: 12px; padding: 13px 24px; box-shadow: 0 6px 24px #7cf29c33; }
a.btn:hover { filter: brightness(1.06); }
.get-app { background: linear-gradient(135deg, #18213d, #141a2e); display: grid; grid-template-columns: 1fr auto; gap: 8px 28px; align-items: center; margin-top: 24px; }
.get-app h3 { font-size: 21px; margin: 4px 0 8px; letter-spacing: -0.02em; }
.get-app ul { margin: 0; padding-left: 20px; color: var(--muted); }
.get-app li { margin: 3px 0; }
.ga-action { text-align: center; }
.ga-action .fine { margin-top: 8px; }
.ga-help { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.ga-help summary { cursor: pointer; color: var(--text); }
.ga-help p { margin: 8px 0 0; }
.ga-help ol { margin: 8px 0 0; padding-left: 20px; }
.ga-help li { margin: 4px 0; }
.ga-help code { background: var(--card2); border-radius: 4px; padding: 0 4px; }
footer { max-width: 760px; margin: 0 auto; padding: 10px 20px 40px; color: #6d769a; font-size: 13px; }

@media (max-width: 560px) {
  .card { padding: 18px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .region { grid-template-columns: 112px 1fr 64px; gap: 10px; }
  .region.target .r-name::after { content: " ←"; }
  .live-now { font-size: 44px; }
  .tag { display: none; }
  .get-app { grid-template-columns: 1fr; }
  .ga-action a.btn { display: block; }
}
