/* ============================================================
   ZENOX DSC-100 — a 1998 digital camera simulator
   Desk scene + camera body + PC overlay. No external assets.
   ============================================================ */

:root {
  --desk-w1: #4a3626;
  --desk-w2: #2e2115;
  --plastic-hi: #e6e9ec;
  --plastic-1: #c3c8cc;
  --plastic-2: #a7adb2;
  --plastic-3: #8b9197;
  --plastic-4: #6f767c;
  --grip-1: #3c4045;
  --grip-2: #24272b;
  --lcd-off: #10130f;
  --amber: #ffb64c;
  --amber-dim: #7a5316;
  --ok-green: #7fe07f;
  --paper: #e9e2cf;
  --paper-ink: #37311f;
  --win-face: #c9c0b4;
  --win-dark: #40425a;
  --cam-scale: 1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Chicago", "Charcoal", "Geneva", "MS Sans Serif", "Tahoma", Verdana, sans-serif;
  color: #e8e2d2;
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(255, 230, 180, 0.16), transparent 70%),
    radial-gradient(900px 700px at 70% 120%, rgba(0,0,0,0.55), transparent 70%),
    linear-gradient(180deg, var(--desk-w1) 0%, var(--desk-w2) 78%, #1c1610 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* faint wood grain + noise over the desk */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(94deg, rgba(0,0,0,0.09) 0 2px, transparent 2px 7px, rgba(255,255,255,0.02) 7px 9px, transparent 9px 26px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.05'/></svg>");
  mix-blend-mode: overlay;
  z-index: 0;
}

/* ---------- top marquee ---------- */

#marquee {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 16px 6px;
  flex-wrap: wrap;
}

#marquee .plaque {
  background: linear-gradient(180deg, #d9c284, #8a6f37);
  color: #241b06;
  border: 1px solid #5c4a1e;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.5);
  padding: 6px 16px;
  font-weight: bold;
  letter-spacing: 0.14em;
  font-size: 13px;
  text-transform: uppercase;
}

#marquee .plaque small {
  display: block;
  font-weight: normal;
  letter-spacing: 0.08em;
  font-size: 9px;
  opacity: 0.75;
}

/* ---------- stage layout ---------- */

#stage {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 26px;
  padding: 12px 16px 60px;
  flex-wrap: wrap;
}

#side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 252px;
  flex: 0 0 252px;
  margin-top: 26px;
}

.card {
  position: relative;
  border-radius: 3px;
  padding: 12px 12px 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.4);
}

