:root {
  color-scheme: dark;
  --ink: #f6efe3;
  --paper: #d8c7a5;
  --amber: #e7b45d;
  --rose: #c46b6f;
  --mint: #89c2a2;
  --deep: #07070a;
  --panel: rgba(18, 14, 15, 0.9);
  --line: rgba(246, 239, 227, 0.22);
  --overlay-width: min(860px, calc(100vw - 160px));
  --overlay-max-height: 82svh;
  --tv-screen-width: min(620px, 100%);
  --room-object-fit: cover;
  --room-object-position: center center;
  --room-brightness: 1.05;
  --falloff-opacity: 0.32;
  --window-sky-left: 67.9%;
  --window-sky-top: 4.8%;
  --window-sky-width: 17%;
  --window-sky-height: 40%;
  --window-sky-opacity: 0.44;
  --lava-left: 80.8%;
  --lava-top: 50.6%;
  --lava-width: 4.6%;
  --lava-height: 27.2%;
  --lava-opacity: 0.78;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, #2a1b25 0%, #0b0a10 52%, #030305 100%);
  color: var(--ink);
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

html.tv-zoom-open,
body.tv-zoom-open,
html.tv-view-open,
body.tv-view-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  cursor: pointer;
}

.signal-console {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 24;
  --signal-tab-visible-width: clamp(44px, 3.75vw, 52px);
  --signal-button-offset: calc(100% - var(--signal-tab-visible-width));
  --signal-button-y: 0px;
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
}

.signal-console:hover,
.signal-console--open {
  --signal-button-offset: 0px;
}

.signal-console__button {
  position: relative;
  z-index: 3;
  display: block;
  width: clamp(99px, 11.475vw, 152px);
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.42));
  transform: translateX(var(--signal-button-offset)) translateY(var(--signal-button-y));
  transition:
    filter 150ms ease,
    transform 220ms ease-out;
}

.signal-console__button img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: auto;
  user-select: none;
  pointer-events: none;
}

.signal-console__button:hover,
.signal-console__button:focus-visible,
.signal-console--open .signal-console__button {
  --signal-button-offset: 0px;
  --signal-button-y: -1px;
  outline: none;
  filter:
    brightness(1.08)
    drop-shadow(0 0 8px rgba(76, 255, 245, 0.18))
    drop-shadow(0 13px 26px rgba(0, 0, 0, 0.48));
}

.signal-console__shade {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.16);
}

.signal-console__shade[hidden] {
  display: none;
}

.signal-console__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 2;
  width: min(344px, calc(100vw - 34px), calc((100svh - 150px) * 1126.4 / 2060));
  aspect-ratio: 1408 / 2060;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.54);
  transform-origin: bottom right;
  animation: signalPanelIn 120ms ease both;
}

.signal-console__panel[hidden] {
  display: none;
}

.signal-console__art {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.signal-console__panel::before {
  --signal-header-line-mask-top: 8.15%;
  --signal-header-line-mask-left: 2.7%;
  --signal-header-line-mask-width: 94%;
  --signal-header-line-mask-height: 1.5%;
  content: "";
  position: absolute;
  left: var(--signal-header-line-mask-left);
  top: var(--signal-header-line-mask-top);
  z-index: 2;
  width: var(--signal-header-line-mask-width);
  height: var(--signal-header-line-mask-height);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    #061012;
  pointer-events: none;
}

.signal-console__story-date {
  --signal-story-date-size: clamp(0.48rem, 1.1vw, 0.7rem);
  --signal-story-date-color: rgba(157, 231, 148, 0.88);
  --signal-story-date-top: 7.25%;
  --signal-story-date-left: 6.25%;
  --signal-story-date-spacing: 0.08em;
  position: absolute;
  left: var(--signal-story-date-left);
  top: var(--signal-story-date-top);
  z-index: 3;
  width: 66%;
  color: var(--signal-story-date-color);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: var(--signal-story-date-size);
  line-height: 1;
  letter-spacing: var(--signal-story-date-spacing);
  text-align: left;
  text-shadow:
    0 0 4px rgba(76, 255, 245, 0.14),
    0 0 8px rgba(157, 231, 148, 0.12);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.signal-console__close,
.signal-console__hit {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
}

.signal-console__close {
  right: 4%;
  top: 3%;
  width: 8%;
  height: 5.2%;
}

.signal-console__hit {
  left: 5.3%;
  width: 89.8%;
  height: 13.3%;
}

.signal-console__hit--field-guide {
  top: 10.4%;
}

.signal-console__hit--journal {
  top: 25.7%;
}

.signal-console__hit--field-notes {
  top: 39.9%;
}

.signal-console__hit--rewind {
  top: 54.4%;
}

.signal-console__hit--account {
  top: 69%;
}

.signal-console__hit--cart {
  top: 83%;
}

.signal-console__close:hover,
.signal-console__close:focus-visible,
.signal-console__hit:hover,
.signal-console__hit:focus-visible {
  outline: none;
  background: transparent;
}

.overlay-open .signal-console {
  opacity: 0.5;
  pointer-events: none;
}

.site-shell {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: block;
  padding: 0;
}

.room-stage {
  width: 100vw;
  height: 100vh;
  height: 100svh;
}

.room-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  aspect-ratio: auto;
  overflow: hidden;
  border: none;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 52%, #151015 0%, #050507 62%, #000 100%);
  box-shadow: none;
  animation: roomFade 1.15s ease both;
}

.room-image,
.room-vignette,
.room-static,
.room-dust,
.hotspot-layer,
.room-falloff,
.window-sky,
.lava-lamp-animation,
.room-clock,
.room-tv-screen {
  position: absolute;
}

.room-image,
.room-vignette,
.room-static,
.room-dust,
.hotspot-layer,
.room-falloff {
  inset: 0;
}

.room-image {
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Scaling controls:
     --room-object-fit defaults to cover near 16:9, then switches to contain on extreme ratios.
     --room-object-position controls the crop/focus point when cover is active. */
  object-fit: var(--room-object-fit);
  object-position: var(--room-object-position);
  filter: brightness(var(--room-brightness));
}

/* Cinematic edge falloff: covers crop edges and softens contain-mode side/top bars. */
.room-falloff {
  z-index: 1;
  pointer-events: none;
  opacity: var(--falloff-opacity);
  background:
    radial-gradient(circle at 48% 55%, transparent 0 60%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 10%, transparent 90%, rgba(0, 0, 0, 0.2)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.2), transparent 15%, transparent 88%, rgba(0, 0, 0, 0.16));
}

.room-dust {
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
  mix-blend-mode: screen;
}

/* Ambient window twinkle overlay:
   adjust --window-sky-* variables in :root to align it with future room art.
   set --window-sky-opacity: 0 to visually disable it. */
.window-sky {
  z-index: 3;
  left: var(--window-sky-left);
  top: var(--window-sky-top);
  width: var(--window-sky-width);
  height: var(--window-sky-height);
  overflow: hidden;
  opacity: var(--window-sky-opacity);
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 22%, rgba(230, 244, 255, 0.95) 0 1px, transparent 2.2px),
    radial-gradient(circle at 39% 18%, rgba(230, 244, 255, 0.72) 0 1px, transparent 2.2px),
    radial-gradient(circle at 61% 34%, rgba(230, 244, 255, 0.9) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 82% 27%, rgba(230, 244, 255, 0.75) 0 1px, transparent 2.2px),
    radial-gradient(circle at 24% 58%, rgba(230, 244, 255, 0.82) 0 1px, transparent 2.4px),
    radial-gradient(circle at 74% 70%, rgba(230, 244, 255, 0.72) 0 1px, transparent 2.2px);
  mix-blend-mode: screen;
  animation: starTwinkle 6.8s ease-in-out infinite;
}

.window-sky::before,
.window-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 53%, rgba(255, 255, 255, 0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 62%, rgba(255, 255, 255, 0.85) 0 1px, transparent 2px);
  animation: starTwinkle 10.5s ease-in-out infinite reverse;
}

.window-sky::after {
  transform: translate(6%, 4%);
  opacity: 0.55;
  animation-duration: 13s;
}

.window-open .window-sky {
  opacity: 0.58;
  box-shadow:
    inset 0 0 28px rgba(128, 191, 255, 0.16),
    0 0 34px rgba(70, 150, 255, 0.12);
}

.window-open .window-sky::after {
  background:
    linear-gradient(100deg, transparent 0 48%, rgba(151, 196, 255, 0.16) 52%, transparent 61%),
    radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 53%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 91% 62%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px);
  animation:
    starTwinkle 13s ease-in-out infinite reverse,
    windowCrackShift 8s ease-in-out infinite;
}

/* Lava lamp overlay:
   Tune --lava-left/top/width/height in :root to align with the room art.
   This stays separate from the room image and hotspot map. */
.lava-lamp-animation {
  z-index: 3;
  left: var(--lava-left);
  top: var(--lava-top);
  width: var(--lava-width);
  height: var(--lava-height);
  overflow: hidden;
  opacity: var(--lava-opacity);
  pointer-events: none;
  border-radius: 44% 44% 30% 30% / 14% 14% 46% 46%;
  clip-path: polygon(34% 0%, 66% 0%, 82% 14%, 85% 82%, 67% 100%, 33% 100%, 15% 82%, 18% 14%);
  mix-blend-mode: screen;
  filter: blur(0.4px) saturate(1.35);
  background:
    radial-gradient(ellipse at 50% 91%, rgba(255, 173, 57, 0.88) 0 11%, transparent 24%),
    radial-gradient(ellipse at 48% 55%, rgba(247, 47, 82, 0.16) 0 35%, transparent 68%),
    linear-gradient(180deg, rgba(255, 116, 54, 0.12), rgba(255, 22, 78, 0.22) 42%, rgba(255, 191, 66, 0.16));
}

.lava-lamp-animation::before,
.lava-lamp-animation::after {
  content: "";
  position: absolute;
  inset: 9% 19% 7%;
  border-radius: inherit;
  pointer-events: none;
}

.lava-lamp-animation::before {
  background:
    radial-gradient(ellipse at 42% 18%, rgba(255, 236, 156, 0.42) 0 7%, transparent 16%),
    radial-gradient(ellipse at 52% 82%, rgba(255, 181, 67, 0.64) 0 14%, transparent 30%);
  opacity: 0.58;
  animation: lavaGlow 7.5s ease-in-out infinite alternate;
}

.lava-lamp-animation::after {
  border-left: 1px solid rgba(255, 230, 190, 0.16);
  border-right: 1px solid rgba(255, 55, 82, 0.16);
  box-shadow:
    inset 0 0 10px rgba(255, 54, 88, 0.25),
    inset 0 -10px 14px rgba(255, 189, 57, 0.2);
  opacity: 0.54;
}

.lava-blob {
  position: absolute;
  left: 50%;
  bottom: -22%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 48% 52% 43% 57% / 55% 42% 58% 45%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 245, 177, 0.9) 0 10%, transparent 25%),
    radial-gradient(circle at 50% 52%, rgba(255, 143, 45, 0.92) 0 38%, rgba(248, 30, 78, 0.84) 67%, transparent 72%);
  box-shadow:
    0 0 12px rgba(255, 86, 64, 0.45),
    0 0 22px rgba(255, 35, 83, 0.22);
  transform: translate3d(-50%, 0, 0);
  filter: blur(0.2px);
}

.lava-blob--one {
  width: 48%;
  animation: lavaRiseOne 8.8s ease-in-out infinite;
}

.lava-blob--two {
  left: 42%;
  width: 33%;
  animation: lavaRiseTwo 11.5s ease-in-out -2.8s infinite;
}

.lava-blob--three {
  left: 59%;
  width: 28%;
  animation: lavaRiseThree 9.7s ease-in-out -5.3s infinite;
}

.lava-blob--four {
  left: 50%;
  width: 38%;
  animation: lavaDriftLow 6.9s ease-in-out infinite alternate;
}

.debug-ambient .window-sky,
.debug-ambient .lava-lamp-animation {
  outline: 2px solid rgba(2, 181, 255, 0.9);
  background-color: rgba(2, 181, 255, 0.12);
}

.debug-ambient .lava-lamp-animation {
  outline-color: rgba(255, 2, 91, 0.9);
  background-color: rgba(255, 2, 91, 0.14);
}

.room-clock {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  color: rgba(42, 210, 72, 0.78);
  font-family: "Digital-7", "DSEG7 Classic", "DS-Digital", "Courier New", ui-monospace, monospace;
  font-size: var(--clock-font-size, 14px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
  letter-spacing: 0.025em;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 0 1px rgba(75, 255, 100, 0.85),
    0 0 4px rgba(53, 230, 90, 0.42),
    0 0 8px rgba(53, 230, 90, 0.18);
  opacity: 0.66;
  filter: blur(0.08px);
  mix-blend-mode: screen;
  pointer-events: none;
  transform: scaleX(0.86);
  transform-origin: center;
}

.room-clock--blank {
  color: transparent;
  text-shadow: none;
}

.room-clock--glitching {
  opacity: 0.82;
  filter: blur(0.04px) brightness(1.18);
}

.debug-ambient .room-clock {
  outline: 2px solid rgba(67, 113, 90, 0.95);
  background-color: rgba(67, 113, 90, 0.18);
}

.room-vignette {
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.32) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.24), transparent 32%);
}

.room-static {
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.22) 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px 5px);
  animation: staticShift 1.8s steps(2) infinite;
}

/* In-room TV screen layer. JS positions this over the TV glass using image-space percentages. */
.room-tv-screen {
  left: var(--room-tv-left, 0);
  top: var(--room-tv-top, 0);
  width: var(--room-tv-width, 0);
  height: var(--room-tv-height, 0);
  z-index: 4;
  overflow: visible;
  opacity: 0.78;
  pointer-events: none;
  transform: translateZ(0) rotate(var(--room-tv-rotation, 0deg));
  transform-origin: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(137, 194, 162, 0.12), transparent 55%),
    radial-gradient(circle, #263b37 0%, #0b1112 62%, #020303 100%);
  clip-path: url("#crtScreenClip");
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.9),
    0 0 14px rgba(137, 194, 162, 0.12);
}

.room-tv-screen__svg {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.room-tv-screen__debug-path {
  display: none;
  fill: rgba(231, 180, 93, 0.1);
  stroke: rgba(231, 180, 93, 0.9);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* Debug: add ?debugRoomTv=1 or set DEBUG_ROOM_TV_MASK = true in script.js. */
.debug-room-tv .room-tv-screen__debug-path {
  display: block;
}

.debug-room-tv .room-tv-screen {
  opacity: 1;
}

.debug-room-tv-fill .room-tv-screen {
  opacity: 1 !important;
  background: #41ab5e !important;
  box-shadow: none;
}

.debug-room-tv-fill .room-tv-screen video,
.debug-room-tv-fill .room-tv-screen__tracking,
.debug-room-tv-fill .room-tv-screen__scanlines,
.debug-room-tv-fill .room-tv-screen__glass,
.debug-room-tv-fill .room-tv-screen .channel03-signal,
.debug-room-tv-fill .room-tv-screen .room-tv-title-card,
.debug-room-tv-fill .room-tv-screen .nonexistent-channel-visual {
  display: none !important;
}

.room-tv-screen__scanlines,
.room-tv-screen__glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: url("#crtScreenClip");
}

.room-tv-screen__tracking {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: url("#crtScreenClip");
  filter: saturate(0.65) contrast(1.7) brightness(0.9);
}

.room-tv-screen__scanlines {
  z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 2px 4px);
  mix-blend-mode: screen;
}

.room-tv-screen__glass {
  z-index: 3;
  /* Keep normal playback clean. The old repeating-radial pattern created the circular static/moire. */
  background:
    radial-gradient(circle at 48% 50%, transparent 0 58%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(115deg, transparent 12%, rgba(255, 255, 255, 0.035) 38%, transparent 52%);
  opacity: 0.12;
}

.room-tv-screen video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: url("#crtScreenClip");
  filter: saturate(0.45) contrast(1.25) brightness(0.72);
}

.channel03-signal {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16% / 12%;
  background:
    radial-gradient(circle at 50% 48%, rgba(132, 169, 143, 0.14), transparent 24%),
    radial-gradient(circle at 50% 52%, rgba(24, 34, 29, 0.88), rgba(2, 4, 4, 0.98) 72%),
    #020303;
  color: rgba(181, 219, 184, 0.82);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow:
    0 0 3px rgba(116, 184, 126, 0.42),
    0 0 10px rgba(71, 128, 83, 0.22);
  mix-blend-mode: screen;
  animation: channel03TrackingJump 34s steps(1) infinite;
}

.channel03-signal::before,
.channel03-signal::after,
.channel03-signal__noise {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.channel03-signal::before {
  background:
    repeating-linear-gradient(0deg, rgba(231, 255, 229, 0.045) 0 1px, transparent 2px 5px),
    linear-gradient(90deg, transparent 0 46%, rgba(255, 255, 255, 0.035) 49%, transparent 52%);
  opacity: 0.62;
}

.channel03-signal::after {
  background:
    linear-gradient(0deg, transparent 0 46%, rgba(215, 255, 218, 0.16) 47%, transparent 49%),
    linear-gradient(0deg, transparent 0 72%, rgba(215, 255, 218, 0.08) 73%, transparent 75%),
    radial-gradient(circle at 50% 50%, transparent 0 52%, rgba(0, 0, 0, 0.42) 100%);
  opacity: 0.2;
  animation: channel03NoiseSkew 23s steps(1) infinite;
}

.channel03-signal__noise {
  background:
    repeating-linear-gradient(92deg, transparent 0 9px, rgba(255, 255, 255, 0.045) 10px, transparent 12px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255, 255, 255, 0.055) 29px, transparent 31px);
  opacity: 0.16;
  animation: staticShift 700ms steps(2) infinite;
}

.channel03-signal__glyph {
  position: relative;
  z-index: 2;
  width: min(43%, 360px);
  aspect-ratio: 1;
  opacity: 0.74;
  filter:
    drop-shadow(0 0 4px rgba(169, 218, 178, 0.34))
    drop-shadow(0 0 16px rgba(83, 158, 99, 0.14));
  transform-origin: center;
  animation:
    channel03Breathe 9.6s ease-in-out infinite,
    channel03Rotate 48s ease-in-out infinite;
}

