.arcade-language-bar{box-sizing:border-box;display:flex;justify-content:flex-end;align-items:center;gap:9px;width:100%;max-width:1200px;margin:0 auto;padding:7px 18px;font:11px/1.4 system-ui,-apple-system,"Microsoft YaHei",sans-serif;color:inherit;position:relative;z-index:2;flex-shrink:0}.arcade-language-bar label{opacity:.8}.arcade-language-bar select{font:inherit;color:inherit;background:transparent;border:1px solid #8887;border-radius:5px;padding:5px 8px;cursor:pointer;max-width:145px}.arcade-language-bar option{color:#222;background:#f7f3e9}.arcade-language-bar select:focus-visible{outline:2px solid #c99b52;outline-offset:2px}html[lang="en"] h1,html[lang="en"] h2,html[lang="en"] h3{letter-spacing:normal}html[lang="en"] button{overflow-wrap:normal}@media(max-width:480px){.arcade-language-bar{padding:6px 12px;font-size:10px;gap:7px}}

.arcade-language-bar label{font-weight:800;letter-spacing:.04em;opacity:1}.arcade-language-bar select{background:#fff8;padding:7px 9px;min-height:34px}

/* Preserve portrait/desktop layouts. Short touch screens place native controls beside the board. */
body[data-arcade-game="dr-mario"] .cabinet-top{height:auto;min-height:30px}
@media (pointer:coarse) and (orientation:landscape) and (max-height:560px){
  body[data-arcade-game]{--arcade-ratio:1.066667;--arcade-room:100px}
  body[data-arcade-game="tanks"]{--arcade-ratio:.928571}
  body[data-arcade-game="breakout"]{--arcade-ratio:.8}
  body[data-arcade-game="circus"]{--arcade-ratio:1.5;--arcade-room:126px}
  body[data-arcade-game="lode-runner"]{--arcade-ratio:1.69697}
  body[data-arcade-game="dr-mario"]{--arcade-ratio:.704545;--arcade-room:106px}
  body[data-arcade-game] main{padding-left:16px;padding-right:16px}
  body[data-arcade-game] .arcade,body[data-arcade-game] .arcade-layout{display:block}
  body[data-arcade-game] .cabinet{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:6px 16px;width:max-content;max-width:100%;margin:0 auto;padding:10px;flex:none;scroll-margin-top:6px}
  body[data-arcade-game] .cabinet-top{grid-column:1/-1;grid-row:1;height:auto;min-height:26px;margin:0;gap:8px;flex-wrap:nowrap}
  body[data-arcade-game] .toolbar{flex-wrap:wrap;justify-content:flex-end;min-width:0}
  body[data-arcade-game] .screen-frame{grid-column:1;grid-row:2;width:calc((100svh - var(--arcade-room))*var(--arcade-ratio));max-width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:var(--arcade-ratio);margin:0 auto}
  body[data-arcade-game] #game{width:100%;height:100%}
  body[data-arcade-game] .cabinet-bottom{grid-column:1;grid-row:3;min-height:0;height:auto;min-width:0;padding:0;gap:6px;font-size:7px;flex-wrap:wrap;line-height:1.3}
  body[data-arcade-game] .touch-controls{grid-column:2;grid-row:2/4;display:flex;flex-direction:column;justify-content:center;align-items:center;align-self:stretch;gap:18px;padding:0;margin:0;border:0;min-width:0}
  body[data-arcade-game] .touch-controls button{min-height:44px;min-width:44px;flex-shrink:0}
  body[data-arcade-game] .touch-hint,body[data-arcade-game] .touch-note,body[data-arcade-game] .touch-label{display:none}
  body[data-arcade-game] .direction-controls,body[data-arcade-game] .move-buttons{gap:12px;display:flex}
  body[data-arcade-game] .fire-key{margin:0}
  body[data-arcade-game] .dpad{grid-template-columns:44px 44px 44px;grid-template-rows:44px 44px 44px;gap:1px}
  body[data-arcade-game] .dpad button{width:44px;height:44px}
  body[data-arcade-game] .touch-actions{margin:0;gap:12px;transform:none}
  body[data-arcade-game] .game-guide,body[data-arcade-game] .arcade>aside,body[data-arcade-game] .arcade-layout>.guide{max-width:680px;width:100%;margin:24px auto 0}
  body[data-arcade-game="circus"] .stage-strip{grid-column:1/-1;grid-row:4;margin:0;padding:5px 0}
  body[data-arcade-game="dr-mario"] .screen-frame{grid-row:2/4}
  body[data-arcade-game="dr-mario"] .cabinet-bottom{grid-row:4}
  body[data-arcade-game="dr-mario"] .touch-controls{grid-row:2;align-self:end;gap:8px}
  body[data-arcade-game="dr-mario"] .virus-lounge{position:static;width:72px;display:block}
  body[data-arcade-game="dr-mario"] .move-controls,body[data-arcade-game="dr-mario"] .rotate-controls{gap:5px;display:flex}
  body[data-arcade-game="dr-mario"] .rotate-controls button{width:64px}
  body[data-arcade-game="dr-mario"] .motion-controls{grid-column:2;grid-row:3;align-self:start;justify-content:center;gap:5px;font-size:9px;padding:0}
  body[data-arcade-game="dr-mario"] .motion-controls #motion-status{font-size:8px;line-height:1.3;text-align:center;margin:0}
}
