:root { color-scheme:dark; --stage:#0d0e10; --ink:#ecebe4; --muted:#a7a7a0; --line:#42433f; --panel:#151614; --accent:#c8f560; --danger:#b7b7ad; }
* { box-sizing:border-box; }
html, body { min-width:0; min-height:100%; margin:0; background:var(--stage); }
body { color:var(--ink); font:16px/1.35 Arial,Helvetica,sans-serif; overflow-x:hidden; }
button, a { font:inherit; } button { color:inherit; }
.shell { width:min(100%,520px); min-height:100dvh; margin:0 auto; padding:calc(env(safe-area-inset-top) + 8px) 13px calc(env(safe-area-inset-bottom) + 12px); }
.topbar { min-height:48px; display:grid; grid-template-columns:minmax(116px,1fr) minmax(72px,1fr) 82px 44px 44px; align-items:center; gap:2px; }
.seed-panel { display:grid; grid-template-columns:1fr 108px; gap:8px; align-items:stretch; margin:4px 0 9px; }
.seed-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; min-width:0; }
.seed-chip { min-height:52px; padding:5px 4px; border:1px solid var(--line); border-radius:2px; background:var(--panel); color:var(--muted); text-align:center; font:13px/1.05 ui-monospace,SFMono-Regular,Consolas,monospace; }
.seed-chip b,.seed-chip span,.seed-chip strong { display:block; }.seed-chip b { color:var(--ink); font-size:12px; }.seed-chip span { margin:2px auto; width:16px; height:16px; border-radius:50%; background:var(--fate); color:#111; font-size:13px; line-height:16px; }.seed-chip strong { margin-top:3px; color:var(--muted); font-size:12px; text-transform:capitalize; }.seed-chip.right strong { color:var(--ink); }.seed-chip.current { border-color:var(--ink); background:#1b1c19; }
.next-seed { min-height:52px; padding:4px; border:1px solid var(--line); border-radius:2px; background:var(--panel); color:var(--ink); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; cursor:pointer; }
.brand,.corner { min-width:44px; min-height:44px; display:grid; place-items:center; border:0; background:transparent; color:var(--muted); text-decoration:none; letter-spacing:.08em; font:13px ui-monospace,SFMono-Regular,Consolas,monospace; }
.brand { grid-auto-flow:column; justify-content:start; gap:6px; color:var(--ink); cursor:pointer; letter-spacing:0; white-space:nowrap; }.brand svg { width:21px; height:21px; color:var(--accent); }.brand b { font:600 14px Arial,Helvetica,sans-serif; }
.corner { color:var(--ink); cursor:pointer; }.howto { font-size:11px; letter-spacing:0; }.mute { color:var(--muted); font-size:18px; }
.level-readout { display:flex; flex-direction:column; align-items:center; line-height:1; }.level-readout span { color:var(--ink); letter-spacing:.14em; font:13px ui-monospace,SFMono-Regular,Consolas,monospace; }.level-readout small { margin-top:5px; color:var(--muted); font-size:13px; }
.play-area { position:relative; border:1px solid var(--line); border-radius:3px; overflow:hidden; background:#111210; transition:border-color .16s ease; }
.play-area.awaiting-gate { border-color:var(--ink); }
.copy { position:absolute; z-index:1; min-height:52px; padding:12px 14px 3px; pointer-events:none; }.copy p { margin:0; font-size:16px; }.copy p + p { margin-top:2px; color:var(--muted); font-size:13px; }.copy #status.is-choice,.copy #status.is-ready { display:inline-block; margin:6px -3px 0; padding:3px 7px; border-left:1px solid var(--ink); color:var(--ink); background:#1b1c19; }
#hill { display:block; width:100%; height:auto; min-height:384px; touch-action:manipulation; }.hill-line { fill:none; stroke:var(--line); stroke-width:2.4; stroke-linecap:round; }.hill-line.default { stroke:#898982; stroke-width:4.6; }
.route { fill:none; stroke:var(--route); stroke-width:2.4; stroke-dasharray:2 7; stroke-linecap:round; opacity:var(--opacity); }.wrong-branch { fill:none; stroke:var(--ink); stroke-width:4; stroke-linecap:round; animation:branch-pulse 1.1s ease-in-out infinite; }.basin { fill:#181916; stroke:#63645e; stroke-width:1.2; }.basin.target { fill:#1b2111; stroke:var(--accent); }.basin.hit { fill:var(--accent); filter:url(#glow); }.basin-label { fill:var(--muted); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; text-anchor:middle; }.fork { cursor:pointer; }.fork-hit { fill:transparent; pointer-events:all; }.fork-dot { fill:var(--ink); stroke:var(--stage); stroke-width:3; }.fork:hover .fork-dot,.fork:focus .fork-dot { stroke:var(--ink); stroke-width:4; }.gate { fill:#191a17; stroke:var(--ink); stroke-width:1.5; }.gate.fixed { stroke:#b7b7ad; }.gate.threshold { stroke:#dfa55a; }.gate.pending { stroke:var(--ink); stroke-dasharray:3 2; }.gate.flipped-now { animation:flip-pulse .5s ease-out; }.gate-text { fill:var(--ink); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; text-anchor:middle; pointer-events:none; }.gate-label { paint-order:stroke; stroke:var(--stage); stroke-width:5px; stroke-linejoin:round; }.side-mark { fill:var(--ink); font-size:16px; font-weight:700; text-anchor:middle; pointer-events:none; }.seed-number { fill:var(--ink); font:700 13px ui-monospace,SFMono-Regular,Consolas,monospace; text-anchor:middle; }
@keyframes flip-pulse { 0% { fill:var(--ink); } 100% { fill:#191a17; } }
@keyframes branch-pulse { 0%,100% { opacity:.72; } 50% { opacity:1; } }
.gate-controls { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:10px 0 6px; }.gate-button { min-height:48px; border:1px solid var(--line); border-radius:2px; background:var(--panel); cursor:pointer; font:12px ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.01em; }.gate-button small { display:block; margin-top:3px; color:var(--muted); font-size:11px; letter-spacing:0; }.gate-button.selected { border-color:var(--ink); background:#20211e; }.gate-button.disabled { opacity:.38; }.gate-controls.needs-choice .gate-button:not(.disabled) { animation:choice-pulse .62s ease-out 2; } @keyframes choice-pulse { 50% { border-color:var(--ink); transform:translateY(-2px); } }
.bottom { display:grid; grid-template-columns:1fr auto; grid-template-areas:'reset score' 'levels levels'; gap:2px 8px; align-items:center; }.reset { grid-area:reset; min-width:64px; min-height:44px; border:0; background:transparent; color:var(--muted); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:.06em; cursor:pointer; }.score { grid-area:score; color:var(--muted); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; white-space:nowrap; }.level-strip { grid-area:levels; display:grid; grid-template-columns:repeat(6,44px); min-height:44px; justify-content:center; align-items:center; }.level-button { width:44px; height:44px; padding:0; border:0; background:transparent; cursor:pointer; }.level-button::after { content:''; display:block; width:7px; height:7px; margin:auto; border:1px solid #777871; border-radius:50%; }.level-button.current::after { background:var(--ink); border-color:var(--ink); }
.solved-row { display:grid; grid-template-columns:78px 1fr auto; gap:8px 10px; align-items:center; margin:5px 0 8px; padding:9px 0; border-top:1px solid var(--ink); border-bottom:1px solid var(--line); }.solved-row[hidden] { display:none; }.solved-row #solved-hill { display:none; }.tissue-strip { display:flex; flex-wrap:wrap; gap:3px; max-width:76px; }.tissue-cell { width:16px; height:16px; display:grid; place-items:center; border-radius:50%; color:#171815; font-size:11px; }.solved-row p { margin:0; }.solved-row h1 { margin:1px 0; font-size:16px; font-weight:600; }.solved-row #solved-kicker,.solved-row #solved-copy { color:var(--muted); font:13px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; }.solved-row #next { min-height:48px; padding:8px 10px; border:0; border-radius:2px; background:var(--accent); color:#202414; font:700 13px ui-monospace,SFMono-Regular,Consolas,monospace; cursor:pointer; }.solved-row #share { grid-column:2 / 4; justify-self:start; min-height:32px; padding:0; border:0; background:transparent; color:var(--muted); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; cursor:pointer; text-decoration:underline; }
.level-strip { min-height:88px; }
.corner:focus-visible,.brand:focus-visible,.gate-button:focus-visible,.reset:focus-visible,.level-button:focus-visible,#next:focus-visible,#share:focus-visible,#next-seed:focus-visible,.fork:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; } }

.credit { margin:8px auto 0; max-width:30em; text-align:center; color:var(--muted); font-size:12px; line-height:1.45; }
.daily { display:block; min-height:36px; margin:0 auto; padding:0 10px; border:0; background:transparent; color:var(--accent); cursor:pointer; font:13px ui-monospace,SFMono-Regular,Consolas,monospace; }
.why { display:block; min-height:36px; margin:2px auto 0; border:0; background:transparent; color:var(--muted); text-decoration:underline; cursor:pointer; font-size:13px; }.level-button.tick::after { background:var(--accent); border-color:var(--accent); }
.info-card { position:fixed; z-index:5; inset:0; display:grid; place-items:center; padding:18px; background:rgba(4,5,6,.76); }.info-card[hidden] { display:none; }.info-sheet { width:min(100%,380px); padding:20px; border:1px solid var(--line); border-radius:4px; background:#171815; box-shadow:0 12px 36px rgba(0,0,0,.4); }.info-sheet h2 { margin:3px 0 10px; font-size:21px; }.info-sheet p,.info-sheet li { color:var(--muted); font-size:15px; }.info-sheet ul { margin:0 0 14px; padding-left:20px; }.eyebrow { margin:0; color:var(--accent)!important; font:12px ui-monospace,SFMono-Regular,Consolas,monospace; }.rule-loop { height:104px; margin:12px 0; border:1px solid var(--line); background:linear-gradient(90deg,transparent 15%,#e5c7a9 15% 28%,transparent 28% 46%,#8fc7dd 46% 59%,transparent 59% 77%,#d87872 77%); animation:rule-flow 2.2s linear infinite; }.rule-loop canvas { width:100%; height:100%; }.rule-loop.neighbour { background:repeating-linear-gradient(90deg,#e5c7a9 0 18px,#8fc7dd 18px 36px); }.rule-loop.fading { background:linear-gradient(90deg,#e5c7a9 0 42%,#8fc7dd 42%); }.info-actions { display:flex; gap:8px; flex-wrap:wrap; }.info-actions button,.info-sheet > button { min-height:44px; padding:0 12px; border:1px solid var(--line); background:#22231f; color:var(--ink); cursor:pointer; }.info-actions #howto-close { margin-left:auto; border:0; background:var(--accent); color:#1b1c19; }@keyframes rule-flow { to { background-position:72px 0; } }
@media (max-width:360px) { .shell { padding-left:8px; padding-right:8px; }.topbar { grid-template-columns:minmax(104px,1fr) 54px 72px 40px 40px; }.brand b { font-size:12px; }.level-readout small { font-size:11px; }.howto { font-size:10px; }.seed-panel { grid-template-columns:1fr 92px; }.next-seed { font-size:11px; } #hill { min-height:330px; }.level-strip { grid-template-columns:repeat(6,40px); }.level-button { width:40px; }.copy { padding-left:10px; }.copy p { font-size:14px; } }

/* One screen (P2FS49): Daily, credit and Why sit behind More; short phones get a shorter hill. Text and targets keep their size. */
.more { margin:0; }
.more > summary { min-height:44px; display:flex; align-items:center; justify-content:center; color:var(--muted); font:13px ui-monospace,SFMono-Regular,Consolas,monospace; cursor:pointer; }
.more[open] > summary { min-height:36px; }
@media (max-height:700px) { #hill { min-height:0; height:min(100vw, 282px); } }
