/* ============================================================
   Orbital Soup · Station terminals · hardware kit (v0.20)

   Loaded after style.css on the Station Services terminal pages only.
   Each service is drawn as a piece of station hardware: an enamel
   housing with brass trim and screws, an engraved unit plate with a
   status light, physical keys, and inset screens. The hardware keeps
   its own colors in both themes, the way a real machine would, while
   the page around it follows Day and Night mode.

   Contents
     1. Tokens
     2. Layout: the two-column terminal
     3. Housing, plate, screws
     4. Keys
     5. Screens and readouts
     6. Form fields inside a device
     7. Paper (certificates, receipts, memos, tags)
     Per-terminal sections follow from 10 onward. Print layouts for the
     terminals' outputs live in css/print.css.
   ============================================================ */

/* 1. TOKENS ------------------------------------------------------- */
:root {
  --hw-enamel-1: #1f3846;
  --hw-enamel-2: #0e1d26;
  --hw-brass-hi: #ecd08e;
  --hw-brass: #c69742;
  --hw-brass-lo: #8a6424;
  --hw-ink: #2b1d07;
  --hw-screen-1: #0f2a22;
  --hw-screen-2: #06120e;
  --hw-phosphor: #9cf5c0;
  --hw-amber: #ffc46b;
  --hw-paper: #fbf3e2;
  --hw-paper-ink: #1d2a2e;
}

/* 2. LAYOUT ------------------------------------------------------ */
/* Controls on the left, the machine on the right, once there is room;
   a single column on tablets and phones. */
.terminal-layout {
  display: grid;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}
@media (min-width: 1240px) {
  .terminal-layout.two-col { grid-template-columns: minmax(290px, 350px) minmax(0, 1fr); }
  .terminal-layout.two-col.wide-left { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
}
.terminal-page h2.subhead, .terminal-page h3.subhead { margin-top: 40px; }

/* 3. HOUSING ----------------------------------------------------- */
.device {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: 18px;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 5px),
    linear-gradient(160deg, var(--hw-enamel-1), var(--hw-enamel-2));
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 2px rgba(198, 151, 66, 0.38),
    inset 0 0 0 7px rgba(8, 16, 22, 0.5),
    0 18px 40px rgba(0, 0, 0, 0.42),
    0 2px 0 rgba(0, 0, 0, 0.4);
}
/* four brass screws, one in each corner */
.device::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  --screw: radial-gradient(circle at 40% 35%, #f3dfae 0 1.5px, #b58c43 2px 3.2px, #5e4419 3.6px 4.4px, transparent 4.8px);
  background:
    var(--screw) left top / 10px 10px no-repeat,
    var(--screw) right top / 10px 10px no-repeat,
    var(--screw) left bottom / 10px 10px no-repeat,
    var(--screw) right bottom / 10px 10px no-repeat;
}
.device > * { position: relative; }

/* engraved unit plate with the status light */
.device-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px 6px 16px;
  padding: 7px 12px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--hw-brass-hi), var(--hw-brass) 55%, #a87b2c);
  color: var(--hw-ink);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.5);
}
.device-plate .plate-state { display: inline-flex; align-items: center; gap: 7px; letter-spacing: 0.1em; }
.device-plate .led { box-shadow: 0 0 0 2px rgba(43, 29, 7, 0.45), 0 0 8px var(--led-glow, transparent); }