.room-tv-screen .channel03-signal__glyph {
  width: 46%;
}

.channel03-signal__glyph svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.channel03-signal__glyph circle,
.channel03-signal__glyph path {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.channel03-signal__glyph path {
  stroke-width: 0.75;
}

.channel03-signal__dash {
  stroke-dasharray: 3 5;
}

.channel03-signal__dash--slow {
  stroke-dasharray: 10 7 2 7;
}

.channel03-signal__core {
  fill: currentColor;
  stroke: none;
}

.channel03-signal__message {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 67%;
  width: 78%;
  transform: translateX(-50%);
  opacity: 0;
  color: rgba(177, 221, 183, 0.78);
  font-size: clamp(0.46rem, 1.15vw, 0.88rem);
  line-height: 1.3;
  text-align: center;
  transition: opacity 520ms ease;
}

.room-tv-screen .channel03-signal__message {
  top: 70%;
  font-size: clamp(0.18rem, 0.48vw, 0.42rem);
  letter-spacing: 0.08em;
}

.channel03-signal__message--visible {
  opacity: 0.82;
}

.room-tv-screen--off {
  opacity: 0;
  background: transparent;
  box-shadow: none;
}

.room-tv-screen--off video:not(.room-tv-screen__tracking),
.room-tv-screen--tuning video:not(.room-tv-screen__tracking),
.room-tv-screen--signal video:not(.room-tv-screen__tracking) {
  display: none;
}

.room-tv-screen--on {
  opacity: 0.82;
}

.room-tv-screen--solid-color {
  background: var(--tv-solid-color, #41ab5e);
}

.room-tv-screen--tuning .room-tv-screen__glass,
.room-tv-screen--signal .room-tv-screen__glass {
  opacity: 0.28;
  animation: staticShift 420ms steps(2) infinite;
}

.tv-view {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: #030303;
  opacity: 0;
  transition: opacity 260ms ease;
}

.tv-view[hidden] {
  display: none;
}

.tv-view--open {
  pointer-events: auto;
  opacity: 1;
}

.tv-view--leaving {
  opacity: 0;
}

.tv-view__stage {
  position: relative;
  /* Keep this stage in the TV artwork's native 1535x1024 ratio so controls stay pixel-aligned. */
  width: min(100vw, calc(100vh * 1.499));
  width: min(100vw, calc(100svh * 1.499));
  aspect-ratio: 1535 / 1024;
  max-height: 100vh;
  max-height: 100svh;
  overflow: hidden;
  background: #030303;
}

.tv-view__art,
.tv-view__screen,
.tv-view__power-led,
.tv-view__channel-display,
.tv-hot-control,
.tv-knob-control {
  position: absolute;
}

.tv-view__art,
.tv-view__screen {
  inset: 0;
  width: 100%;
  height: 100%;
}

.tv-view__art {
  z-index: 1;
  object-fit: fill;
  object-position: center center;
  pointer-events: none;
}

.tv-view__screen {
  z-index: 2;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-mask-image: url("assets/tv_screen_mask.png");
  mask-image: url("assets/tv_screen_mask.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: saturate(0.72) contrast(1.18) brightness(0.9);
}

.tv-view__program,
.tv-view__tracking,
.tv-view__signal,
.tv-view__channel-card {
  position: absolute;
  left: 22.4%;
  top: 12.5%;
  width: 54.2%;
  height: 57.5%;
}

.tv-view__program {
  --tv-interference: 0;
  --tv-contrast: 1.28;
  --tv-brightness: 0.88;
  --tv-blur: 0px;
  --tv-warp-x: 0px;
  --tv-scale: 1.018;
  --tv-skew: 0deg;
  --tv-drift-x: 0px;
  --tv-drift-y: 0px;
  --tv-drift-return-x: 0px;
  --tv-drift-return-y: 0px;
  z-index: 1;
  object-fit: cover;
  opacity: 1;
  filter:
    grayscale(0.0)
    sepia(0.0)
    hue-rotate(20deg)
    saturate(1.05)
    contrast(var(--tv-contrast))
    brightness(var(--tv-brightness))
    blur(var(--tv-blur));
  border-radius: 16% / 12%;
  transform:
    translateX(var(--tv-warp-x))
    scale(var(--tv-scale))
    skewX(var(--tv-skew));
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.tv-view--fine-tuning .tv-view__program {
  animation: tvFineTuningDrift 360ms steps(2) infinite;
}

.tv-view__tracking {
  z-index: 3;
  opacity: 0;
  object-fit: cover;
  border-radius: 16% / 12%;
  transform: scale(1.018);
  pointer-events: none;
}

.tv-view--tuning .tv-view__tracking {
  opacity: 0.7;
}

.tv-view__signal {
  z-index: 2;
  opacity: 0;
  border-radius: 16% / 12%;
  background:
    repeating-radial-gradient(circle at 42% 46%, rgba(230, 255, 236, 0.18) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 50%, rgba(99, 154, 119, 0.18), transparent 58%),
    #090b0a;
  animation: staticShift 260ms steps(2) infinite;
}

.tv-view__signal .channel03-signal {
  animation:
    channel03TrackingJump 34s steps(1) infinite,
    channel03SignalDistort 41s steps(1) infinite;
}

.tv-view__signal[hidden] {
  display: none;
}

.tv-view--signal .tv-view__signal,
.tv-view--tuning .tv-view__signal {
  opacity: 0.48;
}

.tv-view--solid-color .tv-view__signal {
  opacity: 1;
  background: var(--tv-solid-color, #41ab5e);
  animation: none;
}

.tv-view--signal .tv-view__signal--channel03 {
  opacity: 0.92;
}

.tv-view--nonexistent-channel .tv-view__signal {
  opacity: 0.96;
  background: #010202;
  animation: none;
}

.tv-view--anomaly-distortion .tv-view__signal {
  opacity: 0.82;
  filter: contrast(1.55) brightness(0.96) saturate(0.58);
  animation:
    staticShift 120ms steps(2) infinite,
    tvAnalogAnomalyDrift 620ms steps(3) infinite;
}

.room-tv-screen--nonexistent-channel {
  background: #010202;
}

.room-tv-screen--anomaly-distortion {
  filter: contrast(1.34) brightness(0.9) saturate(0.66);
  animation: tvAnalogAnomalyDrift 720ms steps(3) infinite;
}

.nonexistent-channel-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16% / 12%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  filter: saturate(0.82) contrast(1.08) brightness(0.88) blur(0.2px);
  transform: translateZ(0) scale(1.012);
  user-select: none;
}

video.nonexistent-channel-visual {
  background: #010202;
}

.room-tv-screen .nonexistent-channel-visual {
  border-radius: 0;
  clip-path: url("#crtScreenClip");
  filter: saturate(0.7) contrast(1.2) brightness(0.68) blur(0.2px);
}

.tv-view__scanlines,
.tv-view__glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tv-view__scanlines {
  z-index: 4;
  background:
    repeating-linear-gradient(0deg, rgba(222, 255, 230, 0.026) 0 1px, rgba(0, 0, 0, 0.06) 1px 3px, transparent 3px 6px);
  mix-blend-mode: screen;
  opacity: 0.22;
}

.tv-view__glass {
  z-index: 5;
  background:
    radial-gradient(ellipse at 45% 42%, rgba(208, 255, 221, 0.08), transparent 38%),
    linear-gradient(115deg, transparent 12%, rgba(255, 255, 255, 0.055) 32%, transparent 47%);
  mix-blend-mode: screen;
  opacity: 0.5;
  filter: blur(0.2px);
}

.tv-view__channel-card {
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 10%;
  color: rgba(210, 255, 222, 0.82);
  font-family: "Courier New", ui-monospace, monospace;
  text-align: center;
  text-shadow: 0 0 8px rgba(78, 255, 112, 0.28);
  pointer-events: none;
  opacity: 0.72;
}

.tv-view__channel-card[hidden] {
  display: none;
}

.tv-view__channel-card span {
  color: rgba(72, 245, 92, 0.74);
  font-size: clamp(0.7rem, 1.1vw, 1rem);
  letter-spacing: 0.12em;
}

.tv-view__channel-card strong {
  display: block;
  margin: 0.25em 0;
  font-size: clamp(1rem, 1.8vw, 1.8rem);
  line-height: 1.05;
}

.tv-view__channel-card em {
  max-width: 24em;
  color: rgba(210, 255, 222, 0.58);
  font-size: clamp(0.68rem, 0.95vw, 0.95rem);
  font-style: normal;
  line-height: 1.35;
}

.tv-view__power-led {
  z-index: 4;
  left: 23.6%;
  top: 84.9%;
  width: 0.78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #321010;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.tv-view__power-led--on {
  background: #e33b26;
  box-shadow:
    0 0 6px rgba(227, 59, 38, 0.86),
    0 0 12px rgba(227, 59, 38, 0.36),
    inset 0 0 3px rgba(255, 220, 172, 0.5);
}

.tv-view__channel-display {
  z-index: 4;
  left: 39.4%;
  top: 83.05%;
  width: 4.8%;
  height: 4.8%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: rgba(35, 226, 68, 0.82);
  font-family: "Digital-7", "DSEG7 Classic", "DS-Digital", "Courier New", ui-monospace, monospace;
  font-size: clamp(13px, 2.9vw, 40px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow:
    0 0 2px rgba(58, 255, 92, 0.82),
    0 0 7px rgba(58, 255, 92, 0.34);
  transform: scaleX(0.9);
  transform-origin: center;
  mix-blend-mode: screen;
  pointer-events: none;
}

.tv-view:not(.tv-view--power-on) .tv-view__channel-display {
  opacity: 0;
}

.tv-hot-control,
.tv-knob-control {
  z-index: 5;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.tv-hot-control {
  opacity: 0;
}

.tv-hot-control--power {
  left: 25.1%;
  top: 83.8%;
  width: 3.4%;
  height: 5.9%;
}

.tv-hot-control--channel-down {
  left: 34.5%;
  top: 83.4%;
  width: 3.7%;
  height: 5.2%;
}

.tv-hot-control--channel-up {
  left: 43.7%;
  top: 83.4%;
  width: 3.7%;
  height: 5.2%;
}

.tv-hot-control--back {
  /* Temporary back-to-room zone: tune this over the non-TV wall/window area of tv_fullscreen_room.png. */
  left: 80%;
  top: 0;
  width: 20%;
  height: 100%;
}

.tv-knob-control {
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
  border-radius: 50%;
  opacity: 0.34;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 43%, rgba(226, 184, 107, 0.12) 45% 48%, transparent 50%),
    linear-gradient(90deg, transparent 0 48%, rgba(232, 179, 86, 0.58) 49% 51%, transparent 52%);
  filter:
    drop-shadow(0 0 3px rgba(232, 179, 86, 0.2))
    blur(0.1px);
  mix-blend-mode: screen;
  transform: rotate(var(--knob-rotation, 0deg));
  transform-origin: center;
}

.tv-knob-control::-webkit-slider-runnable-track {
  background: transparent;
  border: 0;
}

.tv-knob-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.tv-knob-control::-moz-range-track {
  background: transparent;
  border: 0;
}

.tv-knob-control::-moz-range-thumb {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.tv-knob-control--volume {
  left: 56.6%;
  top: 80.1%;
  width: 6.3%;
  height: 10.4%;
}

.tv-knob-control--tuning {
  left: 66.6%;
  top: 79.6%;
  width: 6.6%;
  height: 10.9%;
}

.room-frame--glitch {
  animation: roomGlitch 520ms steps(2);
}

.hotspot-layer {
  z-index: 5;
}

.hotspot-layer--active {
  cursor: pointer;
}

.hotspot {
  appearance: none;
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: transparent;
  outline: 0;
  pointer-events: none;
  transform: translateZ(0) rotate(var(--hotspot-rotation, 0deg));
  transform-origin: center;
  animation: none;
}

.hotspot span {
  display: none;
  opacity: 0;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255, 238, 202, 0.22);
  border-radius: 2px;
  background: rgba(5, 5, 8, 0.78);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateY(6px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot:active {
  background: transparent;
  outline: 1px solid rgba(231, 180, 93, 0.22);
  box-shadow: 0 0 10px rgba(231, 180, 93, 0.14);
}

/* Bookshelf item hotspots should stay localized to individual books/objects. */
.hotspot--bookshelfItem {
  background: transparent;
}

.hotspot--bookshelfItem:hover,
.hotspot--bookshelfItem:focus-visible,
.hotspot--bookshelfItem:active {
  background: transparent;
  outline: 1px solid rgba(137, 194, 162, 0.2);
  box-shadow: 0 0 8px rgba(137, 194, 162, 0.12);
}

/* Toggle by setting DEBUG_HOTSPOTS = true in script.js or adding ?debugHotspots=1. */
.debug-hotspots .hotspot {
  border: 0;
  outline: 1px solid rgba(231, 180, 93, 0.85);
  background: transparent;
  box-shadow:
    0 0 8px rgba(231, 180, 93, 0.28),
    inset 0 0 10px rgba(255, 255, 255, 0.12);
}

.debug-hotspots .hotspot span {
  display: block;
  opacity: 1;
  transform: translateY(0);
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
}

.debug-hotspots .hotspot::after {
  content: attr(data-hotspot-id);
  position: absolute;
  left: 0;
  bottom: calc(100% + 3px);
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(70, 154, 255, 0.9);
  color: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.65rem;
  white-space: nowrap;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vh, 76px) clamp(72px, 8vw, 120px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.tv-zoom-open .overlay {
  padding: 0;
  overflow: hidden;
}

.overlay[hidden] {
  display: none;
}

.overlay--open {
  pointer-events: auto;
  opacity: 1;
}

.overlay__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(73, 42, 36, 0.16), rgba(0, 0, 0, 0.68)),
    rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(2px);
}

.artifact-panel {
  position: relative;
  width: var(--overlay-width);
  max-height: var(--overlay-max-height);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 14, 15, 0.84);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(255, 240, 210, 0.04) inset;
  transform: translateY(18px) scale(0.98);
  transition: transform 240ms ease;
}

.artifact-panel:focus {
  outline: none;
}

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

.artifact-panel--journal,
.artifact-panel--field-guide,
.artifact-panel--field-notes,
.artifact-panel--rewind,
.artifact-panel--account,
.artifact-panel--subscribe,
.artifact-panel--zine,
.artifact-panel--bookshelf,
.artifact-panel--book,
.artifact-panel--composition,
.artifact-panel--vhs,
.artifact-panel--radio,
.artifact-panel--thought,
.artifact-panel--lockbox,
.artifact-panel--trash,
.artifact-panel--eightball,
.artifact-panel--drawer {
  width: min(720px, calc(100vw - 180px));
}

.artifact-panel--thought.thought-asset {
  width: auto;
  max-height: 92svh;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.artifact-panel--thought.thought-asset .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--thought.thought-asset .close-button {
  display: none;
}

.artifact-panel--lockbox.lockbox-asset {
  width: fit-content;
  max-width: calc(100vw - 48px);
  max-height: 92svh;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.artifact-panel--lockbox.lockbox-asset .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--lockbox.lockbox-asset .close-button {
  display: none;
}

.overlay[data-overlay-kind="lockbox lockbox-asset"] {
  place-items: center;
  padding: 0;
}

.overlay[data-overlay-kind="rewind rewind-locked"] {
  place-items: center;
  padding: clamp(14px, 3vw, 44px);
}

.overlay[data-overlay-kind="rewind rewind-locked"] .overlay__scrim {
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: none;
}

.artifact-panel--rewind.rewind-locked {
  width: min(88vw, calc(88svh * 1235 / 1086), 1120px);
  max-height: 88svh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.artifact-panel--rewind.rewind-locked .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--rewind.rewind-locked .close-button {
  display: none;
}

.overlay--open .artifact-panel--rewind.rewind-locked {
  transform: translateY(0) scale(1);
  animation: rewind-locked-popup-in 180ms ease-out both;
}

.rewind-locked-popup {
  position: relative;
  width: 100%;
  filter:
    drop-shadow(0 24px 50px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 20px rgba(0, 255, 231, 0.1));
}

.rewind-locked-popup__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88svh;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.rewind-locked-popup__close,
.rewind-locked-popup__back,
.rewind-locked-popup__decoder-club {
  position: absolute;
  z-index: 2;
  display: block;
  border: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.rewind-locked-popup__close {
  top: 5.3%;
  right: 3.8%;
  width: 6.4%;
  height: 8%;
}

.rewind-locked-popup__back {
  left: 9.7%;
  bottom: 9.8%;
  width: 26.85%;
  height: 8.8%;
}

.rewind-locked-popup__decoder-club {
  right: 9.7%;
  bottom: 9.8%;
  width: 43%;
  height: 8.8%;
}

.rewind-locked-popup__close:hover,
.rewind-locked-popup__close:focus-visible,
.rewind-locked-popup__back:hover,
.rewind-locked-popup__back:focus-visible,
.rewind-locked-popup__decoder-club:hover,
.rewind-locked-popup__decoder-club:focus-visible {
  outline: none;
}

@keyframes rewind-locked-popup-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.artifact-panel--trash.trash-asset {
  width: fit-content;
  max-width: calc(100vw - 56px);
  max-height: 90svh;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.artifact-panel--trash.trash-asset .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--trash.trash-asset .close-button {
  display: none;
}

.artifact-panel--drawer.drawer-asset {
  width: auto;
  max-height: 100svh;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.overlay[data-overlay-kind="drawer drawer-asset"] {
  place-items: center;
  padding: 0;
}

.artifact-panel--drawer.drawer-asset .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--drawer.drawer-asset .close-button {
  display: none;
}

.artifact-panel--journal {
  width: min(1040px, calc(100vw - 120px));
}

.artifact-panel--sfse-journal {
  width: fit-content;
  max-width: calc(100vw - 48px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.artifact-panel--sfse-journal .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--sfse-journal .close-button {
  display: none;
}

/* Legacy TV modal styles: retained only for reference after the permanent tv-view system replaced renderTv(). */
.artifact-panel--tv {
  width: min(760px, calc(100vw - 160px));
}

.artifact-panel--cryptid-zine {
  width: fit-content;
  max-width: calc(100vw - 56px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.artifact-panel--cryptid-zine .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--cryptid-zine .close-button {
  display: none;
}

.artifact-panel--neves {
  width: fit-content;
  max-width: calc(100vw - 72px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.artifact-panel--neves .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--neves .close-button {
  display: none;
}

.artifact-panel--eightball {
  width: fit-content;
  max-width: calc(100vw - 40px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.artifact-panel--eightball .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--eightball .close-button {
  display: none;
}

/* Legacy TV modal zoom styles: no active code path should depend on these. */
.artifact-panel--tv-zoom {
  width: min(94vw, calc(94vh * 1.14));
  width: min(94vw, calc(94svh * 1.14));
  max-height: 94vh;
  max-height: 94svh;
  overflow: hidden;
}

.artifact-panel--tv-zoom .artifact-panel__inner {
  display: grid;
  place-items: center;
  padding: clamp(6px, 1vmin, 12px);
  overflow: hidden;
}

.artifact-panel--tv-zoom .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  margin: 0;
}

.overlay--open .artifact-panel {
  transform: translateY(0) scale(1);
}

.artifact-panel__inner {
  padding: clamp(20px, 3.4vw, 38px);
}

.close-button {
  position: sticky;
  top: 14px;
  left: calc(100% - 92px);
  z-index: 2;
  margin: 14px 14px 0 auto;
  display: block;
  border: 1px solid rgba(246, 239, 227, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
}

.close-button:hover,
.close-button:focus-visible,
.artifact-controls button:hover,
.artifact-controls button:focus-visible,
.action-button:hover,
.action-button:focus-visible,
.tv-controls button:hover,
.tv-controls button:focus-visible,
.shelf-item:hover,
.shelf-item:focus-visible {
  border-color: rgba(231, 180, 93, 0.68);
  box-shadow: 0 0 16px rgba(231, 180, 93, 0.2);
}

.artifact-kicker {
  margin: 0 0 10px;
  color: var(--amber);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.artifact-panel h1 {
  margin: 0 0 14px;
  color: #fff7e6;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.artifact-panel p,
.artifact-panel time {
  color: rgba(246, 239, 227, 0.9);
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  line-height: 1.65;
}

.journal {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.1), transparent 10%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(95, 57, 44, 0.18) 32px),
    #d9c49f;
  color: #2b1d1a;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 0 40px rgba(67, 35, 20, 0.22);
  transform-origin: center;
}

.journal h1,
.journal p,
.journal time,
.journal .artifact-kicker,
.zine-page h1,
.zine-page p,
.zine-page .artifact-kicker {
  color: #261a18;
}

.journal time {
  display: block;
  margin-bottom: 22px;
  font-style: italic;
}

.decoder-panel,
.journal-entry {
  margin: 0 auto;
  border: 1px solid rgba(246, 239, 227, 0.18);
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 8px),
    linear-gradient(145deg, rgba(34, 29, 25, 0.96), rgba(9, 8, 9, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 18px 48px rgba(0, 0, 0, 0.28);
}

.decoder-panel {
  max-width: 640px;
  padding: clamp(24px, 4vw, 42px);
}

.decoder-panel h1,
.journal-entry h1 {
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
}

.decoder-panel__status {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(137, 194, 162, 0.34);
  background: #060706;
  color: #bff0ca;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.decoder-panel__status--locked {
  border-color: rgba(231, 180, 93, 0.36);
  color: #ffd38a;
}

.artifact-panel--account {
  width: min(96vw, calc(94svh * 1400 / 1643));
  max-height: 94svh;
  aspect-ratio: 1400 / 1643;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#overlay[data-overlay-kind="account"] {
  --account-overlay-padding: clamp(16px, 3svh, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--account-overlay-padding);
  overflow: auto;
}

.artifact-panel--account > .close-button {
  display: none;
}

.artifact-panel--account .artifact-panel__inner {
  width: 100%;
  height: 100%;
  padding: 0;
}

.artifact-panel--account::before,
.artifact-panel--account::after {
  content: "";
  position: absolute;
  inset: 2.2% 2.4%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

.artifact-panel--account::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(112, 255, 246, 0.08) 0 1px,
      transparent 1px 5px
    );
  mix-blend-mode: screen;
}

.artifact-panel--account::after {
  background:
    linear-gradient(90deg, transparent 0 34%, rgba(140, 255, 247, 0.11) 35% 37%, transparent 38% 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 250, 220, 0.08), transparent 52%);
  clip-path: polygon(0 38%, 100% 34%, 100% 52%, 0 56%);
}

.artifact-panel--account.account-interference-active::before {
  opacity: 0.48;
  transform: translateX(-2px);
}

.artifact-panel--account.account-interference-active::after {
  opacity: 0.72;
  transform: translateX(5px);
}

.account-screen {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1400 / 1643;
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  color: rgba(246, 255, 247, 0.92);
  text-transform: uppercase;
}

.account-screen__backplate {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

.account-screen button,
.account-screen input {
  font-family: inherit;
}

.account-screen__close,
.account-screen__hit,
.account-screen__password-toggle,
.account-screen__forgot,
.account-screen__checkbox {
  position: absolute;
  z-index: 3;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.account-screen__close {
  top: 3.35%;
  right: 5%;
  width: 4%;
  height: 4%;
}

.account-screen__field {
  position: absolute;
  z-index: 3;
  display: block;
}

.account-screen__field--email {
  left: 11.6%;
  top: 42.6%;
  width: 78.8%;
  height: 5.7%;
}

.account-screen__field--password {
  left: 11.6%;
  top: 53.45%;
  width: 75.6%;
  height: 5.7%;
}

.account-screen__field--confirm {
  left: 11.6%;
  top: 59.6%;
  width: 78.8%;
  height: 4.8%;
}

.account-screen--create .account-screen__field--name {
  left: 10.9%;
  top: 33.95%;
  width: 79.8%;
  height: 3.85%;
}

.account-screen--create .account-screen__field--email {
  left: 10.9%;
  top: 43%;
  width: 79.8%;
  height: 4%;
}

.account-screen--create .account-screen__field--password {
  left: 10.9%;
  top: 50.9%;
  width: 75.8%;
  height: 4%;
}

.account-screen--create .account-screen__field--confirm {
  left: 10.9%;
  top: 59%;
  width: 79.8%;
  height: 4%;
}

.account-screen__input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: rgba(246, 255, 247, 0.94);
  caret-color: #5ff7e6;
  font-size: clamp(0.72rem, 2.1vw, 1.25rem);
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 0 3.3%;
  text-transform: none;
}

.account-screen__input::placeholder {
  color: rgba(202, 214, 217, 0.42);
  font-style: italic;
}

.account-screen__input:focus-visible {
  outline: 2px solid rgba(87, 246, 229, 0.72);
  outline-offset: -3px;
  box-shadow: 0 0 14px rgba(87, 246, 229, 0.18) inset;
}

.account-screen--create .account-screen__input:focus-visible,
.account-screen--create .account-screen__checkbox:focus-within,
.account-screen--create .account-screen__password-toggle:focus-visible,
.account-screen--create .account-screen__submit:focus-visible,
.account-screen--create .account-screen__create:focus-visible {
  outline: none;
  box-shadow: none;
}

.account-screen__password-toggle {
  left: 84.25%;
  top: 54.35%;
  width: 5%;
  height: 4.2%;
}

.account-screen--create .account-screen__password-toggle {
  left: 84%;
  top: 51.15%;
  width: 5.2%;
  height: 4%;
}

.account-screen__forgot {
  left: 64%;
  top: 60.1%;
  width: 26%;
  height: 3.4%;
  color: transparent;
}

.account-screen__submit {
  left: 11.6%;
  top: 64.3%;
  width: 78.8%;
  height: 5.9%;
}

.account-screen--create .account-screen__submit {
  left: 10.9%;
  top: 68.9%;
  width: 79.8%;
  height: 5.4%;
}

.account-screen__submit-label,
.account-screen__create-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 246, 215, 0.96);
  font-size: clamp(0.68rem, 1.9vw, 1rem);
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(255, 210, 125, 0.28);
  opacity: 0;
}

.account-screen--signup .account-screen__submit-label,
.account-screen--confirmation .account-screen__create-label {
  opacity: 1;
}

.account-screen__create {
  left: 11.6%;
  top: 76.5%;
  width: 78.8%;
  height: 8.5%;
}

.account-screen--create .account-screen__create {
  left: 10.9%;
  top: 78.3%;
  width: 79.8%;
  height: 6.7%;
}

.account-screen__checkbox {
  left: 10.8%;
  top: 63.4%;
  width: 3.4%;
  height: 3%;
  cursor: pointer;
}

.account-screen__checkbox input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.account-screen__checkbox::after {
  content: "";
  position: absolute;
  left: 31%;
  top: 5%;
  width: 38%;
  height: 72%;
  border-right: 2px solid rgba(135, 255, 238, 0.95);
  border-bottom: 2px solid rgba(135, 255, 238, 0.95);
  opacity: 0;
  pointer-events: none;
  transform: rotate(42deg);
  filter: drop-shadow(0 0 5px rgba(57, 244, 225, 0.55));
}

.account-screen__checkbox:has(input:checked)::after {
  opacity: 1;
}

.account-screen__hit:hover,
.account-screen__hit:focus-visible,
.account-screen__close:hover,
.account-screen__close:focus-visible,
.account-screen__password-toggle:hover,
.account-screen__password-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.account-screen__hit[disabled] {
  cursor: wait;
  opacity: 0.5;
}

.account-screen__message {
  position: absolute;
  left: 11.6%;
  top: 70.8%;
  z-index: 3;
  width: 78.8%;
  margin: 0;
  color: #9ff1be;
  font-size: clamp(0.54rem, 1.35vw, 0.78rem);
  line-height: 1.35;
  text-transform: none;
  text-align: center;
  text-shadow: 0 0 8px rgba(65, 171, 94, 0.24);
}

.account-screen__message--error {
  color: #e9a09b;
}

.account-screen--create .account-screen__message {
  left: 11%;
  top: 88.2%;
  width: 79%;
  font-size: clamp(0.48rem, 1.05vw, 0.68rem);
  text-align: left;
}

.account-screen__confirmation-card {
  position: absolute;
  left: 11.6%;
  top: 39.8%;
  z-index: 3;
  width: 78.8%;
  color: rgba(246, 255, 247, 0.92);
  text-align: center;
  text-transform: none;
}

.account-screen__confirmation-card h2 {
  margin: 0 0 0.7em;
  color: #6ff3e4;
  font-size: clamp(0.95rem, 2.3vw, 1.55rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-screen__confirmation-card p {
  margin: 0;
  font-size: clamp(0.62rem, 1.6vw, 0.95rem);
  line-height: 1.45;
}

.account-screen__value {
  position: absolute;
  z-index: 3;
  margin: 0;
  overflow: hidden;
  color: rgba(246, 255, 247, 0.95);
  font-size: clamp(0.54rem, 1.58vw, 0.92rem);
  line-height: 1.1;
  letter-spacing: 0.025em;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(246, 255, 247, 0.18);
  text-transform: none;
}

.account-screen__value--email {
  left: 13.4%;
  top: 28.65%;
  width: 29.5%;
  letter-spacing: 0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-screen__value--decoder-id {
  left: 49.6%;
  top: 28.65%;
  width: 19.5%;
  letter-spacing: 0.018em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-screen .account-screen__value.account-screen__value--email,
.account-screen .account-screen__value.account-screen__value--decoder-id {
  font-size: clamp(11px, 0.68vw, 13px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-screen__value strong {
  font-weight: 700;
}

.account-screen__sign-out {
  left: 10.4%;
  top: 82.1%;
  width: 25.6%;
  height: 5.7%;
}

.account-screen__manage {
  left: 37.7%;
  top: 82.1%;
  width: 25%;
  height: 5.7%;
}

.account-screen__upgrade {
  left: 64.3%;
  top: 82.1%;
  width: 25.8%;
  height: 5.7%;
}

.account-screen--decoder .account-screen__message {
  top: 81.65%;
  left: 15%;
  width: 70%;
}

.account-screen--manage {
  background: transparent;
}

.account-screen--manage .account-screen__input {
  color: rgba(226, 244, 235, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10px, 0.58vw, 12px);
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0 5.4%;
  text-shadow: 0 0 6px rgba(140, 255, 235, 0.12);
}

.account-screen--manage .account-screen__input:focus-visible {
  outline: none;
  box-shadow: none;
}

.account-screen__field--manage-name {
  left: 11.35%;
  top: 25.95%;
  width: 36.5%;
  height: 4.25%;
}

.account-screen__field--manage-email {
  left: 52.6%;
  top: 25.95%;
  width: 36.4%;
  height: 4.25%;
}

.account-manage__decoder-id {
  position: absolute;
  left: 11.55%;
  top: 37.5%;
  z-index: 3;
  width: 36%;
  margin: 0;
  overflow: hidden;
  color: rgba(226, 244, 235, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(8px, 0.48vw, 10px);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 0 6px rgba(140, 255, 235, 0.12);
}

.account-screen.account-screen--manage .account-manage__decoder-id {
  color: rgba(226, 244, 235, 0.88);
  font-size: clamp(10px, 0.58vw, 12px);
  font-weight: 400;
}

.account-screen--manage .account-manage__checkbox {
  position: absolute;
  left: 8.75%;
  top: 46.74%;
  z-index: 3;
  display: block;
  width: 3.75%;
  height: 3.28%;
  cursor: pointer;
}

.account-screen--manage .account-manage__checkbox input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.account-screen--manage .account-manage__checkbox::after {
  content: "";
  position: absolute;
  left: 24%;
  top: .5%;
  width: 40%;
  height: 65%;
  border-right: 3px solid rgba(135, 255, 238, 0.96);
  border-bottom: 3px solid rgba(135, 255, 238, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: rotate(42deg);
  filter: drop-shadow(0 0 5px rgba(57, 244, 225, 0.55));
}

.account-screen--manage .account-manage__checkbox:has(input:checked)::after {
  opacity: 1;
}

.account-manage__save {
  left: 7.2%;
  top: 52.58%;
  width: 86%;
  height: 5.4%;
}

.account-manage__action {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.account-manage__action-label {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 92%;
  color: rgba(255, 246, 215, 0.96);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  font-size: clamp(8px, 0.68vw, 12px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  animation: accountButtonStateReveal 180ms steps(8, end) both;
}

.account-manage__status-art {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  animation: accountButtonStateReveal 140ms steps(8, end) both;
}

.account-manage__action--loading,
.account-manage__action--success,
.account-manage__action--error {
  opacity: 1;
  background: rgba(1, 14, 12, 0.64);
}

.account-screen__hit.account-manage__action--loading[disabled],
.account-screen__hit.account-manage__action--success[disabled],
.account-screen__hit.account-manage__action--error[disabled] {
  opacity: 1;
}

.account-manage__action--loading .account-manage__action-label {
  color: rgba(84, 252, 235, 0.94);
  text-shadow: 0 0 8px rgba(0, 255, 231, 0.28);
}

.account-manage__action--success {
  background: rgba(9, 42, 27, 0.66);
  box-shadow: inset 0 0 0 1px rgba(110, 255, 160, 0.24), 0 0 16px rgba(110, 255, 160, 0.16);
}

.account-manage__action--success .account-manage__action-label {
  color: rgba(110, 255, 160, 0.95);
  text-shadow: 0 0 8px rgba(110, 255, 160, 0.3);
}

.account-manage__action--error {
  background: rgba(48, 17, 10, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 145, 116, 0.24), 0 0 14px rgba(255, 97, 78, 0.16);
}

.account-manage__action--error .account-manage__action-label {
  color: rgba(255, 145, 116, 0.96);
  text-shadow: 0 0 10px rgba(255, 97, 78, 0.3);
}

.account-manage__reset {
  left: 62.6%;
  top: 62.16%;
  width: 28.4%;
  height: 4.5%;
}

.account-manage__deactivate {
  left: 8%;
  top: 70.55%;
  width: 84.7%;
  height: 6.82%;
}

.account-screen--manage .account-manage__back {
  left: 8.1%;
  top: 79.58%;
  width: 33.2%;
  height: 5.38%;
}

.account-screen--decoder-club .account-screen__decoder-club-back {
  left: 8.1%;
  top: 80.7%;
  width: 33.8%;
  height: 5.55%;
}

.account-manage__confirm {
  position: absolute;
  left: 8%;
  top: 69.35%;
  z-index: 5;
  width: 84.7%;
  min-height: 9.2%;
  padding: 1% 1.2%;
  border: 1px solid rgba(255, 71, 111, 0.86);
  background: rgba(14, 0, 7, 0.88);
  color: rgba(255, 212, 220, 0.94);
  box-shadow:
    0 0 18px rgba(255, 71, 111, 0.18),
    inset 0 0 16px rgba(255, 71, 111, 0.08);
}

.account-manage__confirm p {
  margin: 0;
  font-size: clamp(0.46rem, 1.02vw, 0.68rem);
  line-height: 1.3;
  text-transform: none;
}

.account-manage__confirm strong {
  display: block;
  margin-bottom: 0.2em;
  color: rgba(255, 93, 128, 0.98);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-manage__confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 1.1%;
}

.account-manage__confirm-actions button {
  min-height: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(108, 255, 240, 0.7);
  background: rgba(0, 24, 23, 0.68);
  color: rgba(204, 255, 248, 0.94);
  font-size: clamp(0.44rem, 0.9vw, 0.62rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-manage__confirm-actions button:last-child {
  border-color: rgba(255, 93, 128, 0.82);
  color: rgba(255, 212, 220, 0.96);
}

.account-manage__inactive {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(14px, 2vw, 22px);
  height: 100%;
  margin: 0 10%;
}

.account-manage__inactive p {
  margin: 0 0 0.25em;
  color: rgba(255, 249, 226, 0.92);
  font-size: clamp(0.72rem, 1.35vw, 1rem);
  letter-spacing: 0.08em;
}

.account-manage__inactive h2 {
  margin: 0;
  color: rgba(245, 255, 250, 0.96);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 4vw, 3.35rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-shadow: 0 0 13px rgba(211, 255, 248, 0.24);
}

.account-manage__inactive span {
  display: block;
  margin-top: 0.75em;
  color: rgba(130, 255, 236, 0.84);
  font-size: clamp(0.64rem, 1.35vw, 0.94rem);
  line-height: 1.35;
  text-transform: none;
}

.account-manage__inactive .account-manage__button {
  min-height: clamp(34px, 4.2vw, 50px);
  border: 1px solid rgba(255, 201, 77, 0.9);
  background: linear-gradient(180deg, rgba(125, 78, 24, 0.86), rgba(70, 39, 9, 0.92));
  color: rgba(255, 247, 218, 0.96);
  font-size: clamp(0.58rem, 1.15vw, 0.82rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.decoder-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 24px 0 18px;
}

.decoder-auth-tabs button,
.decoder-auth-form input,
.decoder-auth-message {
  font-family: "Courier New", ui-monospace, monospace;
}

.decoder-auth-tabs button {
  min-height: 40px;
  border: 1px solid rgba(246, 239, 227, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(246, 239, 227, 0.74);
  text-transform: uppercase;
  cursor: pointer;
}

.decoder-auth-tabs button.is-active {
  border-color: rgba(65, 171, 94, 0.62);
  color: #bff0ca;
  box-shadow: 0 0 18px rgba(65, 171, 94, 0.12) inset;
}

.decoder-auth-tabs button:hover,
.decoder-auth-tabs button:focus-visible,
.decoder-auth-form input:focus-visible {
  outline: 1px solid rgba(65, 171, 94, 0.58);
  outline-offset: 2px;
}

.decoder-auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.decoder-auth-form label {
  display: grid;
  gap: 6px;
  color: rgba(246, 239, 227, 0.78);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.decoder-auth-form input {
  min-height: 42px;
  border: 1px solid rgba(246, 239, 227, 0.22);
  border-radius: 4px;
  background: rgba(3, 5, 4, 0.72);
  color: #fff7e6;
  font-size: 1rem;
  padding: 9px 10px;
}

.decoder-auth-form button[disabled],
.decoder-panel--account button[disabled] {
  cursor: wait;
  opacity: 0.58;
}

.decoder-auth-message {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(65, 171, 94, 0.32);
  background: rgba(4, 12, 8, 0.72);
  color: #bff0ca;
  font-size: 0.9rem;
  line-height: 1.4;
}

.decoder-auth-message--error {
  border-color: rgba(180, 62, 58, 0.48);
  color: #e9a09b;
}

.decoder-auth-email {
  color: #bff0ca;
  font-family: "Courier New", ui-monospace, monospace;
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .artifact-panel--account::before,
  .artifact-panel--account::after {
    display: none;
  }
}

.artifact-panel--field-notes {
  width: min(96vw, calc(94svh * 1400 / 1643));
  max-height: 94svh;
  aspect-ratio: 1400 / 1643;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#overlay[data-overlay-kind="field-notes"] {
  --field-notes-overlay-padding: clamp(14px, 2.6svh, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--field-notes-overlay-padding);
  overflow: auto;
}

.artifact-panel--field-notes > .close-button {
  display: none;
}

.artifact-panel--field-notes .artifact-panel__inner {
  width: 100%;
  height: 100%;
  padding: 0;
}

.artifact-panel--field-notes::before,
.artifact-panel--field-notes::after {
  content: "";
  position: absolute;
  inset: 2.2% 2.4%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

.artifact-panel--field-notes::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(112, 255, 246, 0.08) 0 1px,
      transparent 1px 5px
    );
  mix-blend-mode: screen;
}

.artifact-panel--field-notes::after {
  background:
    linear-gradient(90deg, transparent 0 34%, rgba(140, 255, 247, 0.11) 35% 37%, transparent 38% 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 250, 220, 0.08), transparent 52%);
  clip-path: polygon(0 38%, 100% 34%, 100% 52%, 0 56%);
}

.artifact-panel--field-notes.account-interference-active::before {
  opacity: 0.48;
  transform: translateX(-2px);
}

.artifact-panel--field-notes.account-interference-active::after {
  opacity: 0.72;
  transform: translateX(5px);
}

.field-notes-screen {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1400 / 1643;
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  color: rgba(226, 255, 249, 0.94);
  text-transform: none;
}

.field-notes-screen__backplate {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

.field-notes-screen button,
.field-notes-screen input,
.field-notes-screen textarea,
.field-notes-screen select {
  font-family: inherit;
}

.field-notes-screen__close,
.field-notes-screen__new,
.field-notes-screen__save,
.field-notes-screen__duplicate,
.field-notes-screen__delete {
  position: absolute;
  z-index: 3;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.field-notes-screen__close {
  top: 3.15%;
  right: 4.9%;
  width: 4.2%;
  height: 4.2%;
}

.field-notes-screen {
  --field-notes-font: "Lucida Console", "Courier New", ui-monospace, monospace;
  --field-notes-meta-color: rgba(84, 252, 235, 0.92);
  --field-notes-data-color: rgba(238, 242, 232, 0.96);
  --field-notes-meta-size: clamp(9px, 0.62vw, 10px);
  --field-notes-data-size: clamp(11px, 0.78vw, 12px);
}

.field-notes-screen .field-notes-screen__count {
  position: absolute;
  left: 6.55%;
  top: 22.7%;
  z-index: 3;
  width: 32%;
  margin: 0;
  color: var(--field-notes-meta-color);
  font-family: var(--field-notes-font);
  font-size: var(--field-notes-meta-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(0, 255, 231, 0.35);
}

.field-notes-screen__search,
.field-notes-screen__title-field,
.field-notes-screen__date-field,
.field-notes-screen__category-field,
.field-notes-screen__content-field {
  position: absolute;
  z-index: 3;
  display: block;
}

.field-notes-screen__search {
  left: 12.2%;
  top: 24.9%;
  width: 26.4%;
  height: 4.2%;
}

.field-notes-screen__search input,
.field-notes-screen__title-field input,
.field-notes-screen__date-field input,
.field-notes-screen__category-field select,
.field-notes-screen__content-field textarea {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--field-notes-data-color);
  caret-color: #5ff7e6;
  font-family: var(--field-notes-font);
  font-size: var(--field-notes-data-size);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0;
  padding: 0 3.8%;
  outline: none;
  resize: none;
}

.field-notes-screen__search input {
  color: rgba(197, 219, 222, 0.8);
  font-size: var(--field-notes-data-size);
}

.field-notes-screen__search input::placeholder,
.field-notes-screen__title-field input::placeholder,
.field-notes-screen__content-field textarea::placeholder {
  color: rgba(188, 213, 219, 0.52);
}

.field-notes-screen__title-field {
  left: 42.6%;
  top: 24.9%;
  width: 51.2%;
  height: 4.1%;
}

.field-notes-screen__date-field {
  left: 42.6%;
  top: 32.7%;
  width: 25.8%;
  height: 4.1%;
}

.field-notes-screen__category-field {
  left: 70.55%;
  top: 32.7%;
  width: 23.2%;
  height: 4.1%;
}

.field-notes-screen__category-field select {
  color: var(--field-notes-data-color);
  text-transform: uppercase;
  appearance: none;
}

.field-notes-screen__content-field {
  left: 42.6%;
  top: 42.1%;
  width: 51.35%;
  height: 35.7%;
}

.field-notes-screen__content-field textarea {
  padding: 2.9% 3.5%;
  line-height: 1.28;
  white-space: pre-wrap;
}

.field-notes-screen__search input:focus-visible,
.field-notes-screen__title-field input:focus-visible,
.field-notes-screen__date-field input:focus-visible,
.field-notes-screen__category-field select:focus-visible,
.field-notes-screen__content-field textarea:focus-visible,
.field-notes-screen__list-item:focus-visible,
.field-notes-screen__new:focus-visible,
.field-notes-screen__save:focus-visible,
.field-notes-screen__duplicate:focus-visible,
.field-notes-screen__delete:focus-visible,
.field-notes-screen__close:focus-visible {
  outline: none;
  box-shadow: none;
}

.field-notes-screen__list {
  position: absolute;
  left: 5.85%;
  top: 29.15%;
  z-index: 3;
  display: grid;
  grid-auto-rows: minmax(0, 19.2%);
  gap: 1.55%;
  width: 33.35%;
  height: 52.15%;
  overflow: hidden;
}

.field-notes-screen__list-item {
  display: flex;
  flex-direction: column;
  gap: 4%;
  width: 100%;
  height: 100%;
  padding: 4.4% 5.8%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  overflow: hidden;
}

.field-notes-screen__list-item--selected {
  background: rgba(214, 169, 62, 0.09);
  box-shadow: 0 0 18px rgba(250, 195, 65, 0.18) inset;
}

.field-notes-screen__item-title {
  color: var(--field-notes-data-color);
  font-family: var(--field-notes-font);
  font-size: var(--field-notes-data-size);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 7px rgba(238, 242, 232, 0.24);
}

.field-notes-screen__item-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--field-notes-data-color);
  font-family: var(--field-notes-font);
  font-size: clamp(10px, 0.72vw, 11px);
  font-weight: 400;
  line-height: 1.22;
  overflow: hidden;
}

.field-notes-screen__item-date {
  margin-top: auto;
  color: var(--field-notes-meta-color);
  font-family: var(--field-notes-font);
  font-size: var(--field-notes-meta-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(0, 255, 231, 0.34);
}

.field-notes-screen__new {
  left: 5.85%;
  top: 83.1%;
  width: 33.4%;
  height: 5.25%;
}

.field-notes-screen__status-row {
  position: absolute;
  left: 42.7%;
  top: 78%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4%;
  width: 51%;
  min-width: 0;
  pointer-events: none;
}

.field-notes-screen .field-notes-screen__sync,
.field-notes-screen .field-notes-screen__edited {
  min-width: 0;
  max-width: 50%;
  z-index: 3;
  margin: 0;
  color: var(--field-notes-meta-color);
  font-family: var(--field-notes-font);
  font-size: var(--field-notes-meta-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(0, 255, 231, 0.35);
  transition:
    color 240ms ease,
    text-shadow 240ms ease;
}

.field-notes-screen__sync {
  flex: 1 1 auto;
}

.field-notes-screen__edited {
  flex: 0 1 auto;
  text-align: right;
}

.field-notes-screen__status-row--success .field-notes-screen__sync,
.field-notes-screen__status-row--info .field-notes-screen__sync {
  color: rgba(110, 255, 160, 0.95);
  text-shadow: 0 0 8px rgba(110, 255, 160, 0.32);
  animation: fieldNotesStatusReveal 220ms steps(8, end) both;
}

.field-notes-screen__status-row--local .field-notes-screen__sync {
  color: rgba(242, 198, 94, 0.94);
  text-shadow: 0 0 8px rgba(242, 198, 94, 0.28);
  animation: fieldNotesStatusReveal 220ms steps(8, end) both;
}

.field-notes-screen__status-row--delete .field-notes-screen__sync {
  color: rgba(255, 122, 134, 0.92);
  text-shadow: 0 0 8px rgba(255, 122, 134, 0.24);
  animation: fieldNotesStatusReveal 220ms steps(8, end) both;
}

.field-notes-screen__status-row--error .field-notes-screen__sync {
  color: rgba(255, 145, 116, 0.96);
  text-shadow: 0 0 10px rgba(255, 97, 78, 0.32);
  animation: fieldNotesStatusReveal 260ms steps(8, end) both;
}

.field-notes-screen__save {
  left: 42.55%;
  top: 82.55%;
  width: 18.35%;
  height: 5.55%;
}

.field-notes-screen__duplicate {
  left: 62.05%;
  top: 82.55%;
  width: 16.9%;
  height: 5.55%;
}

.field-notes-screen__delete {
  left: 80.05%;
  top: 82.55%;
  width: 14.2%;
  height: 5.55%;
}

.field-notes-screen__empty-list,
.field-notes-screen__empty-editor,
.field-notes-screen__confirm {
  position: absolute;
  z-index: 5;
  margin: 0;
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
}

.field-notes-screen__empty-list {
  inset: 10% 8% auto 8%;
  color: rgba(84, 252, 235, 0.82);
  font-size: clamp(9px, 1vw, 15px);
}

.field-notes-screen__empty-editor {
  left: 42.6%;
  top: 45%;
  width: 51.35%;
  color: rgba(226, 255, 249, 0.88);
}

.field-notes-screen__empty-editor h2 {
  margin: 0 0 1em;
  color: rgba(84, 252, 235, 0.95);
  font-size: clamp(13px, 1.3vw, 20px);
  font-weight: 400;
}

.field-notes-screen__empty-editor p {
  max-width: 34em;
  margin: 0 0 1.4em;
  font-size: clamp(9px, 0.95vw, 15px);
  line-height: 1.35;
}

.field-notes-screen__empty-editor button {
  border: 1px solid rgba(84, 252, 235, 0.7);
  background: rgba(0, 24, 22, 0.66);
  color: rgba(84, 252, 235, 0.96);
  padding: 0.7em 1.1em;
  font: inherit;
}

.field-notes-screen__confirm {
  left: 28%;
  top: 39%;
  width: 44%;
  padding: 2.3%;
  border: 1px solid rgba(84, 252, 235, 0.78);
  background: rgba(2, 15, 16, 0.96);
  color: rgba(226, 255, 249, 0.94);
  text-align: center;
  box-shadow: 0 0 34px rgba(0, 255, 231, 0.18);
}

.field-notes-screen__confirm h2 {
  margin: 0 0 0.8em;
  color: rgba(84, 252, 235, 0.96);
  font-size: clamp(13px, 1.25vw, 20px);
  font-weight: 400;
}

.field-notes-screen__confirm p {
  margin: 0 0 1.1em;
  font-size: clamp(9px, 0.95vw, 15px);
}

.field-notes-screen__confirm div {
  display: flex;
  gap: 0.7em;
  justify-content: center;
}

.field-notes-screen__confirm button {
  border: 1px solid rgba(84, 252, 235, 0.62);
  background: rgba(0, 31, 28, 0.82);
  color: rgba(226, 255, 249, 0.94);
  padding: 0.65em 0.9em;
  font-size: clamp(8px, 0.86vw, 13px);
  text-transform: uppercase;
}

.field-notes-screen__confirm button:last-child {
  border-color: rgba(255, 113, 128, 0.78);
  color: rgba(255, 126, 140, 0.96);
}

@media (prefers-reduced-motion: reduce) {
  .artifact-panel--field-notes::before,
  .artifact-panel--field-notes::after {
    display: none;
  }
}

.artifact-panel--field-guide {
  --field-guide-toolbar-slot: 48px;
  width: min(97vw, calc((100svh - var(--field-guide-toolbar-slot)) * 1.409));
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.artifact-panel--field-guide .artifact-panel__inner {
  padding: 0;
}

.artifact-panel--field-guide .close-button {
  display: none;
}

.field-guide-panel__viewport {
  width: 100%;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(84, 252, 235, 0.58) rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
}

.field-guide-panel__viewport--zoomed {
  cursor: grab;
}

.field-guide-panel__viewport--dragging {
  cursor: grabbing;
  user-select: none;
}

.field-guide-zoom-control {
  --reader-console-width: clamp(128px, 18vw, 176px);
  --reader-console-height: clamp(36px, 4vw, 42px);
  --reader-console-zoom-width: 100%;
  --reader-console-divider-gap: 0;
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 2px auto 0;
}

.overlay[data-overlay-kind="field-guide"] .overlay__scrim {
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: none;
}

.overlay[data-overlay-kind="field-guide"] {
  z-index: 60;
  place-items: start center;
  padding: clamp(4px, 0.5svh, 8px) clamp(18px, 4vw, 48px) clamp(4px, 0.5svh, 8px);
  overflow: auto;
}

.overlay[data-overlay-kind="journal"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vh, 40px) clamp(18px, 4vw, 48px);
}

.field-guide-panel {
  position: relative;
  width: calc(100% * var(--field-guide-zoom, 1));
  aspect-ratio: 2887 / 2048;

  /* FIELD GUIDE TUNING CONTROLS
     All left/top/width/height values are percentages of the Field Guide backplate. */

  /* FIELD GUIDE - GLOBAL TYPE */
  --fg-copy-size: clamp(9px, 0.84vw, 12.5px);
  --fg-copy-tight: calc(var(--fg-copy-size) * 1.02);
  --fg-copy-tighter: calc(var(--fg-copy-size) * 0.96);
  --fg-body-line-height: 1.04;
  --fg-paragraph-gap: 0.3em;

  /* FIELD GUIDE - HEADER TITLE */
  --fg-header-title-left: 4.7%;
  --fg-header-title-top: 3.9%;
  --fg-header-title-width: 13%;
  --fg-header-title-height: 2.6%;
  --fg-header-title-heading-size: 1em;
  --fg-header-title-body-size: 1em;
  --fg-header-title-line-height: 1;

  /* FIELD GUIDE - HEADER SUBTITLE */
  --fg-header-subtitle-left: 19.8%;
  --fg-header-subtitle-top: 3.9%;
  --fg-header-subtitle-width: 42%;
  --fg-header-subtitle-height: 2.6%;
  --fg-header-subtitle-heading-size: 1em;
  --fg-header-subtitle-body-size: 1em;
  --fg-header-subtitle-line-height: 1;

  /* FIELD GUIDE - WELCOME TO TULARO */
  --fg-welcome-left: 33.1%;
  --fg-welcome-top: 15.0%;
  --fg-welcome-width: 40%;
  --fg-welcome-height: 11.8%;
  --fg-welcome-heading-size: 1em;
  --fg-welcome-body-size: var(--fg-copy-tight);
  --fg-welcome-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - OFFICIAL RECORD */
  --fg-record-left: 13.2%;
  --fg-record-top: 32.2%;
  --fg-record-width: 34.2%;
  --fg-record-height: 12.4%;
  --fg-record-heading-size: 1em;
  --fg-record-body-size: var(--fg-copy-tight);
  --fg-record-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - EXPLORE THE ROOM */
  --fg-explore-left: 13.2%;
  --fg-explore-top: 48.3%;
  --fg-explore-width: 34.2%;
  --fg-explore-height: 15.4%;
  --fg-explore-heading-size: 1em;
  --fg-explore-body-size: var(--fg-copy-tighter);
  --fg-explore-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - FIELD NOTES */
  --fg-notes-left: 13.2%;
  --fg-notes-top: 66.3%;
  --fg-notes-width: 34.2%;
  --fg-notes-height: 11.2%;
  --fg-notes-heading-size: 1em;
  --fg-notes-body-size: var(--fg-copy-tighter);
  --fg-notes-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - REWIND */
  --fg-rewind-left: 13.2%;
  --fg-rewind-top: 79.5%;
  --fg-rewind-width: 34.2%;
  --fg-rewind-height: 9.2%;
  --fg-rewind-heading-size: 1em;
  --fg-rewind-body-size: var(--fg-copy-tighter);
  --fg-rewind-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - TIME & EVENTS */
  --fg-time-left: 55.9%;
  --fg-time-top: 32.0%;
  --fg-time-width: 37%;
  --fg-time-height: 13.8%;
  --fg-time-heading-size: 1em;
  --fg-time-body-size: var(--fg-copy-tighter);
  --fg-time-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - ACCOUNTS & ACCESS */
  --fg-account-left: 55.9%;
  --fg-account-top: 48.3%;
  --fg-account-width: 37%;
  --fg-account-height: 14%;
  --fg-account-heading-size: 1em;
  --fg-account-body-size: var(--fg-copy-tighter);
  --fg-account-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - ARTIFACTS */
  --fg-artifacts-left: 55.7%;
  --fg-artifacts-top: 65.5%;
  --fg-artifacts-width: 37%;
  --fg-artifacts-height: 14.7%;
  --fg-artifacts-heading-size: 1em;
  --fg-artifacts-body-size: var(--fg-copy-tighter);
  --fg-artifacts-line-height: var(--fg-body-line-height);

  /* FIELD GUIDE - ONE LAST THING */
  --fg-last-left: 55.8%;
  --fg-last-top: 81.5%;
  --fg-last-width: 35%;
  --fg-last-height: 9.8%;
  --fg-last-heading-size: 1em;
  --fg-last-body-size: clamp(8.5px, 0.72vw, 11px);
  --fg-last-line-height: 0.92;

  margin: 0 auto;
  color: rgba(241, 238, 221, 0.92);
  font-family:
    "VT323",
    "Pixel Operator",
    "PxPlus IBM VGA8",
    "Lucida Console",
    "Courier New",
    ui-monospace,
    monospace;
  font-size: var(--fg-copy-size);
  line-height: var(--fg-body-line-height);
  letter-spacing: 0;
  text-shadow: 0 0 4px rgba(224, 244, 209, 0.12);
}

.field-guide-panel__backplate {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.field-guide-panel__content,
.field-guide-panel__close,
.field-guide-panel__got-it {
  position: absolute;
}

.field-guide-panel__content {
  inset: 0;
  pointer-events: none;
}

.field-guide-panel__titlebar {
  position: absolute;
  display: none;
  left: var(--fg-header-title-left);
  top: var(--fg-header-title-top);
  width: var(--fg-header-title-width);
  height: var(--fg-header-title-height);
  font-size: var(--fg-header-title-body-size);
  line-height: var(--fg-header-title-line-height);
}

.field-guide-panel__titlebar span {
  font-size: var(--fg-header-title-heading-size);
}

.field-guide-panel__titlebar p {
  margin: 0;
  font-size: var(--fg-header-subtitle-body-size);
  line-height: var(--fg-header-subtitle-line-height);
}

.field-guide-panel__welcome,
.field-guide-panel__section {
  position: absolute;
  overflow: hidden;
  color: rgba(241, 238, 221, 0.92);
}

.field-guide-panel__welcome p,
.field-guide-panel__section p {
  margin: 0 0 var(--fg-paragraph-gap);
  font-size: inherit;
  line-height: inherit;
}

.field-guide-panel__columns {
  display: contents;
}

.field-guide-panel__column {
  display: contents;
}

.field-guide-panel__section h2,
.field-guide-panel__welcome h2 {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.field-guide-panel__welcome {
  left: var(--fg-welcome-left);
  top: var(--fg-welcome-top);
  width: var(--fg-welcome-width);
  height: var(--fg-welcome-height);
  font-size: var(--fg-welcome-body-size);
  line-height: var(--fg-welcome-line-height);
}

.field-guide-panel__welcome h2 {
  font-size: var(--fg-welcome-heading-size);
}

.field-guide-panel__section--official {
  left: var(--fg-record-left);
  top: var(--fg-record-top);
  width: var(--fg-record-width);
  height: var(--fg-record-height);
  font-size: var(--fg-record-body-size);
  line-height: var(--fg-record-line-height);
}

.field-guide-panel__section--official h2 {
  font-size: var(--fg-record-heading-size);
}

.field-guide-panel__section--explore {
  left: var(--fg-explore-left);
  top: var(--fg-explore-top);
  width: var(--fg-explore-width);
  height: var(--fg-explore-height);
  font-size: var(--fg-explore-body-size);
  line-height: var(--fg-explore-line-height);
}

.field-guide-panel__section--explore h2 {
  font-size: var(--fg-explore-heading-size);
}

.field-guide-panel__section--notes {
  left: var(--fg-notes-left);
  top: var(--fg-notes-top);
  width: var(--fg-notes-width);
  height: var(--fg-notes-height);
  font-size: var(--fg-notes-body-size);
  line-height: var(--fg-notes-line-height);
}

.field-guide-panel__section--notes h2 {
  font-size: var(--fg-notes-heading-size);
}

.field-guide-panel__section--rewind {
  left: var(--fg-rewind-left);
  top: var(--fg-rewind-top);
  width: var(--fg-rewind-width);
  height: var(--fg-rewind-height);
  font-size: var(--fg-rewind-body-size);
  line-height: var(--fg-rewind-line-height);
}

.field-guide-panel__section--rewind h2 {
  font-size: var(--fg-rewind-heading-size);
}

.field-guide-panel__section--time {
  left: var(--fg-time-left);
  top: var(--fg-time-top);
  width: var(--fg-time-width);
  height: var(--fg-time-height);
  font-size: var(--fg-time-body-size);
  line-height: var(--fg-time-line-height);
}

.field-guide-panel__section--time h2 {
  font-size: var(--fg-time-heading-size);
}

.field-guide-panel__section--account {
  left: var(--fg-account-left);
  top: var(--fg-account-top);
  width: var(--fg-account-width);
  height: var(--fg-account-height);
  font-size: var(--fg-account-body-size);
  line-height: var(--fg-account-line-height);
}

.field-guide-panel__section--account h2 {
  font-size: var(--fg-account-heading-size);
}

.field-guide-panel__section--artifacts {
  left: var(--fg-artifacts-left);
  top: var(--fg-artifacts-top);
  width: var(--fg-artifacts-width);
  height: var(--fg-artifacts-height);
  font-size: var(--fg-artifacts-body-size);
  line-height: var(--fg-artifacts-line-height);
}

.field-guide-panel__section--artifacts h2 {
  font-size: var(--fg-artifacts-heading-size);
}

.field-guide-panel__section--last {
  left: var(--fg-last-left);
  top: var(--fg-last-top);
  width: var(--fg-last-width);
  height: var(--fg-last-height);
  font-size: var(--fg-last-body-size);
  line-height: var(--fg-last-line-height);
}

.field-guide-panel__section--last h2 {
  font-size: var(--fg-last-heading-size);
}

.field-guide-panel__welcome p,
.field-guide-panel__section p {
  color: rgba(241, 238, 221, 0.9);
}

.field-guide-panel__return {
  margin-top: 0.55em !important;
  color: #58d866 !important;
}

.field-guide-panel__close,
.field-guide-panel__got-it {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.01);
  color: transparent;
  cursor: pointer;
}

.field-guide-panel__close {
  right: 7%;
  top: 5.2%;
  width: 1.9%;
  height: 2.4%;
}

.field-guide-panel__got-it {
  right: 8.5%;
  bottom: 6.5%;
  width: 16.5%;
  height: 3%;
}

.field-guide-panel__close:hover,
.field-guide-panel__close:focus-visible,
.field-guide-panel__got-it:hover,
.field-guide-panel__got-it:focus-visible {
  outline: none;
  background: transparent;
}

.journal-entry {
  max-width: 960px;
  padding: clamp(20px, 3vw, 34px);
}

.journal-entry__header {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(246, 239, 227, 0.16);
}

.journal-entry__header time {
  color: rgba(231, 180, 93, 0.92);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.95rem;
}

.journal-entry__layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 1fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
  margin-top: 24px;
}

.journal-entry__page {
  margin: 0;
}

.journal-entry__page img,
.journal-entry__page-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: min(54svh, 560px);
  border: 1px solid rgba(45, 29, 20, 0.26);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(80, 46, 35, 0.11), transparent 13%),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(52, 77, 142, 0.12) 31px),
    #d9c49f;
  color: rgba(42, 27, 22, 0.62);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    inset 0 0 34px rgba(74, 43, 24, 0.18);
  font-family: "Courier New", ui-monospace, monospace;
  text-align: center;
  text-transform: uppercase;
}

.journal-entry__page img {
  height: auto;
  object-fit: contain;
}

.journal-entry__page figcaption {
  margin-top: 10px;
  color: rgba(246, 239, 227, 0.66);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.78rem;
  text-align: center;
  text-transform: uppercase;
}

.journal-entry__room-prompt {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(231, 180, 93, 0.22);
  border-radius: 4px;
  background: rgba(231, 180, 93, 0.07);
}

.journal-entry__room-prompt {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.journal-entry__room-prompt strong,
.journal-entry__room-prompt span {
  grid-column: 1;
}

.journal-entry__room-prompt strong {
  color: #fff7e6;
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
}

.journal-entry__room-prompt span {
  color: rgba(246, 239, 227, 0.82);
}

.journal-entry__room-prompt button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.artifact-panel--journal {
  width: min(1180px, calc(100vw - 44px));
  max-height: 94svh;
  background: rgba(10, 9, 9, 0.9);
}

.artifact-panel--journal .artifact-panel__inner {
  padding: clamp(12px, 2vw, 24px);
}

.journal-entry {
  max-width: 1120px;
  padding: clamp(12px, 2vw, 22px);
  border-color: rgba(246, 239, 227, 0.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(231, 180, 93, 0.08), transparent 32%),
    linear-gradient(145deg, rgba(20, 17, 17, 0.96), rgba(4, 4, 5, 0.98));
}

.journal-entry__header {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 14px;
  padding-bottom: 12px;
}

.journal-entry__header .artifact-kicker,
.journal-entry__header h1 {
  grid-column: 1;
}

.journal-entry__header h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2.3rem);
}

.journal-entry__header time {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
}

.journal-entry__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 8px;
  border: 1px solid rgba(246, 239, 227, 0.13);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
  font-family: "Courier New", ui-monospace, monospace;
}

.journal-entry__tools button,
.journal-entry__tools span {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(246, 239, 227, 0.2);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.journal-entry__tools button:hover,
.journal-entry__tools button:focus-visible,
.journal-entry__tools button[aria-pressed="true"] {
  outline: none;
  border-color: rgba(231, 180, 93, 0.58);
  background: rgba(231, 180, 93, 0.13);
}

.journal-entry__tools button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.journal-entry__tools span {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  color: rgba(246, 239, 227, 0.72);
}

.journal-entry__viewer {
  display: grid;
  gap: 8px;
}

.journal-entry__viewport {
  position: relative;
  overflow: hidden;
  min-height: min(72svh, 760px);
  border: 1px solid rgba(246, 239, 227, 0.12);
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 44%, rgba(231, 180, 93, 0.07), transparent 50%),
    #050505;
  cursor: default;
  touch-action: none;
}

.journal-entry__viewport--zoomed {
  cursor: grab;
}

.journal-entry__spread {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
  align-items: center;
  justify-items: center;
  width: 100%;
  min-height: inherit;
  padding: clamp(12px, 2vw, 24px);
  transform-origin: center;
  will-change: transform;
}

.journal-entry__spread--zoomed {
  transition: none;
}

.journal-entry__page {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.journal-entry__page img,
.journal-entry__page-placeholder {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(66svh, 700px);
  min-height: 0;
}

.journal-entry__page-placeholder {
  width: min(420px, 100%);
  aspect-ratio: 0.72;
  min-height: 440px;
  padding: 18px;
}

.journal-entry__hint {
  margin: 0;
  color: rgba(246, 239, 227, 0.56);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.78rem;
  text-align: center;
  text-transform: uppercase;
}

.journal-entry__typed {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(246, 239, 227, 0.16);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
}

.journal-entry__typed[hidden] {
  display: none;
}

.journal-entry__typed h2 {
  margin: 0 0 8px;
  color: #fff7e6;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 1rem;
  text-transform: uppercase;
}

.journal-entry__typed p {
  margin: 0;
}

.journal-entry__room-prompt {
  grid-template-columns: auto 1fr;
  margin-top: 14px;
  padding: 10px 12px;
  border-color: rgba(137, 194, 162, 0.2);
  background: rgba(137, 194, 162, 0.055);
}

.journal-entry__room-link {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(137, 194, 162, 0.28);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.24);
  color: #dfffe9;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.journal-entry__room-link:hover,
.journal-entry__room-link:focus-visible {
  outline: none;
  border-color: rgba(137, 194, 162, 0.62);
  box-shadow: 0 0 14px rgba(137, 194, 162, 0.12);
}

.artifact-panel--journal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-height: 96svh;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  transform: none;
  transition: none;
}

.overlay--open .artifact-panel--journal {
  transform: none;
}

.artifact-panel--journal .artifact-panel__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.artifact-panel--journal .close-button {
  display: none;
}

.artifact-panel--journal .close-button::before,
.artifact-panel--journal .close-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: rgba(246, 239, 227, 0.86);
  transform-origin: center;
}

.artifact-panel--journal .close-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.artifact-panel--journal .close-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.artifact-panel--journal .close-button:hover,
.artifact-panel--journal .close-button:focus-visible {
  outline: 2px solid rgba(231, 180, 93, 0.74);
  outline-offset: 2px;
  background: rgba(7, 7, 8, 0.78);
}

.official-record {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto;
  outline: none;
  pointer-events: auto;
  touch-action: none;
}

.official-record.artifact-motion--forward {
  animation: officialRecordForward 160ms ease-out both;
}

.official-record.artifact-motion--back {
  animation: officialRecordBack 160ms ease-out both;
}

.official-record--cover {
  width: min(64vw, calc(88svh * 0.792), 720px);
}

.official-record--spread {
  width: min(calc(100vw - 84px), calc(90svh * 1.307), 1320px);
}

.official-record__page-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  transform-origin: center center;
  transition: transform 140ms ease-out;
  filter:
    drop-shadow(0 26px 44px rgba(0, 0, 0, 0.54))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.36));
}

.image-reader--zoomed .official-record__page-frame {
  cursor: grab;
}

.image-reader--dragging .official-record__page-frame {
  cursor: grabbing;
  transition: none;
}

.official-record__image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.official-record__turn {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.001);
}

.official-record__turn:focus-visible {
  outline: 2px solid rgba(231, 180, 93, 0.7);
  outline-offset: -5px;
}

.official-record__turn--cover {
  inset: 0;
  cursor: pointer;
}

.official-record__turn--previous,
.official-record__turn--next {
  top: 0;
  bottom: 0;
  width: 50%;
}

.official-record__turn--previous {
  left: 0;
  cursor: w-resize;
}

.official-record__turn--next {
  right: 0;
  cursor: e-resize;
}

.official-record__turn:disabled {
  cursor: default;
  pointer-events: none;
}

.official-record__controls {
  --reader-console-width: clamp(640px, 68vw, 860px);
  --reader-console-height: clamp(38px, 4vw, 42px);
  --reader-console-bottom: 0;
  --reader-console-zoom-width: clamp(118px, 16%, 144px);
  --reader-console-title-width: minmax(260px, 1fr);
  --reader-console-slider-width: clamp(150px, 28%, 232px);
  --reader-console-divider-gap: clamp(5px, 0.9vw, 10px);
  position: fixed;
  left: 50%;
  bottom: var(--reader-console-bottom);
  z-index: 8;
  transform: translateX(-50%);
}

.reader-zoom-control {
  width: min(94vw, var(--reader-console-width));
  min-height: var(--reader-console-height);
  display: grid;
  grid-template-columns:
    var(--reader-console-zoom-width)
    auto
    var(--reader-console-title-width)
    auto
    var(--reader-console-slider-width);
  align-items: center;
  gap: var(--reader-console-divider-gap);
  padding: 2px clamp(7px, 1vw, 10px);
  border: 1px solid rgba(231, 180, 93, 0.44);
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(9, 17, 20, 0.94), rgba(3, 7, 9, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(246, 239, 227, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.34);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  pointer-events: auto;
}

.reader-console__region {
  min-width: 0;
}

.reader-console__region--zoom {
  display: grid;
  place-items: center;
}

.reader-console__region--entry {
  overflow: hidden;
}

.reader-console__divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(231, 180, 93, 0.58) 20%,
    rgba(246, 239, 227, 0.28) 50%,
    rgba(231, 180, 93, 0.58) 80%,
    transparent
  );
}

.reader-console__divider[hidden],
.reader-console__region[hidden] {
  display: none;
}

.reader-zoom-control__shell {
  position: relative;
  width: min(100%, 108px);
  aspect-ratio: 2172 / 724;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.reader-zoom-control__art {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.reader-zoom-control__hit {
  position: absolute;
  top: 24%;
  bottom: 18%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
}

.reader-zoom-control__hit--out {
  left: 3.8%;
  width: 24.8%;
}

.reader-zoom-control__hit--fit {
  left: 31.2%;
  width: 37.4%;
}

.reader-zoom-control__hit--in {
  right: 3.8%;
  width: 24.8%;
}

.reader-zoom-control:hover .reader-zoom-control__art,
.reader-zoom-control:focus-within .reader-zoom-control__art {
  filter: brightness(1.06);
}

.reader-zoom-control__hit:hover,
.reader-zoom-control__hit:focus-visible {
  outline: 1px solid rgba(76, 255, 245, 0.62);
  outline-offset: -3px;
  background: rgba(76, 255, 245, 0.045);
}

.reader-zoom-control__hit:active {
  background: rgba(76, 255, 245, 0.08);
}

.reader-zoom-control__hit:disabled {
  cursor: default;
  pointer-events: none;
}

.reader-entry-control {
  width: auto;
}

.reader-entry-control[hidden] {
  display: none;
}

.reader-entry-control__readout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  max-width: 100%;
  overflow: hidden;
  color: rgba(246, 239, 227, 0.88);
  font-size: clamp(0.62rem, 1vw, 0.76rem);
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(76, 255, 245, 0.16);
}

.reader-entry-control__date,
.reader-entry-control__separator {
  flex: 0 0 auto;
  color: rgba(246, 239, 227, 0.8);
}

.reader-entry-control__title {
  min-width: 0;
  overflow: hidden;
  color: rgba(76, 255, 245, 0.86);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-entry-control__scrubber {
  display: grid;
  grid-template-columns: 24px minmax(120px, 1fr) 24px;
  align-items: center;
  gap: 6px;
}

.reader-entry-control__step {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(246, 239, 227, 0.78);
  font-size: 0.78rem;
  line-height: 1;
}

.reader-entry-control__step:hover,
.reader-entry-control__step:focus-visible {
  outline: 1px solid rgba(76, 255, 245, 0.58);
  outline-offset: 1px;
  color: #4cfff5;
}

.reader-entry-control__step:disabled {
  cursor: default;
  opacity: 0.34;
}

.reader-entry-control__range {
  width: var(--reader-slider-width, 100%);
  height: 22px;
  margin: 0;
  accent-color: #4cfff5;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.reader-entry-control__range:focus-visible {
  outline: 1px solid rgba(76, 255, 245, 0.62);
  outline-offset: 2px;
}

.reader-entry-control__range::-webkit-slider-runnable-track {
  height: 3px;
  border: 1px solid rgba(231, 180, 93, 0.34);
  background:
    repeating-linear-gradient(90deg, rgba(76, 255, 245, 0.2) 0 2px, transparent 2px 12px),
    rgba(246, 239, 227, 0.18);
}

.reader-entry-control__range::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -6px;
  border: 1px solid rgba(246, 239, 227, 0.86);
  border-radius: 0;
  background: #4cfff5;
  box-shadow: 0 0 8px rgba(76, 255, 245, 0.38);
  -webkit-appearance: none;
}

.reader-entry-control__range::-moz-range-track {
  height: 3px;
  border: 1px solid rgba(231, 180, 93, 0.34);
  background:
    repeating-linear-gradient(90deg, rgba(76, 255, 245, 0.2) 0 2px, transparent 2px 12px),
    rgba(246, 239, 227, 0.18);
}

.reader-entry-control__range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(246, 239, 227, 0.86);
  border-radius: 0;
  background: #4cfff5;
  box-shadow: 0 0 8px rgba(76, 255, 245, 0.38);
}

.official-record__page-placeholder {
  display: grid;
  place-items: center;
  width: min(92vw, 720px);
  aspect-ratio: 0.792;
  padding: 24px;
  border: 1px solid rgba(246, 239, 227, 0.2);
  background: rgba(7, 7, 8, 0.8);
  color: rgba(246, 239, 227, 0.78);
  font-family: "Lucida Console", "Courier New", ui-monospace, monospace;
  text-align: center;
  text-transform: uppercase;
}

.sfse-reader {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto;
  outline: none;
  pointer-events: auto;
  touch-action: none;
}

.sfse-reader.artifact-motion--forward {
  animation: officialRecordForward 160ms ease-out both;
}

.sfse-reader.artifact-motion--back {
  animation: officialRecordBack 160ms ease-out both;
}

.sfse-reader--cover {
  width: min(54vw, calc(76svh * 0.667), 600px);
}

.sfse-reader--spread {
  width: min(calc(100vw - 72px), calc(82svh * 1.333), 1280px);
}

.sfse-reader__page-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  transform-origin: center;
  filter:
    drop-shadow(0 30px 72px rgba(0, 0, 0, 0.62))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
  transition: transform 140ms ease-out;
}

.image-reader--zoomed .sfse-reader__page-frame {
  cursor: grab;
}

.image-reader--dragging .sfse-reader__page-frame {
  cursor: grabbing;
  transition: none;
}

.sfse-reader__image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.sfse-reader__turn {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.001);
}

.sfse-reader__turn:focus-visible {
  outline: 2px solid rgba(231, 180, 93, 0.7);
  outline-offset: -5px;
}

.sfse-reader__turn--cover {
  inset: 0;
  cursor: pointer;
}

.sfse-reader__turn--previous,
.sfse-reader__turn--next {
  top: 0;
  bottom: 0;
  width: 50%;
}

.sfse-reader__turn--previous {
  left: 0;
  cursor: w-resize;
}

.sfse-reader__turn--next {
  right: 0;
  cursor: e-resize;
}

.sfse-reader__turn:disabled {
  cursor: default;
  pointer-events: none;
}

.sfse-reader__controls {
  --reader-console-width: clamp(128px, 18vw, 176px);
  --reader-console-height: clamp(36px, 4vw, 42px);
  --reader-console-bottom: 0;
  --reader-console-zoom-width: 100%;
  --reader-console-divider-gap: 0;
  position: fixed;
  left: 50%;
  bottom: var(--reader-console-bottom);
  z-index: 8;
  transform: translateX(-50%);
}

.reader-zoom-control--zoom-only {
  grid-template-columns: var(--reader-console-zoom-width);
  justify-content: center;
  padding-inline: clamp(8px, 1vw, 12px);
}

.reader-zoom-control--zoom-only .reader-zoom-control__shell {
  width: min(100%, 108px);
}

.sfse-journal {
  width: fit-content;
  max-width: calc(100vw - 48px);
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.sfse-journal__page {
  display: block;
  width: auto;
  max-width: calc(100vw - 48px);
  height: min(80svh, 900px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 30px 76px rgba(0, 0, 0, 0.62));
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform 330ms ease,
    filter 242ms ease;
}

.sfse-journal__page:hover,
.sfse-journal__page:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 34px 82px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 18px rgba(231, 180, 93, 0.08));
  transform: translateY(-2px) rotate(-0.25deg);
}

.sfse-journal__page--spread {
  height: min(82svh, 920px);
}

.sfse-journal__page--turning {
  filter:
    drop-shadow(0 34px 82px rgba(0, 0, 0, 0.68))
    brightness(1.04);
  transform: perspective(900px) rotateY(-2deg) translateX(4px);
}

.sfse-journal__page img {
  display: block;
  width: auto;
  height: 100%;
  max-width: calc(100vw - 48px);
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
}

.zine-page {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 4px;
  background:
    linear-gradient(7deg, transparent 0 78%, rgba(196, 107, 111, 0.16) 79% 86%, transparent 87%),
    repeating-linear-gradient(-4deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 7px),
    #eee7d2;
  color: #141114;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    8px 8px 0 rgba(20, 17, 20, 0.16);
  transform-origin: center;
}

.zine-page img {
  width: min(220px, 48vw);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 8px solid #151114;
  filter: contrast(1.08) grayscale(0.35);
}

.zine-page__number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(20, 17, 20, 0.62);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
}

.cryptid-zine {
  position: relative;
  width: fit-content;
  max-width: calc(100vw - 56px);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  animation: artifactInspect 220ms ease both;
}

.cryptid-zine__page {
  display: block;
  width: auto;
  max-width: calc(100vw - 56px);
  height: min(82svh, 940px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter:
    drop-shadow(0 30px 72px rgba(0, 0, 0, 0.64))
    drop-shadow(0 3px 0 rgba(231, 180, 93, 0.06));
  transition:
    transform 286ms ease,
    filter 242ms ease;
}

.cryptid-zine__page--cover {
  height: min(82svh, 900px);
}

.cryptid-zine__page--spread {
  height: min(84svh, 920px);
}

.cryptid-zine__page:hover,
.cryptid-zine__page:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 34px 80px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 18px rgba(231, 180, 93, 0.09));
  transform: translateY(-2px) rotate(-0.15deg);
}

.cryptid-zine__page--turning {
  filter:
    drop-shadow(0 34px 80px rgba(0, 0, 0, 0.68))
    brightness(1.035);
  transform: perspective(900px) rotateY(-2deg) translateX(3px);
}

.cryptid-zine__page img {
  display: block;
  width: auto;
  height: 100%;
  max-width: calc(100vw - 56px);
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
}

.cryptid-zine__cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(20, 17, 20, 0.28);
  background: rgba(238, 231, 210, 0.88);
  color: #1b1716;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 8px) rotate(-1.5deg);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.cryptid-zine__cue--visible {
  opacity: 1;
  transform: translate(-50%, 0) rotate(-1.5deg);
}

.cryptid-cut-reader {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto;
  outline: none;
  pointer-events: auto;
  touch-action: none;
}

.cryptid-cut-reader.artifact-motion--forward {
  animation: officialRecordForward 160ms ease-out both;
}

.cryptid-cut-reader.artifact-motion--back {
  animation: officialRecordBack 160ms ease-out both;
}

.cryptid-cut-reader--cover,
.cryptid-cut-reader--back-cover {
  width: min(54vw, calc(78svh * 0.647), 560px);
}

.cryptid-cut-reader--spread {
  width: min(calc(100vw - 72px), calc(82svh * 1.294), 1220px);
}

.cryptid-cut-reader__page-frame {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  transform-origin: center;
  filter:
    drop-shadow(0 30px 72px rgba(0, 0, 0, 0.62))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
  transition: transform 140ms ease-out;
}

.image-reader--zoomed .cryptid-cut-reader__page-frame {
  cursor: grab;
}

.image-reader--dragging .cryptid-cut-reader__page-frame {
  cursor: grabbing;
  transition: none;
}

.cryptid-cut-reader__image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.cryptid-cut-reader__turn {
  position: absolute;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.001);
}

.cryptid-cut-reader__turn:focus-visible {
  outline: 2px solid rgba(231, 180, 93, 0.7);
  outline-offset: -5px;
}

.cryptid-cut-reader__turn--cover {
  inset: 0;
  cursor: pointer;
}

.cryptid-cut-reader__turn--previous,
.cryptid-cut-reader__turn--next {
  top: 0;
  bottom: 0;
  width: 50%;
}

.cryptid-cut-reader__turn--previous {
  left: 0;
  cursor: w-resize;
}

.cryptid-cut-reader__turn--next {
  right: 0;
  cursor: e-resize;
}

.cryptid-cut-reader__turn:disabled {
  cursor: default;
  pointer-events: none;
}

.cryptid-cut-reader__controls {
  --reader-console-width: clamp(128px, 18vw, 176px);
  --reader-console-height: clamp(36px, 4vw, 42px);
  --reader-console-bottom: 0;
  --reader-console-zoom-width: 100%;
  --reader-console-divider-gap: 0;
  position: fixed;
  left: 50%;
  bottom: var(--reader-console-bottom);
  z-index: 8;
  transform: translateX(-50%);
}

.book-page,
.book-sale,
.composition-book,
.vhs-artifact,
.radio-panel,
.thought-object,
.lockbox-panel,
.trash-artifact,
.eightball-panel,
.drawer-panel {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.3),
    inset 0 0 36px rgba(0, 0, 0, 0.18);
}

.book-page {
  background:
    linear-gradient(90deg, rgba(75, 49, 28, 0.16), transparent 18%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(77, 48, 28, 0.12) 35px),
    #d5c39b;
}

.book-page h1,
.book-page p,
.book-page .artifact-kicker,
.composition-book h1,
.composition-book h2,
.composition-book p,
.composition-book .artifact-kicker {
  color: #261a18;
}

.book-page--fantasy h1 {
  color: #442b19;
}

.neves-book {
  max-width: min(94vw, 1040px);
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.neves-book__page {
  display: block;
  width: min(76vh, 640px);
  max-width: calc(100vw - 72px);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.58));
  cursor: pointer;
  transition:
    opacity 198ms ease,
    transform 330ms ease,
    filter 242ms ease;
}

.neves-book__page:hover,
.neves-book__page:focus-visible {
  outline: none;
  filter:
    drop-shadow(0 32px 76px rgba(0, 0, 0, 0.66))
    drop-shadow(0 0 22px rgba(231, 180, 93, 0.1));
  transform: translateY(-2px) rotate(-0.5deg);
}

.neves-book__page--spread {
  width: min(88vw, 1060px);
  cursor: default;
}

.neves-book__page--spread:hover,
.neves-book__page--spread:focus-visible {
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.58));
  transform: none;
}

.neves-book__page--turning {
  opacity: 0;
  transform: perspective(900px) rotateY(-8deg) translateX(10px);
}

.neves-book__page img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.book-sale {
  background:
    linear-gradient(135deg, rgba(231, 180, 93, 0.12), transparent 38%),
    #171316;
}

.book-sale__cover {
  min-height: 210px;
  display: grid;
  place-items: center;
  margin: 20px 0;
  border: 1px solid rgba(231, 180, 93, 0.28);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 18%, rgba(231, 180, 93, 0.16), transparent 28%),
    linear-gradient(145deg, #251914, #070607);
  color: #f6efe3;
  font-size: clamp(1.3rem, 3vw, 2.3rem);
  text-align: center;
}

.book-sale__price {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(20, 17, 20, 0.22);
  background: #e6d3a8;
  color: #2a1612;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  transform: rotate(-4deg);
}

.composition-book {
  background:
    linear-gradient(90deg, #151114 0 16%, transparent 16%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(67, 91, 151, 0.2) 32px),
    #ece7d7;
}

.composition-book section {
  margin-top: 22px;
  padding-left: clamp(24px, 5vw, 52px);
}

.composition-book h2 {
  margin: 0 0 6px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.vhs-artifact {
  border: 1px solid rgba(246, 239, 227, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(145deg, #211b18, #080708);
}

.vhs-artifact h1 {
  padding: 18px;
  border: 1px solid rgba(231, 180, 93, 0.28);
  background: rgba(0, 0, 0, 0.32);
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

.radio-panel {
  border: 1px solid rgba(137, 194, 162, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(137, 194, 162, 0.16), transparent 35%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 8px),
    #100e0f;
}

.radio-readout {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(137, 194, 162, 0.26);
  border-radius: 6px;
  background: #050607;
  color: #dfffe9;
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-shadow: 0 0 8px rgba(137, 194, 162, 0.42);
}

.radio-readout__light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #172018;
}

.radio-readout__light--on {
  background: #89c2a2;
  box-shadow: 0 0 12px rgba(137, 194, 162, 0.7);
}

.radio-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.radio-controls label {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  color: rgba(246, 239, 227, 0.82);
  text-transform: uppercase;
  font-size: 0.76rem;
}

.radio-controls input {
  accent-color: var(--mint);
}

.radio-controls button {
  border: 1px solid rgba(246, 239, 227, 0.2);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent),
    #111113;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.thought-object {
  max-width: 820px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(83, 56, 32, 0.36);
  background:
    linear-gradient(90deg, rgba(139, 58, 42, 0.16) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(61, 93, 115, 0.13) 30px),
    radial-gradient(circle at 70% 20%, rgba(231, 180, 93, 0.12), transparent 24%),
    #c9b385;
  color: #261a18;
  transform: rotate(-0.4deg);
}

.thought-object h1,
.thought-object .artifact-kicker,
.thought-object blockquote {
  color: #1f1714;
}

.thought-object h1 {
  display: inline-block;
  margin-left: clamp(12px, 4vw, 64px);
  padding: 4px 22px 7px;
  background: rgba(170, 139, 91, 0.56);
  box-shadow: 0 1px 8px rgba(43, 27, 16, 0.18);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 4vw, 3rem);
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.thought-object__image {
  margin: clamp(18px, 3vw, 30px) 0 0;
  padding: clamp(10px, 1.8vw, 18px);
  background: rgba(245, 235, 207, 0.72);
  box-shadow:
    0 16px 32px rgba(42, 25, 16, 0.22),
    inset 0 0 28px rgba(94, 61, 38, 0.12);
  transform: rotate(-2.5deg);
}

.thought-object__image img {
  display: block;
  width: 100%;
  max-height: min(58vh, 620px);
  object-fit: contain;
  filter: saturate(0.95) contrast(1.02);
}

.thought-object blockquote {
  position: relative;
  max-width: min(430px, 100%);
  margin: clamp(18px, 3vw, 28px) 0 0 auto;
  padding: 24px 28px;
  border: 2px solid rgba(31, 23, 20, 0.82);
  border-radius: 46% 48% 42% 50% / 28% 35% 34% 32%;
  background: rgba(236, 215, 166, 0.5);
  font-size: clamp(1.15rem, 2.5vw, 1.7rem);
  line-height: 1.35;
  transform: rotate(1.2deg);
}

.thought-object blockquote::before,
.thought-object blockquote::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(31, 23, 20, 0.82);
  border-radius: 50%;
}

.thought-object blockquote::before {
  left: 22%;
  bottom: -34px;
  width: 22px;
  height: 22px;
}

.thought-object blockquote::after {
  left: 11%;
  bottom: -58px;
  width: 12px;
  height: 12px;
}

.thought-object--asset-only {
  max-width: min(76vw, calc(88svh * 0.973), 980px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.thought-object--asset-only img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88svh;
  object-fit: contain;
  filter:
    drop-shadow(0 26px 54px rgba(0, 0, 0, 0.54))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.32));
  user-select: none;
}

.lockbox-panel {
  border: 1px solid rgba(231, 180, 93, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 24%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 9px),
    #171311;
}

.lockbox-panel--image-ui {
  --lockbox-aspect: 1263 / 978;
  --lockbox-code-left: 39.2%;
  --lockbox-code-top: 68.2%;
  --lockbox-code-width: 21%;
  --lockbox-code-height: 12.6%;
  --lockbox-latch-left: 38.8%;
  --lockbox-latch-top: 85%;
  --lockbox-latch-width: 21.8%;
  --lockbox-latch-height: 6.1%;
  --lockbox-close-right: 3.1%;
  --lockbox-close-top: 5.9%;
  --lockbox-close-size: 4.3%;
  position: relative;
  width: min(calc(100vw - 48px), calc(92svh * var(--lockbox-aspect)), 1320px);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lockbox-panel--image-ui.lockbox-panel--failed {
  animation: lockboxLatchResist 160ms ease-out both;
}

.lockbox-panel--image-ui.lockbox-panel--unlocked {
  animation: lockboxLatchGive 210ms ease-out both;
}

.lockbox-panel__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--lockbox-aspect);
  object-fit: contain;
  filter:
    drop-shadow(0 26px 60px rgba(0, 0, 0, 0.58))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.34));
  user-select: none;
}

.lockbox-panel__close {
  position: absolute;
  right: var(--lockbox-close-right);
  top: var(--lockbox-close-top);
  width: var(--lockbox-close-size);
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.001);
  cursor: pointer;
}

.lockbox-panel__close:focus-visible {
  outline: 1px solid rgba(231, 180, 93, 0.78);
  outline-offset: -2px;
  box-shadow: 0 0 14px rgba(231, 180, 93, 0.18);
}

.lockbox-puzzle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lockbox-puzzle__wheels {
  position: absolute;
  left: var(--lockbox-code-left);
  top: var(--lockbox-code-top);
  width: var(--lockbox-code-width);
  height: var(--lockbox-code-height);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4.2%;
  pointer-events: auto;
}

.lockbox-digit {
  position: relative;
  display: grid;
  grid-template-rows: 27% 46% 27%;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lockbox-digit--active {
  box-shadow: none;
}

.lockbox-digit__arrow {
  min-height: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.001);
  cursor: pointer;
}

.lockbox-digit__arrow::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 18% auto 0;
  border-inline: clamp(4px, 0.62vw, 8px) solid transparent;
  border-bottom: clamp(6px, 0.78vw, 10px) solid rgba(231, 180, 93, 0.72);
  filter: drop-shadow(0 0 4px rgba(231, 180, 93, 0.18));
}

.lockbox-digit__arrow--down::before {
  margin-top: 12%;
  border-top: clamp(6px, 0.78vw, 10px) solid rgba(231, 180, 93, 0.72);
  border-bottom: 0;
}

.lockbox-digit__arrow:hover::before,
.lockbox-digit__arrow:focus-visible::before {
  border-bottom-color: rgba(246, 239, 227, 0.9);
}

.lockbox-digit__arrow--down:hover::before,
.lockbox-digit__arrow--down:focus-visible::before {
  border-top-color: rgba(246, 239, 227, 0.9);
  border-bottom-color: transparent;
}

.lockbox-digit__arrow:focus-visible {
  outline: 1px solid rgba(231, 180, 93, 0.6);
  outline-offset: -2px;
}

.lockbox-digit__value {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f6e0b3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.8vw, 3.35rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.86),
    0 0 8px rgba(231, 180, 93, 0.24);
  appearance: textfield;
}

.lockbox-digit__value:focus {
  outline: 0;
}

.lockbox-digit__value::selection {
  background: rgba(231, 180, 93, 0.22);
}

.lockbox-puzzle__latch {
  position: absolute;
  left: var(--lockbox-latch-left);
  top: var(--lockbox-latch-top);
  width: var(--lockbox-latch-width);
  height: var(--lockbox-latch-height);
  min-height: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.001);
  color: rgba(32, 19, 12, 0.001);
  cursor: pointer;
  pointer-events: auto;
}

.lockbox-puzzle__latch:focus-visible {
  outline: 1px solid rgba(231, 180, 93, 0.72);
  outline-offset: -2px;
  box-shadow: 0 0 16px rgba(231, 180, 93, 0.14);
}

.lockbox-panel--image-ui .lockbox-message {
  position: absolute;
  left: 37%;
  top: 88.7%;
  width: 28%;
  min-height: 1em;
  margin: 0;
  color: rgba(246, 224, 179, 0.86);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(0.52rem, 0.82vw, 0.78rem);
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.74);
  text-transform: uppercase;
  pointer-events: none;
}

.lockbox-code {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.lockbox-code label {
  display: grid;
  gap: 8px;
  color: rgba(246, 239, 227, 0.82);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.lockbox-code input {
  width: min(220px, 100%);
  padding: 12px;
  border: 1px solid rgba(231, 180, 93, 0.28);
  border-radius: 4px;
  background: #070607;
  color: var(--ink);
  letter-spacing: 0.22em;
}

.lockbox-code button,
.drawer-grid button {
  border: 1px solid rgba(246, 239, 227, 0.22);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--ink);
}

.lockbox-message {
  min-height: 1.6em;
  color: var(--amber);
  font-style: italic;
}

.trash-artifact {
  color: #271b18;
  background:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(68, 44, 30, 0.12) 29px),
    #d9c7a5;
}

.trash-artifact--asset-only {
  width: fit-content;
  max-width: calc(100vw - 56px);
  max-height: 90svh;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.trash-artifact--asset-only img {
  display: block;
  width: auto;
  max-width: calc(100vw - 56px);
  max-height: 90svh;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 24px 54px rgba(0, 0, 0, 0.58))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.36));
}

.trash-artifact--whatchamacallit img {
  max-width: calc((100vw - 56px) * 0.5);
  max-height: 45svh;
}

.trash-artifact h1,
.trash-artifact p,
.trash-artifact small,
.trash-artifact .artifact-kicker {
  color: #271b18;
}

.ticket-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 22px 0;
}

