/* Shared arcade-cabinet frame for floor games (marquee, bezel, side art, control panel).
   Set up by assets/js/cabinet.js from a window.CABINET config in the game's page. */
body { margin: 0; }
.cab {
  --cab-ink: #f3ecd7; --cab-dim: #8c84a8; --cab-gold: #ffe066; --cab-pink: #ff4fa3; --cab-cyan: #47d7ff; --cab-red: #e2483d;
  --cab-body: #160f30; --cab-body-d: #0b0819; --cab-black: #050409;
  width: 100%; max-width: 1760px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: stretch;
  background: linear-gradient(180deg, var(--cab-body), var(--cab-body-d));
  border-radius: 12px 12px 6px 6px;
  box-shadow: 0 0 0 3px var(--cab-black), inset 4px 0 0 var(--cab-pink), inset -4px 0 0 var(--cab-pink), 0 20px 60px rgba(0, 0, 0, .6);
  overflow: hidden;
}
/* backlit marquee */
.cab-marquee {
  position: relative; display: flex; justify-content: center; align-items: center;
  background: #120d26; border-bottom: 4px solid var(--cab-black);
  box-shadow: inset 0 -2px 0 #3a2a6a;
}
.cab-marquee img {
  display: block; width: 100%; max-width: 640px; height: auto; max-height: clamp(64px, 11vh, 120px); object-fit: contain;
  image-rendering: pixelated; image-rendering: crisp-edges;
  filter: drop-shadow(0 0 14px rgba(255, 224, 102, .35)) brightness(1.08);
  animation: cab-hum 5s ease-in-out infinite;
}
.cab-marquee::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), transparent 35%, transparent 70%, rgba(0, 0, 0, .25));
}
@keyframes cab-hum { 0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 224, 102, .3)) brightness(1.04); } 50% { filter: drop-shadow(0 0 20px rgba(255, 224, 102, .45)) brightness(1.12); } }

.cab-marquee .cab-back-in { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); z-index: 2; }
.cab-marquee .cab-back-in:active { transform: translateY(calc(-50% + 1px)); }

/* screen row: side art | bezel | side art */
.cab-body { display: flex; justify-content: center; align-items: stretch; gap: 0; padding: clamp(6px, 1.4vw, 16px); }
/* side columns (computers): art on top, controls below */
.cab-col { flex: none; display: flex; flex-direction: column; gap: 12px; align-self: stretch; min-height: 0; }
.cab-col.l { margin-right: clamp(10px, 1.4vw, 16px); }
.cab-col.r { margin-left: clamp(10px, 1.4vw, 16px); }
.cab-side {
  display: block; width: 100%; flex: 1 1 auto; min-height: 0; height: 0; object-fit: cover; object-position: center 35%;
  image-rendering: pixelated; image-rendering: crisp-edges;
  box-shadow: 0 0 0 3px var(--cab-black), inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.cab-ctl {
  flex: none; position: relative; padding: 16px 12px 14px;
  background: linear-gradient(180deg, #2a1f52 0%, #1b1438 30%, #120d26 100%);
  box-shadow: 0 0 0 3px var(--cab-black), inset 0 3px 0 #3d2f73; border-radius: 4px;
}
.cab-ctl::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, var(--cab-pink), var(--cab-gold), var(--cab-cyan), var(--cab-pink)); opacity: .7;
}
.cab-ctl:empty { display: none; }
.cab-sidemode .cab-stick { flex-direction: column; gap: 14px; }
.cab-sidemode .cab-stick .base { margin-top: 16px; }
.cab-sidemode .cab-buttons { display: grid; grid-template-columns: repeat(2, 76px); justify-content: center; gap: 14px 18px; }
.cab-bezel {
  position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: clamp(8px, 2.2vw, 24px) clamp(8px, 2.2vw, 24px) clamp(6px, 1.2vw, 12px);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(180deg, #17122b, #07060e);
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #2b2350, inset 0 0 0 5px var(--cab-black), inset 0 0 40px rgba(0, 0, 0, .8);
}
.cab-bezel::before { /* printed pinstripe on the bezel */
  content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255, 224, 102, .28); border-radius: 7px; pointer-events: none;
}
.cab-screen {
  position: relative; overflow: hidden; background: #000;
  border-radius: 14px / 11px; /* a little CRT curve */
  box-shadow: 0 0 0 3px #000, 0 0 0 5px #221b3d, 0 0 28px rgba(71, 215, 255, .14);
}
.cab-screen > canvas {
  display: block !important; width: 100% !important; height: auto !important; max-width: none !important;
  border: 0 !important; box-shadow: none !important; margin: 0 !important;
}
.cab-screen::after { /* glass: glare + faint scanlines, never blocks input */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, .03) 22%, transparent 38%),
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .10) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .55);
}
.cab-print {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  font-family: "Press Start 2P", ui-monospace, "Courier New", monospace; font-size: 7px; letter-spacing: .12em;
  color: var(--cab-dim); line-height: 1.4;
}
.cab-print b { color: var(--cab-gold); font-weight: 400; }
.cab-print span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* never widen the bezel past the screen */

