/* Lockstep Daily (web). Palette and pieces match the app (App/Sources/Theme.swift). */
:root {
  --bg: #f3f1ed; --ink: #2a2522; --muted: #756d66; --tray: #dfdad3; --cell: #fffdfa; --wall: #aaa199; --wall-hi: #c3bbb2;
  --panel: #fffdfa; --line: #ddd6cd; --daily: #e6a522;
  --b0: #d4462c; --b1: #2f55a8; --b2: #e6a522; --b3: #2a2522; --b4: #3a8a4e;
  --g3: #fffdfa; --pit: #2a2522;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #1a1816; --ink: #f2eee8; --muted: #a0978e; --tray: #0e0d0c; --cell: #2a2724; --wall: #5c554e; --wall-hi: #726a62;
  --panel: #23201d; --line: #3a3530; --daily: #f0b23a;
  --b0: #e8603f; --b1: #5b7fd0; --b2: #f0b23a; --b3: #f2eee8; --b4: #55aa6a;
  --g3: #2a2522; --pit: #050404;
  color-scheme: dark; } }

* { box-sizing: border-box; }
/* Elements marked hidden stay hidden even when a rule below gives them a display value. */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--body); overflow: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--ink) 55%, transparent); outline-offset: 2px; }
a { color: inherit; }

.screen { height: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }

.bar { display: flex; align-items: flex-end; gap: 12px; padding-top: 8px; }
.title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wordmark { font: 800 26px/1 var(--display); letter-spacing: -0.02em; }
.kind { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 6px; }
.kind i { width: 8px; height: 8px; border-radius: 2px; background: var(--daily); }
.count { text-align: right; font-variant-numeric: tabular-nums; }
.count .m { font: 800 26px/1 var(--display); }
.count.over .m { color: var(--b0); }
.count .p { font-size: 12px; color: var(--muted); }

.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  touch-action: none; }
.tray { position: relative; background: var(--tray); border-radius: 18px; padding: 8px;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.08), 0 1px 0 rgba(255,255,255,.4); }
.grid { position: relative; }
.cell { position: absolute; border-radius: 9px; background: var(--cell); box-shadow: inset 0 3px 0 rgba(0,0,0,.07); }
.cell.wall { background: var(--wall); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), inset 0 2px 0 var(--wall-hi); }
.cell.hole { background: radial-gradient(120% 90% at 50% 0%, #000 0%, var(--pit) 75%); box-shadow: inset 0 10px 14px rgba(0,0,0,.7); }
.cell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.arrow path { fill: none; stroke: var(--muted); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.ring svg * { fill: none; stroke: var(--bc); stroke-width: 7; }
.bead { position: absolute; left: 0; top: 0; border-radius: 50%; background: var(--bc); display: grid; place-items: center; z-index: 2;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.2), inset 0 4px 0 rgba(255,255,255,.25), 0 3px 6px rgba(0,0,0,.18);
  transition: transform 130ms cubic-bezier(.3,.7,.4,1); }
.bead svg { width: 42%; height: 42%; }
.bead svg * { fill: var(--gc); }
.bead.home { box-shadow: inset 0 -6px 0 rgba(0,0,0,.2), inset 0 4px 0 rgba(255,255,255,.25), 0 0 0 4px var(--cell), 0 0 0 7px var(--bc); }
.bead.cheer { animation: cheer 380ms ease-out; }
.bump { animation: bump 160ms ease-out; }
@keyframes bump { 50% { translate: var(--bx) var(--by); } }
@keyframes cheer { 40% { translate: 0 -6px; } }
.tip { margin: 0; color: var(--muted); font-size: 14px; text-align: center; max-width: 36ch; min-height: 4.2em; }
.tip b { color: var(--ink); }

.controls { display: flex; gap: 10px; justify-content: center; }
.ctl { height: 50px; padding: 0 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 700;
  display: flex; align-items: center; gap: 8px; }
.ctl svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ctl:disabled { opacity: .4; cursor: default; }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; color: var(--muted); font-size: 12.5px; text-align: center; }
.foot span { flex-basis: 100%; }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--panel); border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  padding: 22px max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: up 260ms cubic-bezier(.2,.8,.3,1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet h2 { margin: 0; font: 800 24px/1.1 var(--display); }
.sheet p { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; max-width: 40ch; }
.sheet .next { color: var(--ink); font-weight: 600; }
.stars { display: flex; gap: 8px; }
.stars svg { width: 40px; height: 40px; animation: pop .45s cubic-bezier(.3,1.6,.5,1) both; }
.stars svg:nth-child(2) { animation-delay: .13s } .stars svg:nth-child(3) { animation-delay: .26s }
@keyframes pop { from { transform: scale(0); } }
.stars .on { fill: var(--daily); } .stars .off { fill: var(--line); }
.store { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 22px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; width: 100%; max-width: 360px; }
.platforms { font-size: 13px; }
.again { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }

@media (prefers-reduced-motion: reduce) {
  .bead { transition: none; } .bump, .bead.cheer, .sheet, .stars svg { animation: none; }
}
