.cpc464-keyboard {
  display: none;
}

html[data-theme="cpc464"] {
  --ink: #e9e7dc;
  --muted: #a3a69f;
  --panel: #303330;
  --panel-deep: #171918;
  --panel-edge: #0b0c0b;
  --metal: #858880;
  --metal-dark: #3e413e;
  --amber: #d69b36;
  --amber-soft: #92651f;
  --red: #c7483a;
  --green: #63a65e;
  font-family: Arial, Helvetica, sans-serif;
}

html[data-theme="cpc464"] body {
  color: #e9e7dc;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(107,111,103,.26), transparent 38%),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(#262825, #0c0d0c 72%);
  background-size: auto, 48px 100%, auto;
}

html[data-theme="cpc464"] body::before {
  opacity: .14;
  background-image:
    repeating-linear-gradient(116deg, rgba(255,255,255,.025) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.08) 50%, transparent 50.2%);
  background-size: auto, 100% 100%;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

html[data-theme="cpc464"] .workbench {
  width: min(1540px, 100%);
  padding-bottom: 70px;
}

html[data-theme="cpc464"] .masthead {
  align-items: center;
  margin-bottom: 24px;
  padding: 0 8px;
}

html[data-theme="cpc464"] .brand-lockup h1 {
  color: #d8d8d1;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  letter-spacing: -.045em;
}

html[data-theme="cpc464"] .brand-lockup h1 strong {
  color: #e4a53b;
  font-weight: 900;
}

html[data-theme="cpc464"] .eyebrow,
html[data-theme="cpc464"] .masthead-meta {
  color: #9da099;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
}

html[data-theme="cpc464"] .brand-mark {
  grid-template-columns: repeat(4, 7px);
  gap: 0;
  width: 28px;
  height: 34px;
  transform: skewY(-16deg);
}

html[data-theme="cpc464"] .brand-mark i {
  width: 7px;
  height: 100% !important;
  box-shadow: none;
}

