:root {
  color-scheme: dark;
  --ink: #0d0b0b;
  --ink-deep: #050404;
  --red: #8b1e1e;
  --red-hot: #d64c3c;
  --paper: #c8b27a;
  --paper-light: #e8e1d2;
  --paper-dim: #8d7d5e;
  --metal: #56504b;
  --line: rgba(232, 225, 210, 0.18);
  --shadow: rgba(0, 0, 0, 0.72);
  --panel: rgba(13, 11, 11, 0.78);
  --panel-solid: #151010;
  --focus: #f0c36a;
  font-family:
    "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: auto;
  background: var(--ink);
  color: var(--paper-light);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.game-shell {
  position: relative;
  min-height: 100dvh;
  overflow: clip;
  background:
    radial-gradient(circle at 50% 110%, rgba(139, 30, 30, 0.28), transparent 42%),
    #050404;
}

.stage {
  position: relative;
  min-height: 100dvh;
  padding: 16px clamp(18px, 2.4vw, 34px) 24px;
  isolation: isolate;
}

.stage-bg,
.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.stage-bg {
  background-image: url("./assets/darkroom-stage.png");
  background-position: center;
  background-size: cover;
  filter: saturate(0.88) contrast(1.06) brightness(0.68);
  transform: scale(1.02);
}

.stage-scrim {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72) 70%),
    linear-gradient(90deg, rgba(5, 4, 4, 0.82), rgba(5, 4, 4, 0.28) 48%, rgba(5, 4, 4, 0.88)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 4px
    );
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(214, 76, 60, 0.16), transparent 20%),
    radial-gradient(circle at 80% 18%, rgba(200, 178, 122, 0.08), transparent 18%);
  mix-blend-mode: screen;
}

.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1540px;
  margin: 0 auto 12px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.brand-kicker {
  color: var(--red-hot);
  font-family: "SFMono-Regular", "Cascadia Mono", "Noto Sans Mono CJK SC", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 3.3vw, 50px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hud-metrics {
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric,
.icon-text-button,
.tool-button,
.ghost-button {
  border: 1px solid var(--line);
  background: rgba(9, 7, 7, 0.68);
  color: var(--paper-light);
  border-radius: 8px;
}

.metric {
  display: grid;
  min-width: 70px;
  padding: 8px 10px;
  gap: 2px;
  box-shadow: inset 0 0 0 1px rgba(139, 30, 30, 0.18);
}

.metric span {
  color: var(--paper-dim);
  font-size: 11px;
}

.metric strong {
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: 18px;
}

.icon-text-button,
.tool-button,
.primary-button,
.ghost-button {
  min-height: 38px;
  padding: 0 14px;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.icon-text-button:hover,
.tool-button:hover,
.ghost-button:hover {
  border-color: rgba(232, 225, 210, 0.4);
  background: rgba(23, 16, 16, 0.88);
}

.icon-text-button:active,
.tool-button:active,
.primary-button:active,
.ghost-button:active,
.verdict-button:active {
  transform: translateY(1px) scale(0.99);
}

.playfield {
  display: grid;
  grid-template-columns:
    clamp(250px, 19vw, 310px)
    minmax(460px, 1fr)
    clamp(300px, 21vw, 360px);
  gap: clamp(14px, 1.5vw, 22px);
  max-width: 1540px;
  height: clamp(620px, calc(100dvh - 94px), 780px);
  min-height: 0;
  margin: 0 auto;
}

.left-rail,
.right-rail,
.viewer-panel {
  min-width: 0;
  min-height: 0;
}

.left-rail {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 13px;
  overflow: hidden;
}

.trash-zone,
.viewer-panel,
.right-rail {
  border: 1px solid rgba(232, 225, 210, 0.13);
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 30, 30, 0.18), transparent 46%),
    linear-gradient(180deg, rgba(24, 18, 16, 0.72), rgba(9, 7, 7, 0.66)),
    rgba(9, 7, 7, 0.72);
  box-shadow:
    0 24px 80px var(--shadow),
    inset 0 0 0 1px rgba(139, 30, 30, 0.12);
  backdrop-filter: blur(5px);
  border-radius: 8px;
}

.trash-zone {
  position: relative;
  overflow: hidden;
  min-height: 214px;
  padding: 10px 12px 14px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
}

.trash-zone::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 42px;
  height: 34px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.58), transparent 68%);
  filter: blur(6px);
}

.trash-can {
  position: relative;
  z-index: 1;
  width: min(210px, 82%);
  aspect-ratio: 1;
  margin: 0 auto -8px;
  transform-origin: center 85%;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.55));
}

.trash-can img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.trash-can.spit {
  animation: can-spit 520ms ease;
}

