#mobile-settings-open { display:none; }
#mobile-settings:not([open]) { display:none; }
@media(max-width:760px) {
  html,body { width:100%; height:100%; margin:0!important; overflow:hidden!important; overscroll-behavior:none; }
  body main,body.arcade-polish main { width:100%; height:100dvh; padding:0!important; margin:0!important; }
  body .play-layout { display:block!important; height:100%; }
  body .game-shell { display:flex; flex-direction:column; height:100%; min-width:0; border:0; border-radius:0; }
  body .hud { min-height:50px; height:50px; flex-shrink:0; padding:4px 10px; gap:8px; }
  body .hud .song { flex:1; min-width:0; }
  body .hud .song strong { font-size:12px; }
  body .hud .song small,body .hud .disc,.score-hud>span { display:none; }
  body .hud .score-hud b { font-size:16px; }
  body #mobile-settings-open { display:inline-grid; place-items:center; width:44px; height:44px; min-width:44px; padding:0; background:#ffffff12; color:#fff; border:1px solid #ffffff20; border-radius:50%; font:22px Arial,sans-serif; }
  body .hud #sound,body .hud #pause,body .tools .icon-button { width:44px; height:44px; min-width:44px; }
  body #stage.stage { flex:1; width:100%; min-height:0!important; height:auto!important; aspect-ratio:auto!important; border-radius:0; touch-action:manipulation; }
  body #overlay { padding:16px; }
  body #overlay .start-card { width:100%; max-width:300px; padding:20px 16px; }
  body #overlay .hero-cat { width:64px; height:64px; object-fit:contain; margin:0 auto 12px; }
  body #overlay .tag,body #overlay #mode-note,body #demo,body #timing-meter,body .stage-caption,body .stage-bottom,body .track-language { display:none!important; }
  body #overlay h2 { font-size:26px; margin:8px 0; }
  body #overlay p { font-size:13px; line-height:1.5; }
  body #overlay .primary,body #overlay .secondary { min-height:48px; width:100%; }
  body .transport { min-height:26px; padding:4px 12px; font-size:10px; flex-shrink:0; }
  body .timeline { flex-shrink:0; }
  body #protection { top:12px; left:12px; font-size:10px; }
  body .run-stats { top:12px; right:12px; }
  body .arena { height:100dvh!important; min-height:0!important; width:100%; border:0; border-radius:0; }
  body .arena-top { top:8px; left:12px; right:12px; }
  body .arena-top .mode-label { display:none; }
  body .arena-top .tools { margin-left:auto; gap:6px; }
  body .arena .speech,body .arena .target-tag,body .arena .arena-footer,body .arena .weapon-card { display:none!important; }
  body .arena .score-card,body .arena.playing .score-card { top:12px; left:12px; right:auto; width:auto; min-width:0; padding:6px 10px; }
  body .arena .score-card .tiny-label,body .arena .score-card>div { display:none; }
  body .arena .score-card>strong { margin:0; font-size:22px; line-height:28px; }
  body .arena #startCard { top:auto; bottom:20px; left:12px; right:12px; transform:none; width:auto; max-width:none; padding:18px; border-radius:24px; background:#11131eef; color:#fff; text-align:center; }
  body .arena #startCard .start-icon { display:none; }
  body .arena #startCard h2 { font-size:24px; }
  body .arena #startCard p { font-size:12px; line-height:1.5; color:#c1bccd; }
  body .arena #startCard #start { width:100%; min-height:52px; margin-top:14px; }
  body .arena:not(.playing) .rhythm { display:none; }
  body .arena.playing .rhythm { top:auto!important; bottom:104px; width:calc(100% - 24px); }
  body .arena.playing > .throw-button { left:12px; right:12px; bottom:16px; width:calc(100% - 24px); height:72px; border-radius:22px; font-size:25px; }
  body .throw-button span { display:none; }
  #mobile-settings { box-sizing:border-box; width:calc(100% - 16px); max-width:480px; max-height:90dvh; margin:auto auto 8px; padding:0; border:1px solid #ffffff24; border-radius:24px; background:#17151f; color:#f6f2ff; overflow:auto; overscroll-behavior:contain; }
  #mobile-settings::backdrop { background:#000a; }
  #mobile-settings>header { display:flex!important; position:sticky; top:0; z-index:10; align-items:center; justify-content:space-between; padding:12px 16px; background:#17151f; border-bottom:1px solid #ffffff1a; }
  #mobile-settings>header h2 { font:600 18px Arial,sans-serif; margin:0; }
  #mobile-settings>header button { min-height:44px; padding:0 18px; border:0; border-radius:22px; background:#baff45; color:#111; font-weight:700; }
  #mobile-settings .mobile-settings-body { padding:16px; display:flex; flex-direction:column; gap:20px; }
  #mobile-settings .mobile-settings-body>* { position:static!important; transform:none!important; width:100%!important; max-width:none!important; margin:0!important; box-sizing:border-box; }
  #mobile-settings .target-card { opacity:1!important; visibility:visible!important; pointer-events:auto!important; background:transparent; color:#fff; padding:0; }
  #mobile-settings .target-card input { color:#fff; }
  #mobile-settings .below { display:flex; flex-direction:column; gap:20px; padding:0; background:transparent; color:#fff; }
  #mobile-settings .below .track,#mobile-settings .below #soundSelect,#mobile-settings .below #previewHit,#mobile-settings .best,#mobile-settings .compact-guide,#mobile-settings .scene-prompt-details { display:none; }
  #mobile-settings aside { display:flex; flex-direction:column; gap:16px; }
  #mobile-settings button,#mobile-settings select,#mobile-settings input:not([type=file]),#mobile-settings summary { min-height:44px; }
  #mobile-settings .output-choice { color:#fff; background:transparent; padding:0; }
  #mobile-settings .sound-credit { font-size:10px; line-height:1.4; }
}
/* One focused game surface on desktop as well as phones. */
body #scene-settings,body #output-settings,body .play-layout>aside,body .target-card,body .output-choice,body .below,body #helpText,body .sound-credit,body .track-language { display:none!important; }
body main,body.arcade-polish main { margin:0; padding:0!important; max-width:none; }
body .play-layout { display:block!important; }
body .game-shell { display:flex; flex-direction:column; min-height:740px; }
body #stage.stage { flex:1; min-height:580px; }
body #overlay .tag,body #mode-note,body #demo,body #timing-meter,body .stage-caption,body .stage-bottom,body .run-stats small,body .panel-label { display:none!important; }
body #overlay .start-card { max-width:330px; padding:24px; }
body #overlay .hero-cat { width:64px; height:64px; object-fit:contain; margin:0 auto 12px; }
body #overlay h2 { font-size:28px; margin:10px 0; }
body #overlay p { font-size:13px; line-height:1.5; }
body #overlay .primary { min-height:52px; width:100%; }
body #quick-output { padding:14px 20px; color:#eee; background:#201e2b; border-bottom:1px solid #ffffff12; }
body #quick-output[hidden] { display:none!important; }
body #quick-output>span { display:block; margin-bottom:10px; font:500 13px Arial,sans-serif; }
body .quick-output-buttons { display:flex; gap:8px; }
body .quick-output-buttons button { flex:1; min-height:44px; padding:10px; border:1px solid #ffffff25; border-radius:12px; background:#ffffff09; color:#eee; font:600 13px Arial,sans-serif; cursor:pointer; }
body .quick-output-buttons button:hover { background:#baff45; color:#141414; }
body #quick-output-change { display:grid; place-items:center; flex-shrink:0; width:40px; min-width:40px; height:40px; border:1px solid #ffffff20; border-radius:12px; background:#ffffff09; color:#eee; font-size:19px; cursor:pointer; }
body #quick-output-change:disabled { display:none; }
body .arena #quick-output { position:absolute; top:65px; right:16px; left:16px; z-index:12; border:1px solid #ffffff20; border-radius:18px; box-shadow:0 8px 30px #0005; }
body .arena .weapon-card,body .arena .speech,body .arena .target-tag,body .arena .arena-footer { display:none!important; }
@media(min-width:761px) {
  body .hud { padding:10px 18px; }
  body .arena #startCard { padding:24px; }
  body .arena #quick-output { left:auto; width:380px; }
}
@media(max-width:760px) {
  body .game-shell { min-height:0; }
  body #quick-output { flex-shrink:0; padding:10px 12px; }
  body #quick-output-change { width:44px; min-width:44px; height:44px; border-radius:50%; }
}

body .score-hud,body .run-stats,body #protection,body .transport,body .timeline,body #intro-detail,body #overlay .start-card p br { display:none!important; }
