* {
  box-sizing: border-box;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%23a7ff7a' stroke-width='2'/%3E%3Cline x1='15' y1='15' x2='22' y2='22' stroke='%23a7ff7a' stroke-width='2'/%3E%3C/svg%3E") 10 10, auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Mono", monospace;
  background: #060707;
  color: #e5e4d4;
  overflow-x: hidden;
  position: relative;
}

.grain,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.grain {
  background-image: radial-gradient(#ffffff14 1px, transparent 0);
  background-size: 4px 4px;
  opacity: 0.2;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    #00000022 3px,
    #00000022 4px
  );
  mix-blend-mode: multiply;
}

.top-bar {
  padding: 0;
  border-bottom: 1px solid #ff474769;
  background: #080909ee;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 0 20px #000;
  width: 100%;
  flex-shrink: 0;
}

.top-bar-brand {
  text-align: center;
  padding: 1rem clamp(0.75rem, 4vw, 1.5rem) 0.75rem;
}

h1 {
  margin: 0 auto;
  color: #ff4d4d;
  letter-spacing: 2px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.65rem, 2.5vw, 1.05rem);
  line-height: 1.5;
  text-shadow: 2px 2px #000;
  max-width: 28em;
}

.subtitle {
  margin: 0.75rem auto 0;
  max-width: 22em;
  font-family: "Permanent Marker", cursive;
  color: #7CFF6B;
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  line-height: 1.35;
  text-align: center;
}

.hud {
  display: flex;
  gap: 0.7rem;
  font-size: 0.74rem;
  flex-wrap: wrap;
}

.hud span {
  background: #111315;
  border: 1px solid #ff4d4d42;
  padding: 0.35rem 0.5rem;
  color: #a7ff7a;
  font-family: "Press Start 2P", monospace;
}

.hud-scroll {
  width: 100%;
  margin: 0;
  border: none;
  border-top: 1px solid #ff3b3070;
  border-bottom: 1px solid #ff3b3070;
  border-radius: 0;
  background: #101827;
  overflow: hidden;
  white-space: nowrap;
}

.hud-marquee {
  display: inline-block;
  padding: 0.55rem 0;
  padding-left: 0.5rem;
  color: #7CFF6B;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.5rem, 1.8vw, 0.65rem);
  animation: hud-scroll 22s linear infinite;
}

@keyframes hud-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

/* Main game UI: hidden until user taps OPEN CASE FILE (see [hidden] on #app) */
#app.game-main.is-active {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  max-width: 100vw;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

.game-card {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  align-self: stretch;
  background: linear-gradient(170deg, #141414, #090a0b);
  border: none;
  border-top: 1px solid #ff5f5f55;
  border-radius: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.75rem, 4vw, 2rem) 1rem;
  position: relative;
  box-shadow: inset 0 0 60px #00000066;
  display: flex;
  flex-direction: column;
}

.main-grid {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.75rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.level-theme,
#level-title {
  display: none !important;
}

.level-content {
  line-height: 1.5;
  color: #e9dfc5;
  margin-bottom: 0;
  background: #E8D8B8;
  border: 2px solid #6d5e45;
  color: #1b1710;
  padding: clamp(0.65rem, 2vw, 1rem);
  position: relative;
  overflow: visible;
  max-height: none;
  min-height: 5.5rem;
  width: 100%;
}

.level-content::after {
  content: "SIBLING NOTE";
  position: absolute;
  right: 8px;
  top: 8px;
  font-family: "Gaegu", cursive;
  color: #7b1313;
  transform: rotate(-4deg);
  font-size: 1.1rem;
}

.puzzle-zone {
  border: 1px solid #ff4d4d4d;
  background: #0b0c0f;
  border-radius: 2px;
  padding: clamp(0.65rem, 2vw, 1rem);
  flex: 1 1 auto;
  min-height: min(42vh, 420px);
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
}

.actions {
  margin-top: 1rem;
}