html[data-theme="cpc464"] .brand-mark i:nth-child(1) { background: #c7483a; }
html[data-theme="cpc464"] .brand-mark i:nth-child(2) { background: #d69b36; }
html[data-theme="cpc464"] .brand-mark i:nth-child(3) { background: #4f9b51; }

html[data-theme="cpc464"] .theme-button {
  min-height: 30px;
  border: 2px solid #171817;
  border-radius: 2px;
  color: #d2d1ca;
  background: linear-gradient(#5a5d57, #343633 58%, #292b29 59%);
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 3px #111210;
  font-family: Arial, Helvetica, sans-serif;
}

html[data-theme="cpc464"] .theme-button strong { color: #e8b150; }

html[data-theme="cpc464"] .theme-menu {
  border: 3px solid #171817;
  border-radius: 3px;
  background: #343633;
  box-shadow: 0 12px 30px rgba(0,0,0,.65), inset 0 0 0 1px #686a64;
}

html[data-theme="cpc464"] .theme-menu::before {
  border-color: #171817;
  background: #343633;
}

html[data-theme="cpc464"] .theme-menu button {
  border-radius: 1px;
  color: #d5d4cd;
}

html[data-theme="cpc464"] .theme-menu button:hover,
html[data-theme="cpc464"] .theme-menu button[aria-checked="true"] {
  border-color: #777a73;
  background: #1d1f1d;
}

html[data-theme="cpc464"] .receiver {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="cpc464"] .receiver-top,
html[data-theme="cpc464"] .screen-stage {
  width: min(1120px, 86%);
  margin-inline: auto;
  border-right: 4px solid #171817;
  border-left: 4px solid #171817;
  background:
    linear-gradient(90deg, rgba(255,255,255,.11), transparent 5%, transparent 94%, rgba(0,0,0,.2)),
    linear-gradient(#4b4e49, #383a37);
}

html[data-theme="cpc464"] .receiver-top {
  grid-template-columns: minmax(170px, .72fr) minmax(250px, 1.35fr) minmax(240px, .75fr);
  gap: 15px;
  padding: 20px 27px 17px;
  border-top: 4px solid #171817;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow:
    inset 0 2px rgba(255,255,255,.2),
    0 -12px 28px rgba(0,0,0,.25);
}

html[data-theme="cpc464"] .model-bank > label,
html[data-theme="cpc464"] .memory-slider label,
html[data-theme="cpc464"] .display-label,
html[data-theme="cpc464"] .activity-bank div {
  color: #d3d3cb;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

html[data-theme="cpc464"] select {
  min-height: 38px;
  border: 2px solid #171817;
  border-radius: 2px;
  color: #f1d37f;
  background: linear-gradient(#242724, #101210);
  box-shadow: inset 0 2px 7px #050605, 0 1px #73766f;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .memory-slider output { color: #f1d37f; }
html[data-theme="cpc464"] .memory-slider input[type="range"]::-webkit-slider-thumb { background: #e8b150; }
html[data-theme="cpc464"] .memory-slider input[type="range"]::-moz-range-thumb { background: #e8b150; }

html[data-theme="cpc464"] .display-panel {
  border: 2px solid #151715;
  border-radius: 2px;
  background: #151b15;
  box-shadow: inset 0 0 15px #050705, 0 1px #71746d;
}

html[data-theme="cpc464"] .display-label { color: #a5aa9e; }
html[data-theme="cpc464"] #status { color: #88d37c; text-shadow: 0 0 8px rgba(112,194,99,.35); }

html[data-theme="cpc464"] .activity-bank .led {
  width: 11px;
  height: 11px;
  border: 2px solid #171817;
}

html[data-theme="cpc464"] .screen-stage {
  position: relative;
  display: flex;
  padding: 45px 52px 104px;
  border-bottom: 4px solid #171817;
  border-radius: 0 0 18px 18px;
  box-shadow:
    0 25px 55px rgba(0,0,0,.55),
    inset 0 -4px rgba(10,11,10,.24);
}

html[data-theme="cpc464"] .screen-stage::before {
  position: absolute;
  top: 14px;
  left: 42px;
  content: "AMSTRAD";
  color: #d6d6cf;
  font: 900 20px/1 Arial, Helvetica, sans-serif;
  letter-spacing: -.045em;
  text-shadow: 0 1px #151615;
}

html[data-theme="cpc464"] .screen-stage::after {
  position: absolute;
  top: 17px;
  right: 43px;
  content: "COLOR MONITOR";
  color: #b6b8b0;
  font: 800 10px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .2em;
}

html[data-theme="cpc464"] .screen-brand {
  bottom: 20px;
  left: 38px;
  width: 100px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.62));
}

html[data-theme="cpc464"] .screen-build-info {
  bottom: 7px;
  left: 38px;
  color: #adb1a8;
  font-size: 7px;
  letter-spacing: .06em;
}

html[data-theme="cpc464"] .screen-frame {
  width: min(100%, calc(1024px * var(--screen-scale)));
  padding: 24px 25px 16px;
  border: 3px solid #1a1c1a;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.11), transparent 14%, transparent 80%, rgba(0,0,0,.28)),
    #292b29;
  box-shadow:
    inset 0 0 0 2px #5d605a,
    inset 0 0 28px #111210,
    0 4px 9px rgba(0,0,0,.5);
}

html[data-theme="cpc464"] .screen-glass {
  border: 7px solid #101210;
  border-radius: 8% / 6%;
  background: #000;
  box-shadow:
    inset 0 0 36px rgba(0,0,0,.9),
    0 0 0 2px #50534e,
    0 2px 12px #090a09;
}

html[data-theme="cpc464"] .scanline-overlay { opacity: .14; }

html[data-theme="cpc464"] .screen-glass::after {
  background:
    radial-gradient(ellipse at center, transparent 66%, rgba(0,0,0,.18)),
    linear-gradient(116deg, rgba(255,255,255,.07), transparent 22%, transparent 78%, rgba(255,255,255,.025));
}

html[data-theme="cpc464"] .screen-hint,
html[data-theme="cpc464"] .drop-hint {
  border: 2px solid #8e918a;
  border-radius: 2px;
  color: #e9e7dc;
  background: rgba(27,29,27,.9);
}

html[data-theme="cpc464"] .screen-badge {
  margin: 14px 7px 0;
  color: #aaaDA5;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

html[data-theme="cpc464"] .screen-badge::after {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 12px;
  content: "";
  border: 2px solid #202220;
  border-radius: 50%;
  background: #67a95f;
  box-shadow: 0 0 7px rgba(103,169,95,.65);
}

html[data-theme="cpc464"] .control-deck {
  position: relative;
  grid-template-columns: .82fr 1.6fr 1.15fr .9fr;
  gap: 10px;
  margin-top: 34px;
  padding: 62px 20px 19px;
  border: 4px solid #101110;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045), transparent 7%, transparent 93%, rgba(0,0,0,.18)),
    linear-gradient(#343734, #242624);
  box-shadow:
    0 25px 55px rgba(0,0,0,.58),
    inset 0 2px rgba(255,255,255,.09);
}

html[data-theme="cpc464"] .control-deck::before {
  position: absolute;
  top: 20px;
  left: 27px;
  content: "AMSTRAD  CPC 464";
  color: #e5e3da;
  font: 900 21px/1 Arial, Helvetica, sans-serif;
  letter-spacing: -.04em;
  text-shadow: 0 1px #090a09;
}

html[data-theme="cpc464"] .control-deck::after {
  position: absolute;
  top: 22px;
  right: 27px;
  width: min(290px, 27%);
  height: 8px;
  content: "";
  background: linear-gradient(90deg, #c7483a 0 25%, #d69b36 25% 50%, #4f9b51 50% 75%, #3e65a0 75%);
  box-shadow: 0 11px 0 -3px #858880;
}

html[data-theme="cpc464"] .deck-module {
  position: relative;
  padding: 18px clamp(12px, 1.4vw, 21px) 22px;
  border: 2px solid #111210;
  border-radius: 5px;
  background: #1a1c1a;
  box-shadow: inset 0 3px 12px #0b0c0b, 0 1px #555852;
}

html[data-theme="cpc464"] .module-heading {
  color: #deddd5;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

html[data-theme="cpc464"] .module-heading small { color: #8f938c; }

html[data-theme="cpc464"] .deck-key,
html[data-theme="cpc464"] .small-key,
html[data-theme="cpc464"] .wide-key {
  border: 2px solid #090a09;
  border-radius: 3px;
  color: #e3e1d8;
  background: linear-gradient(#4b4e4a, #2c2f2c 55%, #222422 56%);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 4px 0 #090a09, 0 5px 5px rgba(0,0,0,.36);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

html[data-theme="cpc464"] .deck-key:hover,
html[data-theme="cpc464"] .small-key:hover,
html[data-theme="cpc464"] .wide-key:hover {
  color: #fff;
  background: linear-gradient(#5b5e59, #373a37 55%, #2a2c2a 56%);
}

html[data-theme="cpc464"] .deck-key:active,
html[data-theme="cpc464"] .small-key:active,
html[data-theme="cpc464"] .wide-key:active { box-shadow: inset 0 1px rgba(255,255,255,.1), 0 1px #090a09; }

html[data-theme="cpc464"] #reset { background: linear-gradient(#c95b50, #913930 55%, #702c26 56%); }
html[data-theme="cpc464"] #fitScreen { background: linear-gradient(#68a562, #426c3e 55%, #345530 56%); }
html[data-theme="cpc464"] #expansion { background: linear-gradient(#6280aa, #405879 55%, #31445e 56%); }
html[data-theme="cpc464"] .key-icon,
html[data-theme="cpc464"] .deck-key small { color: #f0eee6; }

html[data-theme="cpc464"] .media-slot {
  border: 2px solid #090a09;
  border-radius: 3px;
  background: #111311;
  box-shadow: inset 0 2px 8px #050605, 0 1px #444742;
}

html[data-theme="cpc464"] .cassette-window {
  border: 2px solid #080908;
  border-radius: 3px;
  color: #d4a84e;
  background: linear-gradient(#0b0c0b, #202220);
}

html[data-theme="cpc464"] .cassette-window i { border-color: #858980; }
html[data-theme="cpc464"] .snapshot-window span { color: #78c873; }
html[data-theme="cpc464"] .media-copy strong { color: #e4e2da; }
html[data-theme="cpc464"] .media-copy span { color: #8f938c; }

html[data-theme="cpc464"] .toggle-track {
  border: 2px solid #080908;
  border-radius: 2px;
  background: #101210;
  box-shadow: inset 0 2px 5px #050605, 0 1px #444742;
}

html[data-theme="cpc464"] .toggle-track i { border-radius: 1px; background: #72766f; }
html[data-theme="cpc464"] .toggle-control input:checked + .toggle-track i { background: #d69b36; }
html[data-theme="cpc464"] .toggle-control strong { color: #deddd5; }
html[data-theme="cpc464"] .toggle-control small { color: #858981; }

html[data-theme="cpc464"] .input-readout {
  border: 2px solid #080908;
  border-radius: 2px;
  color: #8ed884;
  background: #0a100a;
  box-shadow: inset 0 0 10px #020402;
}

html[data-theme="cpc464"] .rotary {
  border: 3px solid #111210;
  background: repeating-conic-gradient(#74776f 0 3deg, #3d403c 3deg 7deg);
  box-shadow: 0 4px #0a0b0a, inset 0 0 0 5px #242624, inset 0 1px 3px #a7a9a2;
}

html[data-theme="cpc464"] .rotary::after { background: radial-gradient(circle at 38% 30%, #81847c, #353835 65%, #181a18); }
html[data-theme="cpc464"] .dial-row label span { color: #959990; }
html[data-theme="cpc464"] .dial-row label strong { color: #e0ad50; }
html[data-theme="cpc464"] #screenScale { background: #070807; }
html[data-theme="cpc464"] .color-mode-key.active { background: linear-gradient(#67a861, #426d3e 55%, #345630 56%); }
html[data-theme="cpc464"] .display-dial-bank { right: 40px; bottom: 16px; border: 2px solid #111210; background: #252825; box-shadow: inset 0 2px 8px #101210, 0 1px #666962; }

html[data-theme="cpc464"] .cpc464-keyboard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 285px);
  gap: 20px;
  padding: 18px 22px 25px;
  border-right: 4px solid #101110;
  border-left: 4px solid #101110;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 7%, transparent 93%, rgba(0,0,0,.16)),
    #242624;
  box-shadow: inset 0 -4px #121312;
}

html[data-theme="cpc464"] .cpc464-keyboard[data-keyboard-open="false"] {
  grid-template-columns: 1fr;
}

html[data-theme="cpc464"] .cpc-keyboard-bar {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 34px;
  padding: 0 3px 6px;
  color: #9da098;
  font: 800 8px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .cpc-keyboard-bar button {
  min-width: 128px;
  min-height: 30px;
  padding: 5px 12px;
  border: 2px solid #080908;
  border-radius: 3px;
  color: #e6e4dc;
  background: linear-gradient(#555853, #303330 58%, #252725 59%);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 3px #080908;
  cursor: pointer;
  font: 800 8px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .cpc-keyboard-bar button:hover { color: #fff; background: linear-gradient(#676a64, #3a3d39 58%, #2b2e2b 59%); }
html[data-theme="cpc464"] .cpc-keyboard-bar button:active { transform: translateY(2px); box-shadow: 0 1px #080908; }

html[data-theme="cpc464"] .cpc464-keybed[hidden] {
  display: none !important;
}

html[data-theme="cpc464"] .cpc464-tape-deck[hidden] {
  display: none !important;
}

html[data-theme="cpc464"] .cpc464-keybed {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 3px solid #0c0d0c;
  border-radius: 6px;
  background: #151715;
  box-shadow: inset 0 4px 15px #080908, 0 1px #4d504b;
}

html[data-theme="cpc464"] .cpc-key-row {
  display: flex;
  gap: clamp(3px, .45vw, 7px);
  min-width: 0;
}

html[data-theme="cpc464"] .cpc-key {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  min-height: 35px;
  padding: 4px 2px;
  place-items: center;
  border: 2px solid #080908;
  border-radius: 3px;
  color: #e3e1d8;
  background: linear-gradient(#484b48, #2b2e2b 56%, #202220 57%);
  box-shadow: inset 0 1px rgba(255,255,255,.12), 0 4px 0 #080908;
  cursor: pointer;
  font: 800 clamp(6px, .63vw, 9px)/1 Arial, Helvetica, sans-serif;
  touch-action: none;
  user-select: none;
}

html[data-theme="cpc464"] .cpc-key:hover { color: #fff; filter: brightness(1.12); }
html[data-theme="cpc464"] .cpc-key.active {
  transform: translateY(3px);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 1px 0 #080908;
  filter: brightness(1.18);
}
html[data-theme="cpc464"] .cpc-key.latched {
  color: #fff7cf;
  outline: 2px solid #d69b36;
  outline-offset: -3px;
  box-shadow: inset 0 0 9px rgba(214,155,54,.55), 0 4px 0 #080908;
}

html[data-theme="cpc464"] .cpc-key-wide { flex-grow: 1.65; }
html[data-theme="cpc464"] .cpc-key-space { flex-grow: 8; }
html[data-theme="cpc464"] .cpc-key-row-space { padding-inline: 4%; }
html[data-theme="cpc464"] .cpc-key-red { background: linear-gradient(#c9584d, #8e352d 56%, #6d2923 57%); }
html[data-theme="cpc464"] .cpc-key-blue { background: linear-gradient(#607fa9, #3e5678 56%, #30445f 57%); }
html[data-theme="cpc464"] .cpc-key-green { background: linear-gradient(#679e61, #3f673b 56%, #33542f 57%); }

html[data-theme="cpc464"] .cpc464-tape-deck {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-content: start;
  padding: 14px;
  border: 3px solid #0c0d0c;
  border-radius: 6px;
  background: #171917;
  box-shadow: inset 0 4px 15px #080908, 0 1px #4d504b;
}

html[data-theme="cpc464"] .tape-deck-heading {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  color: #b6b9b1;
  font: 800 9px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
}

html[data-theme="cpc464"] .tape-deck-heading span {
  overflow: hidden;
  flex: 1;
  margin-left: 10px;
  color: #777b74;
  font-size: 7px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="cpc464"] .tape-deck-heading button {
  margin: -4px 0 -3px 8px;
  padding: 3px 6px;
  border: 1px solid #080908;
  border-radius: 2px;
  color: #b8bbb3;
  background: #303330;
  cursor: pointer;
  font: 800 6px/1 Arial, Helvetica, sans-serif;
}

html[data-theme="cpc464"] .tape-door {
  position: relative;
  grid-column: 1 / -1;
  height: 92px;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 3px solid #080908;
  border-radius: 4px;
  background: linear-gradient(155deg, #0b0c0b, #242624 58%, #121412);
  box-shadow: inset 0 0 13px #000, 0 1px #4a4d48;
  cursor: pointer;
}

html[data-theme="cpc464"] .tape-door:hover { filter: brightness(1.08); }

html[data-theme="cpc464"] .tape-label {
  position: absolute;
  top: 10px;
  left: 50%;
  overflow: hidden;
  width: calc(100% - 28px);
  color: #b0b3ab;
  font: 800 8px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .15em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

html[data-theme="cpc464"] .tape-reels {
  position: absolute;
  top: 30px;
  left: 50%;
  display: flex;
  gap: 22px;
  align-items: center;
  transform: translateX(-50%);
}

html[data-theme="cpc464"] .tape-reels i {
  width: 33px;
  height: 33px;
  border: 7px dotted #777b73;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #111311;
}

html[data-theme="cpc464"] .cpc464-tape-deck.tape-running .tape-reels i:first-child {
  animation: tape-reel-spin .72s linear infinite;
}

html[data-theme="cpc464"] .cpc464-tape-deck.tape-running .tape-reels i:last-child {
  animation: tape-reel-spin-reverse .72s linear infinite;
}

html[data-theme="cpc464"] .tape-reels b { width: 20px; height: 8px; background: #8d9088; clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%); }

html[data-theme="cpc464"] .tape-window-line {
  position: absolute;
  right: 28px;
  bottom: 12px;
  left: 28px;
  height: 2px;
  background: #454842;
}

html[data-theme="cpc464"] .tape-counter {
  padding: 6px 8px;
  border: 2px solid #080908;
  color: #171817;
  background: #cac8bc;
  font: 800 11px/1 "Courier New", monospace;
  text-align: right;
}

html[data-theme="cpc464"] .tape-transport {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

html[data-theme="cpc464"] .tape-transport button {
  display: grid;
  min-height: 29px;
  padding: 3px;
  place-items: center;
  border: 2px solid #080908;
  border-radius: 2px;
  color: #b8bbb3;
  background: linear-gradient(#464946, #292c29 58%, #202220 59%);
  box-shadow: 0 3px #080908;
  cursor: pointer;
  font: 800 6px/1 Arial, Helvetica, sans-serif;
}

html[data-theme="cpc464"] .tape-transport button:first-child { color: #f2d4d0; background: linear-gradient(#a54a42, #692f2a); }
html[data-theme="cpc464"] .tape-transport button:not(:disabled):active,
html[data-theme="cpc464"] .tape-transport button.active {
  transform: translateY(2px);
  color: #fff4ca;
  background: linear-gradient(#686c66, #3c403b 58%, #30332f 59%);
  box-shadow: 0 1px #080908, inset 0 0 7px rgba(214,155,54,.35);
}

@keyframes tape-reel-spin { to { transform: rotate(360deg); } }
@keyframes tape-reel-spin-reverse { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
  html[data-theme="cpc464"] .cpc464-tape-deck.tape-running .tape-reels i {
    animation: none;
  }
}

html[data-theme="cpc464"] .receiver-footer {
  padding: 12px 26px 15px;
  border: 4px solid #101110;
  border-top: 1px solid #4b4e49;
  border-radius: 0 0 16px 16px;
  color: #858980;
  background: #202220;
  box-shadow: 0 24px 45px rgba(0,0,0,.52), inset 0 -4px #111210;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

html[data-theme="cpc464"] .toast {
  border: 3px solid #151715;
  border-radius: 2px;
  color: #f0eee5;
  background: rgba(52,55,52,.97);
  box-shadow: 0 10px 30px #000, inset 0 0 0 1px #74776f;
}

html[data-theme="cpc464"] .ml-monitor {
  position: absolute;
  z-index: 60;
  top: 50%;
  right: 0;
  display: block;
  width: 0;
  height: min(850px, calc(100vh - 36px));
  color: #d9ddd3;
  font-family: "Courier New", ui-monospace, monospace;
  transform: translate(100%, -50%);
  transition: width .22s ease;
}

html[data-theme="cpc464"] body > .ml-monitor { visibility: hidden; }
html[data-theme="cpc464"] .screen-stage > .ml-monitor { visibility: visible; }

html[data-theme="cpc464"] .ml-monitor[data-open="true"] {
  width: min(370px, calc(100vw - 52px));
}

html[data-theme="cpc464"] .ml-monitor-toggle {
  position: absolute;
  top: 50%;
  right: 100%;
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 34px;
  min-height: 132px;
  padding: 10px 7px;
  border: 3px solid #0a0b0a;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  color: #c6cac0;
  background: linear-gradient(90deg, #222522, #3f423e 48%, #292b29 49%);
  box-shadow: inset 1px 0 rgba(255,255,255,.13), -5px 7px 16px rgba(0,0,0,.38);
  cursor: pointer;
  font: 800 8px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
}

html[data-theme="cpc464"] .ml-monitor-toggle span {
  color: #151715;
  background: #d69b36;
  padding: 5px 3px;
  box-shadow: 0 0 0 2px #0b0c0b;
}

html[data-theme="cpc464"] .ml-monitor-toggle:hover { color: #fff; filter: brightness(1.12); }
html[data-theme="cpc464"] .ml-monitor[data-open="true"] .ml-monitor-toggle { color: #f0ce83; }

html[data-theme="cpc464"] .ml-monitor-panel {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 13px;
  border: 4px solid #0a0b0a;
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07), transparent 4%, transparent 94%, rgba(0,0,0,.24)),
    linear-gradient(#3d403c, #242724);
  box-shadow: -15px 18px 38px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.13);
  scrollbar-color: #666a63 #161816;
}

html[data-theme="cpc464"] .ml-monitor-panel[hidden] { display: none; }

html[data-theme="cpc464"] .ml-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 57px;
  padding: 10px 12px;
  border: 2px solid #111311;
  border-radius: 4px;
  background: #202320;
  box-shadow: inset 0 2px 9px #0c0d0c, 0 1px #656861;
}

html[data-theme="cpc464"] .ml-monitor-head strong,
html[data-theme="cpc464"] .ml-monitor-head span { display: block; }
html[data-theme="cpc464"] .ml-monitor-head strong { margin-top: 5px; color: #ecebe3; font: 900 17px/1 Arial, Helvetica, sans-serif; letter-spacing: .06em; }
html[data-theme="cpc464"] .ml-kicker { color: #92968e; font: 800 7px/1 Arial, Helvetica, sans-serif; letter-spacing: .15em; text-transform: uppercase; }

html[data-theme="cpc464"] .ml-run-state {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #9edd92;
  font: 800 9px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .1em;
}

html[data-theme="cpc464"] .ml-state-lamp {
  width: 11px;
  height: 11px;
  border: 2px solid #0a0b0a;
  border-radius: 50%;
  background: #67a95f;
  box-shadow: 0 0 8px rgba(103,169,95,.8);
}

html[data-theme="cpc464"] .ml-monitor.paused .ml-run-state { color: #ef8177; }
html[data-theme="cpc464"] .ml-monitor.paused .ml-state-lamp { background: #c7483a; box-shadow: 0 0 9px rgba(199,72,58,.85); }

html[data-theme="cpc464"] .ml-register-bank {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

html[data-theme="cpc464"] .ml-register-bank span {
  padding: 7px 5px 6px;
  border: 2px solid #0a0b0a;
  border-radius: 2px;
  color: #80867e;
  background: #101510;
  box-shadow: inset 0 0 7px #030503;
  font-size: 7px;
  text-align: center;
}

html[data-theme="cpc464"] .ml-register-bank b { display: block; margin-top: 3px; color: #8fe582; font-size: 10px; font-weight: 700; text-shadow: 0 0 6px rgba(116,214,101,.3); }

html[data-theme="cpc464"] .ml-module {
  margin-top: 9px;
  padding: 11px;
  border: 2px solid #101210;
  border-radius: 4px;
  background: #191c19;
  box-shadow: inset 0 2px 11px #0a0b0a, 0 1px #575a54;
}

html[data-theme="cpc464"] .ml-module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #3e423d;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .ml-module-head strong { color: #d9d8d0; font: 900 9px/1 Arial, Helvetica, sans-serif; letter-spacing: .12em; }
html[data-theme="cpc464"] .ml-module-head span { color: #747970; font: 700 6px/1 Arial, Helvetica, sans-serif; letter-spacing: .1em; }

html[data-theme="cpc464"] .ml-transport-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

html[data-theme="cpc464"] .ml-key,
html[data-theme="cpc464"] .ml-action,
html[data-theme="cpc464"] .ml-channel-remove {
  border: 2px solid #080908;
  border-radius: 2px;
  color: #deddd5;
  background: linear-gradient(#50534f, #303330 55%, #252825 56%);
  box-shadow: inset 0 1px rgba(255,255,255,.13), 0 3px #080908;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .ml-key {
  min-width: 0;
  min-height: 47px;
  padding: 6px 2px;
}

html[data-theme="cpc464"] .ml-key b,
html[data-theme="cpc464"] .ml-key small { display: block; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="cpc464"] .ml-key b { font-size: 8px; }
html[data-theme="cpc464"] .ml-key small { margin-top: 6px; color: #9a9e96; font-size: 6px; }
html[data-theme="cpc464"] .ml-key-red { background: linear-gradient(#c55b50, #8d3931 55%, #6a2c27 56%); }
html[data-theme="cpc464"] .ml-key-green { background: linear-gradient(#6a9f64, #456c41 55%, #355432 56%); }
html[data-theme="cpc464"] .ml-key-blue { background: linear-gradient(#647fa5, #435777 55%, #34445d 56%); }
html[data-theme="cpc464"] .ml-key:hover,
html[data-theme="cpc464"] .ml-action:hover,
html[data-theme="cpc464"] .ml-channel-remove:hover { color: #fff; filter: brightness(1.14); }
html[data-theme="cpc464"] .ml-key:active,
html[data-theme="cpc464"] .ml-action:active,
html[data-theme="cpc464"] .ml-channel-remove:active { transform: translateY(2px); box-shadow: 0 1px #080908; }
html[data-theme="cpc464"] .ml-key:disabled,
html[data-theme="cpc464"] .ml-action:disabled { opacity: .32; filter: grayscale(.6); cursor: not-allowed; }

html[data-theme="cpc464"] .ml-readout {
  overflow: auto;
  margin: 10px 0 0;
  padding: 9px;
  border: 2px solid #070907;
  border-radius: 2px;
  color: #91de86;
  background: #071007;
  box-shadow: inset 0 0 11px #010301, 0 1px #3c403a;
  font: 500 9px/1.4 "Courier New", monospace;
  text-shadow: 0 0 5px rgba(104,207,91,.22);
}

html[data-theme="cpc464"] .ml-disassembly { min-height: 162px; white-space: pre; }

html[data-theme="cpc464"] .ml-address-control,
html[data-theme="cpc464"] .ml-watch-entry {
  display: grid;
  grid-template-columns: 34px minmax(80px, 1fr) 34px 52px;
  gap: 6px;
  align-items: end;
}

html[data-theme="cpc464"] .ml-watch-entry { grid-template-columns: 1fr 88px 52px; }

html[data-theme="cpc464"] .ml-address-control label,
html[data-theme="cpc464"] .ml-watch-entry label,
html[data-theme="cpc464"] .ml-byte-editor {
  display: grid;
  gap: 4px;
  color: #858a81;
  font: 800 6px/1 Arial, Helvetica, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

html[data-theme="cpc464"] .ml-address-control input,
html[data-theme="cpc464"] .ml-watch-entry input,
html[data-theme="cpc464"] .ml-byte-editor textarea {
  width: 100%;
  min-height: 31px;
  padding: 6px 7px;
  border: 2px solid #080a08;
  border-radius: 2px;
  color: #a1ed95;
  background: #0a110a;
  box-shadow: inset 0 0 7px #020402;
  font: 700 10px/1 "Courier New", monospace;
  text-transform: none;
}

html[data-theme="cpc464"] .ml-encoder {
  width: 34px;
  height: 34px;
  border: 3px solid #0a0b0a;
  border-radius: 50%;
  color: #eceae1;
  background: repeating-conic-gradient(#74776f 0 5deg, #3e413d 5deg 10deg);
  box-shadow: inset 0 0 0 5px #292c29, 0 3px #080908;
  cursor: pointer;
  font: 900 15px/1 Arial, Helvetica, sans-serif;
}

html[data-theme="cpc464"] .ml-encoder:hover { color: #f0c66e; transform: rotate(8deg); }

html[data-theme="cpc464"] .ml-action {
  min-height: 31px;
  padding: 4px 7px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
}

html[data-theme="cpc464"] .ml-snapshot-breaks {
  min-height: 24px;
  color: #dcebd8;
  background: linear-gradient(#668161, #40543c 55%, #30402d 56%);
}

html[data-theme="cpc464"] .ml-snapshot-breaks[aria-pressed="false"] {
  color: #999c95;
  background: linear-gradient(#494c48, #2b2e2b 55%, #222422 56%);
}

html[data-theme="cpc464"] .ml-channel-list { display: grid; gap: 4px; margin-top: 9px; }
html[data-theme="cpc464"] .ml-empty { padding: 7px; color: #666b63; font-size: 7px; text-align: center; text-transform: uppercase; }

html[data-theme="cpc464"] .ml-channel {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 7px;
  align-items: center;
  min-height: 29px;
  padding: 4px 5px 4px 7px;
  border: 1px solid #080a08;
  color: #bfc2b9;
  background: #111411;
  font-size: 8px;
}

html[data-theme="cpc464"] .ml-channel i { width: 7px; height: 7px; border: 1px solid #050605; border-radius: 50%; background: #d69b36; box-shadow: 0 0 5px rgba(214,155,54,.65); }
html[data-theme="cpc464"] .ml-channel.hit { outline: 1px solid #c7483a; outline-offset: -2px; }
html[data-theme="cpc464"] .ml-channel.hit i { background: #c7483a; box-shadow: 0 0 7px rgba(199,72,58,.9); }
html[data-theme="cpc464"] .ml-channel b { overflow: hidden; color: #d8d8d0; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="cpc464"] .ml-channel code { color: #8fdc84; }
html[data-theme="cpc464"] .ml-channel-remove { min-width: 24px; min-height: 21px; padding: 2px 4px; font-size: 7px; }

html[data-theme="cpc464"] .ml-write-log { max-height: 105px; min-height: 62px; color: #e3c879; white-space: pre-wrap; }
html[data-theme="cpc464"] .ml-memory-control { grid-template-columns: 34px minmax(72px, 1fr) 34px 58px 48px; }
html[data-theme="cpc464"] .ml-memory-dump { min-height: 92px; white-space: pre; }
html[data-theme="cpc464"] .ml-byte-editor { margin-top: 9px; }
html[data-theme="cpc464"] .ml-byte-editor textarea { min-height: 56px; resize: vertical; line-height: 1.4; }
html[data-theme="cpc464"] .ml-write-action { width: 100%; margin-top: 7px; color: #f1ddd9; background: linear-gradient(#a85249, #73372f 55%, #5b2c27 56%); }

html[data-theme="cpc464"] .ml-monitor-message {
  min-height: 32px;
  margin-top: 9px;
  padding: 9px 10px;
  border: 2px solid #111311;
  color: #bbbeb5;
  background: #202320;
  font-size: 8px;
  line-height: 1.35;
}
html[data-theme="cpc464"] .ml-monitor-message.error { color: #ef9b91; }

@media (max-width: 1859px) {
  html[data-theme="cpc464"] .ml-monitor[data-open="true"] {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
  }
}

@media (max-width: 1180px) {
  html[data-theme="cpc464"] .receiver-top,
  html[data-theme="cpc464"] .screen-stage { width: 94%; }
  html[data-theme="cpc464"] .screen-stage { padding: 44px 32px 94px; }
  html[data-theme="cpc464"] .screen-brand { bottom: 17px; width: 80px; }
  html[data-theme="cpc464"] .screen-build-info { bottom: 4px; }
  html[data-theme="cpc464"] .control-deck { grid-template-columns: .8fr 1.5fr 1.15fr; }
  html[data-theme="cpc464"] .screen-module { grid-column: 1 / -1; }
  html[data-theme="cpc464"] .cpc464-keyboard { grid-template-columns: minmax(0, 1fr) 245px; }
}

@media (max-width: 820px) {
  html[data-theme="cpc464"] .receiver-top { grid-template-columns: 1fr 1fr; }
  html[data-theme="cpc464"] .display-panel { grid-column: 1 / -1; grid-row: 2; }
  html[data-theme="cpc464"] .screen-stage { padding: 43px 18px 84px; }
  html[data-theme="cpc464"] .screen-stage::before { left: 22px; }
  html[data-theme="cpc464"] .screen-stage::after { right: 22px; }
  html[data-theme="cpc464"] .screen-frame { padding: 16px 17px 13px; }
  html[data-theme="cpc464"] .control-deck { grid-template-columns: 1fr 1fr; }
  html[data-theme="cpc464"] .media-module { grid-column: 1 / -1; grid-row: 1; }
  html[data-theme="cpc464"] .cpc464-keyboard { grid-template-columns: 1fr; }
  html[data-theme="cpc464"] .cpc464-tape-deck { grid-template-columns: 1fr auto; }
  html[data-theme="cpc464"] .cpc-key { min-height: 30px; font-size: 6px; }
}

@media (max-width: 560px) {
  html[data-theme="cpc464"] .masthead { align-items: flex-start; }
  html[data-theme="cpc464"] .receiver-top,
  html[data-theme="cpc464"] .screen-stage { width: 100%; }
  html[data-theme="cpc464"] .receiver-top { grid-template-columns: 1fr; padding: 18px 15px 14px; border-radius: 14px 14px 0 0; }
  html[data-theme="cpc464"] .display-panel,
  html[data-theme="cpc464"] .activity-bank { grid-column: 1; grid-row: auto; }
  html[data-theme="cpc464"] .screen-stage { padding: 39px 9px 145px; border-radius: 0 0 11px 11px; }
  html[data-theme="cpc464"] .screen-stage::before { top: 13px; left: 15px; font-size: 15px; }
  html[data-theme="cpc464"] .screen-stage::after { top: 15px; right: 14px; font-size: 7px; }
  html[data-theme="cpc464"] .screen-brand { bottom: 91px; left: 17px; width: 54px; }
  html[data-theme="cpc464"] .screen-build-info { bottom: 78px; left: 17px; font-size: 6px; }
  html[data-theme="cpc464"] .display-dial-bank { right: 50%; bottom: 12px; transform: translateX(50%); }
  html[data-theme="cpc464"] .screen-frame { padding: 9px; border-radius: 8px; }
  html[data-theme="cpc464"] .screen-glass { border-width: 4px; border-radius: 6% / 5%; }
  html[data-theme="cpc464"] .control-deck { grid-template-columns: 1fr; padding: 54px 10px 12px; }
  html[data-theme="cpc464"] .control-deck::before { top: 19px; left: 16px; font-size: 16px; }
  html[data-theme="cpc464"] .control-deck::after { top: 22px; right: 15px; width: 31%; height: 6px; }
  html[data-theme="cpc464"] .media-module { grid-column: auto; grid-row: auto; }
  html[data-theme="cpc464"] .cpc464-keyboard { padding: 10px 10px 16px; }
  html[data-theme="cpc464"] .cpc464-keybed { overflow-x: auto; }
  html[data-theme="cpc464"] .cpc-key-row { min-width: 620px; }
  html[data-theme="cpc464"] .tape-deck-heading span { display: inline; }
  html[data-theme="cpc464"] .ml-monitor { height: calc(100vh - 16px); }
  html[data-theme="cpc464"] .ml-monitor[data-open="true"] { width: calc(100vw - 42px); }
  html[data-theme="cpc464"] .ml-register-bank { grid-template-columns: repeat(2, 1fr); }
  html[data-theme="cpc464"] .ml-transport-keys { grid-template-columns: repeat(3, 1fr); }
}
