:root {
  --bg: #120d0a;
  --bg-raised: #1e1611;
  --line: #3a2a1f;
  --text: #fbeee3;
  --muted: #b39a86;
  --orange: #ff8a1f;
  --orange-soft: #ffb46b;
  --orange-deep: #c9580a;
  --ok: #7ee08a;
  --warn: #ffd166;
  --error: #ff6b6b;
  --radius: 16px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top, rgba(255, 138, 31, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

a { color: var(--orange-soft); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* --- top bar ----------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #1a0f07;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms, background 120ms;
}
.btn:hover { background: var(--orange-soft); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--orange-soft); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-raised); }
.btn-big { width: 100%; padding: 14px; font-size: 1.05rem; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

.footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer strong { color: var(--orange); }
.watching { margin: 6px 0 0; }
.credit { margin: 6px 0 0; }

/* --- state switching --------------------------------------------------- */

main > section { display: none; }
body[data-state="loading"] #loading,
body[data-state="empty"] #empty,
body[data-state="outage"] #outage,
body[data-state="napping"] #nap { display: block; }
body[data-state="rolling"] #reel,
body[data-state="booting"][data-backdrop="reel"] #reel,
body[data-state="auction"] #auction,
body[data-state="booting"][data-backdrop="auction"] #auction,
body[data-state="duel"] #duel,
body[data-state="booting"][data-backdrop="duel"] #duel { display: flex; }
body[data-state="booting"] #boot { display: flex; }
body[data-state="holding"] #holder { display: grid; }

/* --- reel -------------------------------------------------------------- */

.reel {
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: opacity 400ms, filter 400ms;
}
body[data-state="booting"] .reel,
body[data-state="booting"] .auction,
body[data-state="booting"] .duel { opacity: 0.35; filter: blur(2px); }

.reel-window {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.reel-strip {
  position: absolute;
  top: 20px;
  left: 0;
  display: flex;
  gap: 16px;
  will-change: transform;
}

.reel-card {
  flex: 0 0 220px;
  height: 260px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 2px solid var(--line);
  overflow: hidden;
  transition: transform 300ms, border-color 300ms, box-shadow 300ms;
}
.reel-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--line);
}
.reel-card span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reel-card { position: relative; }
.reel-card.rejected::after {
  content: "REJECTED";
  position: absolute;
  top: 38%;
  left: 50%;
  padding: 4px 12px;
  border: 4px solid var(--error);
  border-radius: 8px;
  color: var(--error);
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(18, 13, 10, 0.75);
  transform: translate(-50%, -50%) rotate(-14deg);
  animation: stamp 300ms cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
.reel-card.rejected { border-color: var(--error); }
.reel-card.rejected img { filter: grayscale(0.6); }

@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-14deg) scale(2.2); opacity: 0; } }

.reel-card.winner {
  border-color: var(--orange);
  box-shadow: 0 0 40px rgba(255, 138, 31, 0.55);
  transform: scale(1.04);
}

.reel-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--orange);
  box-shadow: 0 0 12px var(--orange);
  pointer-events: none;
}
.reel-marker::before,
.reel-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
}
.reel-marker::before { top: 0; border-top-color: var(--orange); }
.reel-marker::after { bottom: 0; border-bottom-color: var(--orange); }

.reel-caption {
  margin: 0;
  font-family: var(--mono);
  color: var(--orange-soft);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.4; } }

/* --- boot terminal ----------------------------------------------------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 5;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 300ms ease-out;
}

.terminal {
  width: min(640px, 100%);
  background: #0b0806;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 138, 31, 0.15);
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dot:nth-child(1) { background: #ff5f57; }
.dot:nth-child(2) { background: #febc2e; }
.dot:nth-child(3) { background: #28c840; }
.terminal-title { margin-left: 8px; color: var(--muted); font-size: 0.8rem; }

/* No scrollbar: app.js keeps it scrolled to the newest line and old lines fade off the top. */
.boot-log {
  height: 260px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 20px);
  mask-image: linear-gradient(transparent, #000 20px);
  padding: 16px;
  color: var(--orange-soft);
  line-height: 1.6;
}
.boot-log .line { animation: type-in 250ms steps(12) both; white-space: pre-wrap; }
.boot-log .line:last-child::after {
  content: "▋";
  margin-left: 4px;
  animation: blink 0.9s steps(1) infinite;
}
.boot-log .warn { color: var(--warn); }
.boot-log .ok { color: var(--ok); font-weight: 700; }
.boot-log .error { color: var(--error); font-weight: 700; }

