/* Rewind Cable — entertainment center: layout, VCR, NES console + pads, rental shelf, boombox.
   Same charcoal plastic as the TV and remote; the stand is 90s black-ash laminate. */

/* ---------------- room layout ---------------- */
.room{display:grid; grid-template-columns:minmax(0,1fr) 300px; grid-template-areas:"tv side" "stand side";
  gap:0 28px; align-items:start; max-width:1320px; flex-wrap:nowrap}
.tv{grid-area:tv; justify-self:center; width:100%}
.stand-unit{grid-area:stand; justify-self:center; width:100%; max-width:min(960px, calc((100vh - 130px) * 1.333 + 90px)); max-width:min(960px, calc((100svh - 130px) * 1.333 + 90px)); margin-top:-4px}
.side{grid-area:side; display:flex; flex-direction:column; align-items:center; gap:26px; min-width:0; padding-top:8px}
.side > *{flex:none}
.screen{container-type:size}

/* ---------------- entertainment center ---------------- */
.su-top,.su-base{background:
    repeating-linear-gradient(91deg, rgba(255,255,255,.035) 0 1px, transparent 1px 7px, rgba(0,0,0,.18) 7px 8px, transparent 8px 13px),
    linear-gradient(#2c2824, #171411)}
.su-top{height:18px; border-radius:5px 5px 0 0; box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.su-base{height:16px; border-radius:0 0 5px 5px; box-shadow:0 18px 28px rgba(0,0,0,.55)}
.su-cavity{display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; padding:18px 18px 12px;
  background:linear-gradient(#050404, #0e0c0a 70%, #16130f);
  border-left:16px solid #1c1915; border-right:16px solid #1c1915;
  box-shadow:inset 0 16px 22px rgba(0,0,0,.85)}

.dbtn{font:700 10px/1 var(--guide-font); letter-spacing:.1em; color:#cfcac0; background:linear-gradient(#3b3a3f,#232226);
  border:1px solid #000; border-radius:3px; padding:6px 8px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px; touch-action:manipulation}
.dbtn:active{transform:translateY(1px); background:linear-gradient(#2d2c31,#1c1b1f)}
.dbtn:focus-visible,.pad button:focus-visible,.boombox button:focus-visible,.tape:focus-visible,.cart:focus-visible{outline:2px solid var(--yellow); outline-offset:2px}
.dled{width:6px; height:6px; border-radius:50%; background:#3a1210; box-shadow:inset 0 1px 1px #000; flex:none}
.vcr.on .dled,.nes.on .dled{background:#ff3b2f; box-shadow:0 0 6px #ff3b2f}
.dev-brand{font:9px/1 var(--brand-font); letter-spacing:.2em; color:#8c8880; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dev-brand i{font-style:normal; color:var(--red)}
.dev-brand b{font-weight:400; color:#d9d5cc}
.dev-brand span{opacity:.6}

/* VCR */
.vcr{flex:1.5 1 300px; min-width:0; display:grid; gap:10px; padding:12px 14px 10px; border-radius:5px;
  background:linear-gradient(180deg,#302f34,#1c1b1e 60%,#151417); box-shadow:0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.08)}
.vcr-face{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center}
.vcr-slot{position:relative; height:32px; background:#050506; border-radius:3px; box-shadow:inset 0 3px 6px #000; overflow:hidden}
.vcr-flap{position:absolute; inset:4px 6px; border-radius:2px; background:linear-gradient(#2e2d32,#18171a); transform-origin:top; transition:transform .35s}
.vcr.loaded .vcr-flap{transform:scaleY(.12)}
.vcr-tape{position:absolute; left:16%; right:16%; top:6px; bottom:3px; border-radius:2px 2px 0 0; background:#0c0c0d;
  display:flex; align-items:center; justify-content:center; transform:translateY(130%); transition:transform .45s .1s; overflow:hidden;
  font:700 8px/1 var(--guide-font); letter-spacing:.08em; color:#1a1a1a; white-space:nowrap}
.vcr-tape:not(:empty){background:linear-gradient(#0c0c0d 0 30%, #ece6d8 30% 80%, #0c0c0d 80%)}
.vcr.loaded .vcr-tape{transform:none}
.vcr-lcd{min-width:100px; height:30px; padding:0 8px; border-radius:3px; background:#020a0b; box-shadow:inset 0 1px 3px #000;
  font:24px/30px var(--osd-font); color:#5ff0ff; text-shadow:0 0 6px rgba(95,240,255,.6); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap}
.vcr-lcd.blink{animation:lcdblink 1s steps(1) infinite}
@keyframes lcdblink{50%{opacity:0}}
.vcr-row{display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap}
.vcr-trans{display:flex; gap:3px}
.vcr-trans .dbtn{min-width:32px; padding:6px}

/* NES-style console */
.nes{flex:1 1 230px; min-width:0; display:grid; gap:9px; padding:10px 12px 9px; border-radius:5px;
  background:linear-gradient(180deg,#34333a,#212024 70%,#1a191c); box-shadow:0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.08)}
.nes-lid{height:50px; border-radius:3px; display:flex; align-items:center; justify-content:center;
  background:repeating-linear-gradient(90deg,#2b2a2f 0 5px,#232227 5px 7px); box-shadow:inset 0 -3px 0 #111013, 0 1px 0 rgba(255,255,255,.06)}
.nes-window{width:66%; height:24px; border-radius:2px; background:#09090a; box-shadow:inset 0 2px 4px #000; overflow:hidden; display:flex; align-items:center; justify-content:center}
.nes-cart{max-width:92%; padding:3px 8px; border-radius:2px; background:linear-gradient(#ebe5d8,#cfc8b8); color:#151515;
  font:700 10px/1.1 var(--guide-font); letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transform:translateY(140%); transition:transform .3s}
.nes.loaded .nes-cart{transform:none}
.nes-front{display:flex; align-items:center; justify-content:space-between; gap:8px}
.nes-btns{display:flex; align-items:center; gap:6px}
.ports{display:flex; gap:6px}
.ports i{width:24px; height:13px; border-radius:3px 3px 7px 7px; background:radial-gradient(circle,#2a2a2e 1px,transparent 1.5px) 3px 2px/5px 5px, #0b0b0c; box-shadow:inset 0 1px 2px #000, 0 0 0 1px #3a3940}

/* ---------------- TV screen layers ---------------- */
.game{z-index:16; background:#000}
#nesCanvas{position:absolute; inset:0; width:100%; height:100%; display:block; image-rendering:pixelated; image-rendering:crisp-edges}
.screen.wide #nesCanvas{object-fit:contain}
.fx #nesCanvas{filter:saturate(1.15) contrast(1.06) blur(.3px)}
.blue{z-index:24; background:#1d2fd6}
#vcrOsd{top:9%; left:10%; font-size:clamp(18px,5cqw,46px); color:#fff; text-shadow:3px 3px 0 #000; opacity:0; transition:opacity .15s}
#vcrOsd small{display:block; font-size:.5em; margin-top:.3em}

.screen.tracking .screen-inner::after{content:""; position:absolute; left:0; right:0; height:16%; z-index:23; pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,.4) 0 1px,transparent 1px 3px), linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);
  mix-blend-mode:screen; animation:trk .7s linear forwards}
@keyframes trk{from{top:100%}to{top:-20%}}

/* cartridge menu */
.cartmenu{position:absolute; inset:0; display:flex; flex-direction:column; gap:2.2cqw; padding:7cqw 9cqw 5cqw; color:#fff; font-family:var(--guide-font);
  background:radial-gradient(ellipse at 50% 0%, #2a3aa8, #0b1250 55%, #05082a)}
.cm-head{display:flex; justify-content:space-between; align-items:flex-end; gap:2cqw; padding-bottom:1.4cqw; border-bottom:.5cqw solid var(--guide-hi)}
.cm-brand{font:4.4cqw/1 var(--brand-font)}
.cm-brand i{font-style:normal; color:var(--red)}
.cm-brand b{font-weight:400; color:var(--guide-hi)}
.cm-sub{font:3.6cqw/1 var(--osd-font); letter-spacing:.1em; color:#b8c4ff}
.cm-err{background:#7a1410; border-left:1cqw solid var(--guide-hi); padding:1.2cqw 2cqw; font-size:2.8cqw}
.cm-grid{flex:1; min-height:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3cqw 2.6cqw; align-content:start; overflow:auto; padding:2cqw 1cqw 1cqw; scrollbar-width:none}
.cm-grid::-webkit-scrollbar{display:none}
.cart{--lab:#c33; position:relative; min-width:0; aspect-ratio:1/1.02; display:flex; flex-direction:column; padding:0; border:none; color:#fff; cursor:pointer;
  border-radius:1.2cqw 1.2cqw .6cqw .6cqw; background:linear-gradient(#5d5c63,#3d3c42); box-shadow:0 .9cqw 0 #1d1c20; transition:transform .12s}
.cart-ridge{height:17%; border-radius:1.2cqw 1.2cqw 0 0; background:repeating-linear-gradient(0deg,#4c4b52 0 .5cqw,#36353b .5cqw 1cqw)}
.cart-label{flex:1; display:flex; flex-direction:column; justify-content:flex-end; gap:.6cqw; margin:5% 9% 13%; padding:7%; text-align:left; border-radius:.6cqw;
  background:linear-gradient(160deg, var(--lab), color-mix(in srgb, var(--lab) 55%, #000))}
.cart-label b{font:700 2.7cqw/1.02 var(--guide-font); overflow-wrap:anywhere; text-transform:uppercase; letter-spacing:.02em}
.cart-label small{font-size:2cqw; line-height:1.15; opacity:.85}
.cart.own .cart-label{background:repeating-linear-gradient(45deg,#2c2c31 0 1.2cqw,#232328 1.2cqw 2.4cqw); outline:.35cqw dashed #b8c4ff; outline-offset:-.8cqw}
.cart.sel{transform:translateY(-1.2cqw); outline:.6cqw solid var(--guide-hi); outline-offset:.4cqw}
.cartwrap{position:relative; min-width:0; display:grid}
.cart-x{position:absolute; top:-1.2cqw; right:-1.2cqw; z-index:2; min-width:4.6cqw; height:4.6cqw; padding:0 1cqw; border:none; border-radius:2.3cqw; cursor:pointer;
  background:#0b1250; color:#b8c4ff; font:700 2.2cqw/4.6cqw var(--guide-font); letter-spacing:.06em; box-shadow:0 0 0 .3cqw #b8c4ff}
.cart-x.armed{background:#7a1410; color:#fff; box-shadow:0 0 0 .3cqw #fff}
body.dropping .screen{box-shadow:0 0 0 4px var(--guide-hi), inset 0 0 40px rgba(0,0,0,.9)}
.cm-foot{font:2.8cqw/1 var(--osd-font); letter-spacing:.12em; color:#b8c4ff; text-align:center}

/* rental shelf */
.store{z-index:16; display:flex; flex-direction:column; color:#fff; font-family:var(--guide-font); background:linear-gradient(180deg,#2a0f14,#3c161b 60%,#2a0f14)}
.st-head{display:flex; justify-content:space-between; align-items:center; gap:2cqw; padding:6cqw 9cqw 1.8cqw; background:linear-gradient(#0f0507,#2a0f14)}
.st-sign{font:6cqw/1 var(--brand-font); letter-spacing:.02em; color:#ff6fb0; text-shadow:0 0 .8cqw #ff2f8a, 0 0 2.4cqw #ff2f8a}
.st-sign span{color:#7af3ff; text-shadow:0 0 .8cqw #22d8ff, 0 0 2.4cqw #22d8ff}
.st-hours{font:2.4cqw/1.15 var(--osd-font); color:#ffcf6a; text-align:right; max-width:30cqw}
.st-body{flex:1; min-height:0; overflow:auto; padding:1cqw 7cqw 0; scrollbar-width:none}
.st-body::-webkit-scrollbar{display:none}
.st-row{margin-bottom:2.6cqw}
.st-label span{display:inline-block; margin:0 0 .6cqw 1cqw; padding:.8cqw 1.6cqw; border:.3cqw solid #ffd23a; border-radius:.5cqw; background:#111;
  color:#ffd23a; font:700 2.6cqw/1 var(--guide-font); letter-spacing:.14em}
.st-tapes{display:flex; gap:1.8cqw; overflow-x:auto; padding:2.2cqw 1cqw .4cqw; scrollbar-width:none}
.st-tapes::-webkit-scrollbar{display:none}
.st-plank{height:1.8cqw; border-radius:.3cqw; background:linear-gradient(#7a4f29,#3d2410); box-shadow:0 1cqw 1.4cqw rgba(0,0,0,.6)}
.tape{--h:200; position:relative; flex:0 0 13.5cqw; aspect-ratio:10/17; padding:0; border:none; border-radius:.5cqw; overflow:hidden; cursor:pointer; color:#fff;
  background:linear-gradient(160deg,hsl(var(--h) 55% 42%),hsl(calc(var(--h) + 40) 50% 16%));
  box-shadow:0 .6cqw 1cqw rgba(0,0,0,.6), inset 0 0 0 .25cqw rgba(255,255,255,.08); transition:transform .15s}
.tape img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover}
.tape .t-top{position:absolute; left:0; right:0; top:0; padding:1cqw .8cqw; background:#0c0c0c; text-align:left;
  font:700 1.9cqw/1.05 var(--guide-font); text-transform:uppercase; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
.tape .t-vhs{position:absolute; right:.8cqw; bottom:.8cqw; padding:.2cqw .6cqw; border-radius:.3cqw; background:#fff; color:#000; font:1.6cqw/1.2 var(--brand-font)}
.tape .t-rew{position:absolute; left:.6cqw; bottom:.6cqw; width:6.4cqw; aspect-ratio:1; display:flex; align-items:center; justify-content:center; border-radius:50%;
  background:#ffd23a; color:#000; font:700 1.2cqw/1 var(--guide-font); text-align:center; transform:rotate(-12deg)}
.tape.sel{transform:translateY(-1.6cqw) scale(1.06); outline:.5cqw solid #ffd23a; outline-offset:.2cqw; z-index:1}
.st-foot{display:flex; align-items:center; gap:1.4cqw; padding:1.6cqw 9cqw 5cqw; background:#0b0405; font-size:2.8cqw; white-space:nowrap; overflow:hidden; min-height:9cqw}
.st-foot b{overflow:hidden; text-overflow:ellipsis}
.st-foot span{margin-left:auto; color:#ffd23a; font:2.6cqw/1 var(--osd-font); letter-spacing:.1em}
.st-empty,.st-loading{font:3cqw/1.3 var(--osd-font); color:#ffcf6a}
.st-empty{flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:1.4cqw; text-align:center; padding:0 10cqw}
.st-empty b{font:700 4cqw/1 var(--guide-font); color:#fff}
.st-loading{padding:5cqw 1cqw}

/* ---------------- game pad (NES style on desktop) ---------------- */
.pad{position:relative; width:300px; max-width:100%; display:grid; gap:10px; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none}
.pad-top{display:flex; flex-wrap:wrap; justify-content:center; gap:4px}
.pad-mini{font:700 10px/1 var(--guide-font); letter-spacing:.1em; color:#cfcac0; background:linear-gradient(#3a393f,#26252a); border:1px solid #000; border-radius:10px; padding:7px 9px; cursor:pointer; touch-action:manipulation}
.pad-face{position:relative; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; padding:20px 12px; border-radius:10px;
  background:linear-gradient(#2e2d32,#1a191c); border:3px solid #0d0d0f; box-shadow:0 18px 30px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08); touch-action:none}
.dpad{position:relative; width:84px; height:84px; touch-action:none; cursor:pointer}
.dpad i,.dpad b{position:absolute; background:linear-gradient(#2c2c30,#0f0f11); box-shadow:0 3px 0 #000}
.dpad .u,.dpad .d{left:33%; width:34%; height:36%}
.dpad .l,.dpad .r{top:33%; height:34%; width:36%}
.dpad .u{top:0; border-radius:4px 4px 0 0} .dpad .d{bottom:0; border-radius:0 0 4px 4px}
.dpad .l{left:0; border-radius:4px 0 0 4px} .dpad .r{right:0; border-radius:0 4px 4px 0}
.dpad b{left:33%; top:33%; width:34%; height:34%; box-shadow:none; background:radial-gradient(circle,#1a1a1d 30%,#111 31%)}
.dpad[data-dir~="up"] .u,.dpad[data-dir~="down"] .d,.dpad[data-dir~="left"] .l,.dpad[data-dir~="right"] .r{background:#060607; box-shadow:0 1px 0 #000}
.pad-mid{display:grid; justify-items:center; gap:7px}
.pad-brand{font:9px/1 var(--brand-font); letter-spacing:.18em; color:#8c8880}
.pad-brand i{font-style:normal; color:var(--red)}
.ss{display:flex; gap:8px}
.ss button{width:30px; height:12px; padding:0; border:none; border-radius:6px; background:linear-gradient(#5a5960,#2d2c31); box-shadow:0 2px 0 #000; cursor:pointer; touch-action:none}
.ss button.down{transform:translateY(2px); box-shadow:none}
.ss-l{display:flex; gap:8px}
.ss-l span{width:30px; text-align:center; font:700 8px/1 var(--guide-font); letter-spacing:.1em; color:#e0473b}
.ab{display:flex; gap:10px}
.ab > div{display:grid; justify-items:center; gap:4px}
.ab span{font:700 11px/1 var(--guide-font); color:#e0473b}
.pb{width:40px; height:40px; padding:0; border:none; border-radius:50%; font-size:0; cursor:pointer; touch-action:none;
  background:radial-gradient(circle at 35% 30%,#ff6b5e,#c42a20 60%,#8e1b14); box-shadow:0 3px 0 #3d0a07, inset 0 -2px 3px rgba(0,0,0,.3)}
.pb.down{transform:translateY(2px); box-shadow:0 1px 0 #3d0a07}
.gb-grill{display:none}
.pad-keys{font:12px/1.45 var(--guide-font); color:#8c8880; text-align:center; letter-spacing:.02em}
.pad-keys b{color:#d9d5cc}
.rgrid.r4{grid-template-columns:repeat(4,1fr); gap:6px}
.rgrid.r4 .rb{font-size:10px; padding:0 2px}

/* ---------------- boombox ---------------- */
.boombox{width:100%; max-width:300px; display:grid; justify-items:center; user-select:none; -webkit-user-select:none}
.bb-handle{width:56%; height:20px; border:7px solid #2c2b30; border-bottom:none; border-radius:18px 18px 0 0}
.bb-keys{display:flex; gap:3px; position:relative; z-index:1; margin-bottom:-1px}
.bb-keys button{width:36px; height:17px; padding:0; border:none; border-radius:3px 3px 0 0; cursor:pointer; touch-action:manipulation;
  background:linear-gradient(#d4d1ca,#8f8c86); color:#1b1a1d; font-size:9px; line-height:17px; box-shadow:inset 0 -2px 0 rgba(0,0,0,.25)}
.bb-keys button:active{transform:translateY(3px)}
#bbShuf.lit{background:linear-gradient(#ffd77a,#d8a12a)}
.bb-body{width:100%; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) minmax(0,1fr); align-items:center; gap:10px; padding:14px 12px; border-radius:18px;
  background:linear-gradient(170deg,#3a393f,#1d1c20 55%,#141316); box-shadow:0 22px 36px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08), inset 0 -3px 0 rgba(0,0,0,.5)}
.spk{aspect-ratio:1; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle,rgba(0,0,0,.55) 1px,transparent 1.6px) 0 0/6px 6px, radial-gradient(circle,#28272c,#101012 72%);
  box-shadow:0 0 0 3px #0c0c0e, 0 0 0 5px #4a4950}
.spk i{width:36%; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle at 40% 35%,#56555c,#19191c 70%); box-shadow:0 0 0 4px #141416}
.boombox.playing .spk i{animation:thump .46s ease-in-out infinite}
@keyframes thump{50%{transform:scale(1.12)}}
.bb-mid{display:grid; grid-template-columns:minmax(0,1fr); gap:8px; min-width:0}
.bb-lcd{height:24px; padding:0 6px; border-radius:3px; background:#061408; box-shadow:inset 0 1px 3px #000; overflow:hidden; white-space:nowrap;
  font:18px/24px var(--osd-font); color:var(--osd); text-shadow:0 0 6px rgba(93,255,106,.5)}
.bb-lcd .marq{display:inline-block; padding-left:100%; animation:tick 14s linear infinite}
.bb-deck{position:relative; height:46px; border-radius:4px; display:flex; align-items:center; justify-content:space-around; background:linear-gradient(#141316,#0a0a0b); box-shadow:inset 0 2px 5px #000}
.bb-deck::before{content:""; position:absolute; inset:9px 12%; border:1px solid #2c2b30; border-radius:3px; background:linear-gradient(rgba(255,255,255,.07),transparent)}
.reel{position:relative; z-index:1; width:22px; height:22px; border-radius:50%; box-shadow:0 0 0 3px #1a1a1d;
  background:conic-gradient(#e9e6df 0 10%,#2a2a2e 0 33%,#e9e6df 0 43%,#2a2a2e 0 66%,#e9e6df 0 76%,#2a2a2e 0)}
.boombox.playing .reel{animation:spin 1.4s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.bb-row{display:flex; align-items:center; gap:8px}
.bb-pw{flex:none; width:24px; height:24px; padding:0; border:none; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; background:#2a2a2e; box-shadow:0 2px 0 #000}
.boombox.on .dled{background:var(--osd); box-shadow:0 0 6px var(--osd)}
#bbVol{flex:1; min-width:0; accent-color:var(--red)}
.boombox .dev-brand{margin-top:9px}
.bb-hidden{position:fixed; left:-9999px; top:0; width:200px; height:200px; overflow:hidden}

/* ---------------- phones, upright ---------------- */
@media (max-width: 760px) and (orientation: portrait){
  .room{grid-template-columns:minmax(0,1fr); grid-template-areas:"tv" "stand" "side"; gap:0}
  .side{padding-top:22px; gap:24px; width:100%}
  .su-cavity{padding:12px; gap:12px; border-width:0 10px}
  .vcr,.nes{flex:1 1 100%}
  .boombox{max-width:420px}
  .pad-keys{display:none}

  /* Game Boy–style pad, TV stays on top */
  body.gaming .stand-unit,body.gaming .boombox{display:none}
  body.gaming .room{grid-template-areas:"tv" "side"; grid-template-rows:auto 1fr; min-height:calc(100svh - 32px)}
  body.gaming .side{padding-top:12px; align-self:stretch}
  body.gaming .pad{flex:1 1 auto; width:100%; max-width:440px; display:flex; flex-direction:column; gap:6px; padding:12px 16px 30px;
    border-radius:14px 14px 70px 14px; background:linear-gradient(170deg,#38373d,#1d1c20 60%,#161518); box-shadow:0 20px 34px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08)}
  body.gaming .pad-face{flex:1; grid-template-columns:auto 1fr auto; grid-template-areas:"dpad . ab" "mid mid mid"; align-content:space-evenly; row-gap:28px;
    padding:10px 4px; background:none; border:none; box-shadow:none; position:static}
  body.gaming .dpad{grid-area:dpad; width:132px; height:132px}
  body.gaming .ab{grid-area:ab; gap:14px; transform:rotate(-25deg); margin-top:-8px}
  body.gaming .ss button{width:50px}
  body.gaming .pb{width:62px; height:62px; background:radial-gradient(circle at 35% 30%,#d4518b,#9c2257 60%,#6c133b); box-shadow:0 4px 0 #3a0820}
  body.gaming .ab span{font-size:13px; color:#b8b4ab}
  body.gaming .pad-mid{grid-area:mid}
  body.gaming .ss{transform:rotate(-25deg); gap:20px}
  body.gaming .ss button{width:50px; height:14px}
  body.gaming .ss-l{gap:20px; transform:rotate(-25deg)}
  body.gaming .ss-l span{width:50px; color:#b8b4ab; font-size:9px}
  body.gaming .pad-brand{display:none}
  body.gaming .gb-grill{display:flex; position:absolute; right:26px; bottom:22px; gap:7px; transform:rotate(-30deg)}
  body.gaming .gb-grill i{width:6px; height:44px; border-radius:3px; background:#0b0b0d; box-shadow:inset 0 2px 2px #000}
}

/* ---------------- phones, sideways ---------------- */
@media (max-height: 520px) and (orientation: landscape){
  .room{grid-template-columns:minmax(0,1fr) 220px; gap:0 14px}
  .stand-unit{max-width:calc((100vh - 90px) * 1.333 + 60px); max-width:calc((100svh - 90px) * 1.333 + 60px)}
  .side{padding-top:0; gap:16px}
  .su-cavity{padding:8px; gap:8px; border-width:0 8px}
  .boombox{max-width:220px}
  .pad-keys{display:none}
  body.gaming .stand-unit,body.gaming .boombox{display:none}
  body.gaming .room{grid-template-columns:minmax(0,1fr) minmax(240px,320px)}
  body.gaming .pad-face{grid-template-columns:auto 1fr; grid-template-areas:"dpad ab" "mid mid"; row-gap:14px; padding:14px 12px}
  body.gaming .dpad{grid-area:dpad; width:96px; height:96px}
  body.gaming .ab{grid-area:ab; justify-self:end}
  body.gaming .pb{width:50px; height:50px}
  body.gaming .pad-mid{grid-area:mid}
}
/* ================= classic gray: console + controllers ================= */
.nes{background:linear-gradient(180deg,#dcd9d2,#c8c5be 55%,#b9b6af); box-shadow:0 3px 0 #000, inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.25)}
.nes-lid{background:repeating-linear-gradient(90deg,#d2cfc8 0 5px,#c3c0b9 5px 7px); box-shadow:inset 0 -3px 0 #9f9c95, 0 1px 0 rgba(255,255,255,.5)}
.nes-window{background:#141416}
.nes-front{margin:0 -12px; padding:8px 12px; background:linear-gradient(#57575c,#3c3c41); box-shadow:inset 0 2px 0 #2a2a2e}
.nes .dbtn{background:linear-gradient(#2b2b2f,#141416); color:#e2dfd8}
.nes .ports i{box-shadow:inset 0 1px 2px #000, 0 0 0 1px #6c6c72}
.nes .dev-brand{color:#55534e}
.nes .dev-brand b{color:#c4251c}

.pad-face{background:#161618; border:9px solid #cbc8c1; border-radius:8px; box-shadow:0 18px 30px rgba(0,0,0,.55), inset 0 0 0 2px #050505, 0 0 0 1px #8f8c86}
.pad-mid{align-self:stretch; align-content:center; padding:6px 4px; border-radius:3px;
  background:repeating-linear-gradient(180deg,#a9a6a0 0 5px,#161618 5px 9px)}
.pad-mid .ss{padding:5px 6px; border-radius:4px; background:#cbc8c1}
.pad-mid .ss-l span{color:#c4251c; background:#161618; border-radius:2px; padding:1px 0}
.pad-brand{color:#c4251c; background:#161618; padding:2px 4px; border-radius:2px}
.ss button{background:linear-gradient(#3a3a3f,#18181b)}
.ab > div{padding:5px 5px 3px; border-radius:6px; background:#cbc8c1}
.ab span{color:#c4251c}
/* desktop NES pad proportions */
.pad-face{padding:16px 10px; gap:8px; border-width:7px}
.dpad{width:78px; height:78px}
.ab{gap:6px}
.ab > div{padding:4px 4px 3px}
.pb{width:36px; height:36px}
.pad-brand{display:none}
.pad-mid{gap:5px; padding:8px 3px}
.pad-mid .ss{gap:6px; padding:5px 6px}
.ss button{width:26px; height:10px}
.pad-mid .ss-l{gap:6px}
.pad-mid .ss-l span{width:30px; font-size:7px}

@media (max-width: 760px) and (orientation: portrait){
  /* Game Boy gray */
  body.gaming .pad{background:linear-gradient(170deg,#dcd9d2,#cbc8c1 55%,#bbb8b1); box-shadow:0 20px 34px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(0,0,0,.2)}
  body.gaming .pad-face{background:none; border:none; box-shadow:none}
  body.gaming .pad-mid{background:none; padding:0}
  body.gaming .pad-mid .ss{background:none; padding:0}
  body.gaming .ss button{background:linear-gradient(#97979e,#6e6e75); box-shadow:0 2px 0 #4a4a50}
  body.gaming .ss-l span,body.gaming .ab span{background:none; color:#2b2f6b; font-weight:700}
  body.gaming .ab > div{background:none; padding:0}
  body.gaming .dpad i,body.gaming .dpad b{background:linear-gradient(#3a3a3f,#1c1c1f)}
  body.gaming .dpad b{background:radial-gradient(circle,#2a2a2e 30%,#1c1c1f 31%)}
  body.gaming .gb-grill i{background:#8f8c86; box-shadow:inset 0 2px 2px rgba(0,0,0,.45)}
  body.gaming .pad-mini{background:linear-gradient(#b5b2ab,#9d9a93); color:#2b2f6b; border-color:#77746e}
  body.gaming .dpad{width:132px; height:132px}
  body.gaming .pb{width:62px; height:62px}
  body.gaming .ab{gap:14px}
  body.gaming .ss{gap:20px}
  body.gaming .ss button{width:50px; height:14px}
  body.gaming .pad-mid .ss-l{gap:20px}
  body.gaming .pad-mid .ss-l span{width:50px; font-size:9px}
}
@media (max-height: 520px) and (orientation: landscape){
  body.gaming .pad-mid{padding:6px 10px}
  body.gaming .dpad{width:96px; height:96px}
  body.gaming .pb{width:48px; height:48px}
}
@media (prefers-reduced-motion: reduce){
  .boombox.playing .reel,.boombox.playing .spk i,.vcr-lcd.blink{animation:none}
  .bb-lcd .marq{animation-duration:40s}
}
