:root{font:16px/1.45 ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#edf0ff;background:#080e20;color-scheme:dark;--ink:#edf0ff;--muted:#b5c0db;--cyan:#89e9e3;--lavender:#bea0ee;--panel:#111d35;--edge:#526b93;--radius:12px}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;min-width:280px}button,select{font:inherit;min-height:44px;min-width:44px;padding:.62em .9em;border:1px solid var(--edge);border-radius:var(--radius);background:#1a2946;color:var(--ink);touch-action:manipulation;line-height:1.35;overflow-wrap:anywhere}button{cursor:pointer}button:hover{border-color:var(--cyan)}button:disabled{opacity:.45;cursor:default}.primary{background:var(--cyan);border-color:#b1fffa;color:#10233a;font-weight:750}button:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #f2b4fa;outline-offset:3px}main{max-width:1180px;margin:auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:30px}.wordmark{font-size:25px;letter-spacing:-2px;font-weight:850;color:var(--cyan);text-decoration:none}.wordmark span{color:var(--lavender)}.homeTools{display:flex;gap:8px;flex-wrap:wrap}.homeTools button{background:transparent}.hero{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr);align-items:center;gap:32px}.hero>*{min-width:0}.heroCopy>small{color:var(--cyan);font-weight:700}.hero h1{font-size:clamp(32px,4vw,58px);line-height:1.05;letter-spacing:-.045em;margin:12px 0 20px}.heroCopy>p{color:var(--muted);max-width:48ch}.hero img{display:block;width:100%;height:auto;border-radius:18px;border:1px solid #5a5387}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.actions button{flex:0 1 auto}#homeBest{display:block;color:#cbe8f4;font-size:20px}.practice{margin-top:32px;padding:18px 0;border-top:1px solid #344765}.practice summary{font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center}.practice p{color:var(--muted);max-width:70ch}.practiceRow{display:flex;gap:12px;flex-wrap:wrap}.practiceRow select{flex:1;min-width:0;max-width:420px}#notice{color:#d4dcf4}#game{position:fixed;inset:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:max-content 1fr;align-items:start;gap:8px;padding:12px;isolation:isolate}#stage{position:absolute;inset:0;touch-action:none;outline:none;z-index:-1}canvas,svg{display:block;width:100%;height:100%}.stackHud{grid-column:1;grid-row:1;max-width:270px;display:grid;gap:2px;width:max-content;min-width:0;max-width:min(270px,100%);padding:8px 12px;border:1px solid #54719a66;border-radius:var(--radius);background:#071026db;pointer-events:none;overflow-wrap:anywhere}.floorLine{display:flex;align-items:baseline;gap:10px}.floorLine strong{font-size:36px;font-variant-numeric:tabular-nums;line-height:1.1;color:#b7f8f1}.floorLine span{font-weight:700}#best,#perfects{font-size:14px}#streak,#rhythm,#footprint{font-size:12px;color:#bdcce4}#gameNotice{font-size:13px;max-width:26ch;color:#f1d1fb}.gameTools{grid-column:2;grid-row:1}.gameTools button{min-width:94px;background:#101f3be8}.timingHint{position:absolute;bottom:max(14px,env(safe-area-inset-bottom));left:12px;right:12px;display:grid;gap:5px;justify-items:center;text-align:center;pointer-events:none}.timingHint strong{font-size:17px;color:#d5fbf8;padding:5px 12px;background:#061126d9;border:1px solid #5a81a3;border-radius:9px}.timingHint small{font-size:13px;max-width:550px;color:#d1d9ee;background:#071026cc;padding:4px 8px;border-radius:6px}#cue{position:absolute;top:27%;left:16px;right:16px;text-align:center;font-weight:800;font-size:22px;color:#b4fff0;text-shadow:0 2px 6px #061026;pointer-events:none;margin:0}dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow:auto;padding:24px;border:1px solid #6a80a9;border-radius:18px;color:var(--ink);background:var(--panel);box-shadow:0 18px 80px #0006}dialog::backdrop{background:#020813a8}dialog h2{font-size:26px;line-height:1.2;margin:0 0 16px;color:#bff4ef;overflow-wrap:anywhere}dialog p{color:#c7d2e9}dialog ol{padding-left:1.4em}dialog li{margin-bottom:14px;color:#d0daee}dialog label{display:flex;gap:12px;align-items:center;min-height:44px;margin:8px 0}input[type=checkbox]{width:24px;height:24px;accent-color:var(--cyan);flex:none}.language{flex-direction:column;align-items:stretch}.language select{width:100%;max-width:100%}#audioNotice{color:#f0d2f6}@media(max-width:700px){main{padding:18px}header{align-items:flex-start;margin-bottom:20px}.homeTools{justify-content:flex-end;gap:6px}.homeTools button{padding:.55em .65em;font-size:14px}.hero{grid-template-columns:1fr;gap:20px}.hero img{max-height:230px;object-fit:cover;grid-row:2}.hero h1{font-size:40px;margin:10px 0 14px}.heroCopy>p{margin-bottom:14px}.actions{gap:8px}.practice{margin-top:24px}.stackHud{max-width:min(190px,100%);padding:7px 9px}.floorLine strong{font-size:32px}.gameTools button{min-width:88px}#cue{font-size:19px;top:30%}}@media(max-width:360px){.homeTools{flex-direction:column}.homeTools button{font-size:13px}header{gap:10px}.hero h1{font-size:34px}.stackHud{max-width:min(172px,100%)}.floorLine strong{font-size:29px}.gameTools button{min-width:82px;padding:.6em}.practiceRow{flex-direction:column}.practiceRow>*{width:100%}dialog{padding:18px}.actions button{max-width:100%}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

/* Long localized rule/reset words must stay within scrollable dialogs. */
dialog p,dialog li{overflow-wrap:anywhere}

/* Rare status notices take the place of secondary HUD detail, never the tower. */
#game.hasNotice #footprint,#game.hasNotice #streak{display:none}

/* Feedback joins the lower hint flow instead of covering the HUD or tower. */
#cue{position:static;font-size:20px;margin:0;max-width:100%}
@media(min-width:651px) and (max-height:500px){.timingHint small{max-width:100%}}
