*{box-sizing:border-box}[hidden]{display:none!important}:root{color-scheme:dark;--ink:#fff2d8;--mint:#96efd0;--gold:#ffd284}body{margin:0;color:var(--ink);min-height:100svh;font-family:system-ui,-apple-system,sans-serif;background:radial-gradient(ellipse at top,#53355d,#241d36 55%,#18172d)}main{width:min(100%,500px);margin:auto;padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))}header{text-align:center;margin-bottom:9px}small{font-weight:850;letter-spacing:.12em;color:var(--mint);font-size:.8rem}h1{font-size:clamp(1.35rem,6.4vw,2.05rem);margin:2px 0;line-height:1.2;font-weight:950}header p,.help{margin:3px 0;color:#ead5ee;font-size:.89rem}.help{margin-top:10px;text-align:center;line-height:1.5}section{background:#3b2b4c;border:2px solid #c989a8;padding:8px;border-radius:15px;box-shadow:0 7px 0 #151327,0 15px 40px #170e29b0}.hud{display:flex;align-items:center;justify-content:space-between;font-weight:850}.hud{padding:1px 4px 7px;color:var(--mint);font-variant-numeric:tabular-nums}.hud b{color:var(--gold)}#lives{color:#ff9b87;letter-spacing:.16em}.board{position:relative;overflow:hidden;border-radius:7px;border:2px solid #e8a0ac;background:#201a31}canvas{display:block;width:100%;height:auto;max-height:calc(100svh - 226px);min-height:210px;aspect-ratio:384/468;object-fit:contain;}#overlay{position:absolute;inset:0;display:grid;place-items:center;background:#1b1529b5;padding:12px}.card{text-align:center;background:#30233bf5;border:2px solid #eba69c;border-radius:16px;padding:16px 14px;width:min(100%,340px);box-shadow:0 8px 0 #171326}.card h2{margin:.25rem 0;font-size:clamp(1.25rem,5.6vw,1.8rem)}.card p{margin:.3rem 0 .9rem;line-height:1.55}button{font:inherit;font-weight:850;min-height:44px;border:1px solid #fff0b7;border-bottom-width:3px;border-radius:8px;background:#ffd284;color:#2c2340;padding:4px 20px;cursor:pointer}button:disabled{opacity:.48}button:active{border-bottom-width:1px;transform:translateY(2px)}button:focus-visible{outline:3px solid #a4f5d6;outline-offset:2px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(100%)}@media(max-height:550px) and (orientation:landscape){header p,.help{display:none}header{margin-bottom:4px}h1{font-size:1.17rem}canvas{max-height:calc(100svh - 164px);min-height:155px}}

.topline{display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;margin:0 2px 3px}.topline small{letter-spacing:.07em;line-height:1.19;font-size:.72rem}.utility{display:flex;flex-shrink:0;gap:6px}.utility button{color:#efe5f6;background:#392c46;border-color:#a582aa;min-height:44px;min-width:66px;padding:4px 9px;font-size:.77rem;border-bottom-width:2px;touch-action:manipulation}
.arrows{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(22px,8vw,45px);margin-top:9px}
.arrows button{display:flex;align-items:center;justify-content:center;gap:clamp(5px,2.6vw,13px);padding:5px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;min-height:68px;font-size:1.05rem;background:#96efd0;border-color:#daffed;letter-spacing:.035em}
.arrows button span{font-size:1.42rem;line-height:1}.arrows #right{background:#e6dbfd;border-color:#f4ebff}.arrows button.held{background:#60c3a6;border-bottom-width:1px;transform:translateY(2px)}.arrows #right.held{background:#c4abf1}
@media(orientation:landscape) and (max-height:550px){.topline small{font-size:.67rem}.utility button{min-height:44px}.arrows button{min-height:52px}}

.effects{position:absolute;top:6px;left:5px;right:5px;z-index:1;display:flex;justify-content:center;gap:4px;pointer-events:none}.effects span{color:#d9f5ff;background:#173b6c;border:1px solid #92dfff;padding:3px 7px;border-radius:16px;font-size:clamp(.66rem,2.9vw,.82rem);font-weight:850;white-space:nowrap}.effects #boost{color:#fff2d6;background:#65362e;border-color:#ffa571}.ballcount{color:#eeccea}

#guide{margin:12px 2px 0;padding:10px 12px;border:1px solid #826486;border-radius:9px;background:#382b49;color:#f2e4f5}#guide summary{cursor:pointer;font-weight:800}.levels{padding-left:1.5rem;display:grid;grid-template-columns:1fr 1fr;gap:4px 20px}#guide p{margin:.4rem 0}

.level-picker{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:12px;font-size:.92rem;font-weight:700}.level-picker select{font:inherit;color:#fff1da;background:#493656;border:1px solid #b481a7;border-radius:7px;min-height:40px;padding:4px 8px}

/* On touchscreens, holding a pad must never select nearby text or invoke the edit menu. */
body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.arrows,.arrows button,.arrows button *,.board,canvas{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.arrows{touch-action:none;padding-bottom:6px}
#guide .help{text-align:left;margin:.65rem 0}
