body{background:radial-gradient(ellipse at 52% 10%,#22284a 0,transparent 55%),radial-gradient(ellipse at 90% 90%,#233645 0,transparent 45%),#10121e;color:#edf0ff}header{height:74px;padding:12px 32px;border-bottom:1px solid #ffffff0d}.brand{font-size:22px}.brand small{color:#9da7c5;font-size:10px;letter-spacing:.18em}.logo{background:linear-gradient(145deg,#c1b0ff,#7755e2);box-shadow:0 4px 0 #403170,0 8px 24px #9478ff30;color:#fff}.header-actions button,button{background:#ffffff08;border:1px solid #ffffff20;color:#cdd5ee}.header-actions a,a{color:#a8b3ce}button:hover{background:#ffffff16}main{grid-template-columns:minmax(200px,1fr) auto minmax(190px,1fr);gap:32px;padding:0 32px;min-height:calc(100dvh - 108px)}.instructions,.pieces{max-width:290px}.instructions>.eyebrow,.instructions>h1,.rule,.steps,.tips,.legend,.compact-rule,.keyboard,.test-note,.pieces>div>p{display:none}.arcade-title>span{font-size:12px;letter-spacing:.22em;color:#a89bdf}.arcade-title h2{font-size:clamp(45px,5vw,84px);line-height:.92;letter-spacing:-.07em;margin:22px 0;color:#f3f1ff}.arcade-title em{font-style:normal;color:#b6a0ff}.arcade-title p{color:#9aa6c2;font-size:13px}.goal{background:none;border:0;border-bottom:1px solid #ffffff16;padding:20px 0;margin:22px 0}.goal>span{color:#a8b3ca;font-size:12px}.goal strong{font-size:32px;margin:8px 0}.goal-total{font-size:18px;color:#7f8eae}progress{height:5px;accent-color:#b5a0ff}.scores{flex-direction:column;gap:24px;color:#a6b0cb;font-size:12px}.scores strong{font-size:clamp(32px,4vw,64px);color:#f4f5ff;letter-spacing:-.055em}.scores span+span strong{font-size:26px;color:#b6a0ff}#combo{font-size:12px;color:#b7a8f2;min-height:30px;margin-top:24px}.text-button{color:#a3afc9;border:0;padding:8px 0;margin-top:5px}.play{width:min(calc(100dvh - 175px),calc(100vw - 550px));min-width:0}.board-heading{height:34px;min-height:34px;color:#dfcbff;font-size:15px}.board-frame{padding:14px;border-radius:24px;background:linear-gradient(145deg,#393c59,#222538);border:1px solid #73759155;box-shadow:0 14px 0 #090d1a,0 26px 60px #0006,inset 0 1px #ffffff24}#board{gap:6px}.cell{background:#151b2c;border:1px solid #43465d66;border-radius:10px;box-shadow:inset 0 2px 5px #0005}.cell:hover{background:#20283c}.cell.filled,.mini i,.cell.ghost{background:linear-gradient(145deg,#ffffff45,transparent 52%),linear-gradient(0deg,#00000016,transparent 35%),var(--color);border:1px solid #ffffff60;box-shadow:inset 0 3px 1px #ffffff45,inset 0 -5px 1px #00000030,0 3px 5px #0004}.cell.filled:after{content:'';position:absolute;inset:6px;border:1px solid #ffffff25;border-radius:5px;pointer-events:none}.cell.will-clear{box-shadow:inset 0 0 0 3px #fff5b9,0 0 20px #e9d5ff80;filter:brightness(1.3)}.cell.ghost{opacity:.85;outline:2px solid white}.cell.bad{background:#a33259}.pieces .eyebrow{display:none}.pieces h2{font-size:11px;letter-spacing:.2em;color:#9ba8c9;margin-bottom:18px}#tray{gap:16px}.piece{background:linear-gradient(145deg,#ffffff09,#ffffff02);border:1px solid #ffffff17;height:clamp(105px,17vh,170px);border-radius:20px;box-shadow:0 8px 20px #0002}.piece.selected{background:#a48bff14;border:1px solid #b6a0ff;box-shadow:0 0 0 3px #b6a0ff20}.piece .number{color:#7e8aaa;font-size:11px}.mini i{border-radius:8px}.used{color:#77819b;font-size:12px}.actions{flex-direction:column;gap:9px}.actions button{font-size:12px;padding:11px}.actions button:last-child{color:#aeb9d2;border-color:transparent}footer{color:#65708e;font-size:10px;letter-spacing:.06em;padding:8px 32px}dialog{background:#23283e;color:#f3f1ff;border:1px solid #ffffff22}.dialog-icon{color:#b6a0ff}.primary{background:#a48ae6;color:#191b30}.primary:hover{background:#c0abff}#celebrate{font-size:clamp(25px,3vw,48px);color:#fff1be;text-shadow:0 4px 0 #543574,0 5px 30px #000}.spark{position:absolute;width:10px;height:10px;border-radius:3px;pointer-events:none;z-index:4}.tutorial .arcade-title{display:none}.tutorial .instructions>h1,.tutorial .rule{display:block}.tutorial .compact-rule{display:block;color:#abb7d2}.tutorial h1 em{color:#b6a0ff}
@media(max-width:1050px){main{grid-template-columns:160px auto 160px;gap:18px;padding:0 18px}.play{width:min(calc(100dvh - 170px),calc(100vw - 400px))}.arcade-title h2{font-size:49px}.piece{height:110px}.board-frame{padding:9px}#board{gap:4px}.cell{border-radius:7px}.goal{margin:10px 0;padding:12px 0}.scores{gap:15px}.scores strong{font-size:38px}}
@media(max-width:720px){header{height:60px;padding:8px 16px}.brand{font-size:18px}.brand small{font-size:8px}.header-actions button{font-size:11px;padding:8px}.logo{font-size:27px}main{display:flex;gap:10px;padding:8px 16px;min-height:calc(100dvh - 86px);justify-content:center}.instructions{display:grid;grid-template-columns:1fr auto;max-width:560px;gap:0 12px}.arcade-title,.goal{display:none}.scores{grid-column:1;flex-direction:row;align-items:center;gap:30px}.scores span{display:block;font-size:10px}.scores strong{font-size:34px}.scores span+span strong{font-size:22px}.text-button{display:block!important;grid-column:2;grid-row:1;font-size:11px;align-self:center}#combo{grid-column:1/-1;margin:5px 0 0;min-height:15px;font-size:10px}.play{width:min(100%,calc(100dvh - 305px));max-width:560px}.board-heading{min-height:22px;height:22px;font-size:12px}.board-frame{padding:9px;border-radius:18px;box-shadow:0 7px 0 #090d1a,0 16px 30px #0005}.cell.filled:after{inset:4px;border-radius:3px}.pieces{max-width:560px}.pieces h2{font-size:9px;margin:8px 0}#tray{gap:9px}.piece{height:85px;border-radius:13px}.mini i{border-radius:5px}.actions{flex-direction:row;margin:8px 0 0}.actions button{padding:8px}.actions button:last-child{border-color:#ffffff20}footer{height:26px;padding:6px 16px;font-size:8px}.tutorial .instructions>h1,.tutorial .rule{display:none}}
@media(max-height:500px) and (min-width:721px){header{height:45px}main{min-height:calc(100dvh - 65px)}.play{width:calc(100dvh - 100px)}.arcade-title{display:none}.piece{height:65px}#tray{gap:7px}.mini{transform:scale(.7)}.actions{margin-top:8px}.goal{margin:0;padding:5px 0}.scores{gap:5px}.scores strong{font-size:28px}#combo{margin:8px 0}.board-heading{height:24px;min-height:24px}.pieces h2{margin:0 0 8px}footer{height:20px}.text-button{margin:0}}

.charge{font-size:13px;color:#f4c58b;border:1px solid #edb76830;border-radius:12px;padding:12px;margin-top:20px;background:#e5ad4d08}.bomb-ready .charge{background:#ffb94722;border-color:#ffd185;box-shadow:0 0 25px #ffbb4440}.bomb-ready .piece:not(:disabled):after{content:'💣';position:absolute;right:10px;top:8px;font-size:24px}.bomb-ready .board-frame{border-color:#ffc56a}@media(max-width:720px){.charge{grid-column:1/-1;margin:7px 0 0;padding:6px 10px;font-size:11px}.play{width:min(100%,calc(100dvh - 335px))}.instructions,.pieces{margin:0 auto}.scores{gap:25px}.scores strong{font-size:30px}#combo{margin-top:4px}.pieces h2{margin-top:8px}}

.blast-preview{outline:3px solid #ffc878;outline-offset:-4px;box-shadow:inset 0 0 22px #ffab4755}.blast-wave{position:absolute;inset:10%;border:12px solid #ffd894;border-radius:50%;box-shadow:0 0 70px #ffb34d,inset 0 0 50px #ffb34d;pointer-events:none;z-index:5}

[hidden]{display:none!important}.start-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;gap:16px;background:radial-gradient(ellipse at 50% 30%,#59418455,transparent 60%)}.start-screen h1{font-size:clamp(40px,5vw,72px);color:#fff;margin:10px 0}.start-screen p{color:#b9c4e0;font-size:17px}.start-kicker{letter-spacing:.25em;font-size:11px;color:#b9a2ff}.start-mark{width:135px;height:135px;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;transform:rotate(-8deg)}.start-mark i{border-radius:18px;background:linear-gradient(145deg,#e1ceff,#a781ee 45%,#71569f);box-shadow:inset 0 3px 2px #fff8,0 8px #463467,0 20px 45px #0004}.start-mark b{font-size:55px;color:#ffd490}.start-record{color:#a8b4d0;font-size:12px;margin-bottom:12px}.start-record strong{display:block;font-size:32px;color:#e4d8ff;margin-top:8px}.start-primary{width:min(310px,85vw);padding:17px;background:linear-gradient(135deg,#c0a6ff,#9975e4);color:#19182b;font-size:18px;border:0;box-shadow:0 5px #59437f}.start-primary:hover{background:#cdb6ff}.start-screen small{font-size:10px;color:#8e99b6;margin-top:25px}.cell.ghost{transition:background .08s;outline:3px solid #d5f3ff;box-shadow:0 0 16px #b9deff44}@media(max-width:720px){.header-actions #fullscreen{display:none}}

.start-mark{grid-template-rows:repeat(2,minmax(0,1fr))}.start-mark b{display:grid;place-items:center;line-height:1}

/* Visible placement model and a raised, finger-safe drag piece. */
.cell.ghost{opacity:1;background:linear-gradient(145deg,#ffffff28,#ffffff05),color-mix(in srgb,var(--color) 34%,#162138);outline:3px dashed #d2f7ff;outline-offset:-4px;box-shadow:inset 0 0 15px #c7ecff25,0 0 18px #92ccff40}
.cell.ghost:before{content:'+';position:absolute;inset:0;display:grid;place-items:center;color:#e5faff;font-size:clamp(18px,2vw,30px);font-weight:400}
.cell.ghost.suggested{opacity:.75;outline-color:#b6c8eb}.cell.will-clear:not(.ghost){outline:2px solid #ffe6a2;outline-offset:-3px}
#drag-piece{position:fixed;z-index:30;pointer-events:none;filter:drop-shadow(0 10px 12px #0008);opacity:.95}
#drag-piece i{position:absolute;width:calc(var(--unit) - 6px);height:calc(var(--unit) - 6px);margin:3px;border-radius:14%;background:linear-gradient(145deg,#ffffff65,transparent 55%),var(--color);border:1px solid #ffffff99;box-shadow:inset 0 3px 1px #ffffff55,inset 0 -5px 1px #0004}
#drag-piece.snapped{opacity:.48}.dragging .piece.selected .mini{opacity:.25}.music-status{color:#9dabcc;font-size:11px;min-height:16px}.start-screen{gap:12px}.start-screen #home-sound{margin:0;padding:6px 14px}.start-screen small{margin-top:10px}
@media(max-height:760px){.start-screen{gap:8px;padding:18px}.start-mark{width:90px;height:90px;margin-bottom:8px}.start-screen h1{font-size:38px;margin:5px}.start-record{margin-bottom:6px}.start-primary{padding:12px}.start-screen p{margin:0}.start-screen small{margin-top:5px}}

.combo-glow{position:absolute;width:80%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#fff0bf88,#ad8eff22 45%,transparent 70%);pointer-events:none;z-index:3}.combo-wave{position:absolute;width:60%;aspect-ratio:1;border:5px solid #d9c7ff;border-radius:50%;box-shadow:0 0 20px #b99fff88,inset 0 0 18px #b99fff44;pointer-events:none;z-index:4}.combo-wave.bomb-wave{border-color:#ffdb8f;box-shadow:0 0 35px #ffb94788}.spark{box-shadow:0 0 9px #ffffff77}#celebrate{will-change:transform}

/* Adaptive full-height game composition: side tray on wide screens, large board above tray in portrait. */
@media(orientation:landscape) and (min-height:521px){main{height:calc(100dvh - 108px);min-height:0;align-items:center}.pieces{align-self:stretch;display:flex;flex-direction:column;padding:18px 0 12px;max-width:380px}.pieces>div:first-child{flex:0 0 auto}#tray{flex:1;grid-template-rows:repeat(3,minmax(0,1fr));min-height:0}.piece{height:auto;min-height:60px}.actions{flex:0 0 auto}.play{width:min(calc(100dvh - 170px),calc(100vw - 470px))}main{grid-template-columns:minmax(160px,1fr) auto minmax(160px,1fr);gap:20px;padding:0 20px}.header-actions{gap:7px}.header-actions a{white-space:nowrap}}
@media(orientation:portrait){header{height:60px;padding:8px 16px}.brand{font-size:18px}.brand small{font-size:8px}.header-actions button{font-size:11px;padding:8px}.header-actions #fullscreen,.header-actions a{display:none}.logo{font-size:27px}main{height:calc(100dvh - 86px);min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);gap:8px;padding:8px 16px;align-items:stretch}.instructions{display:grid;grid-template-columns:1fr auto;max-width:none;width:100%;gap:0 12px}.arcade-title,.goal{display:none}.scores{grid-column:1;flex-direction:row;align-items:center;gap:30px}.scores span{font-size:10px}.scores strong{font-size:32px}.scores span+span strong{font-size:22px}.instructions .text-button{grid-column:2;grid-row:1;font-size:11px;align-self:center}.charge{grid-column:1/-1;margin:4px 0 0;padding:6px 10px;font-size:11px}#combo{grid-column:1/-1;min-height:15px;font-size:10px;margin:3px 0 0}.play{width:min(100%,calc(100dvh - 410px));max-width:none;min-width:0;justify-self:center}.board-heading{height:23px;min-height:23px;font-size:12px}.board-frame{padding:9px}.pieces{width:100%;max-width:none;min-height:0;display:flex;flex-direction:column}.pieces h2{font-size:10px;margin:0 0 6px}#tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:9px;flex:1;min-height:0}.piece{height:auto;min-height:60px}.actions{flex-direction:row;gap:8px;margin-top:8px;flex:0 0 auto}.actions button{padding:8px;font-size:12px}.pieces .text-button{grid-column:auto;grid-row:auto}footer{height:26px;padding:6px 16px;font-size:8px}}
@media(orientation:portrait) and (max-height:760px){.play{width:min(100%,calc(100dvh - 330px))}main{gap:5px}.scores strong{font-size:27px}.pieces h2{font-size:9px}}
@media(orientation:landscape) and (max-height:520px){header{height:45px;padding:5px 14px}.brand{font-size:16px}.brand small{display:none}.header-actions #fullscreen,.header-actions a{display:none}.header-actions button{padding:7px;font-size:11px}main{height:calc(100dvh - 65px);min-height:0;display:grid;grid-template-columns:minmax(110px,1fr) auto minmax(140px,1fr);gap:12px;padding:0 14px}.play{width:calc(100dvh - 105px)}.pieces{align-self:stretch;display:flex;flex-direction:column;padding:4px 0;max-width:none;min-height:0}#tray{flex:1;min-height:0;gap:6px;grid-template-rows:repeat(3,minmax(0,1fr))}.piece{height:auto;min-height:0}.mini{transform:none}.actions{margin-top:6px;gap:5px}.actions button{padding:5px;font-size:10px}.pieces h2{font-size:9px;margin:2px 0 5px}.arcade-title,.goal{display:none}.scores strong{font-size:28px}.scores{gap:6px}.charge{margin-top:8px;padding:6px;font-size:10px}#combo{font-size:10px;margin:8px 0}.text-button{font-size:10px}.board-heading{font-size:10px;height:24px;min-height:24px}footer{height:20px;padding:4px 14px}}

.pieces{margin:0 auto;height:100%}