.card.paper {
  background: linear-gradient(175deg, #f3ecd8, var(--paper) 60%, #ddd3b8);
  color: var(--paper-ink);
  transform: rotate(-0.7deg);
}

.card.paper::after {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  width: 46px; height: 14px;
  transform: translateX(-50%) rotate(-1deg);
  background: rgba(210,200,175,0.75);
  border: 1px solid rgba(120,110,80,0.25);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card h3 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  border-bottom: 1px solid rgba(55,49,31,0.35);
  padding-bottom: 5px;
  letter-spacing: 0.03em;
}

.card p, .card li {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12.5px;
  line-height: 1.42;
  margin: 5px 0;
}

.card ul { margin: 4px 0 4px; padding-left: 17px; }
.card .fine { font-size: 10.5px; opacity: 0.72; font-style: italic; }
kbd {
  font-family: "Chicago", "Charcoal", monospace;
  font-size: 10px;
  background: #fffbe9;
  border: 1px solid #a89c78;
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0 4px;
}

/* location picker */
.card.locator {
  background: linear-gradient(180deg, #3a3f45, #23262b);
  border: 1px solid #14161a;
  transform: rotate(0.6deg);
  color: #d8dce0;
}

.card.locator h3 { border-color: rgba(255,255,255,0.18); }

.loc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }

.loc-btn {
  appearance: none;
  border: 1px solid #0e1013;
  background: linear-gradient(180deg, #596069, #3a3f47);
  color: #e7ebef;
  border-radius: 3px;
  padding: 8px 4px 7px;
  font: inherit;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 2px 3px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.loc-btn .swatch {
  width: 100%;
  height: 34px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.5);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.35);
}

.loc-btn[data-scene="backyard"] .swatch { background: linear-gradient(180deg, #7db7e8 0%, #a8d06a 55%, #5a8a3a 100%); }
.loc-btn[data-scene="downtown"] .swatch { background: linear-gradient(180deg, #10142e 0%, #232a55 45%, #0b0d1c 46%, #14161f 100%); }
.loc-btn[data-scene="livingroom"] .swatch { background: linear-gradient(180deg, #4a3a52 0%, #8a6a4a 60%, #3a2c22 100%); }

.loc-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #ffd98a, #d8a03c);
  color: #241b06;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4), 0 0 10px rgba(255,190,80,0.45);
}

/* utilities row */
#utilities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.util-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #f2e9d8;
  background: linear-gradient(180deg, #5c5346, #38322a);
  border: 1px solid #191512;
  border-radius: 3px;
  padding: 7px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 4px rgba(0,0,0,0.45);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.util-btn:hover { filter: brightness(1.12); }
.util-btn:active { transform: translateY(1px); }
.util-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #87b06a, #4c6b38);
}

.util-btn svg { width: 13px; height: 13px; fill: currentColor; }

/* ---------- CAMERA ---------- */

#camera-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-top: 10px;
}

#camera {
  position: relative;
  width: 792px;
  height: 596px;
  transform-origin: 50% 30%;
  transform: scale(var(--cam-scale));
  filter: drop-shadow(0 26px 26px rgba(0,0,0,0.5));
  perspective: 1400px;
}

#camera .cam-3d {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(11deg) rotateY(-4deg);
}

/* --- rear face (the big panel with LCD) --- */
#cam-rear {
  position: absolute;
  left: 22px; right: 22px; top: 86px; bottom: 0;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 22%),
    linear-gradient(180deg, var(--plastic-1), var(--plastic-2) 55%, var(--plastic-3));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -2px 2px rgba(0,0,0,0.28),
    inset 2px 0 2px rgba(255,255,255,0.28),
    inset -2px 0 3px rgba(0,0,0,0.22),
    0 3px 0 #62686e, 0 6px 0 #4d5257, 0 9px 14px rgba(0,0,0,0.4);
  padding: 16px;
}

/* rubber grip strips */
#cam-rear::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 14px;
  border-radius: 8px 0 0 8px;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.35) 0 3px, transparent 3px 7px),
    linear-gradient(90deg, var(--grip-2), var(--grip-1) 60%, var(--grip-2));
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.08);
}

/* brand printing */
.brandline {
  position: absolute;
  left: 30px;
  bottom: 10px;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.22em;
  color: #5b6167;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.brandline small {
  font-weight: normal;
  letter-spacing: 0.08em;
  font-size: 8.5px;
  color: #6d747a;
}

.screw {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d7dbdf, #7c8288 60%, #565c62);
  box-shadow: inset 0 0 1px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.4);
}
.screw::after {
  content: "";
  position: absolute;
  left: 1.5px; right: 1.5px; top: 50%;
  height: 1.5px;
  background: rgba(20,22,25,0.8);
  transform: rotate(38deg);
}
.screw.s1 { left: 24px; top: 96px; }
.screw.s2 { right: 24px; top: 96px; }
.screw.s3 { left: 24px; bottom: 26px; }
.screw.s4 { right: 24px; bottom: 26px; }

/* --- LCD --- */
#lcd-unit {
  position: absolute;
  left: 34px; top: 22px;
  width: 500px;
  border-radius: 6px;
  background: linear-gradient(180deg, #14161a, #0b0c0f);
  padding: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 2px rgba(0,0,0,0.9),
    0 1px 0 rgba(255,255,255,0.5);
}

#lcd-frame {
  position: relative;
  width: 480px;
  height: 360px;
  background: var(--lcd-off);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 14px rgba(0,0,0,0.95);
}

#lcd {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: crosshair;
  touch-action: none;
}

/* LCD glass: reflection + faint rgb grid */
#lcd-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 18%, transparent 34%),
    repeating-linear-gradient(90deg, rgba(255,0,60,0.028) 0 1px, rgba(0,255,90,0.028) 1px 2px, rgba(40,90,255,0.028) 2px 3px);
}