/* a recessed bay that holds the machine's output (a card, a can, a map) */
.device-bay {
  border-radius: 12px;
  padding: 18px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(180deg, #08131a, #0c1b23);
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(198, 151, 66, 0.25), 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 4. KEYS -------------------------------------------------------- */
.key-row { display: flex; flex-wrap: wrap; gap: 10px 10px; margin-top: 16px; }
.key {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 16px 12px;
  cursor: pointer;
  color: var(--hw-ink);
  font-family: var(--font-label);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f3dc9f, var(--hw-brass) 62%, #a87b2c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 0 #6d4f1b, 0 6px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.06s ease, box-shadow 0.06s ease, filter 0.15s;
  touch-action: manipulation;
}
.key:hover { filter: brightness(1.06); }
.key:active, .key.is-pressed {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 #6d4f1b, 0 2px 4px rgba(0, 0, 0, 0.4);
}
.key:focus-visible { outline: 2px solid #ffd98a; outline-offset: 3px; }
.key:disabled { cursor: not-allowed; filter: grayscale(0.6) brightness(0.8); }
.key.dark {
  color: var(--cream);
  background: linear-gradient(180deg, #3a4e5a, #1f2f39 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 0 #091218, 0 6px 12px rgba(0, 0, 0, 0.4);
}
.key.dark:active, .key.dark.is-pressed { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 #091218, 0 2px 4px rgba(0, 0, 0, 0.4); }
.key.red {
  color: #fff4ec;
  background: linear-gradient(180deg, #d77560, #a84a38 65%, #873626);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 0 #5a2015, 0 6px 12px rgba(0, 0, 0, 0.4);
}
.key.big { padding: 15px 22px 16px; font-size: 1rem; }
.key-row .key.grow { flex: 1 1 auto; }

/* 5. SCREENS ----------------------------------------------------- */
.screen {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--hw-phosphor);
  font-family: var(--font-label);
  letter-spacing: 0.05em;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 0%, var(--hw-screen-1), var(--hw-screen-2));
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.6), inset 0 0 26px rgba(0, 0, 0, 0.85), 0 0 0 3px rgba(198, 151, 66, 0.32);
  text-shadow: 0 0 6px rgba(156, 245, 192, 0.45);
}
.screen.amber {
  color: var(--hw-amber);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 0%, #2c1e08, #110b03);
  text-shadow: 0 0 6px rgba(255, 196, 107, 0.45);
}
.screen .s-label { display: block; opacity: 0.7; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.screen .s-big { display: block; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.06em; }

/* 6. FIELDS ------------------------------------------------------ */
.device .field { display: grid; gap: 6px; margin: 0 0 12px; }
.device .field > span {
  color: var(--hw-brass-hi);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.device input[type="text"], .device select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(198, 151, 66, 0.45);
  background: #09141b;
  color: var(--cream);
  font: 600 1rem var(--font-label);
  letter-spacing: 0.03em;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.device input[type="text"]::placeholder { color: rgba(247, 234, 210, 0.42); }
.device input[type="text"]:focus-visible, .device select:focus-visible { outline: 2px solid #ffd98a; outline-offset: 1px; }
.device input[type="file"] { width: 100%; color: var(--muted); font: 600 0.9rem var(--font-label); }
.device input[type="file"]::file-selector-button {
  margin-right: 10px; padding: 7px 12px; border: 0; border-radius: 7px; cursor: pointer;
  background: linear-gradient(180deg, #3a4e5a, #1f2f39); color: var(--cream);
  font: 800 0.78rem var(--font-label); letter-spacing: 0.1em; text-transform: uppercase;
}
.device .note { margin: 4px 0 0; color: rgba(247, 234, 210, 0.66); font-size: 0.86rem; font-style: italic; }
.device .status-line { min-height: 1.4em; margin: 12px 0 0; color: var(--hw-amber); font-family: var(--font-label); font-weight: 700; letter-spacing: 0.04em; }

/* 7. PAPER ------------------------------------------------------- */
.paper {
  position: relative;
  color: var(--hw-paper-ink);
  background:
    radial-gradient(140% 100% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(180deg, var(--hw-paper), #f1e5cb);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* Station hardware keeps its own colors in Day mode. The page-wide
   Day rule for headings would otherwise darken text on device screens. */
body.theme-day .device h1, body.theme-day .device h2, body.theme-day .device h3 { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .key { transition: none; }
}

/* 10. ISSUE STAFF ID · ID-PRINT-02 --------------------------------- */
/* The card hangs from a lanyard in the printer bay. Three nested
   layers keep the motions independent: .badge-stage supplies the
   perspective, .badge-tilt follows the pointer, and .badge flips. */
.printer .badge-bay { position: relative; padding: 46px 22px 26px; }
.lanyard {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 0;
  width: 44px;
  height: 52px;
  transform: translateX(-50%);
  pointer-events: none;
  border-radius: 0 0 4px 4px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(180deg, #a84a38 0 9px, #8f3d2e 9px 18px);
}
.lanyard::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 30px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 6px 6px 10px 10px;
  background: linear-gradient(180deg, #eef0f2, #9aa3a8 60%, #6d767b);
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0, 0, 0, 0.5);
}
.badge-stage {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 40%;
  max-width: 640px;
  margin: 0 auto;
  perspective: 1500px;
}
.badge-tilt {
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}
.badge-stage.is-tilting .badge-tilt { transition: transform 0.08s linear; }
.badge {
  position: relative;
  aspect-ratio: 1000 / 620;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1);
  cursor: pointer;
}
.badge[data-side="back"] { transform: rotateY(180deg); }
.badge-face {
  position: absolute;
  inset: 0;
  border-radius: 3% / 4.8%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.badge-face canvas { display: block; width: 100%; height: 100%; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.45)); }
.face-back { transform: rotateY(180deg); }
/* moving sheen that follows the pointer across the whole card */
.foil {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  transition: opacity 0.3s ease;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.7), transparent 34%),
    linear-gradient(115deg, transparent 22%, rgba(255, 140, 190, 0.55) 38%, rgba(130, 220, 255, 0.55) 48%, rgba(255, 230, 150, 0.55) 58%, transparent 74%);
  background-size: 100% 100%, 240% 240%;
  background-position: center, var(--mx) var(--my);
}
.badge-stage.is-tilting .foil { opacity: 0.85; }
/* the printed hologram stays iridescent and turns with the tilt */
.face-front::after {
  content: "";
  position: absolute;
  left: 83.4%;
  top: 67.7%;
  width: 11.6%;
  height: 18.7%;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: color-dodge;
  opacity: 0.45;
  background: conic-gradient(from calc(var(--ry) * 10 + 20deg), #ffd2e6, #c9f2ff, #e8ffd0, #ffe7b0, #d8d0ff, #ffd2e6);
}
.printer-merits {
  margin: 14px 4px 0;
  color: rgba(247, 234, 210, 0.78);
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* verification mode: the banner replaces the intake form */
.verify-banner { margin-top: 26px; max-width: 760px; }
.vb-title { margin: 0 0 6px; color: var(--hw-phosphor); font-family: var(--font-display); font-size: 1.9rem; letter-spacing: 0.02em; }
.vb-text { margin: 0; color: var(--cream); }
.id-terminal.is-verifying { grid-template-columns: minmax(0, 760px) !important; }
.id-terminal.is-verifying .intake { display: none; }

/* drawer and cabinet cards */
.id-drawer, .id-cabinet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.id-cabinet-count { color: var(--gold); font-family: var(--font-label); font-weight: 800; letter-spacing: 0.08em; margin: 0; }
.mini-id {
  --band: #3f8f86;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  border: 2px solid #c69742;
  border-radius: 12px;
  background: #f1e3c8;
  color: #10202a;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  font-size: 1rem;
}
.mini-id .mhead {
  padding: 7px 10px;
  background: #101820;
  color: #c69742;
  font: 800 0.72rem var(--font-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mini-id .mbody { display: flex; gap: 10px; padding: 10px; }
.mini-id .mportrait {
  flex: none;
  display: block;
  width: 64px;
  height: 84px;
  overflow: hidden;
  border: 1.5px solid #c69742;
  border-radius: 6px;
  background: #0b1720;
  font-size: 0;
}
.mini-id .mportrait svg, .mini-id .mportrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini-id .mfields { display: grid; align-content: start; gap: 1px; min-width: 0; }
.mini-id .mname { color: #253f50; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; overflow-wrap: anywhere; }
.mini-id .mspecies { color: #a77c2f; font: 800 0.7rem var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; }
.mini-id .mrow { color: #33434b; font: 600 0.86rem/1.2 var(--font-label); }
.mini-id .mmerits { margin-top: 3px; color: #7a571a; font: 800 0.78rem var(--font-label); letter-spacing: 0.06em; }
.mini-id .mband {
  margin-top: auto;
  padding: 5px 10px;
  background: var(--band);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.id-saved { display: grid; gap: 7px; }
.id-saved-row { display: flex; gap: 8px; }
.id-saved-row button {
  padding: 6px 12px;
  border: 1px solid var(--gold-line);
  border-radius: 7px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font: 800 0.74rem var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.id-saved-row button:hover { background: rgba(198, 151, 66, 0.14); }
.id-empty { color: var(--muted); font-style: italic; }
body.theme-day .id-saved-row button { color: #7a571a; }

@media (max-width: 640px) {
  .device { padding: 20px 14px 16px; }
  .printer .badge-bay { padding: 40px 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .badge, .badge-tilt { transition: none; }
}

/* 11. SPECIES ASSESSMENT · OEWS-SA-06 ----------------------------- */
.booth-screen { display: grid; align-content: center; gap: 8px; min-height: 150px; }
.booth-q {
  margin: 0;
  color: var(--hw-phosphor);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.booth-q.blink { animation: screen-in 0.35s ease-out; }
@keyframes screen-in { 0% { opacity: 0; filter: blur(2px); } 60% { opacity: 1; } 100% { filter: none; } }
.booth-lamps { display: flex; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.lamp {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a5559, #1d2427);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(198, 151, 66, 0.35);
}
.lamp.lit {
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--hw-amber) 45%, #c98a2b);
  box-shadow: 0 0 10px rgba(255, 196, 107, 0.8), 0 0 0 2px rgba(198, 151, 66, 0.6);
}
.lamp.current { box-shadow: 0 0 0 2px #ffd98a, 0 0 8px rgba(255, 217, 138, 0.6); }
.booth-answers { display: grid; gap: 12px; margin-top: 16px; }
.key.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: none;
}
.key.answer .ak {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(43, 29, 7, 0.86);
  color: #ffd98a;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.key.answer.chosen { outline: 2px solid #ffd98a; outline-offset: 2px; }

.cert-bay { display: grid; place-items: center; min-height: 300px; overflow: hidden; padding: 22px; }
.cert-idle { max-width: 30ch; color: rgba(247, 234, 210, 0.6); font-style: italic; text-align: center; }
.cert {
  width: 100%;
  overflow: hidden;
  padding: 26px 26px 22px;
  border: 1px solid rgba(167, 124, 47, 0.5);
  border-radius: 4px;
  outline: 4px double rgba(167, 124, 47, 0.55);
  outline-offset: -12px;
}
.cert.printing { animation: cert-print 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes cert-print { from { transform: translateY(-104%); } to { transform: none; } }
.cert-org { margin: 0; color: #a77c2f; font: 800 0.78rem var(--font-label); letter-spacing: 0.2em; text-align: center; text-transform: uppercase; }
.cert-title { margin: 4px 0 16px; color: #253f50; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: 0.02em; text-align: center; }
.cert-main { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.cert-portrait { overflow: hidden; aspect-ratio: 200 / 264; border: 2px solid #c69742; border-radius: 8px; }
.cert-portrait svg { display: block; width: 100%; height: 100%; }
.cert-line { margin: 0; color: #4d5a52; font-size: 0.92rem; font-style: italic; }
.cert-species { margin: 2px 0 8px; color: #a84a38; font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1; }
.cert-body { margin: 0 0 8px; color: #1d2a2e; font-size: 0.98rem; line-height: 1.45; }
.cert-posting { margin: 0; color: #7a571a; font: 700 0.95rem var(--font-label); letter-spacing: 0.02em; }
.cert-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed rgba(167, 124, 47, 0.6);
  color: #5b6460;
  font: 700 0.8rem var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cert-sign { font-family: var(--font-body); font-style: italic; letter-spacing: 0; text-transform: none; }
.cert-stamp {
  position: absolute;
  right: 26px;
  bottom: 58px;
  padding: 4px 12px;
  border: 3px solid rgba(168, 74, 56, 0.75);
  border-radius: 6px;
  color: rgba(168, 74, 56, 0.85);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
}
@media (max-width: 560px) {
  .cert { padding: 22px 18px 18px; }
  .cert-main { grid-template-columns: 1fr; }
  .cert-portrait { max-width: 130px; }
  .cert-stamp { bottom: 70px; right: 14px; }
}

.census { margin-top: 28px; }
.census-note { margin: 0 0 14px; color: rgba(247, 234, 210, 0.75); }
.census-bars { display: grid; gap: 10px; }
.census-row { display: grid; grid-template-columns: 40px minmax(110px, 170px) 1fr auto; gap: 12px; align-items: center; }
.cr-portrait { overflow: hidden; width: 40px; height: 52px; border: 1.5px solid #c69742; border-radius: 6px; }
.cr-portrait svg { display: block; width: 100%; height: 100%; }
.census-row .lbl { font: 700 1rem var(--font-label); letter-spacing: 0.03em; }
.census-track { overflow: hidden; height: 14px; border-radius: 7px; background: #09141b; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7); }
.census-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c98a2b, var(--hw-amber));
  box-shadow: 0 0 10px rgba(255, 196, 107, 0.5);
  transition: width 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.census-row .pct { min-width: 82px; color: var(--hw-amber); font: 700 0.92rem var(--font-label); letter-spacing: 0.04em; text-align: right; font-variant-numeric: tabular-nums; }
.census-total { margin: 12px 0 0; color: var(--hw-phosphor); font: 700 0.95rem var(--font-label); letter-spacing: 0.04em; }
@media (max-width: 560px) {
  .census-row { grid-template-columns: 34px 1fr auto; }
  .cr-portrait { width: 34px; height: 44px; }
  .census-row .census-track { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .booth-q.blink, .cert.printing { animation: none; }
  .census-fill { transition: none; }
}

/* 12. ASK THE ORB · EXP-ORB-08 ------------------------------------ */
.orb-chamber {
  position: relative;
  display: grid;
  justify-items: center;
  overflow: hidden;
  margin: -4px 0 16px;
  padding: 30px 0 0;
  border-radius: 12px;
  background:
    radial-gradient(60% 70% at 50% 40%, rgba(160, 130, 220, 0.2), transparent 70%),
    linear-gradient(180deg, #08131a, #0c1b23);
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(198, 151, 66, 0.25);
}
.orb {
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: clamp(150px, 24vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6dc 0%, #e6c37a 18%, #9a6fb0 52%, #2a2350 100%);
  box-shadow: 0 0 40px rgba(170, 140, 220, 0.55), inset 0 -14px 40px rgba(0, 0, 0, 0.45), inset 0 8px 20px rgba(255, 255, 255, 0.25);
  animation: orb-float 6s ease-in-out infinite;
  transition: box-shadow 0.4s ease;
}
.orb-swirl {
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent 0 15%, rgba(255, 214, 150, 0.5) 22%, transparent 34%,
    rgba(150, 210, 255, 0.4) 52%, transparent 64%, rgba(255, 160, 210, 0.4) 80%, transparent 92%);
  filter: blur(8px);
  mix-blend-mode: screen;
  animation: orb-spin 16s linear infinite;
}
.orb-swirl.two { inset: -10%; opacity: 0.7; animation-duration: 23s; animation-direction: reverse; }
.orb-glint {
  position: absolute;
  left: 22%;
  top: 15%;
  width: 30%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.8), transparent 70%);
  transform: rotate(-24deg);
}
.orb.thinking { animation: orb-float 6s ease-in-out infinite, orb-pulse 0.8s ease-in-out infinite; }
.orb.thinking .orb-swirl { animation-duration: 2.2s; }
.orb.thinking .orb-swirl.two { animation-duration: 3s; }
.orb.answered { box-shadow: 0 0 80px rgba(255, 214, 150, 0.8), inset 0 -14px 40px rgba(0, 0, 0, 0.4), inset 0 8px 20px rgba(255, 255, 255, 0.35); }
@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-float { 50% { transform: translateY(-8px); } }
@keyframes orb-pulse {
  50% { box-shadow: 0 0 70px rgba(255, 200, 130, 0.85), inset 0 -14px 40px rgba(0, 0, 0, 0.45), inset 0 8px 20px rgba(255, 255, 255, 0.3); }
}
.orb-cradle {
  position: relative;
  z-index: 3;
  width: clamp(120px, 19vw, 170px);
  height: 26px;
  margin-top: -18px;
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
  background: linear-gradient(180deg, var(--hw-brass-hi), var(--hw-brass) 50%, var(--hw-brass-lo));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 6px 10px rgba(0, 0, 0, 0.5);
}
.orb-column {
  width: clamp(60px, 9vw, 80px);
  height: 46px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #6e5020, var(--hw-brass) 40%, var(--hw-brass-hi) 52%, var(--hw-brass) 64%, #6e5020);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.5);
}
.orb-readout { min-height: 104px; margin-bottom: 16px; }
.orb-answer {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-style: italic;
  letter-spacing: 0;
  line-height: 1.35;
}
.orb-log { display: grid; gap: 10px; max-height: 560px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.orb-log li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(8, 16, 22, 0.6);
  box-shadow: inset 0 0 0 1px rgba(198, 151, 66, 0.22);
}
.orb-log .lq { color: var(--cream); font: 700 0.95rem var(--font-label); letter-spacing: 0.02em; overflow-wrap: anywhere; }
.orb-log .la { color: var(--hw-amber); font-family: var(--font-body); font-style: italic; }
.orb-log .lt { color: rgba(247, 234, 210, 0.5); font: 700 0.72rem var(--font-label); letter-spacing: 0.1em; text-transform: uppercase; }
.orb-log li.orb-empty { padding: 0; background: none; box-shadow: none; color: rgba(247, 234, 210, 0.6); font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  .orb, .orb.thinking, .orb-swirl { animation: none; }
}

/* 13. SOUP VENDING MACHINE · SOUP-VEND-01 -------------------------- */
.vend-body { display: grid; gap: 18px; }
@media (min-width: 760px) { .vend-body { grid-template-columns: minmax(0, 1fr) 220px; } }
/* the glass front: three shelves of four cans */
.vend-window {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 10px 10px 0;
  border-radius: 10px;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.10) 0 18%, transparent 18% 32%, rgba(255, 255, 255, 0.05) 32% 36%, transparent 36%),
    linear-gradient(180deg, #0b1a22, #10242e);
  box-shadow: inset 0 0 0 3px rgba(198, 151, 66, 0.4), inset 0 6px 18px rgba(0, 0, 0, 0.75);
}
.can-slot {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 4px 0;
  border: 0;
  border-bottom: 6px solid #3b4a52;
  background: none;
  color: inherit;
  cursor: pointer;
}
.can-slot::after {   /* shelf lip */
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: -6px;
  height: 6px;
  background: linear-gradient(180deg, #8a959b, #4c5960);
}
.can-slot:focus-visible { outline: 2px solid #ffd98a; outline-offset: -2px; border-radius: 6px; }
.can-slot.selected .can { box-shadow: 0 0 0 3px #ffd98a, 0 0 16px rgba(255, 217, 138, 0.6); }
.slot-code {
  padding: 1px 8px 2px;
  border-radius: 4px 4px 0 0;
  background: #0b141a;
  color: var(--hw-amber);
  font: 800 0.78rem var(--font-label);
  letter-spacing: 0.1em;
}
.slot-badge, .slot-soldout {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font: 800 0.62rem var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(6deg);
}
.slot-badge { background: #ffd98a; color: #2b1d07; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.slot-soldout { top: 34%; left: 6px; right: 6px; background: rgba(168, 74, 56, 0.92); color: #fff; text-align: center; transform: rotate(-8deg); }
.can-slot.sold-out .can { filter: grayscale(0.6) brightness(0.7); }
/* a drawn can: body color from --can, metal lid and base, paper label */
.can {
  --can: #b9412f;
  position: relative;
  display: block;
  width: 46px;
  height: 64px;
  border-radius: 9px / 5px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), rgba(255, 255, 255, 0.28) 28%, rgba(0, 0, 0, 0.06) 52%, rgba(0, 0, 0, 0.42)),
    var(--can);
  box-shadow: 0 5px 7px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.15s;
}
.can::before, .can::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 7px;
  border-radius: 9px / 4px;
  background: linear-gradient(90deg, #7d868b, #eef0f2 35%, #9aa3a8 70%, #6d767b);
}
.can::before { top: 0; }
.can::after { bottom: 0; }
.can-label {
  position: absolute;
  left: 3px; right: 3px; top: 21px;
  padding: 3px 1px;
  background: rgba(251, 243, 226, 0.93);
  color: #1d2a2e;
  font: 800 0.5rem/1.1 var(--font-label);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.can-slot.vending .can { animation: can-drop 0.75s cubic-bezier(0.5, 0, 0.9, 0.6) forwards; }
@keyframes can-drop {
  0% { transform: none; }
  20% { transform: translateY(-4px) rotate(-5deg); }
  100% { transform: translateY(180px) rotate(22deg); opacity: 0; }
}

.vend-side { display: grid; align-content: start; gap: 14px; }
.vend-display { display: grid; gap: 2px; min-height: 104px; }
.vend-display .s-big { font-size: 2rem; letter-spacing: 0.12em; }
.vend-name { font-weight: 700; letter-spacing: 0.03em; line-height: 1.2; }
.vend-keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.vend-keypad .key { padding: 10px 0 11px; font-size: 1rem; }
.vend-keypad .vend-go { grid-column: 1 / -1; padding: 13px 0 14px; font-size: 1.05rem; }
.vend-coin { display: flex; align-items: center; gap: 12px; color: rgba(247, 234, 210, 0.6); font: 800 0.7rem var(--font-label); letter-spacing: 0.14em; text-transform: uppercase; }
.coin-slot {
  flex: none;
  width: 12px;
  height: 42px;
  border-radius: 6px;
  background: #050b0f;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 0 4px #9aa3a8, 0 0 0 5px #4c5960;
}
.vend-tray {
  position: relative;
  display: grid;
  place-items: center;
  height: 96px;
  margin-top: 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #04090c, #0c1a21);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.9), inset 0 0 0 3px rgba(154, 163, 168, 0.5);
  cursor: pointer;
}
.tray-label { position: absolute; top: 6px; left: 12px; color: rgba(247, 234, 210, 0.35); font: 800 0.66rem var(--font-label); letter-spacing: 0.2em; text-transform: uppercase; }
.tray-out .can { transform: rotate(90deg); }
.tray-out.landed .can { animation: can-land 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes can-land { from { transform: translateY(-50px) rotate(40deg); } to { transform: rotate(90deg); } }

.receipt-bay { display: grid; justify-items: center; min-height: 200px; padding: 0 16px 20px; overflow: hidden; }
.receipt-idle { margin: 24px 0 0; color: rgba(247, 234, 210, 0.55); font-style: italic; }
.receipt {
  width: min(100%, 300px);
  padding: 20px 18px 26px;
  color: #26323a;
  font: 600 0.92rem/1.35 var(--font-label);
  letter-spacing: 0.03em;
  /* a torn bottom edge */
  -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 10px repeat-x;
          mask: linear-gradient(#000, #000) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 10px repeat-x;
}
.receipt.printing { animation: receipt-print 1.2s steps(12, end) both; }
@keyframes receipt-print { from { transform: translateY(-100%); } to { transform: none; } }
.receipt p { margin: 0; }
.receipt .r-head { font-weight: 800; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.receipt .r-sub { color: #5b6460; font-size: 0.8rem; text-align: center; }
.receipt .r-rule { height: 0; margin: 10px 0; border-top: 2px dashed rgba(38, 50, 58, 0.4); }
.receipt .r-row { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r-note { margin: -1px 0 4px 2.2em; color: #5b6460; font-family: var(--font-body); font-size: 0.85rem; font-style: italic; letter-spacing: 0; }
.receipt .r-total { margin-top: 4px; font-weight: 800; font-size: 1.05rem; text-transform: uppercase; }
.receipt .r-foot { color: #3d4a52; font-size: 0.82rem; text-align: center; }
.receipt .r-barcode {
  height: 34px;
  margin: 12px 10px 0;
  background: repeating-linear-gradient(90deg, #26323a 0 2px, transparent 2px 4px, #26323a 4px 5px, transparent 5px 8px, #26323a 8px 11px, transparent 11px 12px);
}
@media (max-width: 480px) {
  .can { width: 38px; height: 54px; }
  .can-label { top: 17px; font-size: 0.44rem; }
}
@media (prefers-reduced-motion: reduce) {
  .can-slot.vending .can, .tray-out.landed .can, .receipt.printing { animation: none; }
}

/* 14. PEBBLE REGISTRY · DSO-REG-04 ------------------------------- */
.registry-desk { display: grid; gap: 18px; align-items: center; margin-bottom: 16px; }
@media (min-width: 700px) { .registry-desk { grid-template-columns: minmax(220px, 280px) 1fr; } }
/* a brass scale: dial, pan, post, and base */
.scale { position: relative; display: grid; justify-items: center; padding: 8px 0 0; }
.scale-gauge {
  position: relative;
  width: 150px;
  height: 80px;
  overflow: hidden;
  border-radius: 80px 80px 0 0;
  background: linear-gradient(180deg, var(--hw-brass-hi), var(--hw-brass));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5);
}
.gauge-face {
  position: absolute;
  inset: 8px 8px -72px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -90deg at 50% 50%, rgba(43, 29, 7, 0.75) 0 1deg, transparent 1deg 12deg),
    radial-gradient(circle, #fbf3e2 0 58%, #efe1c2 59%);
  -webkit-mask: radial-gradient(circle, #000 0 70%, transparent 70%);
          mask: radial-gradient(circle, #000 0 70%, transparent 70%);
}
.gauge-needle {
  --turn: -60deg;
  position: absolute;
  left: calc(50% - 1.5px);
  bottom: 0;
  width: 3px;
  height: 62px;
  border-radius: 2px;
  background: #a84a38;
  transform: rotate(var(--turn));
  transform-origin: 50% 100%;
  transition: transform 0.9s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.gauge-cap { position: absolute; left: calc(50% - 7px); bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: #2b1d07; }
.scale-pan { position: relative; display: grid; justify-items: center; margin-top: 6px; }
.pan-stone { position: relative; z-index: 2; height: 110px; margin-bottom: -34px; }
.pan-stone svg { display: block; width: 120px; height: 120px; }
.pan-dish {
  display: block;
  width: 200px;
  height: 30px;
  border-radius: 0 0 100px 100px / 0 0 30px 30px;
  background: linear-gradient(180deg, var(--hw-brass-hi), var(--hw-brass) 45%, var(--hw-brass-lo));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 8px 12px rgba(0, 0, 0, 0.45);
}
.scale-post { width: 16px; height: 34px; background: linear-gradient(90deg, #6e5020, var(--hw-brass-hi), #6e5020); }
.scale-base { width: 150px; height: 16px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #3a4e5a, #1a2830); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5); }
.pebble-terminal.landing .pan-stone { animation: stone-drop 0.55s cubic-bezier(0.4, 0, 0.6, 1); }
.pebble-terminal.landing .scale-pan { animation: pan-dip 0.7s ease-out 0.3s; }
@keyframes stone-drop { from { transform: translateY(-60px); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
@keyframes pan-dip { 30% { transform: translateY(5px); } 60% { transform: translateY(-1px); } }
.registry-readout { display: grid; gap: 8px; margin: 0; }
.registry-readout > div { display: grid; gap: 1px; }
.registry-readout dt { opacity: 0.7; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.registry-readout dd { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.03em; overflow-wrap: anywhere; }
.registry-readout #peb-mass { font-size: 1.6rem; font-variant-numeric: tabular-nums; }

.tag-bay { display: grid; place-items: center; min-height: 260px; padding: 28px 18px; }
.reg-tag {
  width: min(100%, 290px);
  padding: 24px 22px 20px 46px;
  border-radius: 6px 22px 22px 6px;
  transform: rotate(-3deg);
}
.tag-hole {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  background: #0c1b23;
  box-shadow: inset 0 0 0 3px #c69742;
}
.tag-hole::before {   /* the string */
  content: "";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 70px;
  height: 2px;
  background: #b9a07a;
  transform: rotate(-24deg);
  transform-origin: right center;
}
.tag-org { margin: 0; color: #a77c2f; font: 800 0.72rem var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; }
.tag-no { margin: 0 0 10px; color: #253f50; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.04em; }
.reg-tag dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.reg-tag dt { color: #7a571a; font: 800 0.72rem var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; align-self: center; }
.reg-tag dd { margin: 0; color: #1d2a2e; font-family: var(--font-body); font-size: 1rem; font-style: italic; overflow-wrap: anywhere; }
.tag-stamp {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 2px 10px;
  border: 3px solid rgba(93, 138, 90, 0.85);
  border-radius: 6px;
  color: rgba(93, 138, 90, 0.95);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-14deg) scale(1.6);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
  mix-blend-mode: multiply;
}
.reg-tag.stamped .tag-stamp { opacity: 1; transform: rotate(-14deg) scale(1); }

.peb-count { color: var(--gold); font-family: var(--font-label); font-weight: 800; letter-spacing: 0.06em; }
/* a wooden specimen drawer with one compartment per pebble */
.specimen-drawer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0.06) 0 3px, transparent 3px 11px),
    linear-gradient(180deg, #7a5233, #5e3d25);
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.55), 0 0 0 4px #3e2816, 0 10px 22px rgba(0, 0, 0, 0.4);
}
.specimen {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 8px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f3e6c9, #e6d4ac);
  box-shadow: inset 0 3px 8px rgba(94, 61, 37, 0.45);
  text-align: center;
}
.sp-stone svg { display: block; width: 92px; height: 92px; }
.sp-label { display: grid; gap: 1px; color: #1d2a2e; }
.sp-label b { font-family: var(--font-display); font-size: 1.02rem; font-weight: 400; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.sp-label span { color: #5b4a2f; font: 700 0.78rem var(--font-label); letter-spacing: 0.04em; }
.sp-label small { color: #8a7656; font: 800 0.66rem var(--font-label); letter-spacing: 0.12em; }
.specimen .release {
  margin-top: 4px;
  padding: 3px 10px;
  border: 1px solid rgba(168, 74, 56, 0.55);
  border-radius: 6px;
  background: transparent;
  color: #8f3d2e;
  cursor: pointer;
  font: 800 0.68rem var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.specimen .release:hover { background: rgba(168, 74, 56, 0.12); }
.specimen-drawer .pebble-empty { grid-column: 1 / -1; margin: 6px; color: #f3e6c9; font-style: italic; }
.pebble-empty { color: var(--muted); font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  .pebble-terminal.landing .pan-stone, .pebble-terminal.landing .scale-pan { animation: none; }
  .gauge-needle, .tag-stamp { transition: none; }
}

/* 15. ATRIUM MAP KIOSK · OPS-KIOSK-01 ---------------------------- */
[data-cat="public"] { --cat: #8fbf8a; }
[data-cat="dept"] { --cat: #82a9d8; }
[data-cat="support"] { --cat: #e3b25c; }
[data-cat="restricted"] { --cat: #c98ab8; }
.kiosk { margin-top: 28px; }
.kiosk-body { display: grid; gap: 18px; }
@media (min-width: 1240px) { .kiosk-body { grid-template-columns: minmax(0, 1fr) 300px; } }
.kiosk-screen {
  padding: 10px;
  border-radius: 12px;
  background: #050b0f;
  box-shadow: inset 0 0 0 3px rgba(198, 151, 66, 0.4), inset 0 6px 16px rgba(0, 0, 0, 0.8);
}
.smap-wrap { position: relative; line-height: 0; }
.smap-wrap img { display: block; width: 100%; height: auto; border-radius: 6px; }
.smap-pin {
  position: absolute;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid var(--bg-1);
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-1);
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(198, 151, 66, 0.4), 0 4px 10px rgba(0, 0, 0, 0.4);
  animation: pin-pulse 2.4s ease-in-out infinite;
  transition: opacity 0.2s, transform 0.15s, background 0.15s;
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(198, 151, 66, 0.4), 0 4px 10px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(198, 151, 66, 0), 0 4px 10px rgba(0, 0, 0, 0.4); }
}
.smap-pin:hover, .smap-pin:focus-visible { background: var(--cream); }
.smap-pin:focus-visible { outline: 2px solid #ffd98a; outline-offset: 3px; }
.smap-pin.active { z-index: 2; background: var(--cream); transform: translate(-50%, -50%) scale(1.18); }
.smap-pin.seen:not(.active) { background: #e7d39a; }
.smap-pin.dim { opacity: 0.16; animation: none; }
/* hover label with the location's name (pointer devices only) */
.smap-pin::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(8, 16, 22, 0.94);
  color: var(--cream);
  font: 700 0.8rem/1.2 var(--font-label);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 0 0 1px rgba(198, 151, 66, 0.55), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.smap-pin:hover::after, .smap-pin:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px), (pointer: coarse) { .smap-pin::after { display: none; } }
@media (max-width: 650px) { .smap-pin { width: 24px; height: 24px; border-width: 1px; font-size: 0.78rem; } }

.kiosk-side { display: grid; align-content: start; gap: 12px; }
.smap-detail { min-height: 196px; }
.smap-detail .sd-head { display: flex; align-items: center; gap: 10px; }
.sd-num { color: var(--hw-phosphor); font-family: var(--font-display); font-size: 1.6rem; }
.sd-cat {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--cat);
  color: #0b141a;
  font: 800 0.66rem var(--font-label);
  letter-spacing: 0.12em;
  text-shadow: none;
  text-transform: uppercase;
}
.smap-detail h3 { margin: 6px 0; color: var(--hw-phosphor); font-family: var(--font-label); font-size: 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.smap-detail p { margin: 0 0 10px; color: #cfe9da; font-family: var(--font-body); letter-spacing: 0; line-height: 1.45; text-shadow: none; }
.smap-detail a { color: var(--hw-amber); font-weight: 700; }
.kiosk-tour { margin-top: 0; }
.kiosk-tour .key { min-width: 50px; }
.kiosk-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.kiosk-legend .key { padding: 8px 10px 9px; font-size: 0.72rem; }
.kiosk-legend .key[aria-pressed="true"] {
  transform: translateY(3px);
  box-shadow: inset 0 0 0 2px #ffd98a, 0 1px 0 #091218, 0 2px 4px rgba(0, 0, 0, 0.4);
}
.cat-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--cat); vertical-align: 0.05em; }
.kiosk-step, .kiosk-visited { margin: 0; color: rgba(247, 234, 210, 0.72); font: 700 0.86rem var(--font-label); letter-spacing: 0.04em; }
@media (prefers-reduced-motion: reduce) { .smap-pin { animation: none; transition: none; } }

/* 16. MEMO TYPEWRITER · COMMS-TYPE-07 ----------------------------- */
/* The sheet rises out of a slot behind the roller; the machine body
   below is pure decoration (rows of round keys and a space bar). */
.tw-slot { position: relative; overflow: hidden; padding: 6px 18px 0; }
.memo-sheet {
  position: relative;
  min-height: 420px;
  padding: 26px 30px 76px;
  border-radius: 3px 3px 0 0;
}
.memo-sheet.feeding { animation: sheet-feed 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes sheet-feed { from { transform: translateY(70%); } to { transform: none; } }
.ms-letterhead { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 3px solid #c69742; }
.ms-letterhead img { flex: none; width: 54px; height: 54px; }
.ms-letterhead b { display: block; color: #253f50; font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; letter-spacing: 0.02em; line-height: 1.05; }
.ms-letterhead span { display: block; color: #a77c2f; font: 800 0.72rem var(--font-label); letter-spacing: 0.14em; text-transform: uppercase; }
.ms-fields { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 14px 0; padding-bottom: 12px; border-bottom: 1px solid rgba(167, 124, 47, 0.5); }
.ms-fields dt { color: #7a571a; font: 800 0.74rem var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; align-self: center; }
.ms-fields dd { margin: 0; color: #1d2a2e; font: 600 1rem var(--font-label); letter-spacing: 0.02em; }
.ms-fields #ms-subject { font-weight: 800; }
.ms-body { min-height: 5.5em; margin: 0 0 12px; color: #1d2a2e; font-family: "Courier New", Courier, monospace; font-size: 1rem; line-height: 1.6; }
.ms-sign { margin: 0; color: #33434b; font-style: italic; }
.ms-stamp {
  --ink: #5d8a5a;
  position: absolute;
  right: 26px;
  bottom: 18px;
  padding: 4px 12px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-12deg) scale(1.7);
  mix-blend-mode: multiply;
}
.ms-stamp.down { opacity: 0.85; transform: rotate(-12deg) scale(1); transition: opacity 0.15s ease, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
.tw-machine { position: relative; margin: 0 -6px; }
.tw-roller {
  position: relative;
  z-index: 2;
  height: 26px;
  margin: -8px 4px 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #4a5559, #12191c 55%, #2c3438);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.18);
}
.tw-roller::before, .tw-roller::after {   /* knobs */
  content: "";
  position: absolute;
  top: -4px;
  width: 22px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(90deg, #6d767b, #e6e9eb 40%, #6d767b);
}
.tw-roller::before { left: -14px; }
.tw-roller::after { right: -14px; }
.tw-keys {
  height: 92px;
  margin: 12px 18px 0;
  border-radius: 12px 12px 4px 4px;
  background:
    radial-gradient(circle, #f3e6c9 0 7px, #2b1d07 7.5px 9px, transparent 9.5px) 0 4px / 26px 22px space,
    linear-gradient(180deg, #1f3846, #0e1d26);
  background-origin: content-box;
  padding: 0 8px;
  box-shadow: inset 0 0 0 2px rgba(198, 151, 66, 0.35), 0 6px 14px rgba(0, 0, 0, 0.5);
}
.tw-space { width: 46%; height: 12px; margin: 8px auto 0; border-radius: 6px; background: linear-gradient(180deg, #f3e6c9, #c9b88a); box-shadow: 0 3px 0 #6d4f1b; }
@media (max-width: 560px) {
  .tw-slot { padding: 6px 4px 0; }
  .memo-sheet { padding: 20px 18px 70px; min-height: 0; }
  .ms-fields { grid-template-columns: 1fr; gap: 0; }
  .ms-fields dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) { .memo-sheet.feeding { animation: none; } .ms-stamp.down { transition: none; } }