/* control panel */
.cab-panel {
  position: relative; padding: clamp(10px, 2vw, 18px) clamp(10px, 2vw, 22px) clamp(12px, 2vw, 20px);
  background: linear-gradient(180deg, #2a1f52 0%, #1b1438 18%, #120d26 100%);
  border-top: 4px solid var(--cab-black);
  box-shadow: inset 0 3px 0 #3d2f73;
  display: flex; justify-content: center;
}
.cab-panel::before { /* chrome lip */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--cab-pink), var(--cab-gold), var(--cab-cyan), var(--cab-pink));
  opacity: .7;
}
.cab-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 48px); }
.cab-stick { display: flex; align-items: center; gap: 14px; }
.cab-stick .base {
  width: 64px; height: 64px; border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle at 50% 50%, #0a0814 0 30%, #2b2350 31% 34%, #0a0814 35%);
  box-shadow: 0 0 0 3px var(--cab-black), inset 0 4px 8px rgba(0, 0, 0, .8);
}
.cab-stick .base::before { /* shaft */
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 30px; margin: -30px 0 0 -4px;
  background: linear-gradient(90deg, #6f6a80, #d8d4e4, #6f6a80); border-radius: 3px;
}
.cab-stick .base::after { /* ball top */
  content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -46px 0 0 -15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a90, var(--cab-red) 45%, #7a1410 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .6);
}
.cab-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cab-legend li { display: flex; gap: 8px; align-items: baseline; font-family: "Press Start 2P", ui-monospace, monospace; font-size: 8px; line-height: 1.4; color: var(--cab-ink); white-space: nowrap; }
.cab-legend kbd { font-family: inherit; color: var(--cab-cyan); min-width: 7ch; display: inline-block; }
.cab-buttons { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; justify-content: center; }
.cab-btn { display: grid; justify-items: center; gap: 6px; width: 76px; text-align: center; }
.cab-btn .cap {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255, 255, 255, .7), transparent 32%), var(--c, var(--cab-red));
  box-shadow: 0 0 0 3px var(--cab-black), 0 5px 0 3px rgba(0, 0, 0, .55), inset 0 -5px 8px rgba(0, 0, 0, .35);
}
.cab-btn b { font-family: "Press Start 2P", ui-monospace, monospace; font-weight: 400; font-size: 7px; line-height: 1.5; color: var(--cab-ink); }
.cab-btn i { font-style: normal; font-family: "Press Start 2P", ui-monospace, monospace; font-size: 7px; line-height: 1.4; color: var(--cab-cyan); }
.cab-panel .cab-touch { width: 100%; display: flex; justify-content: center; }