#lcd-unit .lcd-caption {
  text-align: center;
  margin-top: 6px;
  color: #6d757d;
  font-size: 8.5px;
  letter-spacing: 0.28em;
}

/* --- rear control cluster --- */
#rear-controls {
  position: absolute;
  right: 22px; top: 30px; bottom: 44px;
  width: 186px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px 10px;
  align-items: center;
  justify-items: center;
}

/* zoom rocker */
#zoom-rocker {
  grid-column: 1 / 3;
  width: 74px;
  height: 84px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--plastic-2), var(--plastic-3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -2px 3px rgba(0,0,0,0.3), 0 2px 3px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#zoom-rocker button {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: #3f454b;
  font: inherit;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

#zoom-rocker button:hover { background: rgba(255,255,255,0.25); }
#zoom-rocker button:active { background: rgba(0,0,0,0.18); }

#zoom-rocker .zoom-t { border-bottom: 1px solid rgba(0,0,0,0.25); }
#zoom-rocker .zoom-label {
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: #565c62;
  padding: 1px 0;
}

/* round buttons */
.rbtn {
  appearance: none;
  cursor: pointer;
  width: 62px;
  height: 46px;
  border-radius: 23px;
  border: 1px solid #55595f;
  background: linear-gradient(180deg, var(--plastic-hi), var(--plastic-2) 70%, var(--plastic-3));
  box-shadow: inset 0 1px 0 #fff, 0 3px 2px rgba(0,0,0,0.4), 0 5px 5px rgba(0,0,0,0.22);
  color: #43484d;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.05em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: bold;
}

.rbtn:hover { filter: brightness(1.05); }
.rbtn:active, .rbtn.pressed {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.5);
}
.rbtn svg { width: 15px; height: 15px; fill: currentColor; }
.rbtn .glyph { font-size: 15px; line-height: 1; font-family: Georgia, serif; }

