html{background:#173444}body{background:radial-gradient(ellipse at top,#486e79,#173444 80%)}
header{flex-wrap:wrap;gap:8px}h1{font-size:22px;letter-spacing:1px;min-width:160px}h1 small{display:block;margin:4px 0}
.cabinet,.bottom-rim{background:linear-gradient(#547b7e,#274d5b);border-color:#213f4e}
.stage{border-color:#567e8c;border-top-color:#b6cdd0;border-bottom-color:#b6cdd0}
.feedbar{border-color:#213f4e;background:#2f5665}
button#home{min-height:44px;background:#35415e;color:#fff2cc;border:1px solid #b7a1c7;border-radius:7px;padding:0 12px}
#xm-home{position:fixed;inset:0;z-index:10;background:#102b3bf5;overflow:auto;padding:24px 14px;display:grid;place-items:safe center}
#xm-home[hidden]{display:none}.xm-card{width:min(660px,100%);padding:20px;border:2px solid #91b7b7;border-radius:20px;background:linear-gradient(#375f6c,#1f4052);text-align:center}
.xm-card h2{color:#ffe5a0;font-size:30px;margin:0 0 12px}.xm-card p{line-height:1.7}
#xm-mascot{width:180px;height:170px;margin:auto;border-radius:30px;background:linear-gradient(#8bb6c0,#3d7083);box-shadow:inset 0 0 25px #d4eee555}
.xm-picker{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:16px 0}
.xm-picker button,.xm-card>button{min-height:44px;border:2px solid #759d9e;border-radius:8px;background:#315969;color:#fff4d5;font:inherit;padding:6px}
.xm-picker button[aria-pressed=true]{background:#a45165;border-color:#ffcf7e}.xm-card>button{background:#efcb89;color:#253f50;min-width:180px;font-weight:bold}
.xm-picker button{display:flex;flex-direction:column;align-items:center;font-size:12px;white-space:nowrap}.xm-picker .emoji{font-size:19px}
@media(max-width:600px){h1{font-size:19px}header a{font-size:11px}#pause,#menu{padding:0 10px}.xm-picker{grid-template-columns:repeat(4,1fr)}.bottom-rim{flex-wrap:wrap}.readout{flex-wrap:wrap}.xm-card{padding:12px}.feedbar select{min-height:44px}}
@media(max-width:400px){#xm-home{padding:10px}.xm-card h2{font-size:25px;margin-bottom:8px}#xm-mascot{width:130px;height:123px}.xm-card p{font-size:13px;line-height:1.4;margin:8px 0}.xm-picker{gap:4px;margin:10px 0}.xm-picker button{padding:3px;min-height:44px}.xm-picker .emoji{font-size:17px}#xm-error:empty{display:none}}
.shop button{border-color:#789999;border-radius:10px;background:linear-gradient(#fff0cd,#d9bf92)}
.shop button:disabled{background:#849fa5;color:#294754}.feedbar select{background:#faefdb;color:#305367}
#menu,#pause,#sound,button#home{background:#345e6b;border-color:#95b3b5;color:#fff0ce;border-radius:10px}
#paused{background:#1d4054ed}.help,#brmsg{color:#dcece8}
.xm-card{position:relative}.xm-card>button.xm-lang{position:absolute;right:8px;top:8px;min-width:54px;min-height:44px;padding:5px;font-size:12px}
header [data-xm-lang]{min-height:44px;border-radius:10px;background:#345e6b;border:1px solid #95b3b5;color:#fff0ce;padding:0 12px}
.xm-picker button{white-space:normal;overflow-wrap:anywhere;line-height:1.15}.xm-picker .emoji{line-height:1.3}
.feedbar{flex-wrap:wrap}.feedbar select{max-width:100%;min-width:0}.bottom-rim span{overflow-wrap:anywhere}
#mode-menu label{overflow-wrap:anywhere}#paused{overflow:auto;max-height:100%;place-content:safe center}#paused p{max-width:100%;overflow-wrap:anywhere}
.xm-audio{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
#xm-music,.xm-rank{min-height:44px;padding:0 12px;border:1px solid #95b3b5;border-radius:10px;background:#345e6b;color:#fff0ce}
#song-title{flex-basis:100%;overflow-wrap:anywhere}
.xm-card>button.xm-rank{min-width:0;margin-top:6px}
@media(max-width:400px){.xm-card h2{padding:0 42px;font-size:22px}.xm-card>button.xm-lang{right:4px;top:4px;min-width:44px}.xm-picker button{font-size:11px}h1 small{font-size:11px}}

/* Winter framing stays outside the canvas and its touch targets. */
.xm-card{background:radial-gradient(ellipse at 50% 0,#59848a55,transparent 60%),linear-gradient(#345e6b,#1f4052);box-shadow:0 18px 70px #071b2866}
.xm-card h2{text-shadow:0 3px 0 #173846;letter-spacing:.7px}
header{padding-bottom:8px;border-bottom:1px solid #9db9bd66}
.xm-card>button#xm-start{background:linear-gradient(#e3bb7e,#f6d99e);border-color:#ffe5b5}
.xm-picker button[aria-pressed=true]{box-shadow:inset 0 0 0 1px #f8dea1}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}


@media(max-width:600px),(max-height:500px){.help,#brmsg{font-size:18px;line-height:1.55;overflow-wrap:anywhere}}