/* phones and touch screens: no side art, slimmer chrome, touch pad is the control panel */
@media (max-width: 760px) {
  .cab-side { display: none; }
  .cab-panel { padding: 10px 8px 12px; }
}
@media (pointer: coarse) { .cab-controls { display: none; } }
@media (pointer: fine) { .cab-panel .cab-touch { display: none; } }
/* phone held sideways: a handheld — screen as tall as the phone, d-pad left, buttons right */
.cab-hh body { overflow: hidden; padding: 0 !important; }
.cab-hh body > * { gap: 0 !important; padding: 0 !important; }
.cab-handheld { border-radius: 0; box-shadow: none; }
.cab-handheld .cab-marquee, .cab-handheld .cab-panel, .cab-handheld .cab-print, .cab-handheld .cab-side,
.cab-handheld .cab-ctl, .cab-handheld .cab-stick, .cab-handheld .cab-buttons { display: none !important; }
.cab-handheld .cab-body { position: relative; padding: 6px; }
.cab-handheld .cab-bezel { padding: 6px; gap: 0; }
.cab-handheld .cab-bezel::before { inset: 3px; }
.cab-handheld .cab-col { margin: 0 !important; justify-content: flex-start; align-items: center; }
.cab-handheld .cab-back-hh { transform: scale(.62); transform-origin: top center; margin: 0 !important; white-space: nowrap; }
.cab-handheld #pad { position: absolute; inset: 6px; z-index: 3; width: auto; max-width: none; zoom: 1;
  display: grid; grid-template-rows: 1fr auto; align-items: center; gap: 8px; pointer-events: none; }
.cab-handheld #pad > * { pointer-events: auto; }
.cab-handheld #pad .dpad { grid-column: 1; grid-row: 1 / 3; justify-self: center; margin-top: 30px; }
.cab-handheld #pad .ab { grid-column: 3; grid-row: 1; justify-self: center; justify-content: center; }
.cab-handheld #pad .mid { grid-column: 3; grid-row: 2; justify-self: center; flex-direction: row; padding-bottom: 6px; }
/* full screen button + mode */
.cab { position: relative; }
.cab-fs-btn {
  position: absolute; top: 6px; right: 8px; z-index: 6; cursor: pointer;
  font-family: "Press Start 2P", ui-monospace, monospace; font-size: 8px; letter-spacing: .06em; line-height: 1;
  color: var(--cab-gold); background: rgba(5, 4, 9, .78); border: 2px solid var(--cab-gold); border-radius: 6px; padding: 7px 9px;
  box-shadow: 0 0 10px rgba(255, 224, 102, .35); -webkit-tap-highlight-color: transparent;
}
.cab-fs-btn:hover, .cab-fs-btn:focus-visible { background: var(--cab-gold); color: #120d26; outline: none; }
.cab-fs body { overflow: hidden; padding: 0 !important; background: #050409; }
.cab-fs body > * { gap: 0 !important; padding: 0 !important; max-width: none !important; }
.cab-full { border-radius: 0; box-shadow: none; max-width: none; min-height: 100vh; min-height: 100dvh; background: #050409; }
.cab-full .cab-marquee, .cab-full .cab-print, .cab-full .cab-col { display: none !important; }
.cab-full .cab-body { padding: 34px 4px 4px; }
.cab-full .cab-bezel { padding: 4px; background: #050409; box-shadow: none; }
.cab-full .cab-bezel::before { display: none; }
.cab-full .cab-screen { border-radius: 4px; }
.cab-full .cab-panel { padding: 8px 6px 10px; border-top: 0; box-shadow: none; background: #050409; }
.cab-full .cab-panel::before { display: none; }
@media (pointer: fine) { .cab-full .cab-panel { display: none !important; } }
.cab-back-fs { position: absolute !important; top: 4px; left: 6px; z-index: 6; margin: 0 !important; transform: scale(.6); transform-origin: top left; white-space: nowrap; }
.cab-handheld .cab-fs-btn { top: 6px; right: 10px; }
@media (prefers-reduced-motion: reduce) { .cab-marquee img { animation: none; } }