.ticket-stub {
  display: grid;
  gap: 5px;
  width: min(240px, 100%);
  padding: 14px;
  border: 1px dashed rgba(45, 29, 20, 0.46);
  background:
    linear-gradient(90deg, transparent 0 82%, rgba(45, 29, 20, 0.12) 83%),
    #eadcb9;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transform: rotate(-2deg);
}

.ticket-stub--torn {
  transform: rotate(3deg);
}

.ticket-stub em {
  color: #7b1b1b;
  font-style: normal;
}

.trash-artifact--rejected {
  position: relative;
  transform: rotate(-1deg);
}

.rejected-notes {
  display: grid;
  gap: 8px;
  padding-left: 24px;
  color: #4a2920;
  text-decoration: line-through;
}

.no-good {
  position: absolute;
  right: 28px;
  bottom: 34px;
  color: rgba(139, 20, 20, 0.72);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  transform: rotate(-14deg);
}

.trash-artifact--camp-note {
  background:
    linear-gradient(90deg, rgba(74, 49, 34, 0.12), transparent 14%),
    #dfd0ad;
  transform: rotate(1.5deg);
}

.camp-doodles {
  margin-top: 18px;
  color: rgba(39, 27, 24, 0.55);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
}

.eightball-panel {
  position: relative;
  display: grid;
  justify-items: center;
  width: fit-content;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.eightball-frame {
  position: relative;
  width: min(760px, calc(100vw - 40px));
  aspect-ratio: 1537 / 1023;
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.62));
}

