html,body{height:100%;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}body{background:#101e2b}main{height:100vh;height:100svh;max-width:2000px;padding:max(6px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:grid;grid-template-columns:minmax(0,1fr) clamp(170px,15vw,230px);grid-template-rows:54px minmax(0,1fr);gap:10px}header{height:auto;grid-column:1/-1;min-width:0}header a{font-size:13px;white-space:nowrap}header a span{color:#a8ff1a}header .tools{display:flex;align-items:center;gap:7px}header button,select{min-height:42px;min-width:42px;font-size:13px;padding:7px;border-radius:9px;color:#fff1d2;background:#183b52;border:1px solid #c9a768}header #sound{font-size:0;width:44px}header #sound::before{content:'♫';font-size:20px}h1{font-size:clamp(18px,2.4vw,32px)}.stage{grid-column:1;grid-row:2;width:100%;max-height:100%;aspect-ratio:16/9;align-self:center;justify-self:center;box-shadow:none}canvas{width:100%;height:100%;object-fit:contain}.bottom{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:center;gap:20px;padding:8px;text-align:center;min-width:0}.bottom p{display:block}.pad{width:100%;grid-template-columns:1fr 1fr;gap:8px}.pad button{height:clamp(62px,10vh,100px);min-height:52px;font-size:36px}.bottom b{font-size:16px}.bottom small{font-size:12px}.bottom p{font-size:13px}.portrait-tip{display:none}.card{max-height:100%;overflow:auto}.hud{top:8px;left:8px;right:8px}.hud>span{padding:6px 10px}.hud b{font-size:19px}#hearts{font-size:19px}#notice{max-width:90%;text-align:center}
@media(orientation:landscape){.stage{width:min(100%,calc((100svh - 82px)*1.77778));height:auto}.card{padding:15px}.card h2{font-size:clamp(20px,3vh,34px);margin:8px}.card p{font-size:clamp(11px,1.7vh,14px);line-height:1.5}.primary{margin-top:10px;min-height:42px}#modes button{min-height:42px}.card small{font-size:8px}}
@media(orientation:landscape) and (max-height:500px){main{grid-template-rows:44px minmax(0,1fr);gap:5px;grid-template-columns:minmax(0,1fr) 165px}.stage{width:min(100%,calc((100svh - 65px)*1.77778))}header h1{font-size:18px}header a{font-size:11px}header button,select{min-height:38px;min-width:38px}header .tools{gap:4px}.bottom{gap:10px;padding:2px}.pad button{height:56px}.bottom p{font-size:10px}.bottom small{font-size:10px}.card{padding:10px}.card h2{font-size:20px;margin:5px}.card p{font-size:10px;margin:6px 0}.card small{font-size:7px}#modes button{font-size:11px;padding:8px}.primary{margin-top:8px;padding:8px}.hud>span{font-size:8px;padding:4px 6px}.hud b,#hearts{font-size:13px}}
@media(orientation:portrait){main{grid-template-columns:1fr;grid-template-rows:60px minmax(0,1fr) auto 25px;gap:8px;padding-left:6px;padding-right:6px}header{flex-wrap:wrap;gap:3px}header h1{font-size:17px}header a{font-size:11px}header .tools{gap:4px}header button,select{min-height:36px;min-width:36px;padding:5px;font-size:12px}header #sound{width:36px}.stage{grid-column:1;grid-row:2;max-height:none}.bottom{grid-column:1;grid-row:3;gap:8px;padding:5px}.bottom>div:first-child{display:flex;gap:20px;align-items:center}.bottom small{margin:0}.bottom .pad{max-width:420px;gap:10px}.pad button{height:clamp(62px,9vh,100px);font-size:38px}.bottom p{margin:2px;line-height:1.4}.portrait-tip{display:block;grid-row:4;text-align:center;font-size:11px;margin:0;color:#a5bfca}.hud b,#hearts{font-size:13px}.hud>span{font-size:8px;padding:5px 7px}.card{padding:12px}.card h2{font-size:22px;margin:6px}.card p{font-size:11px;line-height:1.4;margin:6px 0}.card small{font-size:7px}#modes button{font-size:11px;padding:8px;min-height:40px}.primary{margin-top:8px;min-height:40px;padding:8px}}
@media(max-width:380px) and (orientation:portrait){main{grid-template-rows:86px minmax(0,1fr) auto 25px}header .tools{width:100%;justify-content:center}.pad button{height:58px}.bottom p{font-size:11px}.bottom b{font-size:13px}.card small{display:none}.card h2{font-size:18px}.card p{font-size:10px}.card{padding:6px}.primary{margin-top:5px}#modes button{font-size:10px}}
header .replay-back{display:flex;align-items:center;min-height:42px;padding:4px 8px;border:1px solid #c9a768;border-radius:9px;letter-spacing:.5px}
#sound[aria-pressed="false"]{opacity:.55}
@media(orientation:portrait){main{grid-template-rows:86px minmax(0,1fr) auto 25px}header{display:grid;grid-template-columns:1fr auto;grid-template-rows:36px 42px;gap:4px}header .replay-back{min-height:34px;width:max-content;font-size:12px}header h1{grid-column:2;grid-row:1}header .tools{grid-column:1/-1;grid-row:2;width:100%;justify-content:flex-end}header button,select{min-height:40px}}
header select{appearance:none;-webkit-appearance:none;height:42px;min-width:44px;text-align:center}
