html{background:#39251f}body{background:radial-gradient(ellipse at top,#89533d,#39251f 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(#a5754e,#583a2b);border-color:#4b3027}
.stage{border-color:#97613e;border-top-color:#dbb07e;border-bottom-color:#dbb07e}
.feedbar{border-color:#4b3027;background:#704331}
button#home{min-height:44px;background:#35415e;color:#fff2cc;border:1px solid #b7a1c7;border-radius:7px;padding:0 12px}
#tg-home{position:fixed;inset:0;z-index:10;background:#2b1d18f5;overflow:auto;padding:24px 14px;display:grid;place-items:safe center}
#tg-home[hidden]{display:none}.tg-card{width:min(660px,100%);padding:20px;border:2px solid #c99762;border-radius:20px;background:linear-gradient(#84503b,#442c25);text-align:center}
.tg-card h2{color:#ffe5a0;font-size:30px;margin:0 0 12px}.tg-card p{line-height:1.7}
#tg-mascot{width:180px;height:170px;margin:auto;border-radius:30px;background:linear-gradient(#e6b179,#926044);box-shadow:inset 0 0 25px #d4eee555}
.tg-picker{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:16px 0}
.tg-picker button,.tg-card>button{min-height:44px;border:2px solid #ba8c60;border-radius:8px;background:#693f30;color:#fff4d5;font:inherit;padding:6px}
.tg-picker button[aria-pressed=true]{background:#973e36;border-color:#ffcf7e}.tg-card>button{background:#efcb89;color:#493024;min-width:180px;font-weight:bold}
.tg-picker button{display:flex;flex-direction:column;align-items:center;font-size:12px;white-space:nowrap}.tg-picker .emoji{font-size:19px}
@media(max-width:600px){h1{font-size:19px}header a{font-size:11px}#pause,#menu{padding:0 10px}.tg-picker{grid-template-columns:repeat(4,1fr)}.bottom-rim{flex-wrap:wrap}.readout{flex-wrap:wrap}.tg-card{padding:12px}.feedbar select{min-height:44px}}
@media(max-width:400px){#tg-home{padding:10px}.tg-card h2{font-size:25px;margin-bottom:8px}#tg-mascot{width:130px;height:123px}.tg-card p{font-size:13px;line-height:1.4;margin:8px 0}.tg-picker{gap:4px;margin:10px 0}.tg-picker button{padding:3px;min-height:44px}.tg-picker .emoji{font-size:17px}#tg-error:empty{display:none}}
.shop button{border-color:#b98458;border-radius:10px;background:linear-gradient(#fff0cd,#d9bf92)}
.shop button:disabled{background:#a28c73;color:#5b3f32}.feedbar select{background:#faefdb;color:#6c402c}
#menu,#pause,#sound,button#home{background:#754834;border-color:#cca074;color:#fff0ce;border-radius:10px}
#paused{background:#4e3027ed}.help,#brmsg{color:#f4dfbe}
.tg-card{position:relative}.tg-card>button.tg-lang{position:absolute;right:8px;top:8px;min-width:54px;min-height:44px;padding:5px;font-size:12px}
header [data-tg-lang]{min-height:44px;border-radius:10px;background:#754834;border:1px solid #cca074;color:#fff0ce;padding:0 12px}
.tg-picker button{white-space:normal;overflow-wrap:anywhere;line-height:1.15}.tg-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}
.tg-audio{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}
#tg-music,.tg-rank{min-height:44px;padding:0 12px;border:1px solid #cca074;border-radius:10px;background:#754834;color:#fff0ce}
#song-title{flex-basis:100%;overflow-wrap:anywhere}
.tg-card>button.tg-rank{min-width:0;margin-top:6px}
@media(max-width:400px){.tg-card h2{padding:0 42px;font-size:22px}.tg-card>button.tg-lang{right:4px;top:4px;min-width:44px}.tg-picker button{font-size:11px}h1 small{font-size:11px}}

/* Autumn framing stays outside the canvas and its touch targets. */
.tg-card{background:radial-gradient(ellipse at 50% 0,#d89b5b55,transparent 60%),linear-gradient(#754834,#442c25);box-shadow:0 18px 70px #1f121866}
.tg-card h2{text-shadow:0 3px 0 #492f29;letter-spacing:.7px}
header{padding-bottom:8px;border-bottom:1px solid #d2a46e66}
.tg-card>button#tg-start{background:linear-gradient(#e3bb7e,#f6d99e);border-color:#ffe5b5}
.tg-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:400px){
  .tg-card h2{font-size:20px;line-height:1.08}
  #tg-mascot{width:100px;height:94px}
}

@media(max-width:600px),(max-height:500px){.help,#brmsg{font-size:18px;line-height:1.55;overflow-wrap:anywhere}}