.rbtn.play { color: #1f5c26; }
.rbtn.menu { color: #3c4146; }
.rbtn.delete { color: #7c2020; }
.rbtn.info { color: #2c4a6b; }
.rbtn.flashq { color: #6b5314; }

/* 4-way pad */
#dpad {
  position: relative;
  width: 128px;
  height: 128px;
  grid-column: 1 / 3;
  justify-self: center;
}

#dpad .pad-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--plastic-2), var(--plastic-4));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -3px 5px rgba(0,0,0,0.4), 0 4px 4px rgba(0,0,0,0.4);
}

.dpad-arrow {
  position: absolute;
  width: 42px;
  height: 42px;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #31363b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpad-arrow svg { width: 17px; height: 17px; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5)); }
.dpad-arrow:hover { color: #000; }
.dpad-arrow:active, .dpad-arrow.pressed { transform: scale(0.92); }

.dpad-arrow.up    { left: 43px; top: 0; }
.dpad-arrow.down  { left: 43px; bottom: 0; }
.dpad-arrow.left  { left: 0; top: 43px; }
.dpad-arrow.right { right: 0; top: 43px; }

#btn-ok {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  border: 1px solid #4a4f55;
  background: radial-gradient(circle at 35% 28%, #f2f4f6, #b9bfc5 55%, #8d939a);
  box-shadow: inset 0 1px 0 #fff, 0 3px 3px rgba(0,0,0,0.45);
  color: #43484d;
  font: inherit;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
}
#btn-ok:active { transform: translate(-50%, -50%) scale(0.94); box-shadow: inset 0 2px 5px rgba(0,0,0,0.4); }

/* --- top deck --- */
#cam-top {
  position: absolute;
  left: 44px; right: 44px; top: 34px;
  height: 64px;
  transform: skewX(-38deg) scaleY(0.62) rotate(-1.2deg);
  transform-origin: bottom left;
  border-radius: 14px 14px 6px 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 30%),
    linear-gradient(180deg, var(--plastic-hi), var(--plastic-1) 45%, var(--plastic-2));
  box-shadow:
    inset 0 1px 0 #fff,
    inset -2px -2px 3px rgba(0,0,0,0.2),
    0 -1px 0 rgba(255,255,255,0.5);
}

#cam-top > * { transform: skewX(38deg); }

#power-cluster {
  position: absolute;
  left: 34px; top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#btn-power {
  width: 40px; height: 26px;
  border-radius: 13px;
  appearance: none;
  cursor: pointer;
  border: 1px solid #6b7177;
  background: linear-gradient(180deg, #dfe3e7, #a9afb5);
  box-shadow: inset 0 1px 0 #fff, 0 2px 2px rgba(0,0,0,0.4);
  color: #4b5157;
  font-size: 12px;
  font-weight: bold;
}
#btn-power[aria-pressed="true"] {
  background: linear-gradient(180deg, #9fe08a, #4c9438);
  color: #10320b;
  box-shadow: 0 0 8px rgba(120, 220, 90, 0.65), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* status LCD on top deck */
#status-lcd {
  position: absolute;
  left: 110px; top: 7px;
  width: 218px; height: 50px;
  background: linear-gradient(180deg, #c7b98a, #b3a46f);
  border-radius: 4px;
  border: 2px solid #4c5258;
  box-shadow: inset 0 2px 5px rgba(60,50,10,0.45), 0 1px 0 rgba(255,255,255,0.55);
  overflow: hidden;
}
#status-lcd canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* mode dial */
#mode-dial {
  position: absolute;
  right: 120px; top: 2px;
  width: 64px; height: 64px;
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
  border: 2px solid #5b6167;
  background:
    radial-gradient(circle at 60% 30%, rgba(255,255,255,0.75), transparent 42%),
    conic-gradient(from 20deg, #b6bcc2 0 140deg, #8d939a 140deg 220deg, #b6bcc2 220deg 360deg);
  box-shadow: 0 3px 4px rgba(0,0,0,0.45), inset 0 1px 0 #fff;
  color: #3c4147;
  font-size: 7.5px;
  font-weight: bold;
  letter-spacing: 0.02em;
}
#mode-dial::after {
  content: "";
  position: absolute;
  left: 50%; top: 4px;
  width: 4px; height: 14px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #f6f8fa, #9aa0a6);
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0,0,0,0.5);
}
#mode-dial span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg);
  transition: transform 0.35s cubic-bezier(.3,1.6,.5,1);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* shutter button */
#btn-shutter {
  position: absolute;
  right: 22px; top: -12px;
  width: 66px; height: 48px;
  border-radius: 50% / 46%;
  appearance: none;
  cursor: pointer;
  border: 2px solid #565c62;
  background:
    radial-gradient(ellipse at 38% 26%, #f4f6f8, #c0c6cc 52%, #878d93);
  box-shadow: 0 4px 4px rgba(0,0,0,0.45), inset 0 2px 0 #fff;
}
#btn-shutter::after {
  content: "";
  position: absolute;
  inset: 7px 14px 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #d7dde2, #7f858c);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
#btn-shutter:active, #btn-shutter.pressed {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 1px rgba(0,0,0,0.5), inset 0 2px 5px rgba(0,0,0,0.4);
}

/* flash tube on top deck */
#flash-window {
  position: absolute;
  right: 210px; top: 12px;
  width: 42px; height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e9edf0, #b7bdc3);
  border: 1px solid #565c62;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.35);
  overflow: hidden;
}
#flash-window .tube {
  position: absolute;
  inset: 4px 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, #cfd4d9, #a6acb2);
  box-shadow: inset 0 0 3px rgba(0,0,0,0.4);
}
#flash-window.charging .tube {
  background: linear-gradient(180deg, #ffe9a8, #d59b2f);
  animation: flash-charge 0.55s linear infinite;
}
#flash-window.fired .tube {
  background: #ffffff;
  box-shadow: 0 0 18px 6px rgba(255,246,200,0.95);
}
@keyframes flash-charge {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* optical viewfinder sliver + speaker */
#ovf-window {
  position: absolute;
  right: 8px; top: 16px;
  width: 34px; height: 26px;
  border-radius: 4px;
  background: radial-gradient(circle at 40% 35%, #3a4b66, #0c1018 75%);
  border: 1px solid #565c62;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.8);
}

#speaker {
  position: absolute;
  left: 348px; top: 24px;
  width: 40px; height: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}
