:root {
  color-scheme: dark;
  --bg: #070a10;
  --frame: #111622;
  --panel: rgba(14, 19, 30, 0.94);
  --panel-solid: #121826;
  --border: #3a4a63;
  --gold: #f0c26b;
  --cyan: #66f0e2;
  --amber: #e6b85c;
  --orange: #e37c4d;
  --red: #e05d5d;
  --ink: #eef4fa;
  --muted: #98a9be;
  --sans: "PingFang SC", "Microsoft YaHei UI", "Noto Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  background: radial-gradient(circle at 50% 45%, #121a29, #06080d 78%);
  color: var(--ink);
  font: 14px / 1.55 var(--sans);
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Full-Stage Indie Game Viewport ---------- */
.arcade-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 14px;
}

.stage-viewport {
  position: relative;
  width: min(100%, 1152px, calc((100svh - 28px) * 1.7647));
  aspect-ratio: 480 / 272;
  border: 2px solid #2b384d;
  border-radius: 8px;
  background: #090d14;
  box-shadow:
    0 0 0 1px #04060a,
    0 24px 72px rgba(0, 0, 0, 0.72),
    0 0 90px rgba(40, 88, 102, 0.14);
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 960px auto 544px;
}

.canvas-box {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
  touch-action: none;
}

/* ---------- Crisp HD World-Anchored Overlays (over low-res pixel canvas) ---------- */
.world-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.wo-room {
  position: absolute;
  padding: 2px 7px;
  border: 1px solid rgba(152, 169, 190, 0.22);
  border-radius: 3px;
  background: rgba(8, 12, 20, 0.62);
  color: rgba(210, 224, 240, 0.68);
  font: 600 11px / 1.25 var(--sans);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.wo-room.is-locked {
  border-color: rgba(224, 93, 93, 0.42);
  color: rgba(245, 140, 140, 0.88);
}

.wo-room.is-exit-open {
  border-color: rgba(82, 240, 176, 0.65);
  background: rgba(12, 34, 28, 0.82);
  color: #7df5c4;
}

.wo-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  max-width: 240px;
  padding: 5px 10px;
  border: 1.5px solid var(--cyan);
  border-radius: 5px;
  background: rgba(10, 15, 25, 0.94);
  color: #f3f7fc;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.62);
}

.wo-bubble[data-tier="light"] { border-color: var(--amber); }
.wo-bubble[data-tier="severe"] { border-color: var(--orange); }
.wo-bubble[data-tier="paused"] { border-color: var(--red); color: #ffb3b3; }

.wo-prompt {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 4px 10px;
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  background: rgba(11, 16, 26, 0.94);
  color: #ffe29a;
  font: 700 12px / 1.3 var(--sans);
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.68);
  pointer-events: auto;
  cursor: pointer;
}

.mobile-deck {
  display: none;
}