.progress {
  height: 8px;
  margin: 0 16px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-deep), var(--orange), var(--orange-soft));
  transition: width 500ms ease-out;
}
.progress-label {
  padding: 8px 16px 14px;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes type-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade-in { from { opacity: 0; } }

/* --- holder ------------------------------------------------------------ */

.holder {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 24px;
  animation: land 700ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.holder-photo { margin: 0; }
.holder-photo img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 24px;
  border: 3px solid var(--orange);
  box-shadow: 0 0 80px rgba(255, 138, 31, 0.35);
  background: var(--bg-raised);
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--mono);
  color: var(--orange-soft);
}

.holder-info h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--orange);
  overflow-wrap: anywhere;
}

.holder-stats {
  display: flex;
  gap: 32px;
  margin: 28px 0;
}
.holder-stats dt { color: var(--muted); font-size: 0.85rem; }
.holder-stats dd { margin: 4px 0 0; font-family: var(--mono); font-size: 1.8rem; }

.hold-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.hold-fill { height: 100%; width: 100%; background: var(--orange); }

.health { margin-bottom: 20px; }
.health-label { display: flex; justify-content: space-between; align-items: baseline; }
.health-label span:last-child { font-family: var(--mono); }
.health-bar {
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.health-fill { height: 100%; width: 100%; background: var(--ok); transition: width 250ms linear, background 400ms; }
.health[data-level="low"] .health-fill { background: var(--warn); }
.health[data-level="critical"] .health-fill { background: var(--error); animation: pulse 0.8s ease-in-out infinite; }
.health[data-level="critical"] .health-label span:last-child { color: var(--error); }

.thought {
  margin: 12px 0 0;
  font-family: var(--mono);
  color: var(--muted);
}
.thought span { display: inline-block; color: var(--orange-soft); }

/* --- auction ----------------------------------------------------------- */

.auction {
  justify-content: center;
  padding: 0 16px;
  transition: opacity 400ms, filter 400ms;
}

.auction-card {
  width: min(560px, 100%);
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(255, 138, 31, 0.15);
  animation: land 500ms ease-out;
}
.auction-card h2 { margin: 0 0 4px; font-size: 1.6rem; }

.auction-high {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 20px 0;
  padding: 16px;
  border: 1px dashed var(--orange-deep);
  border-radius: 12px;
}
.auction-high strong {
  display: block;
  color: var(--orange);
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}

.auction-log {
  height: 150px;
  margin: 0;
  padding-left: 24px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 16px);
  mask-image: linear-gradient(transparent, #000 16px);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}
.auction-log li { animation: fade-in 300ms ease-out; }
.auction-log strong { color: var(--text); }
.auction-log .winning { color: var(--orange-soft); font-weight: 700; }

.auction-gavel {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 1.2rem;
  text-align: center;
  color: var(--warn);
}
.auction-gavel.sold {
  color: var(--orange);
  font-weight: 800;
  animation: bang 400ms cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes bang { from { transform: scale(1.8) rotate(-4deg); opacity: 0; } }

/* --- duel -------------------------------------------------------------- */

.duel {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  text-align: center;
  transition: opacity 400ms, filter 400ms;
  animation: land 500ms ease-out;
}

.duel-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  width: min(760px, 100%);
  margin-top: 8px;
}

.duel-cat {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.duel-photo {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 3px solid var(--line);
  overflow: hidden;
  background: var(--bg-raised);
  transition: border-color 300ms, box-shadow 300ms, filter 300ms;
}
.duel-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#duel-b .duel-photo img { transform: scaleX(-1); } /* face each other */

.duel-cat figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: 100%;
  font-size: 1.2rem;
}
.duel-cat figcaption strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-score {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
}

.duel-hand { font-size: 3.5rem; line-height: 1; min-height: 1em; }
#duel-b .duel-hand { transform: scaleX(-1); }
.duel-arena.shaking .duel-hand { animation: shake-fist 450ms ease-in-out infinite; }
#duel-b.duel-cat .duel-hand { animation-direction: reverse; }

@keyframes shake-fist {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

.duel-vs {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--muted);
}

.duel-call {
  min-height: 1.5em;
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--orange);
}
.duel-note { min-height: 1.5em; margin: 0; font-family: var(--mono); color: var(--muted); }

.duel-cat.won .duel-photo { border-color: var(--orange); box-shadow: 0 0 50px rgba(255, 138, 31, 0.5); }
.duel-cat.lost .duel-photo { border-color: var(--error); filter: grayscale(0.8); }
.duel-cat[data-stamp]::after {
  content: attr(data-stamp);
  position: absolute;
  top: 30%;
  left: 50%;
  padding: 4px 12px;
  border: 4px solid currentColor;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: rgba(18, 13, 10, 0.8);
  transform: translate(-50%, -50%) rotate(-12deg);
  animation: stamp 300ms cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
.duel-cat.won::after { color: var(--orange); }
.duel-cat.lost::after { color: var(--error); }

.duel-arena.brawl { animation: brawl 120ms linear infinite; }
.duel-arena.brawl .duel-hand { visibility: hidden; }
.duel-arena.brawl .duel-vs { font-size: 4rem; }

@keyframes brawl {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-6px, 3px) rotate(-1deg); }
  50% { transform: translate(5px, -4px) rotate(1deg); }
  75% { transform: translate(-3px, -2px) rotate(0); }
}

