/*
 * RIVAS RUN — one stylesheet. Colours, typefaces and manners are those of
 * kskbaits.com: river ink, bone, brass, field paper; square corners; hairline
 * rules; small capitals set in mono for labels.
 */

@font-face {
  font-family: "Bebas Neue";
  src: url("../assets/fonts/bebas-neue-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;            /* one look by design: dark water, on any host */
  --river-ink: #070a0b;
  --stage: #151719;
  --stage-deep: #0c0f10;
  --silt: #232522;
  --bone: #e7e2d7;
  --bone-dim: #b8b2a7;
  --mute: #a3a59f;
  --field-paper: #d8cdb2;
  --paper-edge: #b9ad90;
  --paper-ink: #101416;
  --paper-mute: #383a33;
  --paper-alert: #6f1f0d;
  --brass: #a47a35;
  --brass-bright: #c49a52;
  --brass-ink: #4b350f;
  --line: rgba(231, 226, 215, 0.15);
  --line-strong: rgba(231, 226, 215, 0.4);
  --brass-line: rgba(164, 122, 53, 0.72);
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--river-ink);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; border-radius: 0; cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, ol, dl, dd { margin: 0; padding: 0; }
ol { list-style: none; }
[hidden] { display: none !important; }

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

:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; }

.app {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--river-ink);
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 150vh;
  overflow: hidden;
  background: var(--river-ink);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
@supports (height: 100dvh) { .stage { max-width: 150dvh; } }

.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.tap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}
.tap:focus-visible { outline: none; }

.label, .kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.kicker { color: var(--brass-bright); }
.kicker.ink { color: var(--brass-ink); }

.icon { display: block; }
.icon-btn {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(7, 10, 11, 0.45);
  color: var(--bone);
}
.icon-btn:active { background: rgba(231, 226, 215, 0.14); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 1rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
}
.btn.primary { background: var(--bone); color: var(--paper-ink); border: 1px solid var(--brass); box-shadow: 0 0 0 3px rgba(164, 122, 53, 0.2); }
.btn.primary:active { background: #fff; }
.btn.line { border: 1px solid var(--line-strong); color: var(--bone); background: rgba(7, 10, 11, 0.4); }
.btn.line:active { background: rgba(231, 226, 215, 0.12); }
.btn.ink { background: var(--paper-ink); color: var(--field-paper); border: 1px solid var(--paper-ink); }
.btn.ink:active { background: #000; }
.btn.line-ink { border: 1px solid var(--paper-ink); color: var(--paper-ink); }
.btn.line-ink:active { background: rgba(16, 20, 22, 0.1); }

.link {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--brass-line);
  text-underline-offset: 0.35em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.fine { font-family: var(--sans); font-size: 0.8125rem; line-height: 1.5; color: var(--mute); }
.fine a { text-decoration-color: var(--brass-line); text-underline-offset: 0.25em; }

/* ---- during a cast ------------------------------------------------------ */

.hud {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top) + 8px) max(16px, var(--safe-right)) 0 max(16px, var(--safe-left));
  pointer-events: none;
  display: grid; gap: 6px;
}
.hud { transition: opacity 0.2s ease; }
/* A bass in the air has the top of the screen to itself. */
.stage.airborne .hud { opacity: 0.08; }
.hud-top { display: flex; align-items: center; gap: 12px; }
.hud-logo { width: 84px; height: auto; opacity: 0.92; }
.hud-cast { margin-left: auto; font-family: var(--mono); font-size: 0.8125rem; color: var(--bone); }
.hud-cast b { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1; letter-spacing: 0.02em; }
.hud-cast .of { color: var(--mute); font-size: 0.75rem; letter-spacing: 0.08em; }
.hud-clock { margin-right: 12px; font-size: 0.6875rem; letter-spacing: 0.1em; color: var(--bone-dim); }
.hud .icon-btn { pointer-events: auto; }
.hud-sound { margin-right: -4px; }
.icon-btn[aria-pressed="false"] { color: var(--mute); }
.hud-bag {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.slots { display: flex; gap: 4px; flex: 1; min-width: 0; }
.slots li {
  flex: 1; min-width: 0;
  height: 22px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-family: var(--mono); font-weight: 500; font-size: 0.6875rem;
  color: rgba(231, 226, 215, 0.35);
  background: rgba(7, 10, 11, 0.35);
}
.slots li.filled { color: var(--bone); border-color: var(--brass-line); }
.slots li.pop { animation: slot-pop 0.9s ease-out; }
@keyframes slot-pop { 0% { background: var(--brass-bright); color: var(--paper-ink); transform: scale(1.18); } 100% { background: rgba(7, 10, 11, 0.35); transform: none; } }
.hud-total { font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1; letter-spacing: 0.03em; min-width: 3.4ch; text-align: right; }

.track {
  position: absolute; left: max(16px, var(--safe-left)); right: max(16px, var(--safe-right));
  bottom: calc(var(--safe-bottom) + 10px);
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.track-bed { position: relative; flex: 1; height: 14px; }
.track-line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-strong); }
.track-spot { position: absolute; top: -4px; height: 8px; border-top: 1px solid transparent; }
.track-spot.grass { border-top: 0; background: repeating-linear-gradient(90deg, rgba(231, 226, 215, 0.5) 0 1px, transparent 1px 4px); }
.track-spot.laydown { top: -1px; height: 3px; background: rgba(196, 154, 82, 0.95); }
.track-spot.pads { top: -6px; height: 3px; background: repeating-linear-gradient(90deg, rgba(132, 160, 104, 0.95) 0 5px, transparent 5px 8px); }
.track-spot.rock { top: -2px; height: 5px; background: radial-gradient(circle at 3px 2.5px, rgba(231, 226, 215, 0.7) 2px, transparent 2.6px); background-size: 7px 5px; }
.track-spot.open::after { content: ""; position: absolute; left: 50%; top: 1px; width: 6px; height: 6px; margin-left: -3px; background: #c8603c; transform: rotate(45deg); }
.track-spot.stump { background: rgba(196, 154, 82, 0.9); height: 6px; top: -3px; width: 6px !important; transform: translateX(-3px); margin-left: 3%; }
.track-lure { position: absolute; top: 0; width: 2px; height: 14px; margin-left: -1px; background: var(--bone); box-shadow: 0 0 0 2px rgba(7, 10, 11, 0.6); }

.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 4px 8px;
  font-family: var(--mono); font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone);
  background: rgba(7, 10, 11, 0.72);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  animation: float-up 1.6s ease-out forwards;
}
.float.alert { border-color: #b4512f; color: #f1c9b6; }
.float.good { border-color: var(--brass-bright); color: #f0dcae; }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -70%); }
  12% { opacity: 1; transform: translate(-50%, -100%); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -190%); }
}