.wo-floater {
  position: absolute;
  transform: translate(-50%, -50%);
  font: 800 13px / 1 var(--mono), var(--sans);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

/* ---------- Minimal Pixel-RPG HUD ---------- */
.hud-top {
  position: absolute;
  inset: 10px 12px auto;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud-top > * {
  pointer-events: auto;
}

.hud-ema {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px 7px 8px;
  border: 2px solid #3c4d66;
  border-radius: 4px;
  background: rgba(10, 15, 24, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  min-width: 218px;
}

.hud-ema:hover {
  border-color: var(--cyan);
}

.pixel-portrait,
.pixel-portrait-lg {
  image-rendering: pixelated;
  border: 1px solid #2d3c52;
  border-radius: 3px;
  background: #0b111a;
  flex: none;
}

.hud-ema-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hud-ema-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-name {
  font: 700 12.5px / 1 var(--mono);
  letter-spacing: 0.04em;
}

.hud-tier {
  padding: 1px 6px;
  border-radius: 2px;
  background: rgba(102, 240, 226, 0.14);
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 700;
}

.hud-tier[data-tier="light"] { background: rgba(230, 184, 92, 0.16); color: var(--amber); }
.hud-tier[data-tier="severe"] { background: rgba(227, 124, 77, 0.18); color: var(--orange); }
.hud-tier[data-tier="paused"] { background: rgba(224, 93, 93, 0.22); color: var(--red); }

.hud-shield {
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(100, 184, 255, 0.2);
  color: #7cc4ff;
  font: 700 10.5px / 1.2 var(--mono);
}

.pixel-hp-track {
  height: 7px;
  border: 1px solid #2e3d52;
  background: #070b11;
}

.pixel-hp-fill {
  height: 100%;
  width: 100%;
  background: var(--cyan);
  transition: width 220ms ease, background-color 200ms ease;
}

.pixel-hp-fill[data-tier="light"] { background: var(--amber); }
.pixel-hp-fill[data-tier="severe"] { background: var(--orange); }
.pixel-hp-fill[data-tier="paused"] { background: var(--red); }

.hud-sub-row {
  display: flex;
  justify-content: space-between;
  font: 600 11px / 1 var(--mono);
  color: var(--muted);
}

.hud-pts {
  color: var(--gold);
}

.hud-objective {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 490px;
  padding: 7px 12px;
  border: 1px solid rgba(240, 194, 107, 0.45);
  border-radius: 4px;
  background: rgba(14, 18, 28, 0.88);
  font-size: 12.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.obj-stage {
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(240, 194, 107, 0.16);
  color: var(--gold);
  font: 700 11px / 1.2 var(--mono);
  white-space: nowrap;
}

.obj-text {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-btn {
  padding: 6px 10px;
  border: 1px solid #3c4d66;
  border-radius: 4px;
  background: rgba(12, 17, 27, 0.9);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.hud-btn:hover {
  border-color: var(--gold);
  background: #1b2436;
}

.hud-controls {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 5px 10px;
  border: 1px solid rgba(152, 169, 190, 0.2);
  border-radius: 4px;
  background: rgba(9, 13, 21, 0.78);
  color: var(--muted);
  font-size: 11.5px;
  pointer-events: none;
}

.hud-controls kbd {
  padding: 1px 5px;
  border: 1px solid #485b75;
  border-radius: 3px;
  background: #182233;
  color: var(--ink);
  font: 600 10.5px / 1.2 var(--mono);
}

.hud-cond-tag {
  color: var(--cyan);
  font-family: var(--mono);
}

/* ---------- Title Overlay (over live lit room) ---------- */
.title-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 45%, rgba(9, 14, 24, 0.56), rgba(6, 9, 16, 0.84));
}

.title-card {
  width: min(560px, 100%);
  padding: 30px 32px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: rgba(12, 17, 27, 0.94);
  box-shadow: 0 0 0 3px #070a10, 0 22px 60px rgba(0, 0, 0, 0.75);
  text-align: center;
  display: grid;
  gap: 14px;
}

.title-eyebrow {
  color: var(--gold);
  font: 700 11px / 1 var(--mono);
  letter-spacing: 0.14em;
}

.title-card h1 {
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff6e0;
  text-shadow: 0 3px 0 #1e1810;
}

.title-lead {
  color: #c5d2e0;
  font-size: 13.5px;
  line-height: 1.75;
}

.title-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.title-footnote {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Retro RPG Buttons ---------- */
.rpg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #4d617d;
  border-radius: 4px;
  background: #1a2435;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 130ms ease, background-color 130ms ease;
}

.rpg-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: #25334a;
}

.rpg-btn-primary {
  border-color: var(--gold);
  background: #d8a45b;
  color: #141008;
}

.rpg-btn-primary:hover:not(:disabled) {
  background: #ecc07c;
}

.rpg-btn-cyan {
  border-color: rgba(102, 240, 226, 0.65);
  background: rgba(102, 240, 226, 0.14);
  color: var(--cyan);
}

.rpg-btn-cyan:hover:not(:disabled) {
  background: rgba(102, 240, 226, 0.24);
}

.rpg-btn-warn {
  border-color: rgba(227, 124, 77, 0.65);
  background: rgba(227, 124, 77, 0.16);
  color: #ffb894;
}

.rpg-btn-warn:hover:not(:disabled) {
  background: rgba(227, 124, 77, 0.26);
}

/* ---------- Classic Bottom RPG Dialogue Box ---------- */
.rpg-dialogue {
  position: absolute;
  inset: auto 18px 14px;
  z-index: 9;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 18px;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: rgba(10, 14, 23, 0.96);
  box-shadow: 0 0 0 2px #05080d, 0 16px 44px rgba(0, 0, 0, 0.78);
}

.dlg-portrait-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.dlg-speaker {
  font: 700 11px / 1.2 var(--mono);
  color: var(--gold);
  text-align: center;
}

.dlg-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  min-width: 0;
}

.dlg-text {
  font-size: 14px;
  line-height: 1.65;
  color: #f3f7fc;
  min-height: 44px;
}

.dlg-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Interactive Manual Mini-Puzzle Overlay ---------- */
.mini-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 9, 16, 0.78);
}