.eightball-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.eightball-frame--shaking {
  animation: eightballShake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.eightball-answer {
  position: absolute;
  left: 50%;
  top: 47.7%;
  z-index: 2;
  width: 14.2%;
  height: 18.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Tune these four values against TEXT_REF.png if the answer die moves in future art. */
  padding: 5.5% 1.75% 1.8%;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  background:
    radial-gradient(circle at 50% 64%, rgba(62, 151, 255, 0.42), transparent 44%),
    linear-gradient(180deg, rgba(31, 74, 210, 0.68), rgba(7, 22, 122, 0.82));
  color: #e8f7ff;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 0 7px rgba(107, 213, 255, 0.78),
    0 0 16px rgba(25, 93, 255, 0.42);
  transform: translate(-50%, -50%);
  opacity: 0.94;
  transition:
    opacity 180ms ease,
    filter 220ms ease;
}

.eightball-answer--strange {
  background:
    radial-gradient(circle at 50% 64%, rgba(126, 24, 21, 0.36), transparent 44%),
    linear-gradient(180deg, rgba(73, 10, 13, 0.78), rgba(26, 3, 6, 0.92));
  color: #e2aaa1;
  text-shadow:
    0 0 6px rgba(124, 26, 23, 0.66),
    0 0 14px rgba(63, 4, 8, 0.48);
  transform: translate(calc(-50% + 2px), calc(-50% + 1px));
}

.eightball-answer--short {
  font-size: clamp(0.46rem, 1.34vw, 0.78rem);
}

.eightball-answer--medium {
  font-size: clamp(0.34rem, 0.9vw, 0.54rem);
  line-height: 0.96;
}

.eightball-answer--long {
  font-size: clamp(0.28rem, 0.68vw, 0.43rem);
  line-height: 0.92;
}

.eightball-answer--changing {
  opacity: 0;
  filter: blur(2px) brightness(1.4);
}

.eightball-shake {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 3;
  width: 20%;
  min-height: 6%;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%) rotate(-1deg);
}