.trash-can.swallow {
  animation: can-swallow 430ms ease;
}

.trash-can.warning {
  animation: can-warning 160ms linear infinite;
}

.system-line {
  min-height: 38px;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}

.photo-stack {
  position: relative;
  min-height: 0;
  padding: 10px 12px;
  overflow: hidden auto;
  border: 1px solid rgba(232, 225, 210, 0.1);
  background:
    linear-gradient(180deg, rgba(200, 178, 122, 0.04), transparent 36%),
    rgba(5, 4, 4, 0.5);
  border-radius: 8px;
}

.stack-card {
  width: 64%;
  max-width: 128px;
  margin: -10px auto 8px;
  opacity: 0.72;
  transform: rotate(var(--stack-rot));
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.stack-card.current {
  opacity: 1;
  transform: rotate(0deg) translateX(6px);
}

.stack-card.done {
  opacity: 0.26;
  filter: grayscale(1);
}

.viewer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(12px, 1.45vw, 16px);
  gap: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(139, 30, 30, 0.3), transparent 46%),
    radial-gradient(ellipse at 50% 88%, rgba(200, 178, 122, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(18, 13, 11, 0.78), rgba(5, 4, 4, 0.68));
}

.timer-wrap {
  display: grid;
  gap: 8px;
}

.timer-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  color: var(--paper);
}

.timer-copy strong {
  color: var(--paper-light);
  font-size: 22px;
}

.timer-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(232, 225, 210, 0.16);
  background: rgba(5, 4, 4, 0.86);
  border-radius: 999px;
}

.timer-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--red-hot), var(--paper));
  box-shadow: 0 0 18px rgba(214, 76, 60, 0.45);
  transform-origin: left center;
}

.photo-viewer {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 225, 210, 0.08);
  background:
    radial-gradient(ellipse at 50% 58%, rgba(200, 178, 122, 0.12), transparent 30%),
    radial-gradient(ellipse at 50% 72%, rgba(139, 30, 30, 0.32), transparent 54%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.68)),
    #070505;
  border-radius: 8px;
  touch-action: none;
}

.photo-viewer::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 178, 122, 0.08);
  box-shadow:
    inset 0 0 100px rgba(0, 0, 0, 0.62),
    inset 0 -80px 120px rgba(58, 15, 12, 0.16);
  pointer-events: none;
}

.photo-mover {
  position: relative;
  width: auto;
  height: min(66%, 460px);
  aspect-ratio: 0.78;
  max-width: 100%;
  max-height: calc(100% - 18px);
  display: grid;
  place-items: center;
  transition: transform 120ms ease;
  cursor: grab;
}

.photo-mover.dragging {
  cursor: grabbing;
  transition: none;
}

.viewer-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.zoom-label {
  min-width: 52px;
  text-align: center;
  color: var(--paper);
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
}

.right-rail {
  display: grid;
  grid-template-rows: auto auto minmax(90px, 1fr);
  gap: 12px;
  padding: 13px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(31, 20, 18, 0.86), rgba(8, 6, 6, 0.72)),
    rgba(9, 7, 7, 0.8);
}

.verdict-box,
.reason-box,
.tag-ledger {
  border-top: 1px solid rgba(232, 225, 210, 0.14);
  padding-top: 13px;
}

.verdict-prompt {
  min-height: 42px;
  color: var(--paper);
  line-height: 1.45;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.verdict-button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 82px;
  border: 1px solid rgba(232, 225, 210, 0.22);
  border-radius: 8px;
  color: var(--paper-light);
  font-size: 18px;
  font-weight: 800;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    border-color 140ms ease;
}

.verdict-button span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 11px;
  border: 1px solid rgba(232, 225, 210, 0.32);
  border-radius: 6px;
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: 14px;
}

.verdict-button.save {
  background:
    radial-gradient(circle at 50% 10%, rgba(240, 195, 106, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(139, 30, 30, 0.86), rgba(49, 12, 12, 0.88));
}

.verdict-button.discard {
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 76, 60, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(49, 44, 42, 0.9), rgba(11, 9, 9, 0.92));
}

.verdict-button:hover {
  border-color: rgba(240, 195, 106, 0.52);
  filter: brightness(1.08);
}

.verdict-button:disabled,
.tool-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.5);
}

.reason-box {
  display: none;
  gap: 9px;
}

.reason-box.active {
  display: grid;
}

.reason-box label {
  color: var(--paper-light);
  font-weight: 800;
  line-height: 1.35;
}

.reason-box textarea {
  width: 100%;
  resize: none;
  border: 1px solid rgba(232, 225, 210, 0.2);
  border-radius: 8px;
  background: rgba(5, 4, 4, 0.72);
  color: var(--paper-light);
  padding: 11px;
  line-height: 1.5;
}