.mini-card {
  width: min(600px, 100%);
  max-height: 90%;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--cyan);
  border-radius: 6px;
  background: #111826;
  box-shadow: 0 0 0 2px #06090f, 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.mini-head {
  padding: 14px 18px;
  border-bottom: 1px solid #2b3a4f;
  background: #0d131f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mini-tag {
  color: var(--cyan);
  font: 700 11px / 1 var(--mono);
}

.mini-head h2 {
  margin-top: 3px;
  font-size: 16px;
}

.mini-content {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.mini-hint {
  color: var(--muted);
  font-size: 13px;
}

.puzzle-grid {
  display: grid;
  gap: 8px;
}

.puzzle-row-btn {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #33435b;
  border-radius: 4px;
  background: #161f30;
  text-align: left;
  font-size: 13px;
}

.puzzle-row-btn:hover {
  border-color: var(--gold);
  background: #1f2c42;
}

.puzzle-row-btn.is-wrong {
  border-color: var(--red);
  background: rgba(224, 93, 93, 0.14);
}

.puzzle-row-btn.is-hit {
  border-color: var(--cyan);
  background: rgba(102, 240, 226, 0.16);
}

.mono {
  font-family: var(--mono);
}

/* CCTV Scrubber Mini-game */
.cctv-screen {
  padding: 16px;
  border: 1px solid #33524f;
  border-radius: 4px;
  background: #0a1717;
  display: grid;
  gap: 12px;
}

.cctv-monitor-box {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid #2b4a46;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.2) 3px 4px), #0e2221;
  text-align: center;
  font-family: var(--mono);
}

.cctv-monitor-box.is-static {
  border-color: var(--gold);
  background: repeating-linear-gradient(45deg, #1b1710 0 6px, #251e14 6px 12px);
  color: var(--gold);
}

.cctv-slider {
  width: 100%;
  accent-color: var(--cyan);
}

/* Humidity Bar Chart Mini-game */
.sensor-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  height: 156px;
  padding: 16px 14px 10px;
  border: 1px solid #2b3b52;
  border-radius: 4px;
  background: #0c121d;
}

.bar-btn {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}

.bar-btn:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.03);
}

.bar-col {
  width: 38px;
  border-radius: 3px 3px 0 0;
  background: #3d6978;
}

.bar-btn.is-spike .bar-col {
  background: #e06555;
}

.bar-val {
  font: 700 12px / 1 var(--mono);
}

.bar-time {
  font: 500 11px / 1 var(--mono);
  color: var(--muted);
}

/* Slip Card */
.slip-card {
  padding: 14px 16px;
  border: 1px solid #3c4c63;
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  background: #0d1420;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}

.slip-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(152, 169, 190, 0.12);
}