.eightball-shake:hover,
.eightball-shake:focus-visible {
  outline: none;
  background: transparent;
}

.room-frame--eightball {
  animation: roomGlitch 360ms steps(2);
}

.drawer-panel {
  background:
    linear-gradient(180deg, rgba(255, 245, 214, 0.08), transparent),
    #17110e;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.drawer-grid button {
  min-height: 72px;
  padding: 12px;
  text-align: left;
}

.drawer-note {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(231, 180, 93, 0.22);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
}

.drawer-panel--asset-only {
  --drawer-asset-aspect: 1551 / 1086;
  width: min(80vw, calc(90svh * var(--drawer-asset-aspect)));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.drawer-panel--asset-only img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 90svh;
  aspect-ratio: var(--drawer-asset-aspect);
  object-fit: contain;
  filter:
    drop-shadow(0 26px 54px rgba(0, 0, 0, 0.54))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.32));
  user-select: none;
}

.room-tv-title-card {
  position: absolute;
  inset: 10%;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 12px;
  clip-path: url("#crtScreenClip");
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px),
    radial-gradient(circle, rgba(20, 24, 24, 0.92), rgba(0, 0, 0, 0.96));
  color: #dfffe9;
  font-family: ui-sans-serif, system-ui, sans-serif;
  text-align: center;
  text-shadow: 0 0 8px rgba(137, 194, 162, 0.6);
}

