/* Game Boy-inspired shell; fullscreen removes the housing, not the controls. */
.arcade-player {--gb-ink:#172647;--gb-paper:#dfdbc9}
.pocket-brand,.pocket-speaker {display:none}
html[data-controls=touch] .arcade-player:not(.expanded) .cabinet,
html[data-controls=desktop] .arcade-player:not(.expanded) .cabinet {
 background:var(--gb-paper) url('assets/gameboy-shell.webp') repeat;background-size:360px;
 border:1px solid #b6b29f;border-radius:16px 16px 36px 16px;
}
html[data-controls=touch] .arcade-player:not(.expanded) .cabinet {--grip-height:calc(270px + env(safe-area-inset-bottom));--hud-height:76px}
html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand {
 display:flex;align-items:baseline;gap:12px;position:absolute;top:23px;left:22px;right:115px;color:var(--gb-ink);z-index:4;
}
.pocket-brand strong {font:900 italic 24px/1 'Arial Black',sans-serif;letter-spacing:-1.2px;white-space:nowrap}
.pocket-brand small {font:700 8px/1.4 monospace;letter-spacing:.12em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html[data-controls=touch] .arcade-player:not(.expanded) .cabinet .screen {
 inset:var(--hud-height) 12px var(--grip-height);width:auto;height:calc(100% - var(--hud-height) - var(--grip-height));
 border:12px solid #35383c;border-bottom-width:19px;border-radius:14px 14px 26px 14px;
 background:#000;box-shadow:0 0 0 2px #b6b3a2;
}
html[data-controls=touch] .arcade-player:not(.expanded) .touch::before {display:none}
html[data-controls=touch] .arcade-player .dpad {
 background:url('assets/gameboy-dpad.webp') center/contain no-repeat;border:0;border-radius:0;box-shadow:none;
}
html[data-controls=touch] .arcade-player .dpad::before,
html[data-controls=touch] .arcade-player .stick-ball,
html[data-controls=touch] .arcade-player .stick-shaft {display:none}
html[data-controls=touch] .arcade-player .dpad:has(button.pressed) {filter:brightness(1.2)}
html[data-controls=touch] .arcade-player:not(.expanded) .dpad {left:18px;bottom:calc(92px + env(safe-area-inset-bottom));width:124px;height:124px}
html[data-controls=touch] .arcade-player .actions button {
 background:url('assets/gameboy-action.webp') center/contain no-repeat;
 border:0;box-shadow:none;color:#f6e8df;text-shadow:0 1px 2px #18020d;
}
html[data-controls=touch] .arcade-player .actions button::after {display:none}
html[data-controls=touch] .arcade-player .actions button.pressed {transform:translateY(2px);filter:brightness(.75);box-shadow:none}
html[data-controls=touch] .arcade-player .actions[data-count="6"] button:nth-child(n+4) {background-image:url('assets/gameboy-kick.webp')}
html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .actions[data-count] {right:18px;bottom:calc(102px + env(safe-area-inset-bottom))}
html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .system-buttons {
 top:auto;bottom:calc(16px + env(safe-area-inset-bottom));left:20px;right:auto;width:auto;
}
html[data-controls=touch] .arcade-player:not(.expanded) .cabinet .system-buttons button,
html[data-controls=touch] .arcade-player:not(.expanded) .cabinet #fullscreen {color:var(--gb-ink);text-shadow:none}
html[data-controls=touch] .arcade-player:not(.expanded) .pocket-speaker {
 display:block;position:absolute;right:20px;bottom:calc(25px + env(safe-area-inset-bottom));width:70px;height:38px;
 background:url('assets/gameboy-speaker.webp') center/contain no-repeat;pointer-events:none;
}
html[data-controls=touch] .arcade-player:not(.expanded) .rotate-tip {display:none}
html[data-controls=touch] .arcade-player:not(.expanded) .bar {top:12px;right:12px}
/* Short phones keep full-size hit areas and reduce decoration first. */
@media(orientation:portrait) and (max-height:700px) {
 html[data-controls=touch] .arcade-player:not(.expanded) .cabinet {--grip-height:240px;--hud-height:64px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand {top:20px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand small {display:none}
 html[data-controls=touch] .arcade-player:not(.expanded) .dpad {bottom:78px;width:112px;height:112px}
 html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .actions[data-count] {bottom:82px}
}
@media(orientation:portrait) and (max-width:360px) {
 html[data-controls=touch] .arcade-player:not(.expanded) .dpad {left:10px;width:104px;height:104px}
 html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .actions[data-count] {right:12px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-speaker {width:55px;right:14px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand small {display:none}
}
@media(orientation:landscape) {
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand {top:18px;left:calc(18px + env(safe-area-inset-left));right:auto}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand strong {font-size:20px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand small {display:none}
 html[data-controls=touch] .arcade-player:not(.expanded) .cabinet .screen {
  inset:12px calc(206px + env(safe-area-inset-right)) 12px calc(162px + env(safe-area-inset-left));height:calc(100% - 24px);
 }
 html[data-controls=touch] .arcade-player:not(.expanded) .dpad {left:calc(20px + env(safe-area-inset-left));bottom:calc(82px + env(safe-area-inset-bottom));width:122px;height:122px}
 html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .actions[data-count] {right:calc(16px + env(safe-area-inset-right));bottom:calc(104px + env(safe-area-inset-bottom))}
 html[data-controls=touch] .arcade-player:not(.expanded) .arcade-controller .system-buttons {left:calc(12px + env(safe-area-inset-left));bottom:calc(12px + env(safe-area-inset-bottom));gap:2px}
 html[data-controls=touch] .arcade-player:not(.expanded) .cabinet .system-buttons button {width:46px;min-width:46px}
 html[data-controls=touch] .arcade-player:not(.expanded) .cabinet .system-buttons button::before {width:46px}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-speaker {right:calc(25px + env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom))}
 html[data-controls=touch] .arcade-player:not(.expanded) .bar {right:calc(14px + env(safe-area-inset-right))}
 html[data-controls=touch] .arcade-player:not(.expanded) #cover {padding:14px;gap:8px}
}
/* Desktop adopts the ivory frame, without sacrificing space to a touch deck. */
html[data-controls=desktop] .arcade-player:not(.expanded) .bar {color:var(--gb-ink)}
html[data-controls=desktop] .arcade-player:not(.expanded) .cabinet #fullscreen {color:var(--gb-ink);text-shadow:none}
html[data-controls=desktop] .arcade-player:not(.expanded) .keyboard-strip {color:var(--gb-ink)}
html[data-controls=desktop] .arcade-player:not(.expanded) kbd {background:#e8e5d7;border-color:#aaa795;color:var(--gb-ink);box-shadow:none}
html[data-controls=desktop] .arcade-player:not(.expanded) .cabinet .screen {border:8px solid #34363b;border-radius:12px}
html[data-controls=touch] .arcade-player .arcade-controller .actions[data-count="3"] button:last-child {grid-column:auto}
@media(orientation:portrait) {
 html[data-controls=touch] .arcade-player:not(.expanded) .cabinet {--hud-height:calc(76px + env(safe-area-inset-top))}
 html[data-controls=touch] .arcade-player:not(.expanded) .pocket-brand {top:calc(23px + env(safe-area-inset-top))}
 html[data-controls=touch] .arcade-player:not(.expanded) .bar {top:calc(12px + env(safe-area-inset-top))}
}
@media(orientation:portrait) and (min-width:361px) {
 html[data-controls=touch] .arcade-player .arcade-controller .actions[data-count="6"] {grid-template-columns:repeat(3,52px)}
 html[data-controls=touch] .arcade-player .actions[data-count="6"] button {width:52px;height:52px}
}