.bottom-controls {
  margin-top: auto;
  padding-top: 0.65rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

button {
  border: 1px solid #ff6b6b61;
  background: #1a1d20;
  color: #f3efdc;
  padding: 0.6rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
}

button:hover {
  transform: translateY(-1px) rotate(-0.5deg);
  background: #282d31;
  animation: jitter 0.2s linear 1;
}

@keyframes jitter {
  0% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

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

.feedback {
  min-height: 1.5rem;
  margin: 0.65rem auto 0;
  max-width: 900px;
  width: 100%;
  font-weight: 700;
  color: #7CFF6B;
  text-transform: uppercase;
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  text-align: center;
}

.inventory {
  color: #f9c49f;
  font-size: 0.9rem;
  margin: 0;
  font-family: "Gaegu", cursive;
  letter-spacing: 1px;
}

.input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

input[type="text"] {
  flex: 1;
  background: #0d1012;
  color: #a7ff7a;
  border: 1px solid #a7ff7a69;
  border-radius: 2px;
  padding: 0.6rem;
  font-family: "IBM Plex Mono", monospace;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.floating {
  animation: float 2.8s ease-in-out infinite, tilt 0.7s steps(2) infinite;
  border-left: 3px solid #ff5959;
  padding-left: 0.4rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.scene-note {
  font-family: "Gaegu", cursive;
  color: #ffd9af;
  font-size: 1.2rem;
}

@keyframes tilt {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1deg); }
}

.invisible-clue {
  color: #0b0c0f;
  user-select: text;
  margin-top: 1rem;
  border-top: 1px dashed #ffffff1f;
  padding-top: 0.6rem;
}

.facts-marquee {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
  animation: run 9s linear infinite;
  color: #a7ff7a;
  font-weight: 700;
}

@keyframes run {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.moving-tag {
  position: absolute;
  top: 60%;
  left: 10%;
  animation: tagmove 4s linear infinite;
  font-size: 0.8rem;
}

@keyframes tagmove {
  0% { left: 5%; top: 65%; }
  25% { left: 74%; top: 20%; }
  50% { left: 50%; top: 75%; }
  75% { left: 18%; top: 30%; }
  100% { left: 5%; top: 65%; }
}

.snack-token {
  position: absolute;
  font-size: 1.1rem;
  background: transparent;
  border: 0;
  opacity: 0.3;
  z-index: 10;
}

.snack-token:hover {
  opacity: 1;
}

.hidden {
  display: none !important;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: #020202;
  display: grid;
  place-items: center;
  z-index: 100;
}

.boot-sequence {
  position: fixed;
  inset: 0;
  background: #050507;
  z-index: 180;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.boot-lines {
  font-family: "Press Start 2P", monospace;
  color: #7cff6b;
  font-size: 0.75rem;
  line-height: 1.8;
  min-height: 220px;
}

.boot-line-system {
  font-family: "Press Start 2P", monospace;
  color: #7cff6b;
}

/* Birthday whisper — boot splash only */
.boot-line-birthday {
  font-family: "Gaegu", cursive;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  color: #ffd9af;
  line-height: 1.5;
  margin: 0.2rem 0;
  letter-spacing: 0.02em;
}

.boot-note {
  margin-top: 1rem;
  color: #b8b8b8;
  font-size: 0.8rem;
}

#boot-start {
  margin-top: 1.5rem;
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  padding: 1rem 1.5rem;
  background: #101827;
  color: #FF3B30;
  border: 2px solid #FF3B30;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

#boot-start:hover {
  box-shadow: 0 0 22px #FF3B30, 0 0 40px rgba(255, 59, 48, 0.45);
  color: #7CFF6B;
}

.loading-text {
  color: #a7ff7a;
  font-size: 0.9rem;
  font-family: "Press Start 2P", monospace;
  animation: pulse 0.8s infinite alternate, glitch 0.25s infinite;
}

@keyframes glitch {
  0% { text-shadow: 2px 0 #ff5050; }
  100% { text-shadow: -2px 0 #66ff66; }
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.queen-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(45deg, #30083f, #7e0520);
  color: white;
  z-index: 260;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: "Press Start 2P", monospace;
}

.alex-popup {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 130;
  background: #2a0812;
  border: 1px solid #ff6489;
  border-radius: 2px;
  padding: 0.8rem;
  width: 260px;
  animation: pulse 0.8s infinite alternate;
}

.gel-light-grid {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.light {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #fff4;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.light.gel-stage-0 {
  background: #22262c;
}

.light.gel-stage-1 {
  background: linear-gradient(145deg, #5c3848, #3a2835);
  box-shadow: inset 0 0 10px #ff62c144;
}

.light.gel-stage-2 {
  background: #ff62c1;
  box-shadow: 0 0 14px #ff62c166;
}

.gel-board-legend {
  margin-bottom: 0.35rem !important;
  font-size: 1.05rem !important;
}

.scene-board {
  width: 100%;
  min-height: 170px;
  border: 1px dashed #ffffff44;
  position: relative;
  padding: 0.7rem;
  margin-bottom: 0.8rem;
}

.glitching {
  animation: glitch-card 0.2s steps(2) 2;
}

@keyframes glitch-card {
  0% { transform: translateX(0); filter: hue-rotate(0deg); }
  25% { transform: translateX(4px); filter: hue-rotate(40deg); }
  50% { transform: translateX(-4px); filter: hue-rotate(-25deg); }
  100% { transform: translateX(0); filter: hue-rotate(0deg); }
}

.bedroom-scene .scene-note {
  margin-bottom: 0.75rem;
}

.bedroom-hotspot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.65rem;
  align-items: end;
  justify-items: stretch;
  width: 100%;
  margin-top: 0.35rem;
}

button.bedroom-hotspot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 128px;
  padding: 0.55rem 0.4rem 0.65rem;
  background: linear-gradient(180deg, #13161a 0%, #0e1014 100%);
  border: 1px solid #ff3b3040;
  border-radius: 2px;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button.bedroom-hotspot:hover {
  transform: translateY(-3px);
  border-color: #ff3b3099;
  box-shadow: 0 4px 0 #000, 0 0 14px rgba(255, 59, 48, 0.18);
}

.bedroom-pixel-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}

.bedroom-pixel-art svg {
  width: min(92px, 100%);
  height: auto;
  max-height: 88px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bedroom-pixel-label {
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  color: #7CFF6B;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.35;
}

.bedroom-hotspot[data-hotspot="closet"] {
  position: relative;
  overflow: hidden;
}

.bedroom-hotspot[data-hotspot="closet"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #a7ff7a26, transparent);
  transform: translateX(-100%);
  animation: closet-open 1.2s infinite;
  pointer-events: none;
}

@keyframes closet-open {
  to { transform: translateX(100%); }
}

@media (max-width: 900px) {
  .hud-marquee {
    font-size: 0.52rem;
    padding: 0.5rem 0;
  }
  .puzzle-zone {
    min-height: 36vh;
  }
}

.case-unlocked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Press Start 2P", monospace;
  color: #ff4d4d;
  background: #000000b8;
  font-size: 1rem;
  animation: stamp 0.4s ease-out;
}

@keyframes stamp {
  from { transform: scale(2.5) rotate(-11deg); opacity: 0; }
  to { transform: scale(1) rotate(-5deg); opacity: 1; }
}

.shake-screen {
  animation: wrong-shake 0.18s linear 3;
}

@keyframes wrong-shake {
  0% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

/* Expanded campaign UX */
.snack-letter-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0;
}
.snack-letter {
  background: #ffd84d;
  color: #1a1207;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 2px;
}

.clue-israel-flat {
  color: #0b0c0f;
  user-select: text;
}

.visible-hint-evidence {
  color: #7cff6b;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.passport-scan {
  border: 1px dashed #ffffff33;
  padding: 0.55rem;
  border-radius: 3px;
  line-height: 1.55;
}

.alex-board-cards {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  margin-top: 0.55rem;
}
.alex-card {
  background: #111927;
  border: 1px solid #ff4d4d55;
  padding: 0.45rem 0.65rem;
  text-align: left;
  font-size: 0.78rem;
}

.purchase-scroll {
  max-height: 170px;
  overflow-y: auto;
  margin: 0.45rem 0;
  border: 1px solid #ffffff22;
}
.purchase-row {
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
}
.purchase-hint-row {
  padding: 0.4rem;
  border-top: 2px solid #ff4d4d88;
  color: #ffb4b4;
}

.fact-row-btn {
  display: block;
  width: 100%;
  margin: 0.3rem 0;
  text-align: left;
  font-size: 0.74rem;
}
.fact-letter-banner,
.genius-letter-banner {
  display: flex;
  gap: 0.35rem;
  color: #ffd84d;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

.speech-bubbles {
  border-left: 3px solid #ff6b6b66;
  padding-left: 0.65rem;
  margin: 0.35rem 0;
}
.speech-line {
  margin: 0.28rem 0;
  font-family: "Gaegu", cursive;
  font-size: 1.15rem;
}
.juke-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.4rem;
}
.queen-micro-cue {
  margin-top: 0.5rem;
}

/* Loro Piana — scrolling runway belt */
.loro-runway-board {
  margin-top: 0.2rem;
}
.loro-runway-viewport {
  overflow: hidden;
  border: 1px dashed #ffd84d55;
  border-radius: 4px;
  background: linear-gradient(180deg, #07090d 0%, #10141c 50%, #07090d 100%);
  margin-top: 0.4rem;
  position: relative;
  box-shadow: inset 0 0 40px #000a;
}
.loro-runway-viewport::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
  margin-left: -1px;
  background: linear-gradient(
    transparent 0%,
    #88c8ff33 25%,
    #88c8ff55 50%,
    #88c8ff33 75%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}
.loro-marquee-inner {
  display: flex;
  flex-direction: row;
  width: max-content;
  animation: loro-marquee 24s linear infinite;
}
.loro-runway-won .loro-marquee-inner {
  animation-play-state: paused;
}
@keyframes loro-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loro-marquee-inner {
    animation-duration: 80s;
  }
}
.loro-strip {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  gap: 0.42rem;
  padding: 0.7rem 0.55rem;
  align-items: center;
}
.loro-chip {
  flex-shrink: 0;
  min-width: 5.75rem;
  padding: 0.48rem 0.55rem;
  font-size: 0.62rem;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.04em;
  border: 1px solid #ff6b6b44;
  color: #b8b4aa;
  background: #141820;
  cursor: pointer;
}
.loro-chip:hover {
  border-color: #ffffff44;
}
.loro-runway-hint {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.88;
  color: #e8d8b8;
}

.fabric-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.jetski-wave {
  min-height: 240px;
  background: radial-gradient(#0b2840cc, #05080e);
}
.jetski-wave-status {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #e8d8b8;
}
.jetski-wave-msg {
  margin: 0 0 0.35rem;
}
.jetski-wave-msg strong {
  color: #ff8c8c;
}
.jetski-wave-ms {
  margin: 0;
  font-size: 0.68rem;
  opacity: 0.82;
  color: #7cff6b;
}
.jetski-wave-calm {
  margin: 0;
  opacity: 0.9;
}
.jetski-lane-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}
.jetski-lane-picker button {
  flex: 1;
  min-width: 86px;
  font-size: 0.72rem;
  padding: 0.55rem 0.4rem;
}
.jetski-lane-picker button.jetski-lane-active {
  outline: 2px solid #ffd84d;
  outline-offset: 2px;
  box-shadow: 0 0 12px #ffd84d33;
}

.hide-note-block {
  margin: 0.55rem 0;
  padding: 0.5rem;
  border-left: 4px solid #7cff6b77;
}

.hide-game-board .scene-board {
  min-height: 0;
}
.hide-game-status {
  margin: 0.45rem 0 0.35rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #7cff6bcc;
  font-family: "IBM Plex Mono", monospace;
}
.hide-floor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.55rem;
  margin-top: 0.35rem;
}
.hide-floor-grid button {
  min-height: 2.75rem;
  font-size: 0.68rem;
  line-height: 1.25;
  transition: box-shadow 0.08s ease, border-color 0.08s ease;
}
.hide-floor-grid button:disabled {
  opacity: 0.55;
}
.hide-pulse-lit {
  border-color: #ffd84dcc !important;
  box-shadow:
    0 0 18px #ffd84d55,
    inset 0 0 14px #ffd84d18;
  color: #ffd84d !important;
}
.hide-silence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.hide-silence-grid button {
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: left;
  padding: 0.55rem 0.6rem;
}

.camp-trick-status {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.camp-trick-stage {
  margin-top: 0.45rem;
}
.camp-trick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.48rem;
}
.camp-trick-grid button {
  font-size: 0.66rem;
  line-height: 1.3;
  text-align: left;
  padding: 0.55rem 0.55rem;
  min-height: 2.85rem;
}
.camp-trick-gap {
  margin-top: 0.65rem;
}
.camp-ticker-wrap {
  text-align: center;
  padding: 0.35rem 0;
}
.camp-ticker-display {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: #ffd84d;
  padding: 1rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px dashed #ffd84d66;
  background: #0a0d12;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.fencing-coach-line {
  min-height: 2.75rem;
  color: #ffd84d;
  font-weight: 700;
}
.fence-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.curtain-tease {
  padding: 0.5rem;
  border: 1px dashed #ff62c177;
}

.pair-match-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.4rem;
}
.pair-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pair-active {
  outline: 2px solid #ffd84d !important;
  outline-offset: 1px;
}
.pair-solved {
  opacity: 0.45;
}

.mathis-tw-code {
  margin-top: 0.55rem;
  padding: 0.65rem;
  border: 2px solid #ff4d4d88;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  color: #7cff6b;
  letter-spacing: 0.1em;
}

.detention-slip {
  margin-top: 0.5rem;
  border: 1px solid #ff4d4d66;
  padding: 0.55rem;
  background: #12090c88;
}

.forensic-log {
  margin-top: 0.65rem;
  padding: 0.5rem 0 0;
  border-top: 1px dashed #ffffff22;
  max-height: 11rem;
  overflow-y: auto;
}
.forensic-line {
  margin: 0.35rem 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.camera-block-pixel {
  margin: 0.55rem 0;
  padding: 0.6rem;
  text-align: center;
  border: 2px dashed #ffffff33;
}
.camera-regret-msg {
  min-height: 1.75rem;
  font-size: 0.78rem;
  color: #7cff6b;
}

.gamer-room-scene .door-screen-glow {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 2px solid #66d9ef77;
}
.door-screen-glow.hidden {
  display: none !important;
}

.love-tokens-out {
  margin-top: 0.55rem;
  color: #ffd84d;
  font-family: "IBM Plex Mono", monospace;
}

.final-letter-plain {
  background: #fff6eb;
  color: #1e170f;
  border: 2px solid #73624a;
  padding: clamp(0.75rem, 2vw, 1.1rem);
  line-height: 1.7;
}
.final-letter-plain::after {
  display: none;
}
.evidence-wall-mini {
  font-family: "Gaegu", cursive;
}

.pulse-glow {
  animation: glow-pulse 0.85s alternate infinite linear;
}

@keyframes glow-pulse {
  from {
    box-shadow: 0 0 6px #66d9efaa;
    color: #8ee7ff;
  }
  to {
    box-shadow: 0 0 16px #7cff6bcc;
    color: #7cff6b;
  }
}

body.epilogue-open {
  overflow: hidden;
}

.epilogue-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(ellipse at top, #2a241c 0%, #0d0b09 55%);
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.epilogue-layer.hidden {
  display: none !important;
}

.epilogue-screen.hidden {
  display: none !important;
}

.epilogue-inner {
  max-width: 38rem;
  margin: 0 auto;
}

.epilogue-kicker {
  font-family: "Permanent Marker", cursive;
  color: #ffd84d;
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  letter-spacing: 0.04em;
}

.epilogue-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.epilogue-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.epilogue-primary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  border: 2px solid #ff8c42;
  background: #1a1512;
  color: #fff6eb;
  cursor: pointer;
}

.epilogue-primary:hover {
  border-color: #ffd84d;
  color: #7cff6b;
}

.epilogue-secondary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #73624a88;
  background: transparent;
  color: #e8d8b8;
  cursor: pointer;
}

.epilogue-secondary:hover {
  border-color: #ffd84d66;
  color: #ffd84d;
}

.epilogue-feedback {
  margin-top: 0.75rem;
  font-family: "Gaegu", cursive;
  font-size: 1rem;
  color: #7cff6b;
}

.epilogue-evidence-foot {
  margin-top: 0.85rem !important;
  opacity: 0.92;
}

.epilogue-video-inner {
  max-width: min(42rem, 100%);
}

.family-video {
  width: 100%;
  max-height: min(70vh, 520px);
  border: 2px solid #73624a;
  background: #000;
  display: block;
}

.epilogue-back {
  margin-top: 1rem;
}