.coach {
  position: absolute; left: 50%; bottom: calc(var(--safe-bottom) + 46px);
  transform: translateX(-50%);
  width: min(88%, 420px);
  padding: 10px 14px;
  font-family: var(--mono); font-weight: 500; font-size: 0.8125rem; line-height: 1.45; letter-spacing: 0.06em; text-transform: uppercase;
  text-align: center;
  color: var(--bone);
  background: rgba(7, 10, 11, 0.8);
  border: 1px solid var(--brass-line);
  pointer-events: none;
}

.set {
  position: absolute; left: 50%; top: 68%;
  width: 132px; height: 132px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  pointer-events: none;
  animation: set-in 0.12s ease-out;
}
.set b { position: relative; z-index: 1; font-family: var(--display); font-weight: 400; font-size: 3.5rem; letter-spacing: 0.06em; color: var(--bone); text-transform: uppercase; text-shadow: 0 0 18px rgba(7, 10, 11, 0.9); }
.set-dial { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.set-rim { fill: rgba(7, 10, 11, 0.55); stroke: var(--line-strong); stroke-width: 1; }
.set-ring { fill: none; stroke: var(--brass-bright); stroke-width: 5; stroke-dasharray: 339.3; stroke-dashoffset: 0; }
@keyframes set-close { to { stroke-dashoffset: 339.3; } }

/* The fight: the word for the thumb, and the tension in the line. */
.fight {
  position: absolute; left: 50%; bottom: calc(var(--safe-bottom) + 118px);
  transform: translateX(-50%);
  width: min(78%, 300px);
  display: grid; gap: 7px; justify-items: center;
  pointer-events: none;
  animation: fight-in 0.16s ease-out;
}
@keyframes fight-in { from { opacity: 0; } }
.fight b { font-family: var(--display); font-weight: 400; font-size: 2.75rem; line-height: 0.9; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bone); text-shadow: 0 0 18px rgba(7, 10, 11, 0.95), 0 0 4px rgba(7, 10, 11, 0.9); }
.fight.give b { color: var(--brass-bright); }
.fight.won b { color: #f0dcae; }
.fight-bar { position: relative; display: flex; width: 100%; height: 12px; border: 1px solid var(--line-strong); background: rgba(7, 10, 11, 0.7); box-shadow: 0 0 0 3px rgba(7, 10, 11, 0.35); }
.fight-zone { height: 100%; }
.fight-zone.slack { background: repeating-linear-gradient(135deg, rgba(231, 226, 215, 0.2) 0 3px, transparent 3px 6px); }
.fight-zone.good { background: rgba(196, 154, 82, 0.6); }
.fight-zone.tight { background: rgba(190, 84, 48, 0.85); }
.fight-needle { position: absolute; top: -6px; left: 0; width: 4px; height: 22px; margin-left: -2px; background: var(--bone); box-shadow: 0 0 0 2px rgba(7, 10, 11, 0.75); }
.fight-ends { display: flex; justify-content: space-between; width: 100%; font-family: var(--mono); font-weight: 500; font-size: 0.5625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-dim); text-shadow: 0 0 6px rgba(7, 10, 11, 0.9); }
.fight.hot .fight-bar { border-color: #e0764c; box-shadow: 0 0 0 3px rgba(224, 118, 76, 0.45); }
.fight.hot .fight-needle { background: #f3b49c; }
.fight.loose .fight-bar { border-color: var(--bone); }
.fight.loose b { animation: fight-blink 0.36s steps(2, jump-none) infinite; }
@keyframes fight-blink { from { opacity: 1; } to { opacity: 0.35; } }
@keyframes set-in { from { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

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

.screen { position: absolute; inset: 0; }

.title {
  display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 12px) max(20px, var(--safe-right)) calc(var(--safe-bottom) + 16px) max(20px, var(--safe-left));
  background: linear-gradient(to top, rgba(7, 10, 11, 0.96) 0%, rgba(7, 10, 11, 0.82) 38%, rgba(7, 10, 11, 0.15) 70%, rgba(7, 10, 11, 0.35) 100%);
  overflow-y: auto;
  animation: screen-in 0.5s ease-out;
}
@keyframes screen-in { from { opacity: 0; } }
.title-top { display: flex; align-items: center; justify-content: space-between; }
.title-logo { width: 124px; height: auto; }
.sound-note { align-self: flex-end; padding-top: 6px; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-dim); }
.title-finish { width: min(100%, 520px); margin: auto auto 0; padding-top: 10px; display: grid; justify-items: center; }
.title-pick { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; width: 100%; touch-action: pan-y; }
.title-lure-box { display: block; min-width: 0; }
.title-lure-box.swap { animation: pick-next 0.26s ease-out; }
.title-pick[data-dir="prev"] .title-lure-box.swap { animation-name: pick-prev; }
@keyframes pick-next { from { opacity: 0.1; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes pick-prev { from { opacity: 0.1; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.title-lure {
  width: 100%;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
  animation: hover 5.5s ease-in-out infinite;
  -webkit-user-drag: none;
}
.pick-arrow { width: 44px; height: 64px; display: grid; place-items: center; color: var(--brass-bright); }
.pick-arrow:active { color: var(--bone); }
.pick-arrow .icon { width: 30px; height: 30px; }
.finish-line { display: grid; justify-items: center; gap: 3px; width: 100%; min-height: 48px; padding: 6px 8px; text-align: center; }
.finish-line b { font-family: var(--display); font-weight: 400; font-size: 1.625rem; letter-spacing: 0.04em; line-height: 1; text-transform: uppercase; }
.finish-look { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--bone-dim); }
.finish-dots { display: flex; gap: 5px; padding-top: 4px; }
.finish-dots i { width: 16px; height: 2px; background: var(--line-strong); }
.finish-dots i.on { background: var(--brass-bright); }
@keyframes hover { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-9px) rotate(0.5deg); } }
.title-body { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; width: 100%; max-width: 430px; margin-left: auto; margin-right: auto; }
.title h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(4rem, 23vw, 6.5rem); line-height: 0.86; letter-spacing: 0.01em;
  color: var(--bone);
}
.lede { font-family: var(--serif); font-style: italic; font-size: 1.125rem; line-height: 1.35; color: var(--bone-dim); margin-bottom: 6px; }
.finish-pick { justify-content: flex-start; gap: 12px; border: 1px solid var(--line-strong); background: rgba(7, 10, 11, 0.5); text-align: left; padding: 0.4rem 0.75rem; }
.finish-pick-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.finish-pick-text b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.04em; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.finish-pick .icon { flex: none; color: var(--brass-bright); }
.water-pick { min-height: 48px; }
.title-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.records { font-family: var(--mono); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-dim); }

/* ---- catch card --------------------------------------------------------- */

.card {
  display: grid; place-items: center;
  padding: calc(var(--safe-top) + 16px) max(18px, var(--safe-right)) calc(var(--safe-bottom) + 16px) max(18px, var(--safe-left));
  background: rgba(7, 10, 11, 0.62);
  overflow-y: auto;
}
.card-paper {
  width: min(100%, 360px);
  padding: 16px 18px 18px;
  background: var(--field-paper);
  color: var(--paper-ink);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: grid; gap: 6px;
  animation: card-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes card-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-mute);
  padding-bottom: 8px; border-bottom: 1px solid rgba(16, 20, 22, 0.3);
}
.stamp {
  display: inline-block;
  padding: 3px 8px;
  border: 1.5px solid var(--brass-ink);
  color: var(--brass-ink);
  font-family: var(--mono); font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.stamp.alert { border-color: var(--paper-alert); color: var(--paper-alert); }
/* The stamp is pressed on a moment after the paper arrives, and the fish is laid on it. */
.card-paper .stamp, .slip .stamp { animation: stamp-in 0.3s cubic-bezier(0.3, 1.35, 0.5, 1) 0.32s both; }
@keyframes stamp-in { from { opacity: 0; transform: rotate(-10deg) scale(2.3); } }
.card-fish { width: 100%; height: auto; mix-blend-mode: multiply; margin: 6px 0 2px; animation: fish-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.06s both; }
@keyframes fish-in { from { opacity: 0; transform: translateX(22px); } }
.card-paper.short .card-fish { width: 62%; margin-left: auto; margin-right: auto; opacity: 0.85; }
.card-kind { font-family: var(--mono); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper-mute); }
.card-length { font-family: var(--serif); font-style: italic; font-size: 1.125rem; }
.card-weight { font-family: var(--display); font-weight: 400; font-size: 4rem; line-height: 0.9; letter-spacing: 0.01em; text-transform: uppercase; }
.card-paper.blank .card-weight { font-size: 3.25rem; padding-top: 6px; }
.card-paper.short .card-weight { color: var(--paper-mute); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--paper-alert); }
.card-note { font-family: var(--sans); font-size: 0.9375rem; line-height: 1.45; color: var(--paper-ink); min-height: 2.9em; }
.card-bag {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 0 10px; margin-top: 2px;
  border-top: 1px solid rgba(16, 20, 22, 0.3);
}
.card-bag .label { color: var(--paper-mute); }
.card-bag b { font-family: var(--display); font-weight: 400; font-size: 1.75rem; letter-spacing: 0.03em; line-height: 1; text-transform: uppercase; }
.card-bag span:last-child { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-mute); }