.slip-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* ---------- Native Top-Layer Dialogs (modern-web-guidance compliant) ---------- */
dialog {
  width: min(640px, calc(100% - 28px));
  max-width: none;
  padding: 0;
  border: 2px solid #445773;
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  dialog {
    transform: translateY(8px) scale(0.97);
  }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgb(5 8 14 / 0);
  transition-property: background-color, display, overlay;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog[open]:where(:not([data-closing])) {
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: translateY(0) scale(1);

    @starting-style {
      transform: translateY(8px) scale(0.97);
    }
  }

  &::backdrop {
    background-color: rgb(5 8 14 / 0.74);

    @starting-style {
      background-color: rgb(5 8 14 / 0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop {
    transition-duration: 0.1s;
  }
}

.modal-box {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 86svh;
}

.modal-scroll {
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-kicker {
  color: var(--gold);
  font: 700 10.5px / 1.2 var(--mono);
  letter-spacing: 0.1em;
}

.modal-head h1 {
  margin-top: 3px;
  font-size: 18px;
}

.icon-x {
  width: 32px;
  height: 32px;
  border: 1px solid #3c4d66;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.icon-x:hover {
  background: #1d293d;
  color: var(--ink);
}

/* Notebook Timeline & Deduction */
.nb-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nb-node {
  padding: 8px 10px;
  border: 1px solid #2b394f;
  border-radius: 4px;
  background: #0d131f;
  font-size: 12px;
}

.nb-node.is-known {
  border-color: rgba(102, 240, 226, 0.45);
  background: rgba(102, 240, 226, 0.08);
}

.nb-node small {
  display: block;
  color: var(--gold);
  font-family: var(--mono);
}

.deduction-box {
  padding: 14px 16px;
  border: 1px solid rgba(240, 194, 107, 0.4);
  border-radius: 5px;
  background: #0d1421;
  display: grid;
  gap: 10px;
}

.ded-opt {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #2e3d54;
  border-radius: 4px;
  background: #141d2d;
  cursor: pointer;
}

.ded-opt:has(input:checked) {
  border-color: var(--cyan);
  background: rgba(102, 240, 226, 0.12);
}

/* Chat Modal */
.chat-modal-box {
  height: min(640px, 86svh);
}

.chat-knowledge {
  padding: 8px 12px;
  border: 1px solid #2f4059;
  border-radius: 4px;
  background: #0b111c;
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.chat-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #29384d;
  border-radius: 4px;
  background: #0a1019;
}

.cmsg {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.cmsg.user {
  align-self: flex-end;
  background: #233852;
}

.cmsg.agent {
  align-self: flex-start;
  background: #182334;
  border: 1px solid #2f425c;
}

.cmsg.system {
  align-self: center;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 999px;
  background: #111826;
  color: var(--amber);
  font: 500 11.5px / 1.3 var(--mono);
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cchip {
  padding: 5px 9px;
  border: 1px solid #3c4f6b;
  border-radius: 4px;
  background: #162031;
  font-size: 12px;
}

.cchip:hover {
  border-color: var(--cyan);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-form textarea {
  padding: 8px 10px;
  border: 1px solid #3f5370;
  border-radius: 4px;
  background: #090e16;
  resize: none;
}

/* Settings & Questionnaire */
.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-pill {
  padding: 5px 10px;
  border: 1px solid #3e526e;
  border-radius: 999px;
  background: #0d1421;
  font-size: 12px;
}

.preset-pill:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.settings-form {
  display: grid;
  gap: 12px;
}

.set-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.set-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.set-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.set-field input,
.set-field select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #3c4f6b;
  border-radius: 4px;
  background: #0a1019;
  color: var(--ink);
}

.err-text {
  color: var(--red);
  font-size: 12.5px;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.foot-right {
  display: flex;
  gap: 8px;
}

.likert-card {
  padding: 10px 12px;
  border: 1px solid #2b3a50;
  border-radius: 4px;
  background: #0c121e;
  display: grid;
  gap: 8px;
}

.likert-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.likert-cell {
  display: grid;
  place-items: center;
  padding: 6px 2px;
  border: 1px solid #344660;
  border-radius: 4px;
  background: #141d2c;
  font: 600 12px / 1 var(--mono);
  cursor: pointer;
}

.likert-cell:has(input:checked) {
  border-color: var(--cyan);
  background: rgba(102, 240, 226, 0.16);
  color: var(--cyan);
}

.likert-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #121a28;
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

@media (max-width: 780px) {
  .hud-objective,
  .hud-controls {
    display: none;
  }

  .rpg-dialogue {
    grid-template-columns: 1fr;
    inset: auto 8px 8px;
  }

  .dlg-portrait-wrap {
    flex-direction: row;
  }

  .nb-timeline,
  .set-grid-2,
  .set-grid-3 {
    grid-template-columns: 1fr;
  }
}


/* ---------- Pinned Detective Sticky Notes & Verdict Stamp ---------- */
.hud-pins {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 48%;
  pointer-events: none;
}

.hud-pin {
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid rgba(240, 194, 107, 0.55);
  background: rgba(36, 29, 15, 0.88);
  color: #ffe7a8;
  font: 700 11px / 1.25 var(--sans);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.hud-pin.is-cyan { border-color: rgba(102, 240, 226, 0.55); background: rgba(12, 30, 34, 0.88); color: #a8fff5; }
.hud-pin.is-red { border-color: rgba(242, 107, 91, 0.65); background: rgba(42, 15, 16, 0.9); color: #ffb3a8; }
.hud-pin.is-blue { border-color: rgba(100, 184, 255, 0.65); background: rgba(14, 26, 46, 0.9); color: #b5dcff; }
.hud-pin.is-green { border-color: rgba(82, 240, 176, 0.65); background: rgba(12, 36, 28, 0.9); color: #8cf7c8; }

.verdict-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 12;
  transform: translate(-50%, -50%) rotate(-5deg);
  padding: 12px 26px;
  border: 3px double var(--gold);
  border-radius: 6px;
  background: rgba(16, 14, 10, 0.92);
  color: #ffe399;
  font: 800 22px / 1.2 var(--sans);
  letter-spacing: 0.14em;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.78);
  pointer-events: none;
}

.verdict-stamp[data-tone="green"] {
  border-color: #66f0b8;
  color: #8af7cc;
}

/* ---------- Bespoke Visual Detective Props ---------- */
.prop-caption {
  color: #c5d4e4;
  font-size: 13px;
}

.prop-caption b {
  color: var(--gold);
}

.prop-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sticky-pin {
  padding: 5px 10px;
  border: 1px solid #d4b054;
  border-left: 4px solid #e0a738;
  border-radius: 3px;
  background: #2b2414;
  color: #ffe8ad;
  font-size: 12px;
}

.sticky-pin.is-red { border-color: #c95b4e; border-left-color: #f06556; background: #2d1616; color: #ffc5bc; }
.sticky-pin.is-blue { border-color: #4f88c9; border-left-color: #67b0ff; background: #142235; color: #c4e2ff; }

.prop-footer {
  display: flex;
  justify-content: flex-end;
}

/* 1. A-17 Cabinet SVG */
.prop-cabinet-stage {
  display: grid;
  gap: 10px;
}

.prop-svg {
  width: 100%;
  height: auto;
  border: 1px solid #2e4054;
  border-radius: 4px;
  background: #0a1017;
}

.svg-hit {
  cursor: pointer;
}

.svg-hit:hover rect,
.svg-hit:hover circle {
  filter: brightness(1.22);
}

.svg-hit.is-checked rect,
.svg-hit.is-checked circle {
  stroke: #66f0e2;
}

.prop-status-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.prop-chip {
  padding: 7px 10px;
  border: 1px solid #2f3e52;
  border-radius: 4px;
  background: #0c131f;
  color: var(--muted);
  font-size: 12px;
}

.prop-chip.is-done {
  border-color: rgba(102, 240, 226, 0.55);
  background: rgba(102, 240, 226, 0.1);
  color: var(--cyan);
}

/* 2. Retro Green-Phosphor CRT Monitor */
.crt-bezel {
  padding: 12px 14px;
  border: 2px solid #354745;
  border-radius: 8px;
  background: linear-gradient(180deg, #172021, #0e1416);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.65);
  display: grid;
  gap: 10px;
}

.crt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #8ab8ad;
}

.crt-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52f0b0;
  box-shadow: 0 0 8px #52f0b0;
}

.crt-tag {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(82, 240, 176, 0.14);
  color: #7df5c4;
}

.crt-tag.is-alert {
  background: rgba(240, 194, 107, 0.18);
  color: var(--gold);
}

.crt-canvas {
  width: 100%;
  height: auto;
  border: 2px solid #233c37;
  border-radius: 5px;
  background: #061411;
  image-rendering: pixelated;
}

.crt-controls {
  display: grid;
  gap: 6px;
}

.crt-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.crt-mark {
  color: var(--gold);
  font-weight: 700;
}

/* 3. Retro DOS Catalog Terminal */
.dos-screen {
  border: 2px solid #2b5944;
  border-radius: 5px;
  background: #081711;
  overflow: hidden;
  box-shadow: inset 0 0 28px rgba(24, 96, 62, 0.16);
}

.dos-bar {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  background: #143627;
  color: #82f0be;
  font-size: 11.5px;
}

.dos-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.dos-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dos-folder-ico {
  font-size: 32px;
  line-height: 1;
}

.dos-title {
  font-size: 15px;
  font-weight: 700;
  color: #c8fce2;
}

.dos-loc {
  margin-top: 3px;
  color: #7cd4ab;
  font-size: 13px;
}

.dos-loc strong {
  color: var(--gold);
}

.dos-warn-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid #e09648;
  border-radius: 4px;
  background: rgba(224, 150, 72, 0.14);
  color: #ffd59e;
  text-align: left;
  font-size: 12.5px;
}

.dos-warn-btn:hover {
  background: rgba(224, 150, 72, 0.26);
}

.dos-blink {
  color: #ff6b5e;
  font-size: 14px;
}

/* 4. Thermal Paper Receipt Roll + Highlighter */
.printer-slot {
  height: 10px;
  margin: 0 8px -6px;
  border-radius: 5px;
  background: linear-gradient(180deg, #070a10, #2c394b);
  border: 1px solid #485b75;
}

.thermal-paper {
  position: relative;
  margin: 0 14px;
  padding: 14px 12px;
  background: #f2ead4;
  color: #1e242c;
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
  display: grid;
  gap: 6px;
}

.thermal-head {
  padding-bottom: 6px;
  border-bottom: 1.5px dashed #9d947e;
  color: #5d5648;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.08em;
}

.thermal-row {
  display: grid;
  grid-template-columns: 48px 106px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.45);
  color: #1c222a;
  font-size: 12.5px;
  text-align: left;
}

.thermal-row:hover {
  background: rgba(255, 232, 102, 0.32);
  border-color: #c8a232;
}

.thermal-row.is-highlighted {
  background: #ffe866;
  border-color: #c49818;
  font-weight: 700;
}

.thermal-row.is-miss {
  background: rgba(224, 93, 93, 0.16);
}

.thermal-time {
  font-weight: 700;
  color: #363e4a;
}

.role-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font: 700 11px / 1.2 var(--mono);
  color: #fff;
  text-align: center;
}

.role-tag.is-blue { background: #2c6ec2; }
.role-tag.is-green { background: #2e846b; }
.role-tag.is-gray { background: #5f6c7d; }

.thermal-mark {
  font-size: 11.5px;
  color: #6d6452;
}

/* 5. Hanging Employee ID Badges */
.badge-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.id-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  border: 2px solid #354760;
  border-top: 5px solid var(--badge-accent);
  border-radius: 6px;
  background: #141c2b;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.id-badge:hover {
  border-color: var(--gold);
  background: #1b263a;
}

.id-badge.is-selected {
  border-color: var(--cyan);
  background: rgba(73, 150, 232, 0.18);
}

.id-badge.is-miss {
  border-color: var(--red);
  opacity: 0.65;
}

.id-clip {
  width: 24px;
  height: 5px;
  border-radius: 99px;
  background: #4e627d;
}

.id-stripe {
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--badge-accent);
  color: #081018;
  font-size: 11px;
  font-weight: 800;
}

.id-avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  border: 1px solid #32435b;
}

.id-name {
  font-size: 15px;
  color: #fff;
}

.id-role {
  font-size: 11.5px;
  color: var(--gold);
}

.id-perms {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* 6. Glass-Cased Humidity Gauge */
.gauge-box {
  padding: 12px;
  border: 2px solid #3a4c63;
  border-radius: 6px;
  background: #0d1420;
  display: grid;
  gap: 10px;
}

.gauge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
}

.gauge-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5b52;
  box-shadow: 0 0 8px #ff5b52;
}

.hum-canvas {
  width: 100%;
  height: auto;
  border: 1px solid #2b3c52;
  border-radius: 4px;
  cursor: pointer;
}

.gauge-btns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.gauge-pick {
  padding: 7px 6px;
  border: 1px solid #354861;
  border-radius: 4px;
  background: #152032;
  font-size: 12px;
}

.gauge-pick.is-danger {
  border-color: rgba(255, 107, 94, 0.55);
  color: #ffb8b0;
}

.gauge-pick:hover {
  border-color: var(--gold);
}

/* 7. Kraft Paper Handoff Slip + Wax Seal & Job Stamp */
.kraft-paper {
  padding: 16px;
  border: 1px solid #bfa474;
  border-radius: 4px;
  background: linear-gradient(160deg, #efe0bc, #e2ce9f);
  color: #2c2418;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 12px;
}

.kraft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #ad9263;
  font-weight: 800;
  font-size: 15px;
}

.kraft-stamp {
  padding: 2px 8px;
  border: 2px solid #b53a2f;
  border-radius: 3px;
  color: #b53a2f;
  font: 700 11px / 1.3 var(--mono);
  transform: rotate(-3deg);
}

.kraft-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 186px;
  gap: 14px;
  align-items: center;
}

.kraft-lines {
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.kraft-sig span {
  font-style: italic;
  font-weight: 800;
  font-size: 16px;
  color: #1d3c73;
  text-decoration: underline;
}

.kraft-attachments {
  display: grid;
  gap: 8px;
}

.seal-sticker,
.job-stub {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 4px;
  text-align: center;
  transition: transform 120ms ease;
}

.seal-sticker {
  border: 2px dashed #ff9b8e;
  background: #a82824;
  color: #fff3f0;
}

.job-stub {
  border: 2px dashed #8cc4ff;
  background: #1f4f85;
  color: #eef6ff;
}

.seal-sticker strong,
.job-stub strong {
  font-size: 16px;
}

.seal-sticker small,
.seal-sticker span,
.job-stub small,
.job-stub span {
  font-size: 11px;
  opacity: 0.92;
}

.seal-sticker.is-pinned,
.job-stub.is-pinned {
  border-style: solid;
  border-color: #ffe285;
  box-shadow: 0 0 0 2px #2c2418;
}

/* 8. Three Heavy Steel Vault Doors */
.vault-doors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vault-door {
  min-height: 158px;
  padding: 12px 10px;
  border: 2px solid #485d75;
  border-radius: 5px;
  background: linear-gradient(180deg, #1d2938, #121a25);
  box-shadow: inset 0 0 0 3px #0c121b;
  display: grid;
  place-items: center;
}

.vault-door:hover {
  border-color: var(--gold);
}

.vault-door.is-opened {
  border-color: #66f0b8;
  background: radial-gradient(circle at 50% 45%, #193832, #0c1816);
}

.vault-door.is-miss {
  border-color: var(--red);
  opacity: 0.6;
}

.vd-front,
.vd-inside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.vd-plate {
  padding: 2px 10px;
  border: 1px solid #6b8099;
  border-radius: 3px;
  background: #0d141f;
  color: #dce8f5;
  font-weight: 800;
  font-size: 14px;
}

.vd-seal {
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 800;
  font-size: 13px;
}

.vd-seal.is-crimson { background: #b82d28; color: #fff; border: 1px solid #ff9488; }
.vd-seal.is-gray { background: #485463; color: #dbe3ec; }
.vd-seal.is-teal { background: #266b6b; color: #d1fffb; }

.vd-handle {
  width: 28px;
  height: 7px;
  border-radius: 99px;
  background: #7c91a8;
}

.vd-hint {
  font-size: 11px;
  color: var(--muted);
}

.vd-folder {
  width: 74px;
  height: 54px;
  border: 2px solid #73c5ff;
  border-radius: 4px;
  background: linear-gradient(135deg, #25578c, #17375c);
  display: grid;
  place-items: center;
  color: #e6f4ff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(102, 240, 226, 0.35);
}

/* 9. Dual-Machine Data Conduit Board */
.pipe-board {
  padding: 14px;
  border: 1px solid #32465e;
  border-radius: 5px;
  background: #0b121c;
  display: grid;
  gap: 10px;
}

.pipe-headers {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.pipe-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #2b3c52;
  border-radius: 4px;
  background: #121b2a;
}

.pipe-row:hover {
  border-color: var(--gold);
}

.pipe-row.is-broken {
  border-color: rgba(242, 107, 91, 0.55);
  background: rgba(242, 107, 91, 0.08);
}

.pipe-row.is-locked {
  border-color: var(--cyan);
  background: rgba(102, 240, 226, 0.14);
}

.pipe-node {
  font-weight: 700;
  color: var(--gold);
}

.pipe-wire {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
}

.wire-full {
  color: #5ef0b4;
  font-family: var(--mono);
  font-size: 11.5px;
}

.wire-seg {
  flex: 1;
  height: 3px;
  background: #ff7a6b;
}

.wire-seg.is-dead {
  background: #3d4b5c;
}

.wire-gap {
  padding: 2px 8px;
  border: 1px solid #ff7a6b;
  border-radius: 3px;
  background: #331414;
  color: #ffb8ad;
  font-size: 11.5px;
  font-weight: 700;
}

.pipe-end {
  text-align: right;
  font-size: 12px;
}

/* Detective Corkboard Cards in Notebook */
.cork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.cork-card {
  position: relative;
  padding: 10px 10px 8px;
  border: 1px solid #6b5739;
  border-radius: 4px;
  background: linear-gradient(180deg, #272017, #1c1711);
  font-size: 12px;
  display: grid;
  gap: 3px;
}

.cork-pin {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e8584f;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.cork-card small {
  color: var(--gold);
  font-size: 10.5px;
}

/* ---------- Cinematic Widescreen Cutscene Chrome ---------- */
.cinema-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 11%;
  z-index: 7;
  background: #04060a;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cinema-bar-top { top: 0; border-bottom: 1px solid rgba(240, 194, 107, 0.16); }
.cinema-bar-bottom { bottom: 0; border-top: 1px solid rgba(240, 194, 107, 0.16); }

.cinema-sub {
  position: absolute;
  left: 50%;
  bottom: 3.4%;
  z-index: 8;
  transform: translateX(-50%);
  padding: 4px 16px;
  color: #f4e6c4;
  font: 600 14px / 1.35 var(--sans);
  letter-spacing: 0.1em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  pointer-events: none;
}

.cinema-skip {
  position: absolute;
  right: 16px;
  top: 2.8%;
  z-index: 9;
  padding: 4px 11px;
  border: 1px solid rgba(240, 194, 107, 0.42);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.72);
  color: #d6c8a8;
  font: 600 11.5px / 1.2 var(--mono), var(--sans);
}

.cinema-skip:hover {
  border-color: var(--gold);
  color: #fff;
}

/* ---------- Mobile Handheld Portrait & Short-Viewport Responsive Layout ---------- */
@media (max-width: 820px), (max-height: 540px) {
  .title-overlay,
  .mini-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    padding: 14px;
    overflow-y: auto;
  }

  .mini-card {
    max-height: 90dvh;
  }

  .rpg-dialogue {
    position: fixed;
    inset: auto 10px 10px;
    z-index: 42;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .dlg-portrait-wrap {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
  }

  .pixel-portrait-lg {
    width: 38px;
    height: 43px;
  }

  .dlg-text {
    min-height: 22px;
    font-size: 13.5px;
  }

  .verdict-stamp {
    position: fixed;
    font-size: 18px;
    padding: 10px 18px;
  }
}

@media (max-width: 820px) {
  .arcade-shell {
    display: block;
    min-height: 100dvh;
    padding: 8px 8px 18px;
  }

  .stage-viewport {
    width: 100%;
    aspect-ratio: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    content-visibility: visible;
  }

  .hud-top {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    pointer-events: auto;
  }

  .hud-ema {
    min-width: 0;
    width: 100%;
    padding: 6px 10px 6px 8px;
  }

  .hud-objective {
    display: flex;
    max-width: none;
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
  }

  .hud-tools {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .hud-btn {
    padding: 7px 4px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .canvas-box {
    width: 100%;
    height: auto;
    aspect-ratio: 480 / 272;
    border: 2px solid #2b384d;
    border-radius: 8px;
    background: #090d14;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  }

  .hud-controls {
    display: none;
  }

  .hud-pins {
    position: static;
    max-width: none;
    justify-content: flex-start;
    gap: 5px;
  }

  .mobile-deck {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #2c3b52;
    border-radius: 8px;
    background: rgba(12, 17, 27, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }

  .dpad {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 3px;
    touch-action: none;
    user-select: none;
  }

  .dpad-btn {
    display: grid;
    place-items: center;
    border: 1.5px solid #415573;
    border-radius: 6px;
    background: #182334;
    color: #dce8f5;
    font-size: 15px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .dpad-btn.is-pressed,
  .dpad-btn:active {
    border-color: var(--gold);
    background: #2b3c57;
    color: var(--gold);
  }

  .dpad-up { grid-column: 2; grid-row: 1; }
  .dpad-left { grid-column: 1; grid-row: 2; }
  .dpad-mid { grid-column: 2; grid-row: 2; border-radius: 4px; background: #101723; border: 1px solid #263448; }
  .dpad-right { grid-column: 3; grid-row: 2; }
  .dpad-down { grid-column: 2; grid-row: 3; }

  .mob-actions {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .mob-act-btn {
    width: 100%;
    min-height: 44px;
    font-size: 13.5px;
  }

  .mob-sub-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .mob-sub-btn {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .mob-tip {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
  }

  .cinema-sub {
    font-size: 12px;
    bottom: 2%;
    padding: 2px 10px;
  }

  .cinema-skip {
    top: 4px;
    right: 6px;
    font-size: 10.5px;
    padding: 3px 8px;
  }

  /* Responsive compact visual props inside mobile screen */
  .prop-status-row,
  .kraft-body {
    grid-template-columns: 1fr;
  }

  .thermal-paper {
    margin: 0;
    padding: 10px 8px;
  }

  .thermal-row {
    grid-template-columns: 42px 86px minmax(0, 1fr);
    gap: 6px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .thermal-mark {
    display: none;
  }

  .badge-wall,
  .vault-doors {
    gap: 7px;
  }

  .id-badge {
    padding: 10px 5px 8px;
  }

  .id-avatar {
    width: 36px;
    height: 36px;
  }

  .id-name {
    font-size: 13px;
  }

  .id-role,
  .id-perms {
    font-size: 10px;
  }

  .vault-door {
    min-height: 126px;
    padding: 8px 4px;
  }

  .vd-folder {
    width: 58px;
    height: 44px;
    font-size: 10px;
  }

  .pipe-row {
    grid-template-columns: 56px minmax(0, 1fr) 52px;
    gap: 6px;
    padding: 8px 7px;
    font-size: 11px;
  }

  .wire-full,
  .wire-gap {
    font-size: 10.5px;
  }

  .gauge-btns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .title-card {
    padding: 22px 18px;
  }
}
