#arcadePlayer { max-width: 42rem; min-width: 0; color: #e6eee4; font: 500 0.85rem/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
#arcadePlayer [hidden], #arcadePlayer[hidden] { display: none !important; }
.arcade-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.65rem; margin-bottom: 0.75rem; }
.arcade-status { margin: 0; color: #aebdb0; font-size: 0.75rem; }
.arcade-actions { display: flex; gap: 0.4rem; }
.arcade-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #414a42; border-radius: 3px; background: #141b17; color: #f1f4ed; cursor: pointer; touch-action: manipulation; }
.arcade-button img { display: block; pointer-events: none; }
.arcade-button:hover, .arcade-button.is-pressed { border-color: #b2cca0; background: #2a3a28; }
.arcade-button:disabled { opacity: 0.35; cursor: default; }
.arcade-button:focus-visible, .arcade-primary:focus-visible { outline: 2px solid #c6dcb2; outline-offset: 3px; }
.arcade-viewport { position: relative; aspect-ratio: 4 / 3; width: 100%; background: #080c0b; overflow: hidden; }
#arcadeCanvas { display: block; width: 100%; height: 100%; touch-action: none; outline: 0; }
#arcadeCanvas:focus-visible { outline: 1px solid #b2cca0; outline-offset: -1px; }
.arcade-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; text-align: center; background: rgb(4 8 6 / 82%); }
.arcade-overlay p { margin: 0; font-size: 1rem; }
.arcade-primary { display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 48px; padding: 0.5rem 1rem; font: inherit; border: 1px solid #adc99c; border-radius: 3px; background: #233520; color: #eff6e8; cursor: pointer; }
.arcade-primary:disabled { opacity: 0.5; cursor: wait; }
.arcade-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.6rem; margin-top: 0.8rem; }
.arcade-dpad { display: grid; grid-template-columns: repeat(3, 52px); grid-template-rows: repeat(2, 52px); gap: 5px; }
.arcade-dpad .arcade-button { width: 52px; height: 52px; touch-action: none; }
.arcade-dpad [data-arcade-key="up"] { grid-column: 2; }
.arcade-dpad [data-arcade-key="left"] { grid-column: 1; grid-row: 2; }
.arcade-dpad [data-arcade-key="down"] { grid-column: 2; grid-row: 2; }
.arcade-dpad [data-arcade-key="right"] { grid-column: 3; grid-row: 2; }
#arcadePlayer[data-game="asteroids"] [data-arcade-key="down"],
#arcadePlayer[data-game="breakout"] [data-arcade-key="down"],
#arcadePlayer[data-game="breakout"] [data-arcade-key="up"] { display: none; }
#arcadePlayer[data-game="breakout"] .arcade-dpad { display: flex; }
#arcadeAction { width: 80px; height: 58px; border-color: #a77d68; background: #362720; touch-action: none; }
.arcade-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.75rem; color: #b4c9b9; }
.arcade-footer label { display: flex; gap: 0.5rem; align-items: center; min-height: 44px; }
.arcade-footer input { width: 18px; height: 18px; accent-color: #b9d5a9; }
.arcade-credits { font-size: 0.72rem; line-height: 1.6; color: #969e95; overflow-wrap: anywhere; }
.arcade-credits summary { cursor: pointer; padding: 0.5rem 0; width: fit-content; }
.arcade-credits a { color: #c1d8b2; text-underline-offset: 3px; }
#arcadePlayer:fullscreen, #arcadePlayer.is-fullscreen { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; height: 100%; max-width: none; padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)); background: #080c0b; overflow: auto; }
#arcadePlayer.is-fullscreen { position: fixed; inset: 0; z-index: 10000; height: 100dvh; }
#arcadePlayer:fullscreen .arcade-viewport, #arcadePlayer.is-fullscreen .arcade-viewport { min-height: 120px; flex: 1; aspect-ratio: auto; }
#arcadePlayer:fullscreen canvas, #arcadePlayer.is-fullscreen canvas { object-fit: contain; }
#arcadePlayer:fullscreen .arcade-credits, #arcadePlayer.is-fullscreen .arcade-credits { display: none; }
.is-arcade-fullscreen .companion { visibility: hidden; }
@media (max-width: 420px) {
  .arcade-dpad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 50px); gap: 4px; }
  .arcade-dpad .arcade-button { width: 46px; height: 50px; }
  #arcadeAction { width: 64px; }
  .arcade-status { font-size: 0.7rem; }
}