.room-tv-title-card span,
.room-tv-title-card em {
  font-size: clamp(0.48rem, 1.1vw, 0.78rem);
  text-transform: uppercase;
  opacity: 0.76;
}

.room-tv-title-card strong {
  font-size: clamp(0.8rem, 2vw, 1.25rem);
  letter-spacing: 0.08em;
}

.artifact-controls,
.tv-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.artifact-controls button,
.action-button,
.tv-controls button,
.shelf-item {
  border: 1px solid rgba(246, 239, 227, 0.22);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
}

.artifact-controls button,
.action-button,
.tv-controls button {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.action-button {
  min-height: 42px;
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
}

.action-button--primary {
  border-color: rgba(231, 180, 93, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #6d4520;
  color: #fff5d9;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 177, 0.14);
}

.artifact-controls--single {
  justify-content: flex-start;
}

.artifact-controls--split {
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Legacy temporary CRT modal object.
   The active TV experience now uses .tv-view and tv_fullscreen_room.png.
   Keep this quarantined until a later CSS prune confirms no historical modal TV styles are needed. */
.tv-console {
  display: grid;
  justify-items: center;
}

.artifact-panel--tv-zoom .tv-console {
  width: 100%;
}

.crt-tv {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: clamp(16px, 2.2vw, 24px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(246, 239, 227, 0.14);
  border-radius: 28px 24px 32px 28px;
  background:
    linear-gradient(90deg, rgba(101, 61, 31, 0.28), transparent 14%, transparent 82%, rgba(101, 61, 31, 0.22)),
    radial-gradient(circle at 22% 12%, rgba(255, 235, 190, 0.1), transparent 24%),
    repeating-linear-gradient(8deg, rgba(255, 232, 186, 0.035) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #32261f 0%, #151316 43%, #0b0a0c 100%);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.62),
    inset 0 0 34px rgba(255, 231, 181, 0.07),
    inset 0 -18px 34px rgba(0, 0, 0, 0.34);
}

.artifact-panel--tv-zoom .crt-tv {
  width: 100%;
  max-height: calc(94svh - 18px);
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1vmin, 12px);
  padding: clamp(8px, 1.2vmin, 14px);
}

.artifact-panel--tv-zoom .crt-tv__screen-bay {
  min-height: 0;
  padding: clamp(8px, 1vmin, 12px);
}

.artifact-panel--tv-zoom .tv-screen {
  width: min(100%, calc((94svh - 128px) * 4 / 3));
  background:
    radial-gradient(circle at 50% 50%, rgba(153, 217, 176, 0.08), transparent 58%),
    radial-gradient(circle, #29433e 0%, #111c1d 58%, #050607 100%);
}

.artifact-panel--tv-zoom .tv-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: clamp(6px, 0.8vmin, 10px);
  margin-top: 0;
  padding: clamp(8px, 1vmin, 10px);
}

.artifact-panel--tv-zoom .tv-controls__topline,
.artifact-panel--tv-zoom .tv-dials {
  grid-column: auto;
}

.artifact-panel--tv-zoom .tv-dials {
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 0.8vmin, 10px);
}

.artifact-panel--tv-zoom .tv-dial {
  width: clamp(48px, 7vmin, 64px);
  height: clamp(48px, 7vmin, 64px);
  min-height: clamp(48px, 7vmin, 64px);
}

.artifact-panel--tv-zoom .tv-dial--fine {
  width: clamp(42px, 5.8vmin, 54px);
  height: clamp(42px, 5.8vmin, 54px);
  min-height: clamp(42px, 5.8vmin, 54px);
}

.artifact-panel--tv-zoom .tv-dial span {
  display: none;
}

.artifact-panel--tv-zoom .tv-switch,
.artifact-panel--tv-zoom .tv-volume {
  font-size: clamp(0.62rem, 1.2vmin, 0.72rem);
}

.artifact-panel--tv-zoom .speaker-grille {
  display: none;
}

.crt-tv__screen-bay {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(10px, 1.8vw, 18px);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 28%),
    #080708;
  box-shadow:
    inset 0 0 24px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 240, 214, 0.1);
}

/* CRT glass keeps a fixed 4:3 ratio while scaling with the TV body. */
.tv-screen {
  position: relative;
  width: var(--tv-screen-width);
  aspect-ratio: 4 / 3;
  min-height: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: clamp(10px, 1.8vw, 14px) solid #060607;
  border-radius: 30px / 38px;
  background:
    radial-gradient(circle at 50% 50%, rgba(153, 217, 176, 0.1), transparent 54%),
    repeating-linear-gradient(21deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 8px),
    radial-gradient(circle, #29433e 0%, #111c1d 52%, #050607 100%);
  box-shadow:
    inset 0 0 36px rgba(0, 0, 0, 0.86),
    inset 0 0 18px rgba(137, 194, 162, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tv-screen--off {
  background: radial-gradient(circle, #1d1d1f 0%, #060607 58%, #010101 100%);
}

.tv-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(0.45) contrast(1.3);
}

.tv-screen--signal video:not(.tv-tracking-video),
.tv-screen--tuning video:not(.tv-tracking-video) {
  display: none;
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px 4px);
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: scan 1.2s linear infinite;
}

/* Analog channel-switch static. Timing is controlled by TV_STATIC_DELAY_* in script.js. */
.tv-static-transition {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  pointer-events: none;
  overflow: hidden;
  background: #060607;
  opacity: 1;
}

.tv-tracking-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(0.7) contrast(1.65) brightness(0.88);
}

.tv-screen--tuning .tv-static-transition {
  display: block;
}

.artifact-panel--tv-zoom .scanlines {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(220, 255, 232, 0.018) 0 1px,
      rgba(0, 0, 0, 0.035) 1px 2px,
      transparent 2px 5px
    );
  opacity: 0.45;
  animation: none;
}

.tv-static {
  position: relative;
  z-index: 3;
  width: min(390px, 84%);
  padding: 16px;
  color: #dfffe9;
  text-shadow: 0 0 7px rgba(137, 194, 162, 0.62);
  opacity: 0;
  animation: tvType 900ms steps(12) both;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tv-static--visible {
  opacity: 1;
}

.tv-screen--signal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 6px);
  opacity: 0.34;
  animation: staticShift 280ms steps(2) infinite;
}