.reason-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--paper-dim);
  font-size: 12px;
}

.reason-footer button,
.primary-button {
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: #1b120e;
  font-weight: 900;
  min-height: 38px;
  padding: 0 14px;
}

.reason-footer button:hover,
.primary-button:hover {
  background: #e3ca87;
}

.tag-ledger {
  min-height: 0;
  overflow: hidden;
}

.tag-ledger > span {
  display: block;
  color: var(--paper-dim);
  margin-bottom: 10px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  border: 1px solid rgba(214, 76, 60, 0.4);
  background: rgba(139, 30, 30, 0.24);
  color: var(--paper-light);
  border-radius: 999px;
  padding: 5px 8px;
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: 12px;
}

.photo-print {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: 0.78;
  padding: 5.5% 5.5% 14%;
  color: #211812;
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 255, 255, 0.42), transparent 14%),
    linear-gradient(135deg, #e7d6ad, #b69e6a 74%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(67, 40, 18, 0.18);
  border-radius: 2px;
  transform: rotate(var(--rot, 0deg));
  overflow: hidden;
}

.photo-mover > .photo-print {
  width: 100%;
  height: 100%;
}

.photo-print.mini {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.photo-print::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(255, 255, 255, 0.16) 45%, transparent 50%),
    repeating-linear-gradient(12deg, rgba(42, 23, 14, 0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.photo-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(72, 42, 22, 0.45);
  background: #19120f;
}

.photo-image::before,
.photo-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.photo-image::before {
  background:
    radial-gradient(circle at 50% 46%, transparent 42%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.12), transparent 32% 68%, rgba(70, 22, 14, 0.22));
  mix-blend-mode: multiply;
}

.photo-image::after {
  background:
    radial-gradient(circle at 18% 12%, rgba(237, 214, 151, 0.2), transparent 9%),
    radial-gradient(circle at 88% 76%, rgba(35, 18, 10, 0.24), transparent 12%),
    repeating-linear-gradient(11deg, transparent 0 6px, rgba(255, 255, 255, 0.045) 6px 7px);
  mix-blend-mode: soft-light;
}

.photo-raster {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #120d0c;
  filter: sepia(0.28) saturate(0.74) contrast(1.08) brightness(0.92);
}

.tone-red .photo-raster {
  filter: sepia(0.42) saturate(0.78) contrast(1.12) brightness(0.86) hue-rotate(-8deg);
}

.tone-green .photo-raster {
  filter: sepia(0.34) saturate(0.66) contrast(1.08) brightness(0.88) hue-rotate(22deg);
}

.tone-silver .photo-raster {
  filter: grayscale(0.7) sepia(0.18) contrast(1.12) brightness(0.9);
}

.tone-burnt .photo-raster {
  filter: sepia(0.58) saturate(0.7) contrast(1.18) brightness(0.78);
}

.tone-pale .photo-raster {
  filter: sepia(0.18) saturate(0.58) contrast(0.98) brightness(1.04);
}

.photo-back {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 420px;
  padding: 32px;
  color: #392313;
  background:
    repeating-linear-gradient(0deg, rgba(95, 62, 31, 0.08) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #d6bf82, #a88954);
  text-align: center;
}

.photo-back strong {
  display: block;
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: clamp(20px, 3vw, 34px);
  transform: rotate(-3deg);
}

.photo-back span {
  display: block;
  margin-top: 18px;
  color: rgba(57, 35, 19, 0.66);
}

.photo-caption {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 3.5%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(32, 22, 13, 0.78);
  font-family: "SFMono-Regular", "Cascadia Mono", "Noto Sans Mono CJK SC", monospace;
  font-size: clamp(9px, 1.2vw, 13px);
  line-height: 1.25;
  z-index: 2;
}

.photo-clue {
  position: absolute;
  z-index: 3;
  max-width: 44%;
  padding: 3px 5px;
  color: rgba(45, 25, 16, 0.78);
  background: rgba(226, 205, 150, 0.32);
  border: 1px solid rgba(60, 35, 19, 0.22);
  font-size: clamp(9px, 1.3vw, 13px);
  line-height: 1.2;
  transform: rotate(-4deg);
}

.photo-clue.one {
  left: 7%;
  top: 8%;
}

.photo-clue.two {
  right: 7%;
  bottom: 12%;
  transform: rotate(4deg);
}

.watermark {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.34), transparent);
  pointer-events: none;
}

.wall-overlay,
.interlude {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(139, 30, 30, 0.34), transparent 36%),
    rgba(5, 4, 4, 0.94);
  backdrop-filter: blur(8px);
}