#speaker i {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #565c62, #2c3034);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.4);
}

/* --- side: card door + LED --- */
#card-door {
  position: absolute;
  right: -2px; top: 150px;
  width: 26px; height: 120px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, var(--plastic-2), var(--plastic-4));
  box-shadow: inset -1px 0 2px rgba(0,0,0,0.35), 2px 2px 4px rgba(0,0,0,0.3);
  border: 1px solid #565c62;
  border-left: 2px solid #767c82;
}
#card-door .door-lines {
  position: absolute;
  inset: 8px 5px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.16) 0 2px, transparent 2px 6px),
    linear-gradient(90deg, #b7bdc3, #99a0a6);
}
#card-door .door-text {
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  font-size: 6.5px;
  letter-spacing: 0.12em;
  color: #4b5157;
  white-space: nowrap;
}

#led-card {
  position: absolute;
  right: 2px; top: 284px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3a0c0c;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.9);
}
#led-card.on {
  background: #ff4632;
  box-shadow: 0 0 8px 2px rgba(255, 70, 40, 0.8);
  animation: led-blink 0.34s steps(2) infinite;
}
@keyframes led-blink { 50% { opacity: 0.25; } }

#led-power {
  position: absolute;
  left: 30px; top: 66px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #0e2a0c;
}
#led-power.on {
  background: #62e055;
  box-shadow: 0 0 7px 2px rgba(90, 230, 80, 0.75);
}

/* lens barrel sliver on left front edge */
#lens-sliver {
  position: absolute;
  left: -6px; top: 210px;
  width: 34px; height: 96px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(90deg, #23262b, #43484e 55%, #23262b);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), -2px 3px 5px rgba(0,0,0,0.4);
  border: 1px solid #1a1c1f;
}
#lens-sliver::after {
  content: "";
  position: absolute;
  left: 6px; top: 20px; bottom: 20px;
  width: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #4a6a9a, #0a0e18 70%);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.9);
}

/* strap lugs */
.strap-lug {
  position: absolute;
  width: 16px; height: 11px;
  border-radius: 3px;
  background: linear-gradient(180deg, #8d939a, #5b6167);
  border: 1px solid #43484d;
  box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.strap-lug.l { left: 4px; top: 118px; }
.strap-lug.r { right: 4px; top: 118px; }

/* flash overlay on the LCD when firing */
#lcd-flashfx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}
#lcd-flashfx.fired { animation: shot-flash 0.28s ease-out; }
@keyframes shot-flash {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* whole-page flash for close-range full-screen feel is intentionally NOT used;
   the LCD flash + scene blowout carries the effect. */

/* boot animation on lens */
#camera.booting #lens-sliver { animation: lens-out 1.2s ease-out; }
@keyframes lens-out {
  0% { transform: translateX(-40px); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}

/* ---------- PC overlay (card reader) ---------- */

#pc-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(2px);
}
#pc-overlay.open { display: flex; }

#crt {
  width: min(880px, 94vw);
  height: min(660px, 92vh);
  background: linear-gradient(180deg, #d8d2c4, #b9b2a2);
  border-radius: 14px;
  padding: 14px 14px 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
}

#crt .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #1d2a6b, #3a4a9a);
  color: #fff;
  border-radius: 4px 4px 0 0;
  padding: 4px 6px 4px 10px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.04em;
}

#crt .titlebar .tbtns { margin-left: auto; display: flex; gap: 4px; }
#crt .titlebar button {
  width: 18px; height: 16px;
  font-size: 10px;
  line-height: 1;
  border: 1px solid #0d1330;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8e4d8, #b9b4a4);
  cursor: pointer;
  color: #222;
}

#crt .menubar {
  display: flex;
  gap: 14px;
  background: #d4cec0;
  color: #2a2a2a;
  padding: 3px 10px;
  font-size: 11px;
  border-bottom: 1px solid #8f8877;
}

#crt .screen {
  flex: 1;
  margin: 8px 2px;
  background: #101423;
  border-radius: 6px;
  border: 3px solid #3c3a33;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.85);
  position: relative;
  overflow: hidden;
  color: #dfe6f2;
  font-family: "Chicago", "MS Sans Serif", Tahoma, sans-serif;
}