.tv-screen--tuning::before {
  content: none;
}

.tv-screen--tuning {
  filter: brightness(1.12) contrast(1.08) saturate(0.85);
  animation: analogSignalSettle 520ms steps(3) infinite;
}

.tv-static h1,
.tv-static p {
  color: #dfffe9;
}

.tv-static h1 {
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.08;
}

.tv-static p {
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  line-height: 1.45;
}

/* Built-in right-side controls: physical knobs/switches, not a web control bar. */
.tv-controls {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 12px 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    rgba(4, 4, 5, 0.42);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.56),
    inset 1px 0 0 rgba(255, 235, 190, 0.06);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.tv-controls__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.power-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #321010;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.9);
}

.power-light--on {
  background: #d94230;
  box-shadow:
    0 0 10px rgba(217, 66, 48, 0.8),
    inset 0 0 3px rgba(255, 232, 190, 0.45);
}

.tv-dials {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 4px 0;
}

.tv-dial {
  position: relative;
  width: 82px;
  height: 82px;
  min-height: 82px;
  border: 1px solid rgba(255, 240, 210, 0.13);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.18), transparent 18%),
    radial-gradient(circle, #2b2a2b 0 28%, #111113 30% 52%, #050506 54% 100%);
  color: rgba(246, 239, 227, 0.86);
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.46),
    inset 0 0 14px rgba(255, 240, 210, 0.06);
}

.tv-dial::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: rgba(231, 180, 93, 0.8);
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(231, 180, 93, 0.24);
}

.tv-dial--fine {
  width: 58px;
  height: 58px;
  min-height: 58px;
}

.tv-dial span {
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 120px;
  color: rgba(246, 239, 227, 0.72);
  font-size: 0.72rem;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.tv-switch {
  min-height: 34px;
  border: 1px solid rgba(255, 240, 210, 0.14);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 45%),
    #111113;
  color: rgba(246, 239, 227, 0.88);
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
  box-shadow:
    inset 0 -3px 0 rgba(0, 0, 0, 0.46),
    0 3px 8px rgba(0, 0, 0, 0.35);
}

.tv-switch--audio {
  justify-self: stretch;
}

.tv-switch--muted {
  color: rgba(231, 180, 93, 0.88);
}

.tv-volume {
  display: grid;
  gap: 8px;
  color: rgba(246, 239, 227, 0.82);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.tv-volume input {
  width: 100%;
  accent-color: var(--amber);
}

.speaker-grille {
  min-height: 118px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(0, 0, 0, 0.8) 7px 10px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    #141315;
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.7),
    0 1px 0 rgba(255, 240, 210, 0.06);
}

.bookshelf h1,
.shelf-fragment h1 {
  color: #fff7e6;
}

