:root {
  color-scheme: dark;
  font-family: "IBM Plex Mono", "Courier New", monospace;
  background: #14120e;
  color: #f1ddac;
}
* { box-sizing: border-box; }
body { margin: 0; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 66% 19%, #423027, #211a16 52%, #100d0b 90%);
}
main {
  min-height: calc(100svh - 1.75rem);
  display: grid;
  place-content: start center;
  justify-items: center;
}
.device {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  box-shadow: 0 0 3rem #100c0990;
}
.chassis, #sparks { width: 100%; height: 100%; display: block; }
#sparks { position: absolute; inset: 0; pointer-events: none; }

.fan-motion,
.wifi-led {
  position: absolute;
  pointer-events: none;
}
.fan-motion {
  left: 17.55%;
  top: 34.1%;
  width: 12%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 12deg, #0000 0deg 13deg, #040403d0 28deg 40deg, #9a897747 48deg, #0000 60deg);
  mask-image: radial-gradient(circle closest-side, transparent 44%, #000 54% 90%, transparent 100%);
  opacity: .58;
  animation: fan-turn 1.55s linear infinite;
}
@keyframes fan-turn { to { transform: rotate(1turn); } }
.wifi-led {
  left: 84%;
  top: 35.55%;
  width: 10.3%;
  height: 9.2%;
  translate: -50% -50%;
  background: radial-gradient(ellipse, #247cfe42, #1761ff18 49%, transparent 72%);
}
.wifi-led::before {
  content: "";
  position: absolute;
  inset: 7% 11%;
  backdrop-filter: sepia(1) saturate(5) hue-rotate(169deg) brightness(1.26);
  mask-image: radial-gradient(ellipse closest-side, #000 58%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) {
  .fan-motion { display: none; }
}

.crt {
  position: absolute;
  inset: 34.4% 24.4% 28.6% 26.5%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .3cqw;
  padding: 1.2cqw 2.3cqw 1.15cqw;
  border-radius: 4% / 5%;
  background: radial-gradient(ellipse at 50% 43%, #3c573a, #284433 70%, #122c20 100%);
  box-shadow: inset 0 0 2.3cqw #0a20169c, inset 0 0 .8cqw #10271d;
  --phosphor: #bfffac;
  color: var(--phosphor);
  font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace;
  text-shadow: 0 0 2px #bfffac30;
  font-size: clamp(.625rem, 1.3875cqw, 1.1625rem);
  line-height: 1.22;
  font-weight: 700;
}
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: repeating-linear-gradient(transparent 0 3px, #081c1010 4px 5px);
  box-shadow: inset 0 0 2cqw #0a201658;
}
.crt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5ch;
  min-height: 1em;
}
.battery {
  position: relative;
  flex: 0 0 1.55em;
  height: .68em;
  border: 1px solid currentColor;
  padding: 1px;
  background: repeating-linear-gradient(90deg, currentColor 0 17%, transparent 17% 24%) content-box;
}
.battery::after {
  content: "";
  position: absolute;
  width: .15em;
  height: .35em;
  right: -.2em;
  top: 24%;
  background: currentColor;
}
.screen { min-width: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #c2ee8f70 transparent; }
.menu { display: grid; min-height: 100%; align-content: center; gap: .2cqw; }
.crt button, .crt input {
  color: inherit;
  font: inherit;
  text-shadow: inherit;
  border-radius: 0;
}
.crt input { touch-action: manipulation; }
.crt button {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: .3cqw .35em;
  text-align: left;
}
.crt button:hover, .crt button:focus-visible {
  background: #65f68f1c;
  border-color: #62d78580;
  outline: none;
}
.crt button[aria-current="true"] {
  color: #1a2f20;
  background: var(--phosphor);
  border-color: var(--phosphor);
  text-shadow: none;
}
.crt .menu button {
  min-height: max(1.25em, 4.4cqw);
  padding-block: .12cqw;
}
.crt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45em;
  font-size: .77em;
  overflow-wrap: anywhere;
}
.screen, .hint-panel { grid-area: 2 / 1; }
.hint-panel {
  min-height: 0;
  z-index: 1;
  overflow: auto;
  padding: .6em .7em;
  border: 1px solid #c7ed8d80;
  background: #1a3426;
  font-size: .87em;
}
.hint-panel p { margin: 0; white-space: pre-line; }
.hint-panel:focus-visible { outline: 1px solid #e3ffaf; outline-offset: -2px; }
.crt .hint-toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 30px;
  min-height: 24px;
  width: 2em;
  height: 2em;
  padding: 0;
  border-radius: 50%;
}
.crt .hint-toggle:is(:hover, :focus-visible) {
  border-color: transparent;
  background: transparent;
}
.crt .hint-toggle:is(:hover, :focus-visible) span {
  box-shadow: 0 0 .7em #d4ff8bb0;
}
.hint-toggle span {
  display: grid;
  place-items: center;
  width: max(17px, 1.35em);
  height: max(17px, 1.35em);
  border: 1px solid var(--phosphor);
  border-radius: 50%;
  background: #122c2060;
  box-shadow: 0 0 .45em #d4ff8b52;
  line-height: 1;
}
.hint-toggle[aria-expanded="true"] span { background: var(--phosphor); color: #1a2f20; text-shadow: none; }
.readout { display: grid; align-content: start; gap: .4em; padding-top: .35em; }
.readout p, .console p { margin: 0; }
.console { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .35em; height: 100%; }
.transcript { overflow: auto; overflow-wrap: anywhere; scrollbar-width: thin; }
.transcript p { margin: .25em 0; }
.console form { display: flex; align-items: center; min-width: 0; gap: .3em; }
.console input {
  min-width: 0;
  width: 100%;
  border: 1px solid #d6ff9c79;
  background: #151b14a0;
  padding: .25em .35em;
  font-size: max(16px, .9em);
}
.console button { flex: 0 0 auto; }
.crt.arc::after { animation: flicker 270ms ease-out; }
@keyframes flicker { 25% { background-color: #d2ffae38; } 60% { background-color: #090b08a0; } }
.knob {
  position: absolute;
  width: 11.3%;
  height: 11.3%;
  top: 77.55%;
  translate: -50% -50%;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background-color: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.knob::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #080604;
  clip-path: polygon(50% 12%, 44% 25%, 56% 25%);
  transform: rotate(var(--dial-angle, 0deg));
}
.knob:active {
  cursor: grabbing;
  box-shadow: inset 0 0 0 100px #0002;
}
.knob:focus-visible { outline: 2px solid #dfffad; outline-offset: 3px; }
.knob-left { left: 16.65%; }
.knob-right { left: 86.85%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .crt.arc::after { animation: none; }
}

.rig {
  width: min(100vw, calc((100svh - 7rem) / 1.19), 75rem);
  container-type: inline-size;
}
.keypad {
  position: relative;
  width: 68%;
  margin: -9.3cqw auto 0;
  padding: max(10px, 1.5cqw) max(8px, 1.6cqw) max(8px, 1.1cqw);
  border: 1px solid #7a5642;
  border-radius: 9px 11px 8px 8px;
  isolation: isolate;
  background:
    repeating-linear-gradient(117deg, transparent 0 24px, #bbb3a515 25px, transparent 26px 54px),
    radial-gradient(ellipse at 9% 5%, #624131, transparent 28%),
    radial-gradient(ellipse at 97% 91%, #473025, transparent 35%),
    linear-gradient(163deg, #363432, #191918 67%, #292522);
  box-shadow: inset 0 1px 1px #d6c6a058, inset 0 -5px 0 #100d0b,
    0 3px 0 #17110d, 0 9px 12px #0b0908b0, 0 16px 26px #08060599;
}
.keypad::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 15%;
  top: -4.2cqw;
  width: 8.3cqw;
  height: 4.8cqw;
  border-right: max(4px, .75cqw) solid #201813;
  border-top: max(4px, .75cqw) solid #352419;
  border-radius: 0 3.7cqw 0 0;
  box-shadow: 1px -1px 0 #745542, 2px -1px 4px #100c09a0;
  transform: rotate(7deg);
  pointer-events: none;
}
.keypad::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 5px;
  right: 5px;
  height: 4px;
  background:
    radial-gradient(circle, #b49976 0 1px, #43332b 1.4px 2px, transparent 2.2px) left center / 5px 5px no-repeat,
    radial-gradient(circle, #9f8870 0 1px, #382a22 1.4px 2px, transparent 2.2px) right center / 5px 5px no-repeat;
  pointer-events: none;
}
.keypad-light {
  position: absolute;
  top: 4px;
  right: 16px;
  width: 6px;
  height: 2px;
  border-radius: 1px;
  background: #ccff79;
  box-shadow: 0 0 6px #9ae038;
}
.keys { display: grid; gap: max(3px, .45cqw); }
.key-row { display: flex; gap: max(3px, .47cqw); }
.key {
  --cap-top: #45433b;
  --cap-bottom: #292924;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  place-items: center;
  height: max(27px, 3.7cqw);
  border: 1px solid #100f0c;
  border-radius: 4px;
  padding: 0 1px 2px;
  color: #f5e0b8;
  font-family: inherit;
  font-size: clamp(.64rem, 1.55cqw, 1.05rem);
  font-weight: 700;
  line-height: 1;
  background:
    repeating-linear-gradient(102deg, transparent 0 6px, #d1c5ac0b 7px, transparent 8px 13px),
    linear-gradient(var(--cap-top), var(--cap-bottom));
  box-shadow: inset 0 1px 0 #d6cdb44a, inset 0 -3px 0 #130f0c80, 0 2px 0 #100e0b;
  text-shadow: 0 1px #17120c;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.key--movement { --cap-top: #8f4f30; --cap-bottom: #5e3320; }
.key--command { --cap-top: #635747; --cap-bottom: #3c322a; }
.key--enter { --cap-top: #52603b; --cap-bottom: #2f3926; color: #e6ffb7; }
.key--wide { flex-grow: 1.7; }
.key--space { flex-grow: 4.8; }
@media (hover: hover) {
  .key:hover { filter: brightness(1.25); }
}
.key:active {
  transform: translateY(2px);
  filter: brightness(1.2);
  box-shadow: inset 0 1px 0 #d6cdb44a, inset 0 -2px 0 #130f0c80;
}
.key:focus-visible { outline: 2px solid #dfffad; outline-offset: 1px; z-index: 1; }
@media (max-width: 570px) and (orientation: portrait) {
  .rig { width: 100vw; }
  .keypad { width: 94%; }
  .key { height: max(31px, 7.5cqw); }
}
@media (orientation: landscape) and (max-height: 550px) and (pointer: coarse) {
  .rig { width: min(100vw, max(27rem, 100svh)); }
  .keypad { width: 87%; }
}

.site-bar {
  width: min(100%, 68rem);
  margin: 0 auto;
  min-height: 1.75rem;
  padding: .25rem clamp(.65rem, 3vw, 1.25rem);
  display: flex;
  gap: .8rem;
  align-items: center;
  justify-content: space-between;
  color: #f1ddac;
}
.programming { font-size: .75rem; line-height: 1.1; }
.working-dots { color: #e2a072; letter-spacing: .09em; margin-inline-start: .13em; }
.working-dots span { animation: work-dot 1.8s step-end infinite; }
.working-dots span:nth-child(2) { animation-delay: .27s; }
.working-dots span:nth-child(3) { animation-delay: .54s; }
@keyframes work-dot { 0%, 70% { opacity: 1; } 75%, 100% { opacity: .13; } }
@media (prefers-reduced-motion: reduce) {
  .working-dots span { animation: none; }
}
.music-toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3.15rem;
  min-height: 2.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.cassette-icon { display: block; width: 2.5rem; height: auto; }
.music-toggle:hover .cassette-icon { filter: brightness(1.2); }
.music-toggle[aria-pressed="true"] .cassette-reels { fill: #bfffac; }
.music-toggle:focus-visible, .login-form input:focus-visible { outline: 2px solid #a6ffbb; outline-offset: 2px; }

.login-form {
  display: grid;
  align-content: center;
  gap: .6em;
  min-height: 100%;
  padding: .18em;
}
.login-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #c7ed8d94;
  background: #131d12a6;
  padding: .28em .4em;
  font-size: max(16px, .85em);
}
.login-actions { display: flex; flex-wrap: wrap; gap: .2em; }
.login-actions button {
  border-color: #c7ed8d66;
  padding: .38em .45em;
  font-size: .77em;
}
.login-actions button:disabled { opacity: .6; }
.keys[data-layout="numeric"] {
  width: min(100%, max(10.25rem, 42cqw));
  margin-inline: auto;
}
.keypad:has([data-layout="numeric"]) { width: max(12rem, 45%); }

@media (max-width: 570px) and (orientation: portrait) {
  .music-toggle { min-height: 2.35rem; }
  .login-form input { padding-block: .13em; }
  .login-actions button { padding: .27em .35em; }
  .keypad:has([data-layout="numeric"]) { width: max(12rem, 56%); }
}

.paddle {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  gap: .25em;
}
.paddle-score { text-align: center; font-size: .78em; min-height: 1.2em; }
.paddle canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid #3a7f56;
  background: #020905;
  touch-action: none;
}
.paddle-controls { display: flex; gap: .4em; justify-content: center; font-size: .8em; }
.paddle-controls button { border-color: #4b9c69; padding: .15em .45em; }
.paddle-controls button:disabled { opacity: .4; }

.arcade-list { display: grid; gap: .45em; padding: .25em; }
.arcade-list select {
  color: inherit;
  background: #183324;
  border: 1px solid #76ae83;
  padding: .18em .3em;
  font: inherit;
}
.arcade-list ol, .arcade-list ul {
  display: grid;
  gap: .28em;
  margin: 0;
  padding: 0;
  list-style: none;
}
.arcade-list li { display: flex; align-items: center; gap: .6em; }
.arcade-list li strong, .presence-state { margin-inline-start: auto; }
.crt .arcade-back { justify-self: start; border-color: #76ae83; }
.presence-dot { flex: 0 0 .64em; height: .64em; border-radius: 50%; background: #516d59; }
[data-online="true"] .presence-dot { background: #c2ffac; box-shadow: 0 0 .65em #b8ff9c; }
.presence-state { opacity: .7; font-size: .85em; }
[data-online="true"] .presence-state { opacity: 1; }
.turn-actions { display: flex; flex-wrap: wrap; gap: .2em; }
.crt .turn-actions button { border-color: #56936e; }
.crt .turn-actions button:disabled { opacity: .48; }
.crt .turn-actions button[aria-pressed="true"] { background: #bfffac; color: #183324; }
.turn-board { display: grid; gap: .22em; padding: .2em; }
.local-game:has(.paddle) { height: max(70px, calc(100% - 3.4em)); }

.screen[data-view="arcade"] .menu { align-content: start; }
.screen[data-view="home"] .menu { align-content: safe center; }

/* Ice Blue hardware: the original terminal remains behind the new controls. */
[data-design=blue] {
  --metal-light:#e8f2ff; --metal-mid:#9aaec0; --metal-catch:#ebf9ff; --metal-dark:#506278; --button-gap:0;
}
[data-design=blue] .knob { height:auto; border:1px solid #120b09; }
[data-design=blue] .knob::after { display:none; }
[data-design=blue] .knob i { position:absolute; height:auto; border-radius:50%; pointer-events:none;
  translate:var(--x,0px) var(--y,0px); box-shadow:inset 0 1px #fff3, inset 0 -2px #0008,0 .55cqw #100e0d,0 .8cqw .6cqw #000a;
  transition:translate .12s ease;
}
[data-design=blue] .knob.dragging i { transition:none; }
.transport button:focus-visible { outline:2px solid #b9f8ff; outline-offset:2px; }
[data-design=blue] .keypad-light { background:#c1ddff; box-shadow:0 0 6px #458cfe; }
@media (prefers-reduced-motion:reduce) {
  [data-design=blue] .knob i, .transport-symbol i, .transport-symbol::after { transition:none; }
}
.transport { position: absolute; top: 81.75%; left: 30.4%; width: 42%; height: 4.1%; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: var(--button-gap); }
.transport::before {
  content: "";
  position: absolute;
  inset: 15% 3% 11%;
  border-radius: .62cqw;
  background: linear-gradient(180deg, #1f0b0773, #280a071d 50%, #682b1833);
  box-shadow: inset 0 .35cqw .55cqw #190704b5, inset 0 -.14cqw #ed8a604f, 0 .13cqw #fd996a4f;
  pointer-events: none;
}
.transport button {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  touch-action: manipulation;
}
.transport-symbol {
  position: relative;
  width: min(54%, 3.9cqw);
  height: 53%;
  pointer-events: none;
}
.transport-symbol::before, .transport-symbol::after, .transport-symbol i {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: var(--symbol);
}
.transport-symbol::before {
  transform: translateY(.12cqw) scale(1.23, 1.27);
  background: linear-gradient(179deg, #1d0c09 0%, #28110d 62%, #6d3727 83%, #a9664f 100%);
}
.transport-symbol::after {
  transform: translateY(.17cqw);
  background: linear-gradient(150deg, #635c52, #2d2824 58%, #615a51 84%, #31241d);
  transition: transform .2s cubic-bezier(.25,.75,.34,1.25);
}
.transport-symbol i {
  z-index: 1;
  transform: translateY(-.13cqw);
  background:
    repeating-linear-gradient(92deg, #fff1 0, #fff0 .65px, #15120c15 1.2px, #fff0 1.8px),
    radial-gradient(ellipse at 24% 12%, #fffaf148 0%, transparent 66%),
    linear-gradient(173deg, var(--metal-catch) 4%, var(--metal-light) 14%, var(--metal-mid) 50%, var(--metal-dark) 80%, var(--metal-mid) 90%, #43362c 100%);
  transition: transform .2s cubic-bezier(.25,.75,.34,1.25), filter .12s ease;
}
.transport [data-action=previous] { --symbol: polygon(2% 50%, 47% 6%, 47% 94%, 2% 50%, 53% 50%, 98% 6%, 98% 94%, 53% 50%); }
.transport [data-action=play] { --symbol: polygon(23% 5%, 84% 50%, 23% 95%); }
.transport [data-action=pause] { --symbol: polygon(26% 5%, 45% 5%, 45% 95%, 55% 95%, 55% 5%, 74% 5%, 74% 95%, 26% 95%); }
.transport [data-action=stop] { --symbol: polygon(7% 7%, 93% 7%, 93% 93%, 7% 93%); }
.transport [data-action=stop] .transport-symbol { width: auto; height: 52%; aspect-ratio: 1; }
.transport [data-action=next] { --symbol: polygon(2% 6%, 47% 50%, 2% 94%, 2% 6%, 53% 6%, 98% 50%, 53% 94%, 53% 6%); }
.transport button:hover .transport-symbol i { filter: brightness(1.14); }
.transport button:active .transport-symbol i,
.transport button:active .transport-symbol::after,
.transport:not(:has(button:active)) button[aria-pressed=true] .transport-symbol i,
.transport:not(:has(button:active)) button[aria-pressed=true] .transport-symbol::after {
  transform: translateY(.15cqw) scale(.96);
  transition-duration: .055s;
}
.transport button:active .transport-symbol i,
.transport:not(:has(button:active)) button[aria-pressed=true] .transport-symbol i { filter: brightness(.85); }
[data-design=blue] .transport {
  top: 81.6%;
  left: 35%;
  width: 32%;
  height: 3.3%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding-inline: 2%;
}
[data-design=blue] .transport::before {
  inset: 0;
  border: 1px solid #191511;
  border-radius: .8cqw / 46%;
  background:
    radial-gradient(ellipse at 24% 21%, #b9a69030, transparent 60%),
    repeating-linear-gradient(101deg, #fff0 0 2px, #ffffff05 3px, #15131009 4px),
    linear-gradient(#252523, #4d4c47 22%, #353532 57%, #1e1d1b 87%, #151412);
  box-shadow: inset 0 1px #a69a8359, inset 0 -1px #0009, 0 0 0 .22cqw #1b0d0b, 0 .24cqw .52cqw #110704, 0 .24cqw 0 .23cqw #b66b504f;
}
[data-design=blue] .transport button::before {
  content: "";
  position: absolute;
  width: 1.95cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #131310;
  background: linear-gradient(160deg, #55534e, #393935 68%, #292826);
  box-shadow: inset 0 1px #b7aa9140, 0 1px #090908b8;
}
[data-design=blue] .transport .transport-symbol,
[data-design=blue] .transport [data-action=stop] .transport-symbol {
  width: .95cqw;
  height: .95cqw;
}
[data-design=blue] .transport-symbol::before,
[data-design=blue] .transport-symbol::after { content: none; }
[data-design=blue] .transport-symbol i {
  transform: none;
  background: linear-gradient(#151512 62%, #878176);
}
[data-design=blue] .transport button:active::before,
[data-design=blue] .transport:not(:has(button:active)) button[aria-pressed=true]::before {
  background: #292824;
  box-shadow: inset 0 1px 2px #0e0d0b, 0 1px #96867456;
  transform: translateY(.12cqw);
}

[data-design=blue] .knob {
  top: 77.4%;
  width: 12.25%;
  aspect-ratio: .94;
  border-color: #120b09;
  background: #161311;
  box-shadow: 0 2px 4px #150a07cc;
}
[data-design=blue] .knob-left { left: 17.55%; }
[data-design=blue] .knob-right { left: 85.4%; width: 11.6%; aspect-ratio: .90; }
[data-design=blue] .knob::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 97%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, #141211 77%, #282420 82%, #4b433b 90%, #211e1a 98%, #151311);
}
[data-design=blue] .knob i {
  inset: 50% auto auto 50%;
  width: 62%;
  aspect-ratio: 1;
  margin: -31% 0 0 -31%;
  border: 1px solid #100f0e;
  background: radial-gradient(ellipse at 36% 26%, #7b74684d, transparent 52%), repeating-radial-gradient(circle, #302e2b 0 2px, #292724 3px 4px);
}
[data-design=blue] .keypad {
  background: linear-gradient(155deg, #3e3a36, #242424 42%, #151412 92%);
  box-shadow: inset 0 1px #eacfb538, 0 .2rem #211913, 0 .6rem 1rem #100a07c9;
}
[data-design=blue] .key {
  background: linear-gradient(162deg, #323133, #1b1a1b 85%);
  color: #deedff;
  text-shadow: 0 0 .36em #66aaff;
  box-shadow: inset 0 1px #ffffff38, inset 0 -2px #0008, 0 2px #0e0d0c;
}
[data-design=blue] .key:is([data-key=w], [data-key=a], [data-key=s], [data-key=d]) {
  background: linear-gradient(162deg, #9c3c36, #681e23 85%);
  border-color: #411818;
}
[data-design=blue] .key:active, [data-design=blue] .key.pressed {
  box-shadow: inset 0 1px 3px #000a;
}

/* Fade only the chassis footprint; keep the landscape and keyboard still. */
.melt-wreck {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
  opacity:0;
  mask:url('terminal-melt-mask.svg') center / 100% 100% no-repeat;
}
.terminal-melted .melt-wreck,
.terminal-melted .device :is(.crt,.knob,.transport,.fan-motion,.wifi-led,#sparks) {
  transition:opacity .65s ease;
}
.terminal-melted .melt-wreck { opacity:1; }
.terminal-melted .device :is(.crt,.knob,.transport,.fan-motion,.wifi-led,#sparks) { opacity:0; animation:none; }
.melt-notice {
  position: relative;
  z-index: 2;
  min-width: min(100%,17rem);
  margin: .45rem auto 1.5rem;
  padding: .65rem .85rem;
  color: #f3b082;
  background: #1b100d;
  border: 1px solid #77432c;
  border-radius: .3rem;
  text-align: center;
  font-size: .9rem;
  line-height: 1.45;
}
.melt-notice span { display:block; color:#e2c5aa; }
.melt-notice:focus-visible { outline: 2px solid #e2a072; outline-offset: 2px; }
@media (prefers-reduced-motion:reduce) {
  .terminal-melted .melt-wreck,
  .terminal-melted .device :is(.crt,.knob,.transport,.fan-motion,.wifi-led,#sparks) {
    transition:none;
  }
}