/* ---- weigh-in ----------------------------------------------------------- */

.weigh { background: rgba(7, 10, 11, 0.9); }
.weigh-scroll {
  position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 18px) max(16px, var(--safe-right)) calc(var(--safe-bottom) + 24px) max(16px, var(--safe-left));
  display: grid; gap: 18px; align-content: start; justify-items: center;
}
.slip {
  width: min(100%, 400px);
  padding: 18px 18px 20px;
  background: var(--field-paper); color: var(--paper-ink);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  display: grid; gap: 8px;
  animation: card-in 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slip-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid rgba(16, 20, 22, 0.3); }
.slip-head img { width: 104px; }
.weigh-total { font-family: var(--display); font-weight: 400; font-size: clamp(4rem, 21vw, 5.5rem); line-height: 0.88; letter-spacing: 0.01em; text-transform: uppercase; }
.weigh-sub { font-family: var(--serif); font-style: italic; font-size: 1.125rem; }
.weigh-list { display: grid; margin-top: 6px; border-top: 1px solid rgba(16, 20, 22, 0.3); }
.weigh-list li {
  display: grid; grid-template-columns: 1.6rem 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid rgba(16, 20, 22, 0.16);
  font-family: var(--mono); font-size: 0.8125rem; color: var(--paper-mute);
}
.weigh-list li { animation: row-in 0.32s ease-out both; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.weigh-list .rank { color: var(--brass-ink); font-weight: 600; }
.weigh-list b { font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.03em; line-height: 1; color: var(--paper-ink); text-transform: uppercase; }
.weigh-list .cast { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6875rem; }
.weigh-big { font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: 0.03em; line-height: 1; text-transform: uppercase; padding-top: 8px; }
.weigh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px 6px; margin-top: 6px; }
.weigh-stats div { display: grid; gap: 2px; }
.weigh-stats dt { font-family: var(--mono); font-weight: 500; font-size: 0.5625rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-mute); }
.weigh-stats dd { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.03em; line-height: 1.1; text-transform: uppercase; }
.weigh-best { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-mute); padding-top: 6px; }
.slip-actions { display: grid; gap: 8px; margin-top: 8px; }

