/* Fantasy Gambling pitch — four scenes: the price, the season, the loop, the board. */

body.pitch {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.pitch .shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.1rem 0.9rem 6.4rem;
  width: 100%;
}

.pitch .shell.is-wide {
  max-width: 1180px;
}

.pitch .scene {
  display: none;
}

.pitch .scene.is-on {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  animation: pgIn 0.34s ease both;
}

/* Board scenes stay pinned to the top so they never jump mid-season. */
.pitch .scene[data-scene="season"].is-on,
.pitch .scene[data-scene="loop"].is-on,
.pitch .scene[data-scene="demo"].is-on {
  justify-content: flex-start;
}

.pitch .scene[data-scene="coin"].is-on,
.pitch .scene[data-scene="deal"].is-on {
  justify-content: safe center;
}

@keyframes pgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.pitch .scene h1,
.pitch .scene h2 {
  margin: 0 0 0.5rem;
  text-wrap: balance;
}

.pitch .scene .lede {
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0 0 0.95rem;
  max-width: 46rem;
}

.pitch .scene .lede strong {
  color: var(--ink);
}

.pitch .scene .lede em {
  font-style: normal;
  color: var(--accent);
  font-weight: 600;
}

.is-bad {
  color: var(--danger);
}

.is-good {
  color: var(--accent);
}

.caption {
  font-size: 0.75rem;
  color: #6f6f6f;
  margin: 0.7rem 0 0;
  line-height: 1.5;
  max-width: 48rem;
}

.caption strong {
  color: #a8a8a8;
}

.caption em {
  font-style: italic;
  color: #8a8a8a;
}

.beat {
  margin: 0.7rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 0.75rem;
  min-height: 2.6rem;
}

.beat strong {
  color: var(--accent);
}

/* ---------- readout strip ---------- */

.readout {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  grid-template-columns: repeat(2, 1fr);
}

.readout.three {
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 560px) {
  .readout.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

.readout > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  min-width: 0;
}

