/* «⚡ Мини»: a vertical feed of short simulations, one per screen (2026-11-26). */
:root {
  --bg: #0f0d14;
  --panel: rgba(20, 16, 28, 0.88);
  --line: #322a3e;
  --text: #f1eadf;
  --muted: #a59c8f;
  --accent: #ffb22e;
  --ink: #1d1406;
  --good: #4ade80;
  --bad: #f87171;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior: none; }
button { font: inherit; cursor: pointer; }

.ag-top {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; width: min(100vw, calc(100dvh * 9 / 16));
  display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(to bottom, rgba(15, 13, 20, 0.85), transparent); pointer-events: none;
}
.ag-top > * { pointer-events: auto; }
.ag-back { color: var(--text); text-decoration: none; font-size: 15px; }
.ag-back i { font-style: normal; color: var(--accent); }
.ag-title { flex: 1; text-align: center; font-weight: 900; font-size: 17px; }
.ag-streak { font-size: 14px; color: var(--muted); }
.ag-streak b { color: var(--accent); }
.ag-sound { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 99px; width: 36px; height: 36px; color: var(--text); }

.feed {
  height: 100dvh; width: min(100vw, calc(100dvh * 9 / 16)); margin: 0 auto; overflow-y: auto; scroll-snap-type: y mandatory;
  scrollbar-width: none; background: #000;
}
.feed::-webkit-scrollbar { display: none; }
.slide { height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.stage { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 30%, #241a3a, var(--bg) 70%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.pick, .result {
  position: absolute; left: 12px; right: 12px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 2;
  padding: 18px 16px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  text-align: center; /* no backdrop blur: the canvas behind redraws every frame, so phones re-blurred it each frame */ animation: up 0.25s ease-out;
}
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.pick .kind { margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pick .ask { margin: 4px 0 12px; font-size: 23px; line-height: 1.15; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 2), 1fr); max-height: 46dvh; overflow-y: auto; }
.choices button {
  display: flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; padding: 8px 10px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text);
  font-weight: 700; font-size: 15px; line-height: 1.1;
}
.choices.many button { font-size: 13px; min-height: 38px; padding: 6px; justify-content: flex-start; }
.choices button i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.choices button:active { transform: scale(0.97); }
.choices button.on { border-color: var(--accent); background: rgba(255, 178, 46, 0.16); color: var(--accent); }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); margin: 14px 0 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }
.skip { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 6px; }

.result .verdict { margin: 0; font-weight: 900; font-size: 18px; }
.result .verdict.good { color: var(--good); }
.result .verdict.bad { color: var(--bad); }
.result .verdict.none { color: var(--muted); font-weight: 700; font-size: 15px; }
.result .r-title { margin: 6px 0 2px; font-size: 26px; line-height: 1.15; }
.result .r-line { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.r-acts { display: flex; gap: 10px; justify-content: center; }
.r-acts button { flex: 1; max-width: 160px; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--text); font-weight: 800; }
.r-acts .again { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.result .next { margin: 12px 0 0; font-size: 14px; color: var(--muted); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .result .next, .pick, .result { animation: none; } }

/* A game you play (merge): no choices, a big «Тоглох», the canvas takes taps; up/down still scrolls. */
.stage canvas { touch-action: pan-y; }
.pick .hint { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.pick .hint:empty { display: none; }
.pick.play .choices, .pick.play .bar { display: none; }
.pick.play .skip { display: block; width: 100%; margin-top: 4px; padding: 13px; border-radius: 12px; background: var(--accent); color: var(--ink); font-weight: 900; font-size: 17px; }