.rivas-panel {
  width: min(100%, 400px);
  padding: 18px;
  background: var(--stage);
  border: 1px solid var(--line);
  display: grid; gap: 8px;
}
.rivas-panel img { width: 100%; margin: 4px 0 6px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5)); }
.rivas-panel h2 { font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 0.9; letter-spacing: 0.02em; }
.rivas-finish { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone-dim); }
.rivas-copy { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; color: var(--bone); margin-bottom: 6px; }

/* ---- pause -------------------------------------------------------------- */

.pausemenu { display: grid; place-items: center; background: rgba(7, 10, 11, 0.86); padding: calc(var(--safe-top) + 20px) max(20px, var(--safe-right)) calc(var(--safe-bottom) + 20px) max(20px, var(--safe-left)); overflow-y: auto; }
.pause-body { width: min(100%, 340px); display: grid; gap: 10px; }
.pause-body h2 { font-family: var(--display); font-weight: 400; font-size: 3.5rem; line-height: 0.9; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 8px; }

/* ---- sheets ------------------------------------------------------------- */

.sheet { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(7, 10, 11, 0.7); z-index: 5; }
.sheet-panel {
  width: min(100%, 520px); max-height: 92%;
  display: flex; flex-direction: column;
  background: var(--stage-deep);
  border: 1px solid var(--line-strong); border-bottom: 0;
  animation: card-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.75rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 18px calc(var(--safe-bottom) + 18px); display: grid; gap: 12px; }