#crt .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

#crt .statusbar {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #d4cec0;
  color: #2c2c2c;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 0 0 4px 4px;
  border-top: 1px solid #8f8877;
}

#crt .statusbar .flex1 { flex: 1; }

/* gallery inside CRT */
#pc-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#pc-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-wrap: wrap;
}

.pcbtn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid #0d1330;
  background: linear-gradient(180deg, #e8e4d8, #c2bcaa);
  color: #1c1c1c;
  box-shadow: inset 0 1px 0 #fff;
}
.pcbtn:hover { filter: brightness(1.07); }
.pcbtn:active { transform: translateY(1px); }
.pcbtn:disabled { opacity: 0.45; cursor: default; }

#pc-cardinfo { font-size: 11px; color: #9fe08a; margin-left: auto; }

#pc-thumbs {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  align-content: start;
}

.pc-thumb {
  background: #1a2033;
  border: 1px solid #39415e;
  border-radius: 3px;
  padding: 6px;
  cursor: pointer;
  text-align: center;
}
.pc-thumb:hover { border-color: #7f9adf; background: #222a44; }
.pc-thumb.selected { border-color: #ffd98a; box-shadow: 0 0 0 1px #ffd98a; }
.pc-thumb img, .pc-thumb canvas {
  width: 100%;
  image-rendering: pixelated;
  border: 1px solid #0b0e18;
  background: #000;
}
.pc-thumb .fname { font-size: 10px; color: #aebadc; margin-top: 4px; }
.pc-thumb .fsize { font-size: 9px; color: #6f78a0; }

#pc-detail {
  position: absolute;
  inset: 0;
  background: #101423;
  display: none;
  flex-direction: column;
}
#pc-detail.open { display: flex; }

#pc-detail .dhead {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: #1a2033;
  border-bottom: 1px solid #39415e;
  font-size: 12px;
}

#pc-detail .dbody {
  flex: 1;
  display: flex;
  gap: 14px;
  padding: 14px;
  overflow: auto;
  min-height: 0;
}

#pc-detail .dimg {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
#pc-detail .dimg img {
  max-width: 100%;
  max-height: 78%;
  image-rendering: pixelated;
  border: 1px solid #39415e;
  background: #000;
}

#exif-table {
  flex: 1;
  font-size: 11px;
  border-collapse: collapse;
  align-self: flex-start;
  min-width: 300px;
}
#exif-table caption {
  text-align: left;
  font-weight: bold;
  color: #ffd98a;
  padding-bottom: 6px;
  font-size: 12px;
}
#exif-table th, #exif-table td {
  text-align: left;
  padding: 3px 8px;
  border-bottom: 1px solid #262e4a;
  color: #cdd6ec;
  font-weight: normal;
  font-family: "Chicago", Tahoma, sans-serif;
}
#exif-table th { color: #8f9cc8; white-space: nowrap; }

.exif-section td { color: #ffd98a; font-weight: bold; letter-spacing: 0.06em; }

/* ---------- helper / a11y ---------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button:focus-visible {
  outline: 2px solid #ffd98a;
  outline-offset: 2px;
}

#no-webgl {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  background: #14161a;
  color: #e8e2d2;
  font-family: Georgia, serif;
  text-align: center;
  padding: 40px;
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  #stage { gap: 12px; }
  #side-col { width: 230px; flex-basis: 230px; }
  #camera { --cam-scale: 0.86; }
}

@media (max-width: 1020px) {
  #stage { flex-direction: column; align-items: center; }
  #side-col {
    width: min(92vw, 560px);
    flex-basis: auto;
    order: 2;
    margin-top: 8px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  #side-col > .card { flex: 1 1 240px; }
  #camera-wrap { order: 1; margin-top: 0; }
  #camera { --cam-scale: 0.62; margin-top: 30px; }
}

@media (max-width: 620px) {
  #camera { --cam-scale: 0.46; margin-top: 60px; }
  #marquee .plaque { font-size: 11px; }
  #side-col { width: 94vw; }
}

@media (max-width: 420px) {
  #camera { --cam-scale: 0.36; margin-top: 90px; }
}