.shelf-list {
  display: grid;
  gap: 12px;
}

.shelf-item {
  width: 100%;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.shelf-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--mint);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.window-toast {
  position: absolute;
  left: 50%;
  bottom: 7%;
  z-index: 10;
  width: min(600px, calc(100% - 28px));
  padding: 16px 18px;
  border: 1px solid rgba(231, 180, 93, 0.26);
  border-radius: 8px;
  background: rgba(7, 7, 10, 0.84);
  color: var(--ink);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
  pointer-events: none;
}

.window-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #050506;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.loading-screen {
  --loading-load-reveal: 0%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(13, 33, 33, 0.2), transparent 54%),
    #030505;
}

.loading-screen__stage {
  position: relative;
  width: min(100vw, calc(100svh * 2000 / 1126));
  aspect-ratio: 2000 / 1126;
  overflow: hidden;
  filter:
    drop-shadow(0 0 38px rgba(0, 255, 231, 0.08))
    drop-shadow(0 28px 70px rgba(0, 0, 0, 0.68));
}

.loading-screen__base,
.loading-screen__signal,
.loading-screen__loadbar {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.loading-screen__signal {
  opacity: 0;
}

.loading-screen[data-signal-frame="1"] .loading-screen__signal--1,
.loading-screen[data-signal-frame="2"] .loading-screen__signal--2,
.loading-screen[data-signal-frame="3"] .loading-screen__signal--3,
.loading-screen[data-signal-frame="4"] .loading-screen__signal--4 {
  opacity: 1;
}

.loading-screen__loadbar-mask {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--loading-load-reveal)) 0 0);
  transition: clip-path 70ms steps(1, end);
}

.loading-screen--complete .loading-screen__stage {
  animation: loadingCompleteFlicker 220ms steps(2, end) both;
}

.intro--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.load-error,
.noscript {
  padding: 20px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.7);
}

.artifact-motion--forward {
  animation: pageForward 240ms ease both;
}

.artifact-motion--back {
  animation: pageBack 240ms ease both;
}

@keyframes roomFade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

@keyframes pulseHotspot {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(231, 180, 93, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(231, 180, 93, 0.14);
  }
}

@keyframes staticShift {
  50% {
    transform: translate(1px, -1px);
  }
}

@keyframes tvFineTuningDrift {
  0% {
    translate: 0 0;
  }
  50% {
    translate: var(--tv-drift-x, 0px) var(--tv-drift-y, 0px);
  }
  100% {
    translate: var(--tv-drift-return-x, 0px) var(--tv-drift-return-y, 0px);
  }
}

@keyframes channel03Breathe {
  0%,
  100% {
    opacity: 0.68;
    scale: 0.985;
  }

  50% {
    opacity: 0.82;
    scale: 1.018;
  }
}

@keyframes channel03Rotate {
  0% {
    rotate: -1deg;
  }

  30% {
    rotate: 0.5deg;
  }

  65% {
    rotate: 1.6deg;
  }

  100% {
    rotate: -1deg;
  }
}

@keyframes channel03TrackingJump {
  0%,
  72%,
  75%,
  100% {
    transform: translate3d(0, 0, 0);
    filter: brightness(1) contrast(1);
  }

  73% {
    transform: translate3d(1.6%, -0.8%, 0) skewX(-1.2deg);
    filter: brightness(1.16) contrast(1.22);
  }

  74% {
    transform: translate3d(-0.8%, 0.4%, 0) skewX(0.7deg);
    filter: brightness(0.92) contrast(1.1);
  }
}

@keyframes channel03NoiseSkew {
  0%,
  49%,
  52%,
  100% {
    transform: translateY(0);
    opacity: 0.2;
  }

  50% {
    transform: translateY(-4%);
    opacity: 0.34;
  }
}

@keyframes channel03SignalDistort {
  0%,
  86%,
  89%,
  100% {
    filter: none;
  }

  87% {
    filter: brightness(1.22) contrast(1.25);
  }

  88% {
    filter: brightness(0.78) contrast(1.38);
  }
}

@keyframes tvAnalogAnomalyDrift {
  0% {
    transform: translate3d(0, 0, 0) skewX(0deg);
  }
  35% {
    transform: translate3d(-2px, 1px, 0) skewX(-0.55deg);
  }
  62% {
    transform: translate3d(2px, -1px, 0) skewX(0.42deg);
  }
  100% {
    transform: translate3d(0, 0, 0) skewX(0deg);
  }
}

@keyframes roomGlitch {
  0%,
  100% {
    filter: none;
    transform: translate(0);
  }
  20% {
    filter: hue-rotate(30deg) contrast(1.3);
    transform: translate(-3px, 1px);
  }
  55% {
    filter: brightness(1.5) saturate(0.8);
    transform: translate(3px, -1px);
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.22;
    filter: brightness(0.9);
  }
  45% {
    opacity: 0.82;
    filter: brightness(1.12);
  }
  72% {
    opacity: 0.3;
    filter: brightness(1);
  }
}

@keyframes windowCrackShift {
  0%,
  100% {
    transform: translate(4%, 4%);
  }
  50% {
    transform: translate(22%, 4%);
  }
}

@keyframes lavaGlow {
  0% {
    opacity: 0.42;
    transform: scaleY(0.98);
  }
  50% {
    opacity: 0.74;
    transform: scaleY(1.03);
  }
  100% {
    opacity: 0.5;
    transform: scaleY(1);
  }
}

@keyframes lavaRiseOne {
  0% {
    transform: translate3d(-50%, 18%, 0) scale(0.82, 1.16) rotate(-8deg);
    opacity: 0;
  }
  16% {
    opacity: 0.95;
  }
  44% {
    transform: translate3d(-58%, -78%, 0) scale(1.1, 0.86) rotate(7deg);
  }
  72% {
    opacity: 0.9;
    transform: translate3d(-42%, -158%, 0) scale(0.76, 1.28) rotate(-5deg);
  }
  100% {
    transform: translate3d(-52%, -228%, 0) scale(0.5, 1.08) rotate(10deg);
    opacity: 0;
  }
}

@keyframes lavaRiseTwo {
  0% {
    transform: translate3d(-50%, 36%, 0) scale(0.62, 1.25) rotate(8deg);
    opacity: 0;
  }
  22% {
    opacity: 0.82;
  }
  48% {
    transform: translate3d(-32%, -64%, 0) scale(0.95, 0.84) rotate(-11deg);
  }
  78% {
    opacity: 0.74;
    transform: translate3d(-62%, -146%, 0) scale(0.7, 1.2) rotate(5deg);
  }
  100% {
    transform: translate3d(-46%, -216%, 0) scale(0.42, 0.96) rotate(-7deg);
    opacity: 0;
  }
}

@keyframes lavaRiseThree {
  0% {
    transform: translate3d(-50%, 54%, 0) scale(0.54, 1.06) rotate(-5deg);
    opacity: 0;
  }
  20% {
    opacity: 0.74;
  }
  52% {
    transform: translate3d(-64%, -42%, 0) scale(0.9, 0.92) rotate(8deg);
  }
  80% {
    opacity: 0.62;
    transform: translate3d(-38%, -126%, 0) scale(0.58, 1.24) rotate(-4deg);
  }
  100% {
    transform: translate3d(-54%, -198%, 0) scale(0.36, 0.92) rotate(6deg);
    opacity: 0;
  }
}

@keyframes lavaDriftLow {
  0% {
    transform: translate3d(-62%, -8%, 0) scale(1.16, 0.72) rotate(-4deg);
    opacity: 0.48;
  }
  55% {
    transform: translate3d(-40%, -28%, 0) scale(0.88, 1.02) rotate(6deg);
    opacity: 0.72;
  }
  100% {
    transform: translate3d(-54%, -18%, 0) scale(1.04, 0.8) rotate(-2deg);
    opacity: 0.56;
  }
}

@keyframes eightballShake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  18% {
    transform: translate(-5px, 2px) rotate(-1deg);
  }
  36% {
    transform: translate(4px, -2px) rotate(1deg);
  }
  54% {
    transform: translate(-3px, 1px) rotate(-0.6deg);
  }
  72% {
    transform: translate(2px, 0) rotate(0.5deg);
  }
}

@keyframes scan {
  to {
    transform: translateY(4px);
  }
}

@keyframes analogStaticFlicker {
  0% {
    opacity: 0.42;
    filter: contrast(1.35) brightness(0.82);
  }
  45% {
    opacity: 0.84;
    filter: contrast(2.1) brightness(1.08);
  }
  100% {
    opacity: 0.58;
    filter: contrast(1.65) brightness(0.9);
  }
}

@keyframes analogStaticRoll {
  to {
    transform: translateY(16px);
  }
}

@keyframes analogTear {
  0%,
  100% {
    transform: translateX(0) skewX(0deg);
  }
  35% {
    transform: translateX(-8px) skewX(-1.2deg);
  }
  68% {
    transform: translateX(10px) skewX(1.1deg);
  }
}

@keyframes analogSignalSettle {
  0%,
  100% {
    filter: brightness(1.02) contrast(1.02) saturate(0.8);
  }
  42% {
    filter: brightness(1.28) contrast(1.24) saturate(0.7);
  }
  72% {
    filter: brightness(0.86) contrast(1.16) saturate(0.92);
  }
}

@keyframes tvType {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes pageForward {
  from {
    opacity: 0;
    transform: translateX(22px) rotate(0.5deg);
  }
}

@keyframes pageBack {
  from {
    opacity: 0;
    transform: translateX(-22px) rotate(-0.5deg);
  }
}

@keyframes officialRecordForward {
  0% {
    transform: translateX(4px) rotate(0.32deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes officialRecordBack {
  0% {
    transform: translateX(-4px) rotate(-0.32deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

@keyframes lockboxLatchResist {
  0%,
  100% {
    transform: translateX(0);
  }
  28% {
    transform: translateX(-3px);
  }
  58% {
    transform: translateX(3px);
  }
}

@keyframes lockboxLatchGive {
  0% {
    filter: brightness(1);
  }
  48% {
    filter: brightness(1.08);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes fieldNotesStatusReveal {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.72;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@keyframes accountButtonStateReveal {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.72;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@keyframes artifactInspect {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(10px);
  }
}

@keyframes signalPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

@keyframes loadingCompleteFlicker {
  0%,
  100% {
    opacity: 1;
    filter:
      drop-shadow(0 0 38px rgba(0, 255, 231, 0.08))
      drop-shadow(0 28px 70px rgba(0, 0, 0, 0.68));
  }

  35% {
    opacity: 0.86;
    filter:
      brightness(1.15)
      drop-shadow(0 0 44px rgba(0, 255, 231, 0.16))
      drop-shadow(0 28px 70px rgba(0, 0, 0, 0.68));
  }

  68% {
    opacity: 0.95;
    transform: translateX(1px);
  }
}

@keyframes introFlicker {
  0%,
  30% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  54% {
    opacity: 0.45;
  }
  74%,
  100% {
    opacity: 1;
  }
}

@media (min-aspect-ratio: 21 / 9) {
  :root {
    --room-object-fit: contain;
    --falloff-opacity: 0.52;
  }

  .room-falloff {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.66)),
      radial-gradient(circle at 50% 55%, transparent 0 60%, rgba(0, 0, 0, 0.34) 100%);
  }
}

@media (max-aspect-ratio: 3 / 5) {
  :root {
    --room-object-fit: contain;
    --falloff-opacity: 0.56;
  }

  .room-falloff {
    background:
      linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.62)),
      radial-gradient(circle at 50% 52%, transparent 0 60%, rgba(0, 0, 0, 0.36) 100%);
  }
}

@media (min-aspect-ratio: 16 / 10) and (max-aspect-ratio: 19 / 9) {
  :root {
    --room-object-position: center center;
  }
}

@media (min-aspect-ratio: 4 / 5) and (max-aspect-ratio: 16 / 10) {
  :root {
    --room-object-position: center center;
  }
}

@media (max-width: 720px) {
  :root {
    --overlay-width: 100%;
    --overlay-max-height: 92svh;
    --tv-screen-width: min(100%, 520px);
    --room-object-position: center center;
    --window-sky-left: 67%;
    --window-sky-top: 5%;
    --window-sky-width: 18%;
    --window-sky-height: 38%;
    --window-sky-opacity: 0.28;
  }

  body {
    overflow: hidden;
  }

  .site-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100svh;
    padding: 0;
  }

  .room-stage {
    width: 100vw;
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
    display: block;
  }

  .room-frame {
    width: 100vw;
    height: 100vh;
    height: 100svh;
    min-height: 100svh;
    aspect-ratio: auto;
  }

  .signal-console {
    right: 0;
    bottom: 0;
    --signal-tab-visible-width: 44px;
  }

  .signal-console__button {
    width: clamp(112px, 35.7vw, 141px);
  }

  .signal-console__panel {
    width: min(253px, calc(100vw - 24px));
    max-height: calc(100svh - 96px);
    overflow: hidden;
  }

  .hotspot {
    min-width: 48px;
    min-height: 48px;
  }

  .hotspot span {
    opacity: 1;
    font-size: 0.72rem;
    transform: translateY(0);
  }

  .overlay {
    padding: 10px;
    align-items: end;
  }

  .artifact-panel {
    width: 100%;
    max-height: 92svh;
    border-radius: 12px 12px 0 0;
  }

  .artifact-panel--journal {
    width: auto;
    max-height: 96svh;
    border-radius: 0;
    overflow: visible;
  }

  .artifact-panel--journal,
  .artifact-panel--field-guide,
  .artifact-panel--field-notes,
  .artifact-panel--rewind,
  .artifact-panel--cart {
    width: 100%;
  }

  .artifact-panel--account {
    width: min(calc(100vw - 20px), calc(92svh * 1400 / 1643));
    max-height: 92svh;
    border-radius: 0;
  }

  .artifact-panel--field-notes {
    width: min(calc(100vw - 20px), calc(92svh * 1400 / 1643));
    max-height: 92svh;
    border-radius: 0;
  }

  .artifact-panel--journal {
    width: auto;
  }

  .official-record--cover {
    width: min(calc(100vw - 36px), calc(86svh * 0.792));
  }

  .official-record--spread {
    width: min(calc(100vw - 28px), calc(84svh * 1.307));
  }

  .artifact-panel--field-guide {
    width: min(100%, calc((100svh - var(--field-guide-toolbar-slot, 48px)) * 0.92));
    max-height: none;
    overflow: visible;
    border-radius: 0;
  }

  .field-guide-panel__viewport {
    max-height: none;
  }

  .field-guide-panel {
    --fg-copy-size: clamp(5.6px, 1.65vw, 8.4px);
  }

  .field-guide-panel__close {
    right: 4.5%;
    top: 3.8%;
    width: 5.6%;
    height: 4.4%;
  }

  .field-guide-panel__got-it {
    right: 8%;
    bottom: 4.8%;
    width: 23%;
    height: 5.8%;
  }

.artifact-panel--tv-zoom {
    width: min(94vw, calc(92svh * 0.86));
    max-height: 94vh;
    max-height: 94svh;
    border-radius: 0;
  }

  .artifact-panel--tv-zoom .crt-tv {
    max-height: calc(92svh - 14px);
  }

  .artifact-panel--tv-zoom .tv-screen {
    width: min(100%, calc((92svh - 188px) * 4 / 3));
  }

  .artifact-panel--tv-zoom .tv-controls {
    grid-template-columns: 1fr 1fr;
  }

  .artifact-panel--eightball {
    width: min(100vw - 18px, 760px);
  }

  .eightball-frame {
    width: min(100vw - 18px, 760px);
  }

  .artifact-panel__inner {
    padding: 22px;
  }

  .artifact-panel h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .artifact-panel p,
  .artifact-panel time {
    font-size: clamp(1.06rem, 4.6vw, 1.2rem);
  }

  .journal,
  .zine-page {
    max-width: none;
  }

  .journal-entry__room-prompt {
    grid-template-columns: 1fr;
  }

  .journal-entry__header {
    grid-template-columns: 1fr;
  }

  .journal-entry__header time {
    grid-column: 1;
    grid-row: auto;
  }

  .journal-entry__tools {
    position: static;
    max-height: 118px;
    overflow: auto;
  }

  .journal-entry__viewer {
    margin-top: 8px;
  }

  .journal-entry__viewport {
    min-height: min(62svh, 560px);
  }

  .journal-entry__spread {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .journal-entry__page--next {
    display: none;
  }

  .journal-entry__page img,
  .journal-entry__page-placeholder {
    max-height: min(56svh, 520px);
  }

  .journal-entry__page-placeholder {
    min-height: 340px;
  }

  .journal-entry__room-prompt {
    gap: 8px;
  }

  .journal-entry__room-link {
    width: fit-content;
  }

  .crt-tv {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .crt-tv__screen-bay {
    padding: 10px;
  }

  .artifact-controls,
  .tv-controls {
    align-items: stretch;
  }

  .artifact-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .artifact-controls span {
    text-align: center;
  }

  .tv-controls {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
  }

  .tv-controls__topline,
  .tv-dials,
  .speaker-grille {
    grid-column: 1 / -1;
  }

  .tv-dials {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .tv-volume,
  .tv-switch--audio,
  .tv-switch--zoom {
    align-self: stretch;
  }

  .speaker-grille {
    min-height: 56px;
  }

  .tv-screen {
    width: var(--tv-screen-width);
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  .tv-static {
    width: min(330px, 82%);
    padding: 12px;
  }

  .tv-static h1 {
    font-size: clamp(1.05rem, 6vw, 1.55rem);
  }

  .tv-static p {
    font-size: clamp(0.82rem, 3.7vw, 0.96rem);
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .signal-console__button {
    transition: none !important;
  }

  .official-record.artifact-motion--forward,
  .official-record.artifact-motion--back,
  .official-record__page-frame {
    animation: none !important;
    transition: none !important;
  }

  .window-sky,
  .window-sky::before,
  .window-sky::after {
    animation: none !important;
  }

  .window-open .window-sky::after {
    animation: none !important;
  }

  .lava-lamp-animation,
  .lava-lamp-animation::before,
  .lava-blob {
    animation: none !important;
  }

  .room-dust {
    display: none;
  }

  .lava-blob {
    opacity: 0.42;
    transform: translate3d(-50%, -55%, 0) scale(0.86, 1.05);
  }
}