.wall-overlay {
  z-index: 30;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: clamp(18px, 3vw, 34px);
}

.wall-overlay[hidden],
.interlude[hidden] {
  display: none;
}

.wall-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
}

.wall-header h2 {
  margin-top: 6px;
  font-size: clamp(22px, 3.2vw, 42px);
  letter-spacing: 0;
}

.wall-body {
  position: relative;
  max-width: 1420px;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  overflow: auto;
  border: 1px solid rgba(232, 225, 210, 0.14);
  background:
    linear-gradient(rgba(232, 225, 210, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 225, 210, 0.03) 1px, transparent 1px),
    rgba(16, 10, 9, 0.88);
  background-size: 38px 38px;
  border-radius: 8px;
}

.wall-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.wall-line {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--length);
  height: 2px;
  background: rgba(214, 76, 60, 0.58);
  box-shadow: 0 0 10px rgba(214, 76, 60, 0.22);
  transform: rotate(var(--angle));
  transform-origin: left center;
}

.wall-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(240, 195, 106, 0.84);
  box-shadow: 0 0 10px rgba(240, 195, 106, 0.32);
  transform: translate(-50%, -50%);
}

.saved-wall {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
  padding: 26px;
}

.saved-note {
  position: relative;
  display: grid;
  gap: 9px;
}

.saved-note .photo-print {
  width: 100%;
}

.reason-note {
  padding: 9px;
  color: #211812;
  background: #d4be7d;
  border-radius: 2px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
  font-size: 13px;
  line-height: 1.45;
  transform: rotate(var(--note-rot, -1deg));
}

.reason-note strong {
  display: block;
  margin-bottom: 4px;
  font-family: "SFMono-Regular", "Cascadia Mono", monospace;
  font-size: 10px;
  opacity: 0.7;
}

.connection-ledger {
  max-width: 1420px;
  width: 100%;
  min-height: 30px;
  margin: 0 auto;
  color: var(--paper-dim);
  font-family: "SFMono-Regular", "Cascadia Mono", "Noto Sans Mono CJK SC", monospace;
  font-size: 12px;
}

.interlude {
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.interlude-panel {
  width: min(720px, 100%);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(232, 225, 210, 0.18);
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 30, 30, 0.34), transparent 38%),
    #120d0c;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.78);
}

.interlude-panel h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1;
}

.interlude-panel p {
  margin-top: 16px;
  color: var(--paper);
  line-height: 1.65;
}

.interlude-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.interlude-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ghost-button {
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid rgba(232, 225, 210, 0.18);
  background: rgba(9, 7, 7, 0.94);
  color: var(--paper-light);
  border-radius: 8px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.7);
}

@keyframes can-spit {
  0% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-7px) scale(1.04, 0.96);
  }
  52% {
    transform: translateY(4px) scale(0.96, 1.05);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes can-swallow {
  0% {
    transform: rotate(0deg);
  }
  26% {
    transform: rotate(-4deg) translateY(2px);
  }
  56% {
    transform: rotate(4deg) translateY(-2px);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes can-warning {
  0%,
  100% {
    transform: translateX(0);
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.55));
  }
  25% {
    transform: translateX(-2px);
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 10px rgba(214, 76, 60, 0.4));
  }
  75% {
    transform: translateX(2px);
  }
}

@media (max-width: 980px) {
  .stage {
    min-height: 100dvh;
  }

  .hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .hud-metrics {
    width: 100%;
    overflow: auto;
    padding-bottom: 3px;
  }

  .playfield {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .left-rail {
    grid-template-columns: 170px 1fr;
    grid-template-rows: auto;
  }

  .photo-stack {
    display: flex;
    gap: 10px;
    overflow: auto hidden;
  }

  .stack-card {
    flex: 0 0 86px;
    margin: 0;
  }

  .viewer-panel {
    min-height: 560px;
  }

  .photo-mover {
    height: auto;
    width: min(76%, 520px);
    aspect-ratio: 0.78;
  }

  .right-rail {
    grid-template-rows: auto auto auto;
  }
}

@media (max-width: 620px) {
  .stage {
    padding: 12px;
  }

  .brand-lockup {
    display: grid;
    gap: 4px;
  }

  .metric {
    min-width: 58px;
  }

  .left-rail {
    grid-template-columns: 1fr;
  }

  .trash-can {
    width: 110px;
  }

  .viewer-panel {
    min-height: 520px;
  }

  .photo-mover {
    height: auto;
    width: min(92%, 430px);
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .verdict-button {
    min-height: 74px;
  }

  .wall-header {
    align-items: start;
    flex-direction: column;
  }

  .saved-wall {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