.readout span {
  display: block;
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.readout b {
  display: block;
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(1rem, 3.4vw, 1.35rem);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.readout b small {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 0.3rem;
  white-space: nowrap;
}

/* ---------- button rows ---------- */

.speeds {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.speeds button {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.speeds button:hover:not(:disabled) {
  border-color: #4a4a4a;
}

.speeds button.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.speeds button.ghost {
  background: none;
  color: var(--muted);
  font-weight: 500;
}

.speeds button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.speeds .hint {
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: auto;
  text-align: right;
}

@media (max-width: 560px) {
  .speeds .hint {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}

/* ---------- scene 1: the coin ---------- */

.coin-wrap {
  display: grid;
  gap: 0.9rem;
  align-items: start;
}

@media (min-width: 720px) {
  .coin-wrap {
    grid-template-columns: 16.5rem 1fr;
    gap: 1.2rem;
  }
}

.coin-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* The coin sits dead centre and the batch sizes ring it, so the coin itself
   reads as the x1 button without needing a label for it. */
.coin-ring {
  position: relative;
  width: 100%;
  max-width: 16.5rem;
  height: 15.5rem;
  flex: none;
}

.coin {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  width: 8rem;
  height: 8rem;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  perspective: 700px;
}

.coin-hint {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}

.coin-batch {
  position: absolute;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, transform 0.14s;
}

.coin-batch:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.06);
}

.coin-batch.at-l {
  left: 0;
  top: 47%;
  transform: translateY(-50%);
}

.coin-batch.at-l:hover {
  transform: translateY(-50%) scale(1.06);
}

.coin-batch.at-r {
  right: 0;
  top: 47%;
  transform: translateY(-50%);
}

.coin-batch.at-r:hover {
  transform: translateY(-50%) scale(1.06);
}

.coin-batch.at-b {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.coin-batch.at-b:hover {
  transform: translateX(-50%) scale(1.06);
}

.coin-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.3, 0.9, 0.35, 1);
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  backface-visibility: hidden;
  border: 3px solid;
}

.coin-face b {
  font-family: Oswald, Impact, sans-serif;
  font-size: 2.5rem;
  line-height: 1;
}

.coin-face i {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.coin-face.is-h {
  background: #1b2410;
  border-color: var(--accent);
  color: var(--accent);
}

.coin-face.is-t {
  background: #241014;
  border-color: var(--danger);
  color: var(--danger);
  transform: rotateY(180deg);
}

.coin.is-spin .coin-inner {
  transition: transform 0.42s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.coin:hover .coin-inner {
  filter: brightness(1.08);
}

.coin-call {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  font-family: Oswald, Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  min-height: 1.2rem;
  text-align: center;
  pointer-events: none;
}

.coin-call.is-h {
  color: var(--accent);
}

.coin-call.is-t {
  color: var(--danger);
}

.coin-tally {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.coin-reset {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0;
  cursor: pointer;
}

.coin-reset:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.coin-tally b {
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.coin-tally .is-h b {
  color: var(--accent);
}

.coin-tally .is-t b {
  color: var(--danger);
}

.coin-right {
  min-width: 0;
}

/* "Expected value" is too long to clip, so it wraps instead. */
.coin-right .readout span {
  white-space: normal;
  overflow: visible;
}

@media (min-width: 720px) {
  .coin-right .plot {
    height: clamp(190px, 30vh, 290px);
  }
}

/* ---------- the plot ---------- */

.plot {
  position: relative;
  flex: none;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: clamp(160px, 28vh, 245px);
  overflow: hidden;
}

.plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.p-zero {
  stroke: #3a3a3a;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.p-ev {
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  vector-effect: non-scaling-stroke;
}

.p-act {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.p-tag {
  position: absolute;
  z-index: 2;
  right: 0.45rem;
  transform: translateY(-50%);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: #131313;
  white-space: nowrap;
  pointer-events: none;
  transition: top 0.25s ease;
}

.p-tag[hidden] {
  display: none;
}

.p-tag.is-zero {
  color: #7a7a7a;
  left: 0.45rem;
  right: auto;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.p-tag.is-ev {
  color: var(--danger);
}

.p-tag.is-act {
  color: var(--accent-ink);
  background: var(--accent);
}

/* ---------- scene 2 knobs ---------- */

.knobs {
  display: grid;
  gap: 0.55rem 1.1rem;
  margin-bottom: 0.4rem;
}

@media (min-width: 620px) {
  .knobs {
    grid-template-columns: 1fr 1fr;
  }
}

.knobs label {
  display: grid;
  gap: 0.25rem;
}

.knobs label > span {
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.knobs label > span b {
  font-family: Oswald, Impact, sans-serif;
  color: var(--accent);
  font-size: 0.92rem;
  margin-left: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.knobs input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: none;
  cursor: pointer;
  margin: 0;
}

.knobs input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: #2c2c2c;
}

.knobs input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #2c2c2c;
}

.knobs input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

.knobs input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
}

.knobs input[type="range"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.knob-sum {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.knob-sum b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- the shared stage (scenes 2 and 3) ---------- */

.stage {
  position: relative;
  flex: none;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: clamp(310px, 42vh, 400px);
  overflow: hidden;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.nodes {
  position: absolute;
  inset: 0;
}

.node {
  position: absolute;
  left: 0;
  top: 0;
  width: 4.4rem;
  margin-left: -2.2rem;
  margin-top: -1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
  pointer-events: none;
  will-change: transform;
}

.node .av {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.82rem;
  line-height: 1;
  border: 1.5px solid #4a4a4a;
  background: #191919;
  color: #c9c9c9;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.node .nm {
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a7a7a;
  line-height: 1;
}

.node .cash {
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.76rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #c9c9c9;
  white-space: nowrap;
}

.node.is-up .av {
  border-color: var(--accent);
  color: var(--accent);
}

.node.is-up .cash {
  color: var(--accent);
}

.node.is-down .av {
  border-color: #6b2b39;
  color: #d98a99;
}

.node.is-down .cash {
  color: #d98a99;
}

.node.is-dead {
  opacity: 0.4;
}

.node.is-dead .av {
  border-color: #3a3a3a;
  color: #6f6f6f;
  background: #131313;
}

.node.is-dead .cash {
  color: var(--danger);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.node.is-alex .av {
  border-width: 2.5px;
  box-shadow: 0 0 0 3px #0b0b0b, 0 0 0 4px #3a3a3a;
}

.node.is-alex .nm {
  color: #c9c9c9;
}

/* the house sits on the same stage */

.node.is-house {
  width: 5.6rem;
  margin-left: -2.8rem;
  transition: opacity 0.5s ease;
}

.node.is-house .av {
  width: 2.5rem;
  height: 2.5rem;
  border-color: var(--danger);
  background: #1a1012;
}

.node.is-house .av svg {
  width: 1.35rem;
  height: 1.35rem;
}

.node.is-house .nm {
  color: var(--danger);
  font-weight: 700;
}

.node.is-house .cash {
  color: var(--danger);
  font-size: 0.95rem;
}

/* The house is coloured by its own profit and loss like everyone else, so a
   green house surrounded by red friends tells the story on its own. */
.node.is-house.is-up .av {
  border-color: var(--accent);
  background: #16200c;
}

.node.is-house.is-up .nm,
.node.is-house.is-up .cash {
  color: var(--accent);
}

.node.is-house.is-gone {
  opacity: 0;
}

/* ---------- run / replay cover ---------- */

.sim-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  margin: 0;
  padding: 1rem;
  width: 100%;
  background: rgba(11, 11, 11, 0.72);
  cursor: pointer;
  font: inherit;
  color: inherit;
  backdrop-filter: blur(1.5px);
}

.sim-cover[hidden] {
  display: none;
}

.sim-play {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-family: Oswald, Impact, sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  letter-spacing: 0.02em;
  line-height: 1;
  animation: pgPulse 1.15s ease infinite;
}

.sim-cover:hover .sim-play {
  filter: brightness(1.06);
}

.sim-sub {
  color: #c9c9c9;
  font-size: 0.82rem;
  text-align: center;
  max-width: 26rem;
}

@keyframes pgPulse {
  50% {
    transform: scale(1.035);
  }
}

/* ---------- the settle panel ---------- */

.slam {
  margin-top: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: #1a1012;
  border: 1px solid #5a2230;
  animation: pgIn 0.4s ease both;
}

.slam[hidden] {
  display: none;
}

.slam.is-good {
  background: #14180c;
  border-color: #2e3a14;
}

.slam-big {
  margin: 0 0 0.35rem;
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.slam-big .n {
  color: var(--danger);
}

.slam.is-good .slam-big .n {
  color: var(--accent);
}

.slam p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #c2c2c2;
}

.slam p strong {
  color: var(--ink);
}

.slam .odds-note {
  color: #9a9a9a;
  font-size: 0.85rem;
}

.slam-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

.slam-go {
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 9px;
  padding: 0.6rem 1.05rem;
  font-family: Oswald, Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  animation: pgPulse 1.15s ease infinite;
}

.slam-go:hover {
  filter: brightness(1.06);
}

.pitch .note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.sidequest {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed #4a4a4a;
  padding-bottom: 1px;
}

.sidequest:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.sidequest.lg {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  padding: 0.55rem 2.1rem 0.55rem 0.8rem;
  border: 1px dashed #4a4a4a;
  border-radius: 9px;
  color: var(--muted);
}

.sidequest.lg b {
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.sidequest.lg::after {
  content: "\2192";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
}

.sidequest.lg:hover {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.sidequest.lg:hover b {
  color: var(--accent);
}

/* ---------- scene 4 ---------- */

.week-strip {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
  display: grid;
  gap: 0.4rem;
  counter-reset: ws;
}

@media (min-width: 620px) {
  .week-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* In the deck the theater sizes to its contents. Its own caption grows to
   fill on the standalone demo page, which here would push the slide's caption
   under the dock. */
.scene[data-scene="demo"] .fgd-theater {
  flex: none;
  min-height: 0;
}

.scene[data-scene="demo"] .fgd-caption {
  flex: none;
}

.scene[data-scene="demo"] .caption {
  margin-top: 0.55rem;
}

.week-strip li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.week-strip strong {
  display: block;
  color: var(--accent);
  font-family: Oswald, Impact, sans-serif;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

.pitch .pairing {
  font-size: 0.93rem;
}

/* site.css pushes .site-cta right for the header; in a link row it leads. */
.cta-row .site-cta {
  margin-left: 0;
}

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: #0b0b0bee;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 0.55rem 0.9rem calc(0.55rem + env(safe-area-inset-bottom));
}

.dock-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
}

.nav-btn {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  min-width: 5rem;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav-btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
  margin-left: auto;
}

.nav-btn.pulse {
  animation: pgPulse 1.1s ease infinite;
}

.count {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 2.6rem;
  font-variant-numeric: tabular-nums;
}

.dots {
  display: flex;
  gap: 0.3rem;
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3a3a;
  display: block;
}

.dots i.is-on {
  background: var(--accent);
}

/* ---------- narrow screens ---------- */

@media (max-width: 620px) {
  .pitch .shell {
    padding: 0.85rem 0.75rem 6rem;
  }

  /* The coin scene has to fit a phone without hiding the flip buttons. */
  .pitch .scene h1 {
    font-size: clamp(1.6rem, 7.4vw, 2.1rem);
  }

  .pitch .scene .lede {
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 0.7rem;
  }

  .coin-wrap {
    gap: 0.6rem;
  }

  .coin-left {
    gap: 0.35rem;
  }

  /* Not enough room to centre it, so pin the top and let it scroll. */
  .pitch .scene[data-scene="coin"].is-on {
    justify-content: flex-start;
  }

  .coin-ring {
    max-width: 19rem;
    height: 12.4rem;
  }

  .coin {
    width: 5.8rem;
    height: 5.8rem;
  }

  .coin-face b {
    font-size: 1.8rem;
  }

  .coin-face i {
    font-size: 0.62rem;
  }

  .coin-call {
    font-size: 0.88rem;
  }

  .coin-batch {
    padding: 0.5rem 0.72rem;
    font-size: 0.86rem;
  }

  .coin-hint {
    bottom: 2.2rem;
    font-size: 0.56rem;
  }

  .plot {
    height: clamp(140px, 22vh, 190px);
  }

  .beat {
    font-size: 0.88rem;
  }

  .node {
    width: 3.9rem;
    margin-left: -1.95rem;
  }

  .node .av {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.74rem;
  }

  .node .cash {
    font-size: 0.68rem;
  }

  .node .nm {
    font-size: 0.55rem;
  }
}

/* ---------- the side-quest page ---------- */

.backbar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding: 0.42rem 0.85rem 0.42rem 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.14s, color 0.14s;
}

.backbar span {
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}

.backbar:hover,
.backbar:hover span {
  border-color: var(--accent);
  color: var(--accent);
}

.backbar.solid {
  margin-bottom: 0;
}

/* ---------- the legacy chooser ---------- */

.vlist {
  display: grid;
  gap: 0.7rem;
  margin: 1.1rem 0 1.3rem;
}

@media (min-width: 780px) {
  .vlist {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vcard {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}

.vcard:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.vcard h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.15;
}

.vcard p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.vgo {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: Oswald, Impact, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.legbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
}

.legbar button {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.legbar button:hover {
  border-color: #4a4a4a;
}

.legbar button.is-on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.meter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.meter-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.meter-head b {
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.meter-bar {
  display: flex;
  height: 16px;
  border-radius: 5px;
  overflow: hidden;
  background: #141414;
}

.meter-bar i {
  display: block;
  transition: width 0.3s ease;
}

.m-back {
  background: #3a4a1e;
}

.m-cut {
  background: var(--danger);
}

.meter-legs {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.meter-legs b {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-left: 0.2rem;
}

.meter-legs .is-bad b {
  color: var(--danger);
}

.odds-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.odds-box {
  flex: 1 1 8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}

.odds-box span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.odds-box b {
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(1.2rem, 4.4vw, 1.6rem);
  line-height: 1;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.odds-box.is-fair b {
  color: var(--accent);
}

.odds-box.is-hit b {
  color: var(--ink);
}

.odds-vs {
  align-self: center;
  color: #5a5a5a;
  font-size: 0.8rem;
}

.chase-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

table.chase {
  min-width: 30rem;
  margin: 0;
}

table.chase th,
table.chase td {
  padding: 0.55rem 0.85rem;
}

table.chase tbody tr:last-child td {
  border-bottom: 0;
}

table.chase .num {
  font-family: Oswald, Impact, sans-serif;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

table.chase tr.is-last td {
  background: #1a1012;
}

.doc .page section:first-of-type {
  border-top: 1px solid var(--line);
  padding-top: 1.55rem;
  margin-top: 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .sim-play,
  .slam-go,
  .nav-btn.pulse {
    animation: none;
  }

  .pitch .scene.is-on,
  .slam {
    animation: none;
  }

  .coin-inner {
    transition: none;
  }
}
