.laptop-hardware {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform-origin: 50% 50%;
  transform: translateY(var(--laptop-shift, 0px)) scale(var(--laptop-scale, .7));
}
.laptop-lid {
  position: absolute;
  left: calc(-1 * var(--laptop-bezel));
  top: calc(var(--laptop-crop) - var(--laptop-top-bezel));
  width: calc(100% + var(--laptop-bezel) * 2);
  height: calc(var(--laptop-screen-height) + var(--laptop-bezel) + var(--laptop-top-bezel));
  border: var(--laptop-bezel) solid #090a0e;
  border-top-width: var(--laptop-top-bezel);
  border-top-left-radius: calc(var(--laptop-screen-radius) + var(--laptop-bezel)) calc(var(--laptop-screen-radius) + var(--laptop-top-bezel));
  border-top-right-radius: calc(var(--laptop-screen-radius) + var(--laptop-bezel)) calc(var(--laptop-screen-radius) + var(--laptop-top-bezel));
  border-bottom-left-radius: calc(var(--laptop-screen-radius) + var(--laptop-bezel));
  border-bottom-right-radius: calc(var(--laptop-screen-radius) + var(--laptop-bezel));
  outline: 1px solid #50535b;
  box-shadow: 0 16px 32px #0008;
}
.laptop-camera {
  position: absolute;
  top: calc(var(--laptop-crop) - var(--laptop-top-bezel) * .65);
  left: calc(50% - var(--laptop-bezel) * .165);
  width: calc(var(--laptop-bezel) * .33); height: calc(var(--laptop-bezel) * .33);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #46617a, #08090d 65%);
  border: calc(var(--laptop-bezel) * .06) solid #333640;
}
.laptop-mark { position: absolute; top: calc(var(--laptop-crop) + var(--laptop-screen-height) + var(--laptop-bezel) * .08); left: calc(50% - var(--laptop-device-width) * .014); width: calc(var(--laptop-device-width) * .028); opacity: .6; }
.laptop-hinge {
  position: absolute;
  left: 0; width: 100%; height: calc(var(--laptop-bezel) * .75);
  top: calc(var(--laptop-crop) + var(--laptop-screen-height) + var(--laptop-bezel) * .7);
  border-radius: calc(var(--laptop-bezel) * .25);
  background: linear-gradient(#08090c, #363941 38%, #17191f 70%, #08090c);
}
.laptop-deck {
  position: absolute;
  top: calc(var(--laptop-crop) + var(--laptop-screen-height) + var(--laptop-bezel));
  left: calc((100% - var(--laptop-deck-width)) / 2);
  width: var(--laptop-deck-width); height: var(--laptop-deck-surface-height);
  transform-origin: 50% 0;
  transform: perspective(var(--laptop-deck-perspective)) rotateX(var(--laptop-deck-angle));
  border: 1px solid #666a73;
  border-radius: calc(var(--laptop-screen-radius) * .5) calc(var(--laptop-screen-radius) * .5) calc(var(--laptop-screen-radius) * 1.5) calc(var(--laptop-screen-radius) * 1.5);
  background:
    linear-gradient(105deg, #191c22, #494d57 19%, #363a43 48%, #454951 80%, #191c22);
  box-shadow: inset 0 2px 1px #ffffff1c, inset 0 -2px 1px #08090db3;
}
.laptop-deck::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(to bottom, #9333ea1a, transparent 32%),
    radial-gradient(ellipse at 26% 0, #d946ef12, transparent 60%);
}
.laptop-keyboard {
  position: absolute; top: 6%; left: 8%; width: 84%; height: 57%;
  display: flex; flex-direction: column; gap: 4px; padding: 4px;
  border: 1px solid #101217; border-radius: 7px; background: #111318;
  box-shadow: inset 0 2px 4px #0009, 0 1px 0 #ffffff10;
}
.laptop-key-row { display: flex; flex: 1 1 0; gap: 4px; min-height: 0; }
.laptop-key-row.function-row { flex: .68 1 0; }
.laptop-key, .laptop-arrow-pair > span {
  position: relative; display: grid; place-items: center; min-width: 0; min-height: 0;
  border: 1px solid #090a0e; border-radius: 3px;
  background: linear-gradient(175deg, #2a2d35, #191c23 58%, #12151b);
  color: #b7bbc4;
  box-shadow: inset 0 1px 0 #ffffff16, inset 0 -2px 0 #050609, 0 1px 1px #0008;
  font: 500 clamp(4px, .65vw, 9px)/1.05 Arial, sans-serif;
}
.function-row .laptop-key { font-size: clamp(3px, .46vw, 7px); color: #a6aab4; }
.modifier-key .key-legend { align-self: end; justify-self: start; margin: 0 10% 15%; font-size: .8em; white-space: nowrap; }
.dual-legend .key-legend { position: absolute; bottom: 14%; left: 43%; }
.dual-legend small { position: absolute; top: 12%; left: 43%; font: inherit; font-size: .85em; color: #9399a6; }
.power-key { background: linear-gradient(#1b1d24, #0a0c10); border-radius: 5px; }
.laptop-key svg, .laptop-arrow-pair svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.laptop-arrow-pair { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.laptop-arrow-pair > span { flex: 1 1 0; }
.laptop-key.half-arrow { align-self: end; height: calc(50% - 1px); }
.laptop-trackpad {
  position: absolute; left: 33%; top: 69%; width: 34%; height: 24%;
  border: 1px solid #171a21; border-radius: 5px;
  background: linear-gradient(110deg, #3e424b, #41454e 50%, #393d46);
  box-shadow: 0 1px 0 #ffffff18, inset 0 1px 1px #0004;
}
.laptop-speaker { position: absolute; top: 9%; width: 3.2%; height: 52%; background: radial-gradient(circle, #080a0e .65px, transparent .9px) 0 0 / 3px 3px; opacity: .85; }
.laptop-speaker.left { left: 2.5%; }
.laptop-speaker.right { right: 2.5%; }
.laptop-front {
  position: absolute;
  left: calc((100% - var(--laptop-front-width)) / 2);
  width: var(--laptop-front-width); height: max(5px, calc(var(--laptop-device-width) * .008));
  top: calc(var(--laptop-crop) + var(--laptop-screen-height) + var(--laptop-bezel) + var(--laptop-deck-height) - 1px);
  border-radius: 0 0 8px 8px / 0 0 4px 4px;
  background: linear-gradient(#747984, #343840 36%, #171a21 78%, #0b0d12);
  box-shadow: 0 14px 22px #000a;
}
.laptop-front::after { content: ''; position: absolute; top: 0; left: 43%; width: 14%; height: 40%; border-radius: 0 0 5px 5px; background: #20242c; box-shadow: inset 0 -1px 0 #ffffff08; }