/* --- outage ------------------------------------------------------------ */

.outage h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--error); }
.outage-stats { justify-content: center; flex-wrap: wrap; }
.outage-status {
  min-height: 1.5em;
  font-family: var(--mono);
  color: var(--warn);
}
.outage.found .outage-status { color: var(--ok); font-weight: 700; }

/* --- nap --------------------------------------------------------------- */

.nap .big { animation: pulse 2.4s ease-in-out infinite; }
.nap-bar {
  width: min(360px, 100%);
  height: 8px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.nap-fill { width: 0; height: 100%; background: linear-gradient(90deg, var(--orange-deep), var(--ok)); }
.nap-status { min-height: 1.5em; font-family: var(--mono); color: var(--orange-soft); }

/* --- leaderboard page -------------------------------------------------- */

.board-main { align-items: center; padding: 32px 16px; }
.board {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.board h1 { margin: 0; }
.board-section { padding: 24px; }
.board-section h2 { margin: 0 0 4px; font-size: 1.2rem; }
.board-section > p { margin: 0; }

.board-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.board-row {
  display: grid;
  grid-template-columns: 2.2rem 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.board-rank { font-family: var(--mono); color: var(--muted); text-align: right; }
.board-row:first-child .board-rank { color: var(--orange); }
.board-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line); }
.board-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-human { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.board-score { font-family: var(--mono); text-align: right; }
.board-score small { display: block; color: var(--muted); }

.board-tie { margin: 12px 0 4px; font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; color: var(--orange); }

/* --- glitches ---------------------------------------------------------- */

.glitch-now { animation: glitch 400ms steps(1) both; }
.glitch-loop { animation: glitch-loop 3s infinite; }

@keyframes glitch {
  0% { transform: translateX(-3px) skewX(-8deg); text-shadow: -3px 0 #ff2bd6, 3px 0 #2bf5ff; clip-path: inset(10% 0 55% 0); }
  25% { transform: translateX(4px); text-shadow: 3px 0 #ff2bd6, -3px 0 #2bf5ff; clip-path: inset(60% 0 5% 0); filter: hue-rotate(170deg); }
  50% { transform: translateX(-2px) skewX(6deg); text-shadow: -2px 0 #2bf5ff, 2px 0 #ff2bd6; clip-path: inset(30% 0 30% 0); }
  75% { transform: translateX(2px); text-shadow: 2px 0 #ff2bd6; clip-path: none; filter: hue-rotate(90deg); }
  100% { transform: none; text-shadow: none; clip-path: none; filter: none; }
}

@keyframes glitch-loop {
  0%, 88%, 100% { transform: none; text-shadow: none; clip-path: none; }
  90% { transform: translateX(-4px) skewX(-10deg); text-shadow: -3px 0 #ff2bd6, 3px 0 #2bf5ff; clip-path: inset(15% 0 50% 0); }
  93% { transform: translateX(3px); text-shadow: 3px 0 #2bf5ff; clip-path: inset(55% 0 10% 0); }
  96% { transform: translateX(-1px) skewX(4deg); text-shadow: -2px 0 #ff2bd6; clip-path: none; }
}

/* Whole-page hiccup: jolt, colour shift (the cats briefly stop being orange), scanlines. */
body.screen-glitch main,
body.screen-glitch .topbar { animation: screen-glitch 350ms steps(1) both; }
body.screen-glitch::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 4px);
}

@keyframes screen-glitch {
  0% { transform: translate(-6px, 2px) skewX(3deg); filter: hue-rotate(170deg) saturate(3); }
  30% { transform: translate(5px, -1px); filter: hue-rotate(200deg); clip-path: inset(0 0 40% 0); }
  60% { transform: translate(-2px, 0); filter: none; clip-path: inset(25% 0 0 0); }
  80% { transform: translate(3px, 1px); filter: hue-rotate(90deg); clip-path: none; }
  100% { transform: none; filter: none; clip-path: none; }
}

@keyframes land { from { opacity: 0; transform: scale(0.94); } }

/* --- empty / loading --------------------------------------------------- */

.empty { text-align: center; padding: 0 24px; }
.empty .big { font-size: 4rem; margin: 0; }
.empty h1 { margin: 8px 0; }

/* --- upload page ------------------------------------------------------- */

.upload-main { align-items: center; padding: 32px 16px; }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.upload-form {
  width: min(480px, 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.upload-form h1 { margin: 0; }
.upload-form p { margin: 0; }

.drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 150ms;
}
.drop:hover, .drop:focus-within { border-color: var(--orange); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview { width: 100%; max-height: 360px; object-fit: contain; display: block; }

.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}
.field input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }

.status { min-height: 1.4em; font-family: var(--mono); font-size: 0.9rem; }
.status.ok { color: var(--ok); }
.status.error { color: var(--error); }

/* --- small screens ----------------------------------------------------- */

@media (max-width: 760px) {
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 8px 10px; }
  .tagline { order: 3; flex-basis: 100%; font-size: 0.8rem; }
  .brand { flex: 1; }
  .topbar .btn { padding: 8px 14px; font-size: 0.9rem; }
  main { padding: 16px 0; }
  .footer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); font-size: 0.85rem; }

  /* Holder: everything, including the transfer bar, fits without scrolling. */
  .holder { grid-template-columns: 1fr; gap: 14px; padding: 0 16px; }
  /* ~470px is everything else on the screen (top bar, info, footer). */
  .holder-photo img { max-height: clamp(140px, calc(100dvh - 470px), 36vh); width: auto; max-width: 100%; margin: 0 auto; }
  .holder-info h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .eyebrow { font-size: 0.85rem; }
  .holder-info .muted { margin: 4px 0 0; }
  .thought { margin-top: 6px; font-size: 0.9rem; }
  .holder-stats { gap: 24px; margin: 12px 0; }
  .holder-stats dd { font-size: 1.4rem; }
  .health { margin-bottom: 10px; }
  .holder-info .small { margin: 0; }

  .terminal { font-size: 0.82rem; }
  .boot-log { height: 220px; padding: 12px; }
  .reel-card { flex-basis: 170px; height: 210px; }
  .reel-card img { height: 170px; }
  .reel-window { height: 250px; }
  .auction-card { padding: 18px; }
  .auction-card h2 { font-size: 1.25rem; }
  .auction-high { margin: 12px 0; padding: 12px; }
  .auction-high strong { font-size: 1.2rem; }
  .auction-log { height: 110px; font-size: 0.8rem; line-height: 1.6; padding-left: 20px; }
  .auction-gavel { margin-top: 10px; font-size: 1.05rem; }

  .empty .big { font-size: 3rem; }
  .outage-stats { flex-wrap: nowrap; gap: 12px; margin: 18px 0; }
  .outage-stats > div { flex: 1; min-width: 0; }
  .outage-stats dt { font-size: 0.75rem; }
  .outage-stats dd { font-size: 1.3rem; }
  .duel-arena { gap: 10px; }
  .duel-vs { font-size: 1.3rem; }
  .duel-hand { font-size: 2.4rem; }
  .duel-cat figcaption { font-size: 1rem; flex-direction: column; align-items: center; gap: 0; }
  .duel-cat[data-stamp]::after { font-size: 0.85rem; padding: 2px 6px; border-width: 3px; }
  .board-section { padding: 16px 14px; }
  .board-row { grid-template-columns: 1.3rem 40px minmax(0, 1fr) auto; gap: 8px; }
  .board-row img { width: 40px; height: 40px; }
  .board-human { white-space: normal; }
  .board-score { font-size: 0.8rem; }

  .upload-main { padding: 20px 16px; }
  .upload-form { padding: 20px; gap: 14px; }
  .upload-form h1 { font-size: 1.6rem; }
  .drop { min-height: 160px; }
}

/* Phones: short button labels. */
@media (max-width: 480px) {
  .long { display: none; }
  .topbar .btn { padding: 8px 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel-caption, .boot-log .line, .holder, .auction-card, .auction-log li,
  .auction-gavel.sold, .glitch-now, .glitch-loop, .reel-card.rejected::after,
  .nap .big, .health[data-level="critical"] .health-fill,
  .duel, .duel-arena.shaking .duel-hand, .duel-arena.brawl, .duel-cat[data-stamp]::after,
  body.screen-glitch main, body.screen-glitch .topbar { animation: none; }
  body.screen-glitch::after { display: none; }
}