.finish-list { display: grid; }
.finish-row {
  display: grid; grid-template-columns: 1.6rem 104px 1fr auto; gap: 12px; align-items: center;
  width: 100%; min-height: 64px; padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.finish-row:active { background: rgba(231, 226, 215, 0.06); }
.finish-row.chosen { border-bottom-color: var(--brass-line); }
.finish-no { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; color: var(--brass-bright); }
.finish-text { display: grid; gap: 2px; min-width: 0; }
.finish-text b { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.04em; line-height: 1.1; text-transform: uppercase; }
.finish-text span { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.06em; color: var(--mute); }
.finish-mark { font-family: var(--mono); font-weight: 600; font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-bright); }
.water-row {
  display: grid; grid-template-columns: 1.6rem 1fr auto; gap: 12px; align-items: start;
  width: 100%; min-height: 64px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.water-row:active { background: rgba(231, 226, 215, 0.06); }
.water-row.chosen { border-bottom-color: var(--brass-line); }
.water-row .finish-no { padding-top: 5px; }
.water-row .water-note { font-family: var(--sans); font-size: 0.875rem; line-height: 1.4; letter-spacing: 0; color: var(--bone-dim); }
.share-picture { width: min(100%, 300px); height: auto; margin: 0 auto; border: 1px solid var(--line-strong); -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; }
.share-text { font-family: var(--mono); font-size: 0.75rem; line-height: 1.5; color: var(--mute); user-select: text; -webkit-user-select: text; overflow-wrap: anywhere; }
.sound-verdict { margin: 0; padding: 12px 14px; border: 1px solid var(--brass); color: var(--bone); font-size: 0.9375rem; line-height: 1.45; }
.sound-state { display: grid; margin: 0; border-top: 1px solid var(--line); }
.sound-state[hidden], .sound-verdict[hidden] { display: none; }
.sound-state div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; }
.sound-state dt { color: var(--mute); text-transform: uppercase; }
.sound-state dd { color: var(--bone); text-align: right; }
.how-list { display: grid; }
.how-list li { display: grid; grid-template-columns: 1.8rem 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.how-no { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; color: var(--brass-bright); padding-top: 4px; }
.how-list b { font-family: var(--display); font-weight: 400; font-size: 1.375rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1; }
.how-list p { font-size: 0.9375rem; line-height: 1.5; color: var(--bone-dim); margin-top: 2px; }

/* ---- wider and shorter windows ------------------------------------------ */

@media (min-width: 720px) {
  .sheet { align-items: center; }
  .sheet-panel { border-bottom: 1px solid var(--line-strong); max-height: 86%; }
  .title { padding-left: max(48px, var(--safe-left)); padding-right: max(48px, var(--safe-right)); }
  .title-body { margin-left: 0; }
  .title-finish { margin-left: 0; width: min(64%, 560px); }
  .hud { padding-left: max(20px, var(--safe-left)); padding-right: max(20px, var(--safe-right)); }
  .hud-bag { max-width: 460px; }
}

/* Two columns only where the stage itself is wide enough for them. */
@media (min-width: 720px) and (min-height: 520px) {
  .weigh-scroll { grid-template-columns: repeat(2, minmax(0, 400px)); justify-content: center; align-items: start; }
}

@media (max-width: 360px) {
  /* The narrowest phones: smaller figures in the bag, and no clock. */
  .slots li { font-size: 0.5625rem; }
  .hud-clock { display: none; }
  .hud-total { font-size: 1.5rem; }
}

@media (max-height: 620px) {
  .title-finish { width: min(88%, 340px); padding-top: 0; }
  .finish-line { min-height: 44px; padding: 2px 8px; }
  .finish-line b { font-size: 1.25rem; }
  .finish-look { display: none; }
  .pick-arrow { height: 48px; }
  .title h1 { font-size: clamp(3rem, 15vh, 4.5rem); }
  .lede { font-size: 1rem; margin-bottom: 0; }
  .title-body { gap: 7px; padding-top: 8px; }
  .btn { min-height: 46px; }
  .card-weight { font-size: 3.25rem; }
  .card-note { min-height: 0; }
  .set { top: 62%; width: 108px; height: 108px; }
  .set b { font-size: 2.75rem; }
  .fight { bottom: calc(var(--safe-bottom) + 114px); gap: 4px; }      /* clear of two lines of help below it */
  .fight b { font-size: 2.25rem; }
}

@media (max-height: 620px) and (min-width: 560px) {
  /* A phone held sideways: the strip along the top becomes one row. */
  .hud { display: flex; align-items: center; gap: 12px; }
  .hud-top { display: contents; }
  .hud-logo, .hud-clock { display: none; }
  .hud-bag { order: 2; flex: 1; max-width: 400px; border-top: 0; padding-top: 0; }
  .hud-cast { order: 3; margin-left: auto; }
  .hud .icon-btn { order: 4; }
  /* The fight's gauge stands to one side, and the line of help beside it. */
  .fight { left: auto; right: max(16px, var(--safe-right)); bottom: calc(var(--safe-bottom) + 40px); transform: none; width: 170px; }
  .stage.fighting .coach { left: max(16px, var(--safe-left)); transform: none; width: calc(100% - 234px - var(--safe-left) - var(--safe-right)); max-width: 380px; }
  /* The title sits beside the lure. */
  .title { flex-direction: row; flex-wrap: wrap; align-content: space-between; column-gap: 24px; }
  .title-top { width: 100%; }
  .title-finish { margin: auto 0; width: 44%; padding-top: 0; }
  .title-body { margin: auto 0 0 auto; width: 52%; max-width: 380px; padding-top: 0; }
  .card-paper { width: min(100%, 520px); grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .card-head, .card-bag, .card-paper .btn { grid-column: 1 / -1; }
  .card-fish { grid-row: span 4; align-self: center; }
}

@media (prefers-reduced-motion: reduce) {
  .title-lure, .title-lure-box.swap { animation: none; }
  .card-paper, .slip, .sheet-panel, .set, .slots li.pop { animation: none; }
  .card-fish, .card-paper .stamp, .slip .stamp, .weigh-list li, .title, .fight, .fight.loose b { animation: none; }
  .hud, .boot.out, .boot-bar i { transition: none; }
  .float { animation-duration: 1.6s; animation-name: float-still; }
  @keyframes float-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* ---- while the pictures arrive ------------------------------------------ */

.boot {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px;
  background: var(--river-ink);
  text-align: center;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute);
}
.boot.out { opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.boot-logo { width: 132px; height: auto; opacity: 0.92; margin-bottom: 10px; }
.boot-name { font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 0.9; letter-spacing: 0.03em; color: var(--bone); }
.boot-bar { width: min(58vw, 220px); height: 2px; margin-top: 6px; background: var(--line); overflow: hidden; }
.boot-bar i { display: block; height: 100%; background: var(--brass-bright); transform: scaleX(0); transform-origin: left center; transition: transform 0.25s ease-out; }
.boot-note { font-size: 0.6875rem; max-width: 30ch; line-height: 1.5; }
