@font-face {
  font-family: Roboto;
  src: url("/assets/slot-ccac7e185960fd8b/assets/roboto-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Roboto;
  src: url("/assets/slot-ccac7e185960fd8b/assets/roboto-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-2199,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #170f13;
  color: #fff0d5;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  --amber: #ffc579;
  --paper: #fff0d5;
  --muted: #d1b3a5;
  --stroke: #8b594b;
  --surface: #2a181a;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 45% 3%, #563024 0, transparent 57%),
    linear-gradient(#1d1216, #140e13);
}
button, input { font: inherit; }
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; }
button:focus-visible, .stake-options label:has(input:focus-visible) {
  outline: 2px solid #fff1b4;
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.game {
  max-width: 1160px;
  margin-inline: auto;
  padding: max(5px, env(safe-area-inset-top, 0px))
    max(7px, env(safe-area-inset-right, 0px))
    max(5px, env(safe-area-inset-bottom, 0px))
    max(7px, env(safe-area-inset-left, 0px));
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 51px;
  padding: 0 2px 5px;
}
.brand, .top-actions, .dialog-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand h1 {
  margin: -1px 0 0;
  color: #ffe5b5;
  font-family: Georgia, serif;
  font-size: clamp(28px, 8vw, 43px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.065em;
  text-shadow: 0 2px 0 #783e30, 0 3px 8px #1b0b0c;
}
.brand-name {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  line-height: 1;
  text-transform: uppercase;
  color: #ffc789;
}
.brand-seal {
  display: block;
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid #e5a95e;
  border-radius: 12px 12px 15px 15px;
  background: radial-gradient(circle at 48% 30%, #805031, #382025 70%);
  box-shadow: inset 0 0 0 1px #251417, 0 3px 7px #190b0c;
}
.brand-boar {
  position: absolute;
  inset: 1% auto auto -51%;
  width: 168%;
  max-width: none;
  filter: drop-shadow(0 2px 2px #160a0c);
}
.brand-mug {
  position: absolute;
  inset: auto -2% -3% auto;
  width: 54%;
  transform: rotate(13deg);
  filter: drop-shadow(0 1px 2px #160a0c);
}
.demo-label {
  color: #f4cfaa;
  font-size: 11px;
  font-weight: 750;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #875647;
  border-radius: 12px;
  background: linear-gradient(#523229, #301d20);
  color: var(--paper);
  font-size: 20px;
  font-weight: 800;
}
.sound-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 23px;
}
.sound-icon::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 1px;
  width: 12px;
  background: currentColor;
  clip-path: polygon(0 33%, 40% 33%, 100% 0, 100% 100%, 40% 67%, 0 67%);
}
.sound-icon i {
  position: absolute;
  inset: 3px 1px 3px auto;
  width: 12px;
  border-inline-end: 2px solid currentColor;
  border-radius: 50%;
}
.sound-icon i::before {
  content: "";
  position: absolute;
  inset: 3px 3px 3px auto;
  width: 6px;
  border-inline-end: 2px solid currentColor;
  border-radius: 50%;
}
#sound-toggle[aria-pressed="false"] { color: #d1ac99; }
#sound-toggle[aria-pressed="false"] .sound-icon i { display: none; }
#sound-toggle[aria-pressed="false"] .sound-icon::after {
  content: "";
  position: absolute;
  inset: 1px auto 1px 11px;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 2px 0 #382324;
  transform: rotate(-42deg);
}
#sound-toggle:disabled { opacity: .6; }

.race, .controls {
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: linear-gradient(130deg, #432820, var(--surface) 60%);
  box-shadow: inset 0 1px #fcd28f29, 0 6px 12px #11090b65;
}
.race { padding: 6px; }
.race-hud {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  padding: 2px 5px 5px;
  min-height: 46px;
  line-height: 1.1;
}
.hud-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.current strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(28px, 8vw, 42px);
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--amber);
}
.current strong, .next strong { font-variant-numeric: tabular-nums; }
.next { text-align: right; }
.next strong { font-size: 18px; }
#next-risk { color: #f5c2a0; font-size: 11px; font-weight: 650; }
#next-risk:not(:empty) { margin-inline-start: 4px; }
#next-risk:not(:empty)::before { content: "· "; }
#step-preview {
  display: block;
  margin-top: 2px;
  color: #e2c2a4;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}
#step-preview:empty { display: none; }
.race[data-feedback="rise"] .current strong { animation: hud-rise 340ms ease-out; }
.game:has(.race[data-feedback="payout"]) #payout { animation: hud-rise 450ms ease-out; }
.race-hud.has-result > :is(.current, .next) { display: none; }
.round-result {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid #c6a26a;
  border-radius: 8px;
  color: #ffe3ac;
  background: linear-gradient(112deg, #5c391f, #2e271c);
}
.round-result[data-kind="crashed"] {
  border-color: #ca7765;
  color: #ffe5dc;
  background: linear-gradient(112deg, #672d2a, #352021);
}
.round-result-copy, .round-result-total { display: grid; gap: 2px; }
.round-result-copy strong { font-size: clamp(13px, 4vw, 19px); }
.round-result span { color: #ffdfc3; font-size: 11px; font-weight: 650; }
.round-result-total { text-align: right; }
.round-result-total strong {
  font-size: clamp(18px, 5.3vw, 27px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.race[data-feedback="payout"] .round-result { animation: result-credit 540ms ease-out; }
.race[data-feedback="payout"] .round-result::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(107deg, transparent 31%, #ffda8663 48%, transparent 66%);
  transform: translateX(-100%);
  animation: result-shine 600ms ease-out;
}
.race[data-feedback="crash"] .round-result { animation: result-impact 360ms ease-out; }
@keyframes result-credit {
  0% { transform: scale(.98); }
  32% { box-shadow: inset 0 0 20px #e9b7654f, 0 0 12px #edb65a65; }
  100% { transform: none; }
}
@keyframes result-shine { to { transform: translateX(100%); } }
@keyframes result-impact {
  0% { box-shadow: inset 0 0 18px #ff80588f; transform: translateY(-2px); }
  40% { transform: translateY(1px); }
  100% { transform: none; }
}

.track {
  --origin: 18%;
  --stride: 9.142857%;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid #a66a41;
  border-radius: 10px;
  background: #27191d;
  box-shadow: inset 0 0 0 1px #110a0b;
}
.progress {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  column-gap: 3px;
  height: 26px;
  margin: 0;
  padding: 0 5px;
  list-style: none;
  border-bottom: 1px solid #a8754b;
  background:
    repeating-linear-gradient(95deg, #ffc77906 0 1px, transparent 1px 5px),
    linear-gradient(#533728, #31231c);
}
.progress li {
  display: grid;
  place-items: center;
  width: min(68px, 100%);
  height: 20px;
  border: 1px solid #bf94647a;
  border-radius: 6px;
  color: #f6d7af;
  background: #261b19;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.progress li:is(.is-complete, [data-state="complete"]) {
  color: #2a160c;
  border-color: #ffe4ad;
  background: linear-gradient(#ffdf9a, #d2934e);
}
.progress li:is(.is-next, [data-state="next"]) {
  color: #fff3d8;
  border-color: #ffca7d;
  box-shadow: 0 0 7px #ffb1588c;
}
.progress li:is(.is-crash, [data-state="crash"]) {
  color: #ffebe1;
  border-color: #ff9a7a;
  background: #7b3028;
  box-shadow: 0 0 7px #e8604e85;
}

.lanes {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, #0f0b1270, transparent 35% 72%, #10111772),
    url("/assets/slot-ccac7e185960fd8b/assets/tavern-duel.webp") center / auto 100% no-repeat,
    linear-gradient(#59331d, #281a1d 50%, #1e3b38 50%, #152728);
}
.lane {
  position: relative;
  height: clamp(116px, 40vw, 176px);
  isolation: isolate;
  border-bottom: 2px solid #c88753;
  box-shadow: inset 2px 0 var(--lane), inset 0 -5px 9px #0e09095e;
}
.lane:last-child { border-bottom: 0; }
.lane-heading {
  position: absolute;
  z-index: 3;
  inset: 4px 5px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1;
}
.lane-heading strong, .lane-status {
  padding: 3px 5px;
  border: 1px solid #ffe0b02a;
  border-radius: 5px;
  background: #170f16e8;
  box-shadow: 0 1px 3px #100a0ae0;
  white-space: nowrap;
}
.lane-heading strong {
  color: var(--lane);
  letter-spacing: .02em;
}
.lane-status {
  max-width: 72%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 720;
  color: var(--paper);
}
.lane.is-leading .lane-heading strong {
  border-color: var(--lane);
  box-shadow: 0 0 9px color-mix(in srgb, var(--lane), transparent 44%);
}
.lane:has(.runner[data-state="fallen"]) .lane-status {
  color: #ffe9df;
  border-color: #eb8a6e;
  background: #722f2a;
}
.lane-rail {
  position: absolute;
  z-index: 0;
  inset: auto calc(var(--origin) - 3px) 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 8px;
  pointer-events: none;
}
.lane-rail::before, .lane-rail::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 3px 3px auto;
  height: 2px;
  border-radius: 2px;
  background: var(--lane);
  box-shadow: 0 0 7px var(--lane);
}
.lane-rail::before { opacity: .38; }
.lane-rail::after {
  opacity: .86;
  transform: scaleX(calc(var(--step, 0) / 7));
  transform-origin: left;
  transition: transform 255ms ease-out;
}
.lane-rail i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--lane);
  border-radius: 50%;
  background: #1d1314;
  box-shadow: 0 0 5px color-mix(in srgb, var(--lane), transparent 35%);
}
.lane-rail i:first-child, .lane-rail i:last-child { background: var(--lane); }
.lane-start, .lane-finish {
  position: absolute;
  inset-block-end: 3px;
  z-index: 2;
  padding: 2px 3px;
  border-radius: 4px;
  background: #170f16ef;
  color: var(--lane);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1;
  text-transform: uppercase;
}
.lane-start { inset-inline-start: 3px; }
.lane-finish { inset-inline-end: 3px; }
.lane-finish::after {
  content: "";
  display: inline-block;
  margin-inline-start: 3px;
  width: 6px;
  height: 6px;
  background: conic-gradient(var(--lane) 25%, transparent 25% 50%, var(--lane) 50% 75%, transparent 75%) 0 0 / 6px 6px;
}
.runner {
  --step: 0;
  --sprite: clamp(84px, 30vw, 148px);
  --cup-raised: translate(var(--cup-x, -28%), var(--cup-y, -120%)) rotate(-31deg);
  --cup-spilled: translate(-110%, 14%) rotate(112deg);
  --fall-start-clearance: max(0%, calc(10% - var(--step) * 14%));
  --fall-backshift: calc(1% - var(--step) * 5.9%);
  --fall-floor-offset: 0%;
  --fall-rest-x: calc(12% - var(--step) * 1.35%);
  --fall-landing: translate(var(--fall-backshift), calc(-10% - var(--fall-floor-offset))) scale(1.03,.58) rotate(54deg);
  position: absolute;
  z-index: 1;
  left: calc(var(--origin) + var(--step) * var(--stride));
  bottom: 12px;
  width: var(--sprite);
  height: var(--sprite);
  transform: translateX(-50%);
  transition: left 255ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.lane[data-runner="rival"] { --cup-x: -16%; --cup-y: -127%; }
.lane[data-rival="shilo"] { --cup-x: -24%; --cup-y: -119%; }
.lane[data-rival="sedoy"] { --cup-x: -12%; --cup-y: -116%; }
.runner[data-motion="land"] {
  transition-duration: var(--beat-duration, 370ms);
  transition-timing-function: cubic-bezier(.35,.24,.63,.81);
  transition-timing-function: linear(0, .10 16%, .39 41%, .83 77%, .96 92%, 1);
}
.runner[data-motion="fall"] {
  transition-duration: calc(var(--beat-duration, 460ms) * .41);
  transition-timing-function: cubic-bezier(.52,.06,.7,.93);
}
@supports (width: 1cqw) {
  .runner {
    left: var(--origin);
    transform: translateX(calc(-50% + var(--step) * 9.142857cqw));
    transition: transform 255ms cubic-bezier(.2,.8,.2,1);
  }
}
.runner-visual {
  position: relative;
  width: 100%;
  height: 100%;
}
.runner-visual::before {
  content: "";
  position: absolute;
  inset: auto 21% -5px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--lane), transparent 70%);
  opacity: .68;
}
.runner-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px #10050aec) drop-shadow(0 0 1px #ffd69c73);
  transform-origin: 54% 85%;
  transition: opacity 80ms ease-out;
}
.runner-walk-art {
  position: absolute;
  inset: 0;
  visibility: hidden;
  background-image: var(--walk-art, none);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  filter: drop-shadow(0 3px 3px #10050aec) drop-shadow(0 0 1px #ffd69c73);
}
.runner[data-motion="land"][data-walk="ready"] .runner-walk-art {
  visibility: visible;
  animation:
    walk-frames var(--beat-duration, 370ms) step-end both,
    walk-out var(--beat-duration, 370ms) linear both;
}
.runner[data-motion="land"][data-walk="ready"] .runner-visual::before {
  animation: walk-shadow var(--beat-duration, 370ms) linear both;
}
.runner-trip-art, .runner-fall-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  visibility: hidden;
  filter: drop-shadow(0 3px 3px #10050aec);
  transition: opacity 64ms ease-in-out, visibility 0s linear 64ms;
}
.runner-trip-art {
  transform-origin: 46% 91%;
  transform: translateX(calc(3% - var(--step) * 1.1%));
}
.runner-fall-art {
  transform: translateX(var(--fall-rest-x));
  transform-origin: 65% 96%;
}
.runner:is([data-pose="trip"], [data-pose="fall"]) .runner-art {
  opacity: 0;
  transition-duration: 64ms;
  transition-timing-function: ease-in-out;
}
.runner[data-pose="trip"] .runner-trip-art, .runner[data-pose="fall"] .runner-fall-art {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}
.runner[data-motion="fall"] .runner-trip-art {
  animation: trip-transfer var(--beat-duration, 460ms) linear both;
}
.runner[data-motion="fall"] .runner-fall-art {
  animation: fall-settle var(--beat-duration, 460ms) linear both;
}
.runner[data-motion="fall"][data-pose="fall"] :is(.runner-trip-art, .runner-art) {
  transition: opacity 32ms ease-out, visibility 0s linear 32ms;
}
.runner[data-motion="fall"][data-pose="fall"] .runner-fall-art {
  transition: opacity 32ms ease-in;
}
.runner-mug {
  position: absolute;
  z-index: 1;
  left: 59%;
  bottom: 10%;
  width: 35%;
  aspect-ratio: 1;
  background: url("/assets/slot-ccac7e185960fd8b/assets/mug.webp") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px #1a0b0bc0);
  transform: rotate(9deg);
}
.runner[data-motion="lift"] .runner-art { animation: lift-pose var(--beat-duration, 125ms) ease-out both; }
.runner[data-motion="lift"] .runner-mug { animation: lift-mug var(--beat-duration, 125ms) ease-in-out both; }
.runner[data-motion="sip"] .runner-art { animation: sip-pose var(--beat-duration, 245ms) ease-in-out both; }
.runner[data-motion="sip"] .runner-mug { transform: var(--cup-raised); }
.runner[data-pose="sip"] .runner-mug { visibility: hidden; }
.runner[data-motion="land"] .runner-art { animation: land-pose var(--beat-duration, 370ms) ease-out both; }
.runner[data-motion="land"][data-walk="ready"] .runner-art {
  animation: walk-in var(--beat-duration, 370ms) linear both;
}
.runner[data-motion="land"] .runner-mug { animation: return-mug var(--beat-duration, 370ms) ease-out both; }
.runner-foam {
  position: absolute;
  z-index: 2;
  inset: 28% auto auto 68%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff7dc;
  box-shadow: 7px -6px 0 -1px #ffe4a1, -5px -5px 0 -1px #fff7dc, 12px -2px 0 -1px #ffd78c;
  opacity: 0;
}
.runner[data-motion="sip"] .runner-foam { animation: foam-pop var(--beat-duration, 245ms) ease-out both; }
.runner[data-motion="fall"] .runner-foam { animation: foam-fall var(--beat-duration, 460ms) linear both; }
.runner-spill {
  position: absolute;
  z-index: 2;
  inset: auto 34% 1% auto;
  width: 25%;
  height: 10%;
  border-radius: 62% 35% 65% 38%;
  background: radial-gradient(ellipse at 40% 20%, #fff0bd 4%, #ffb55c 33%, #c76426 72%);
  box-shadow: 5px -3px 0 -2px #f6cf8d, -6px 2px 0 -3px #ffd086;
  opacity: 0;
}
.runner-crash-cue {
  position: absolute;
  z-index: 3;
  inset: auto auto 34% 0;
  padding: 4px 6px;
  border: 1px solid #ffb19a;
  border-radius: 5px;
  background: #792b24;
  color: #fff5e8;
  font-size: clamp(9px, 2.7vw, 14px);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 2px 5px #270e0ed9;
  visibility: hidden;
}
.runner-impact {
  position: absolute;
  z-index: 2;
  inset: auto 25% -8px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #fffbda 2%, var(--lane) 20%, transparent 65%);
  opacity: 0;
}
.runner-impact::before, .runner-impact::after {
  content: "";
  position: absolute;
  inset: 30% auto auto 28%;
  width: 11px;
  height: 1px;
  background: var(--lane);
  transform: rotate(24deg);
}
.runner-impact::after { inset-inline: auto 26%; transform: rotate(-24deg); }
.runner[data-motion="land"] .runner-impact { animation: step-impact var(--beat-duration, 370ms) ease-out both; }
.runner[data-motion="fall"] .runner-impact {
  --lane: #ffb08e;
  inset: auto 14% -4px 24%;
  animation: impact var(--beat-duration, 460ms) ease-out both;
}
.runner[data-state="fallen"] .runner-art {
  transform-origin: 48% 92%;
  transform: var(--fall-landing);
}
.runner[data-state="fallen"] .runner-mug { transform: var(--cup-spilled); }
.runner[data-state="fallen"] .runner-spill { opacity: .9; }
.runner[data-state="fallen"] .runner-crash-cue { visibility: visible; }
.runner[data-motion="fall"] .runner-art { animation: fall-pose var(--beat-duration, 460ms) linear both; }
.runner[data-motion="fall"] .runner-mug { animation: spill-mug var(--beat-duration, 460ms) linear both; }
.runner[data-motion="fall"] .runner-spill { animation: spill-pool var(--beat-duration, 460ms) ease-out both; }
.runner[data-motion="fall"] .runner-crash-cue { animation: crash-cue var(--beat-duration, 460ms) ease-out both; }
.runner[data-motion="fall"]:not([data-contact="true"]) :is(.runner-impact, .runner-spill, .runner-crash-cue) {
  visibility: hidden;
}
.runner:is([data-state="cashed"], [data-state="finished"]) .runner-art {
  filter: drop-shadow(0 0 4px #ffd79f) drop-shadow(0 3px 3px #10050aec);
}
@keyframes lift-pose {
  to { transform: translateY(-2%) rotate(-4deg); }
}
@keyframes lift-mug {
  0% { transform: rotate(9deg); }
  46% { transform: translate(4%, -49%) rotate(-9deg); }
  100% { transform: var(--cup-raised); }
}
@keyframes sip-pose {
  0%, 100% { transform: translateY(-2%) scale(.965); }
  54% { transform: translateY(-3%) rotate(-3deg) scale(.97); }
}
@keyframes land-pose {
  0% { transform: translateY(-2%) rotate(-3deg); }
  36% { transform: translateY(-10%) rotate(5deg); }
  68% { transform: translateY(2%) rotate(-2deg) scale(1.03,.95); }
  100% { transform: none; }
}
@keyframes walk-frames {
  0% { background-position: 0 0; }
  41% { background-position: 100% 0; }
  77% { background-position: 0 100%; }
  92%, 100% { background-position: 100% 100%; }
}
@keyframes walk-out {
  0%, 95% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes walk-in {
  0%, 95% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes walk-shadow {
  0%, 100% { opacity: .68; transform: none; }
  24% { opacity: .54; transform: scaleX(.85); }
  76% { opacity: .9; transform: scaleX(1.12); }
}
@keyframes return-mug {
  0% { transform: var(--cup-raised); }
  40% { transform: translate(8%, -69%) rotate(-10deg); }
  76% { transform: translate(4%, 3%) rotate(15deg); }
  100% { transform: rotate(9deg); }
}
@keyframes fall-pose {
  0% { transform: translate(calc(var(--fall-start-clearance) * .45), -2%) rotate(-4deg); }
  19% { transform: translate(var(--fall-start-clearance), -2%) scale(.99,.96) rotate(-6deg); }
  33% { transform: translate(calc(var(--fall-start-clearance) * .25), -3%) scale(1.02,.89) rotate(10deg); }
  54% { transform: translate(calc(2% - var(--step) * 2%), calc(-6% - var(--fall-floor-offset))) scale(1.02,.76) rotate(26deg); }
  72% { transform: translate(var(--fall-backshift), calc(-8% - var(--fall-floor-offset))) scale(1.055,.54) rotate(54deg); }
  87% { transform: translate(var(--fall-backshift), calc(-12% - var(--fall-floor-offset))) scale(1.03,.59) rotate(52deg); }
  100% { transform: var(--fall-landing); }
}
@keyframes trip-transfer {
  0%, 32% { transform: translateX(calc(3% - var(--step) * 1.1%)); }
  52% { transform: translate(calc(var(--fall-rest-x) - 7%), -3%) scale(1.02,.91) rotate(6deg); }
  72%, 100% { transform: translate(calc(var(--fall-rest-x) - 5%), -4%) scale(1.04,.66) rotate(16deg); }
}
@keyframes fall-settle {
  0%, 72% { transform: translate(calc(var(--fall-rest-x) - 9%), -7%) rotate(-8deg) scale(.97,1.04); }
  80% { transform: translate(calc(var(--fall-rest-x) - 4%), 0%) rotate(-2deg) scale(1.02,.97); }
  92% { transform: translate(calc(var(--fall-rest-x) - 1%), -1%) scale(1.005,1.01); }
  100% { transform: translateX(var(--fall-rest-x)); }
}
@keyframes spill-mug {
  0% { transform: var(--cup-raised); }
  19% { transform: translate(calc(var(--cup-x, -28%) - 4%), calc(var(--cup-y, -120%) + 8%)) rotate(-36deg); }
  32% { transform: translate(calc(var(--cup-x, -28%) - 8%), calc(var(--cup-y, -120%) + 21%)) rotate(-18deg); }
  46% { transform: translate(calc(var(--cup-x, -28%) - 42%), calc(var(--cup-y, -120%) + 12%)) rotate(13deg); }
  60% { transform: translate(calc(var(--cup-x, -28%) - 56%), -68%) rotate(53deg); }
  77% { transform: translate(-92%, 14%) rotate(108deg); }
  88% { transform: translate(-102%, -3%) rotate(123deg); }
  100% { transform: var(--cup-spilled); }
}
@keyframes foam-pop {
  0%, 12% { opacity: 0; transform: scale(.28); }
  38% { opacity: 1; transform: translate(3px, -4px) scale(1.1); }
  73% { opacity: .8; }
  100% { opacity: 0; transform: translate(11px, -17px) scale(.65); }
}
@keyframes foam-fall {
  0%, 34% { opacity: 0; transform: scale(.5); }
  47% { opacity: .95; transform: translate(-5px, -6px) scale(1.15); }
  66% { opacity: .65; transform: translate(-13px, 6px) scale(.9); }
  80%, 100% { opacity: 0; transform: translate(-21px, 22px) scale(.5); }
}
@keyframes spill-pool {
  0%, 76% { opacity: 0; transform: scale(.2); }
  87% { opacity: 1; transform: scale(1.08,.96); }
  100% { opacity: .9; transform: scale(1); }
}
@keyframes crash-cue {
  0%, 66% { opacity: 0; transform: translateY(6px) scale(.85); }
  86% { opacity: 1; transform: translateY(-2px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes impact {
  0%, 71% { opacity: 0; transform: scale(.28,.4); }
  75% { opacity: .9; transform: scale(.76,.7); }
  100% { opacity: 0; transform: scale(1.45,1); }
}
@keyframes step-impact {
  0%, 66% { opacity: 0; transform: scale(.24,.45); }
  77% { opacity: .9; transform: scale(.72,.82); }
  100% { opacity: 0; transform: scale(1.45,1); }
}
@keyframes hud-rise {
  0% { transform: translateY(2px) scale(.95); }
  43% { color: #fff3c7; transform: translateY(-2px) scale(1.06); }
  100% { transform: none; }
}
.round-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  margin: 0;
  padding: 3px 5px 0;
  color: #ffe7c5;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.12;
}
.round-status::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 7px #ffa34b;
}

.controls { margin-top: 6px; padding: 7px; align-self: start; min-width: 0; }
.wallet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 0 2px 4px;
}
.wallet strong {
  display: block;
  margin-top: 1px;
  font-size: clamp(17px, 5vw, 24px);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.wallet small { color: var(--muted); font-size: 11px; }
.wallet.with-stance { grid-template-columns: 1fr auto 1fr; gap: 5px; }
.stance-trigger {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 44px;
  padding: 3px 9px;
  border: 1px solid #ba8157;
  border-radius: 9px;
  color: #ffe9c9;
  background: #513126;
  line-height: 1.1;
  white-space: nowrap;
}
.stance-trigger > span { font-size: 10px; color: #f0c398; }
.wallet .stance-trigger strong { font-size: 13px; }
.stance-trigger:disabled { border-color: #69483e; background: #332022; }
.payout { text-align: right; }
.payout strong { color: var(--amber); }
#stake {
  min-inline-size: 0;
  margin: 0 0 6px;
  padding: 0;
  border: 0;
}
#stake legend {
  padding: 0 2px 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.stake-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.stake-options.has-many {
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 15px) / 4);
  grid-template-columns: none;
  overflow-x: auto;
  padding: 3px;
}
.stake-options label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #8c6353;
  border-radius: 8px;
  background: #25181a;
  color: #ffe5c9;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.stake-options input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.stake-options label:has(input:checked) {
  border-color: #f4bc7b;
  background: #623b27;
  color: #fff3d5;
  box-shadow: inset 0 -2px #ebae6a;
}
.stake-options label:has(input:disabled) { cursor: default; color: #ad9189; }
.stake-options label:has(input:checked:disabled) { color: #f0d2b2; }
.round-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.round-actions:has(#cashout:not([hidden])) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.round-actions button {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 5px;
  min-height: 50px;
  padding: 4px 5px;
  border-radius: 9px;
  font-size: clamp(14px, 4vw, 19px);
  font-weight: 900;
  line-height: 1;
}
#sip {
  color: #301806;
  border: 1px solid #ffe6a1;
  background: linear-gradient(#ffe1a2, #ffbc67 51%, #ec8d46);
  box-shadow: inset 0 1px #fff5d4, 0 2px #8f472d, 0 3px 8px #1c0f0c;
}
#cashout {
  color: #102a1e;
  border: 1px solid #c7e5a0;
  background: linear-gradient(#c6e697, #83c288);
  box-shadow: inset 0 1px #edf7c6, 0 2px #34674e, 0 3px 8px #1c0f0c;
}
.action-detail:empty { display: none; }
.action-detail {
  display: inline-block;
  padding: 3px 5px;
  border-radius: 5px;
  background: #23100c24;
  font-size: .85em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#cashout:disabled, #sip:disabled {
  color: #ddc2ae;
  border: 1px solid #805b4a;
  background: #3b2927;
  box-shadow: none;
}
#refill {
  grid-column: 1 / -1;
  color: #ffe8c5;
  border: 1px solid #b98458;
  background: #573727;
}
.controls-note {
  margin: 5px 2px 0;
  color: #d6b8ac;
  font-size: 11px;
  line-height: 1.2;
}

dialog {
  width: min(calc(100vw - 24px), 460px);
  max-height: calc(100svh - 28px);
  padding: 15px;
  color: var(--paper);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #352222;
  box-shadow: 0 18px 50px #0b060b;
}
dialog::backdrop { background: #140b13d9; }
.dialog-head { justify-content: space-between; }
dialog h2 { margin: 0; font-size: 21px; }
dialog ol { padding-inline-start: 23px; }
dialog li + li { margin-top: 7px; }
dialog p, dialog li { color: #f2d4bf; font-size: 14px; line-height: 1.4; }
dialog p { margin: 10px 0 0; }
#stances {
  width: min(calc(100vw - 20px), 650px);
  max-width: none;
  max-height: calc(100svh - 18px);
  padding: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #533226, #23161b 62%);
  border-color: #b78253;
  box-shadow: 0 20px 70px #10070be8, inset 0 1px #ffcb8344;
}
.stance-gallery {
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 20px);
}
.gallery-head, .gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  flex: none;
}
.gallery-head h2 {
  font: 900 clamp(25px, 6vw, 38px)/1 Georgia, serif;
  color: #ffe3ac;
  letter-spacing: -.04em;
}
.gallery-head p { margin: 3px 0 0; font-size: 12px; }
.gallery-scroll { overflow-y: auto; padding: 1px 13px 10px; min-height: 0; overscroll-behavior: contain; }
.stance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.stance-options button {
  --portrait-accent: #efb371;
  display: grid;
  position: relative;
  min-width: 0;
  border: 1px solid #90604b;
  border-radius: 12px 12px 9px 9px;
  overflow: hidden;
  padding: 0;
  color: #fff0d5;
  background: #2a1920;
  text-align: start;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.stance-options button[data-stance="beton"] { --portrait-accent: #83ded0; }
.stance-options button[data-stance="shilo"] { --portrait-accent: #ecb1ff; }
.stance-options button[aria-pressed="true"] {
  border-color: var(--portrait-accent);
  box-shadow: 0 0 0 1px var(--portrait-accent), 0 4px 16px #12070d;
}
.stance-options button[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: 6px 6px auto auto;
  width: 20px;
  height: 20px;
  border: 1px solid #23161b;
  border-radius: 50%;
  background: var(--portrait-accent);
  box-shadow: 0 2px 6px #10080c;
}
.stance-options button[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 10px 12px auto auto;
  width: 7px;
  height: 10px;
  border: solid #23161b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.stance-options button:focus-visible { outline-offset: -4px; }
.stance-options button:disabled { opacity: .5; }
.stance-options img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.16;
  max-height: 248px;
  object-fit: cover;
  object-position: center 32%;
}
.portrait-name {
  display: grid;
  gap: 1px;
  position: relative;
  z-index: 1;
  align-content: end;
  min-height: 39px;
  padding: 8px 5px 3px;
  margin-top: -30px;
  background: linear-gradient(transparent, #21131af7 43%);
  line-height: 1.06;
}
.portrait-name strong { font-size: clamp(11px, 3.55vw, 21px); }
.portrait-name > span { color: var(--portrait-accent); font-size: clamp(9px, 2.75vw, 13px); }
.portrait-stats {
  display: grid;
  padding: 4px 5px 5px;
  background: #241820;
  border-top: 1px solid #735044;
  font-variant-numeric: tabular-nums;
}
.portrait-stats strong { font-size: clamp(14px, 4.2vw, 24px); color: #ffe4b0; }
.portrait-stats > span { font-size: clamp(9px, 2.7vw, 12px); color: #eed3ba; }
.stance-comparison { margin-top: 8px; }
.stance-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 5px; align-items: center; text-align: center; }
.stance-stepper button {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #976b54;
  background: #442922;
  color: #ffdfad;
  font-size: 25px;
  line-height: 1;
}
.stance-stepper button:disabled { opacity: .44; }
.stance-stepper span, .stance-profile { display: grid; gap: 2px; }
.stance-stepper strong { font-size: 13px; }
.stance-stepper small, .stance-profile span, .gallery-footer small { font-size: 12px; color: #ead0bd; line-height: 1.24; }
.stance-profile {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  border-left: 2px solid var(--portrait-accent, #ffc376);
  background: #392329;
}
.stance-profile strong { font-size: 13px; color: var(--portrait-accent, #ffc376); }
.stance-profile .stance-finish { color: #f5ca91; }
#stance-example { color: #fff0d5; font-weight: 720; }
.gallery-footer { background: #27181e; border-top: 1px solid #754c40; }
#stance-confirm {
  min-height: 44px;
  padding: 5px 12px;
  flex: none;
  border: 1px solid #ffce8a;
  border-radius: 9px;
  color: #2c160f;
  background: linear-gradient(#ffd799, #eca34c);
  font-weight: 850;
}
#stance-confirm:disabled { opacity: .55; }
#stance-confirm-name { display: block; font-size: 11px; font-weight: 720; }
.race[data-feedback="stance"] .lane[data-runner="hero"] .runner-visual {
  animation: stance-reveal 240ms ease-out;
}
@keyframes stance-reveal {
  from { opacity: .45; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 480px) {
  .gallery-head, .gallery-footer { padding-inline: 17px; }
  .gallery-scroll { padding-inline: 17px; }
  .stance-options { gap: 10px; }
  .portrait-name, .portrait-stats { padding-inline: 9px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .gallery-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(165px, 30%);
    align-items: start;
    gap: 10px;
  }
  .stance-comparison { margin-top: 0; }
  .stance-options img { max-height: 130px; }
}

@media (min-width: 365px) {
  .game { padding-inline: max(10px, env(safe-area-inset-left, 0px)) max(10px, env(safe-area-inset-right, 0px)); }
  .top-bar { min-height: 64px; }
  .race { padding: 8px; }
  .race-hud { min-height: 54px; }
  .hud-label { font-size: 11px; }
  .progress li { font-size: 11px; }
  .lane-heading { font-size: 11px; }
  .round-status { min-height: 36px; font-size: 12px; }
  .controls { padding: 9px; }
  .round-actions button { min-height: 53px; }
}
@media (max-width: 364px) {
  .top-actions { gap: 4px; }
  .brand { gap: 6px; }
  .brand-seal { width: 38px; height: 38px; }
}
@media (max-width: 659px) and (max-height: 710px) {
  .top-bar { min-height: 48px; }
  .race { padding: 5px; }
  .race-hud { min-height: 42px; }
  .lane { height: clamp(110px, 33vw, 143px); }
  .round-status { min-height: 27px; }
  .controls { padding: 6px; }
  .wallet.with-stance { padding-block-end: 1px; }
  .round-actions button { min-height: 48px; }
}
@media (min-width: 660px), (min-width: 520px) and (max-height: 440px) and (orientation: landscape) {
  .game {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(240px, 29vw, 328px);
    gap: 10px;
    padding-block: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-bottom));
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }
  .top-bar { grid-column: 1 / -1; min-height: 54px; padding-block-end: 0; }
  .brand-seal { width: 46px; height: 46px; }
  .brand-name { font-size: 11px; }
  .brand h1 { font-size: 43px; }
  .demo-label { font-size: 13px; }
  .race { padding: 10px; }
  .race-hud { min-height: 61px; padding-inline: 9px; }
  .hud-label { font-size: 12px; }
  .current strong { font-size: 33px; }
  .next strong { font-size: 21px; }
  #next-risk { font-size: 13px; }
  .progress { height: 35px; }
  .progress li { height: 24px; font-size: 13px; }
  .lanes { background-size: auto, 100% 100%, auto; }
  .lane { height: clamp(119px, calc((100svh - 155px) / 2), 220px); }
  .lane-heading { inset: 6px 10px auto; font-size: 13px; }
  .runner { --sprite: clamp(101px, calc((100svh - 194px) / 2), 196px); bottom: 13px; }
  .runner[data-state="fallen"] {
    --fall-backshift: calc(1% - var(--step) * 2.4%);
    --fall-floor-offset: 3%;
  }
  .lane-rail { inset-block-end: 7px; }
  .lane-start, .lane-finish { font-size: 9px; }
  .round-status { min-height: 40px; padding-inline: 9px; font-size: 14px; }
  .controls { margin-top: 0; padding: 12px; }
  .wallet { padding-block-end: 10px; }
  #stake { margin-block-end: 10px; }
  .round-actions button { min-height: 51px; }
}
@media (min-width: 520px) and (max-height: 440px) and (orientation: landscape) {
  .game { gap: 5px; }
  .top-bar { min-height: 49px; }
  .race { padding: 6px; }
  .race-hud { min-height: 45px; }
  .progress { height: 27px; }
  .lane { height: clamp(100px, calc((100svh - 188px) / 2), 130px); }
  .runner { --sprite: clamp(80px, calc((100svh - 222px) / 2), 109px); bottom: 10px; }
  .round-status { min-height: 25px; font-size: 12px; }
  .controls { padding: 7px; }
  .wallet { padding-block-end: 4px; }
  #stake { margin-block-end: 5px; }
  .round-actions button { min-height: 44px; font-size: 14px; }
}
@media (max-width: 659px) and (max-height: 555px) and (orientation: portrait) {
  .top-bar { min-height: 47px; padding-block-end: 3px; }
  .brand h1 { font-size: clamp(22px, 6.8vw, 36px); white-space: nowrap; }
  .race-hud { min-height: 37px; padding-block: 0 3px; }
  .current strong { font-size: 25px; }
  .progress { height: 23px; }
  .progress li { height: 18px; }
  .lane { height: clamp(81px, calc((100svh - 321px) / 2), 107px); }
  .runner { --sprite: clamp(66px, calc((100svh - 349px) / 2), 94px); bottom: 8px; }
  .round-status { min-height: 20px; }
  .controls { margin-top: 4px; }
  #stake { position: relative; margin-block-end: 4px; }
  #stake legend { position: absolute; inset: 0 auto 0 0; align-content: center; width: 51px; padding: 0 2px; }
  .stake-options { margin-inline-start: 51px; }
  .round-actions button { min-height: 44px; }
}
@media (max-width: 659px) and (max-height: 505px) and (orientation: portrait) {
  .controls-note { margin-block-start: 3px; }
  .wallet.with-stance { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .wallet strong { font-size: 17px; }
  .wallet .stance-trigger strong { font-size: 13px; }
}
@media (max-width: 309px) and (max-height: 555px) and (orientation: portrait) {
  #next-risk:not(:empty) { display: block; margin-inline-start: 0; }
  #next-risk:not(:empty)::before { content: none; }
  .race-hud { gap: 4px; padding-inline: 3px; }
  .lane { height: clamp(75px, calc((100svh - 339px) / 2), 100px); }
  .runner { --sprite: clamp(61px, calc((100svh - 363px) / 2), 87px); }
}
@media (max-height: 335px) and (orientation: landscape) {
  .stance-options img { max-height: 91px; }
  .gallery-head, .gallery-footer { padding-block: 5px; }
  .stance-profile { padding-block: 5px; }
}
@media (hover: hover) {
  .icon-button:hover, .round-actions button:enabled:hover { filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .runner[data-motion="land"][data-walk="ready"] .runner-walk-art {
    visibility: hidden;
    animation: none;
  }
  .runner-trip-art, .runner-fall-art { transition-delay: 0s; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

.save-migration {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 4px 3px;
  text-align: center;
  font-size: 12px;
}
.save-migration a { color: #e1b48f; }
