/* Saloon Showdown styles.

   - Sizes are in em: the font-size of .app is the one scale knob of each layout.
   - Three layouts: phone portrait (base), phone landscape (short), wide screen (tablet landscape / desktop).
     Tablet portrait uses the base. The wheel's size and place are computed in main.js (layout()) and arrive as
     CSS variables (--wd, --wx, --wy): the wheel is often bigger than the screen on a phone.
   - Every painted plate comes from plates.css (GENERATED from the measured art): its border-image keeps the
     corners and the bulbs undistorted; --ph is the plate's height (or its scale, for the board).
   - Stacking: scenery < wheel (2) < host (3) < table (4) < history (5) < HUD (6) < fx (30) < overlays (31..35)
     < sheets (40) < toast (45). */
/* The plates (buttons, tiles, board, ribbon...) stretched with border-image. The cut numbers are measured from the
   pictures in public/art (the same numbers as src/ui/art.js): change both if a new plate has a different rim. */
.plate-board {
  border-image: url(../../art/board.webp) 45 67 54 62 fill / calc(var(--ph) * 0.0659) calc(var(--ph) * 0.0981)
    calc(var(--ph) * 0.0791) calc(var(--ph) * 0.0908) stretch;
  --gx0: 0.05;
  --gx1: 0.0542;
  --gy0: 0.063;
  --gy1: 0.0761;
  --pr: 1.757;
}
.plate-tile-blue {
  border-image: url(../../art/tile-blue.webp) 16 17 18 15 fill / calc(var(--ph) * 0.106) calc(var(--ph) * 0.1126)
    calc(var(--ph) * 0.1192) calc(var(--ph) * 0.0993) stretch;
  --gx0: 0.025;
  --gx1: 0.0288;
  --gy0: 0.0927;
  --gy1: 0.106;
  --pr: 3.4437;
}
.plate-tile-cream {
  border-image: url(../../art/tile-cream.webp) 16 17 18 15 fill / calc(var(--ph) * 0.1046) calc(var(--ph) * 0.1111)
    calc(var(--ph) * 0.1176) calc(var(--ph) * 0.098) stretch;
  --gx0: 0.025;
  --gx1: 0.0288;
  --gy0: 0.0915;
  --gy1: 0.1046;
  --pr: 3.3987;
}
.plate-tile-ruby {
  border-image: url(../../art/tile-ruby.webp) 16 17 18 15 fill / calc(var(--ph) * 0.1053) calc(var(--ph) * 0.1118)
    calc(var(--ph) * 0.1184) calc(var(--ph) * 0.0987) stretch;
  --gx0: 0.025;
  --gx1: 0.0288;
  --gy0: 0.0921;
  --gy1: 0.1053;
  --pr: 3.4211;
}
.plate-tile-gold {
  border-image: url(../../art/tile-gold.webp) 16 17 18 15 fill / calc(var(--ph) * 0.1053) calc(var(--ph) * 0.1118)
    calc(var(--ph) * 0.1184) calc(var(--ph) * 0.0987) stretch;
  --gx0: 0.025;
  --gx1: 0.0288;
  --gy0: 0.0921;
  --gy1: 0.1053;
  --pr: 3.4211;
}
.plate-sheet-frame {
  border-image: url(../../art/sheet-frame.webp) 102 85 84 86 fill / calc(var(--ph) * 0.0748) calc(var(--ph) * 0.0623)
    calc(var(--ph) * 0.0616) calc(var(--ph) * 0.063) stretch;
  --gx0: 0.0933;
  --gx1: 0.0922;
  --gy0: 0.0733;
  --gy1: 0.0601;
  --pr: 0.6598;
}
.plate-opt-card {
  border-image: url(../../art/opt-card.webp) 53 70 53 70 fill / calc(var(--ph) * 0.2477) calc(var(--ph) * 0.3271)
    calc(var(--ph) * 0.2477) calc(var(--ph) * 0.3271) stretch;
  --gx0: 0.0756;
  --gx1: 0.0756;
  --gy0: 0.2383;
  --gy1: 0.2383;
  --pr: 4.2056;
}
.plate-load-bar {
  border-image: url(../../art/load-bar.webp) 0 67 0 67 fill / calc(var(--ph) * 0) calc(var(--ph) * 0.5)
    calc(var(--ph) * 0) calc(var(--ph) * 0.5) stretch;
  --gx0: 0.0756;
  --gx1: 0.0822;
  --gy0: 0.2015;
  --gy1: 0.2015;
  --pr: 6.7164;
}
.plate-pill-blue {
  border-image: url(../../art/pill-blue.webp) 0 107 0 107 fill / calc(var(--ph) * 0) calc(var(--ph) * 0.5)
    calc(var(--ph) * 0) calc(var(--ph) * 0.5) stretch;
  --gx0: 0.1308;
  --gx1: 0.1308;
  --gy0: 0.1542;
  --gy1: 0.1542;
  --pr: 2.4299;
}
.plate-plaque {
  border-image: url(../../art/plaque.webp) 0 62 0 62 fill / calc(var(--ph) * 0) calc(var(--ph) * 0.5)
    calc(var(--ph) * 0) calc(var(--ph) * 0.5) stretch;
  --gx0: 0.0714;
  --gx1: 0.0714;
  --gy0: 0.1371;
  --gy1: 0.1371;
  --pr: 4.5161;
}
.plate-btn-gold {
  border-image: url(../../art/btn-gold.webp) 0 96 0 96 fill / calc(var(--ph) * 0) calc(var(--ph) * 0.4974)
    calc(var(--ph) * 0) calc(var(--ph) * 0.4974) stretch;
  --gx0: 0.0886;
  --gx1: 0.0886;
  --gy0: 0.1451;
  --gy1: 0.1451;
  --pr: 3.6269;
}

/* End of src/ui/plates.css */

:root {
  --gold-1: #fff3b0;
  --gold-2: #ffc93c;
  --gold-3: #e08a00;
  --gold-4: #7a3d00;
  --ruby-1: #6a3410;
  --ruby-2: #2a1406;
  --panel-1: #6e1020;
  --panel-2: #2a050c;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ruby-2);
  overscroll-behavior: none;
}
/* the saloon's lettering: Georgia's letters with lining digits (Georgia's own digits are old-style) */
@font-face {
  font-family: 'Saloon';
  src: local('Georgia Bold'), local('Georgia-Bold');
  font-weight: 600 900;
  unicode-range: U+0020-002F, U+003A-024F;
}
@font-face {
  font-family: 'Saloon';
  src: local('Georgia');
  font-weight: 100 599;
  unicode-range: U+0020-002F, U+003A-024F;
}
body {
  font-family: 'Saloon', 'Times New Roman', Georgia, serif;
  font-weight: 800;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
button {
  padding: 0;
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
img {
  display: block;
  -webkit-user-drag: none;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
/* painted digits (glyphs.js): each <i> shows its piece of the atlas */
.glyph {
  display: inline-block;
  height: 0.86em;
  vertical-align: -0.08em;
  background: url(../../art/font-gold.webp) no-repeat;
  background-size: calc(var(--glyph-atlas, 10) * 1em) 0.86em; /* the atlas offsets are in the same em: never change a glyph's height, change its font-size */
  margin-right: -0.035em;
  filter: drop-shadow(0 0.05em 0.04em rgba(40, 8, 4, 0.9));
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-size: clamp(11px, min(3.9vw, 2vh), 19px);
}

/* ---------------- scenery ---------------- */
.bg,
.bg-img,
.bg-spot {
  position: absolute;
  inset: 0;
}
.bg-img {
  background: url(../../art/bg-portrait.webp) center / cover;
}
.bg-spot {
  background: radial-gradient(ellipse at 50% 34%, rgba(255, 170, 70, 0.2), rgba(24, 10, 2, 0.45) 80%);
}
.bg-spot::before,
.bg-spot::after {
  content: '';
  position: absolute;
  top: -10%;
  width: 60%;
  height: 120%;
  background: linear-gradient(180deg, rgba(255, 176, 80, 0.16), rgba(255, 176, 80, 0) 78%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  mix-blend-mode: soft-light; /* warm lantern light, never a white haze */
  transform-origin: 50% 0;
  animation: sweep 9s ease-in-out infinite alternate;
}
.bg-spot::before {
  left: -8%;
}
.bg-spot::after {
  right: -8%;
  animation-duration: 11s;
  animation-direction: alternate-reverse;
}
.bg-spot {
  transition: filter 0.6s;
}
.app.hot .bg-spot {
  filter: brightness(1.5) saturate(1.2);
}

/* ---------------- shared plates ---------------- */
.pill,
.btn-gold,
.plaque {
  border-width: 1px;
  border-style: solid;
  border-color: transparent; /* longhands: the "border" shorthand would reset the plate's border-image */
  height: var(--ph);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
  /* the text stays on the glass: off the round ends (measured: 0.32 of the height each side) */
  padding: 0 calc(var(--ph) * 0.34);
  filter: drop-shadow(0 0.18em 0.25em rgba(0, 0, 0, 0.55));
  transition: transform 0.09s;
}
.pill {
  --ph: max(2.6em, 44px);
  font-size: 0.86em;
  letter-spacing: 0.03em;
}
.pill > span,
.btn-gold > span {
  display: block;
  min-width: 0;
  color: #ffe9b0; /* cream-gold lettering with a dark outline, as painted on the saloon's buttons */
  font-weight: 900;
  text-shadow:
    0 0 0.08em #1e0e04,
    0 0 0.08em #1e0e04,
    0.05em 0.05em 0 #1e0e04,
    -0.05em 0.05em 0 #1e0e04,
    0.05em -0.04em 0 #1e0e04,
    -0.05em -0.04em 0 #1e0e04,
    0 0.12em 0.18em rgba(0, 0, 0, 0.6);
  /* centred on the glass, which sits a little below the plate's middle */
  translate: 0 calc(var(--ph) * (var(--gy0) - var(--gy1)) / 2);
}
.btn-gold {
  --ph: 3.6em;
  font-size: 1.4em;
  letter-spacing: 0.04em;
}
button.pill:active:not(:disabled),
button.btn-gold:active:not(:disabled),
.btn-ico:active,
.chip:active {
  transform: scale(0.92);
}
button:disabled.pill {
  filter: saturate(0.5) brightness(0.6);
}

.btn-ico {
  width: max(2.8em, 40px);
  height: max(2.8em, 40px);
  display: grid;
  place-items: center;
  position: relative;
  background: url(../../art/btn-round.webp) center / contain no-repeat;
  filter: drop-shadow(0 0.18em 0.25em rgba(0, 0, 0, 0.55));
  transition: transform 0.09s;
}
.btn-ico .ico {
  width: 58%;
  height: 58%;
}
.btn-ico .ico.off,
.btn-ico[aria-pressed='true'] .ico.on {
  display: none;
}
.btn-ico[aria-pressed='true'] .ico.off {
  display: block;
}
.gift-dot {
  position: absolute;
  top: 0.1em;
  right: 0.1em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background: #ff4d6a;
  box-shadow: 0 0 0.4em #ff4d6a;
  animation: breathe 1.2s ease-in-out infinite;
}

/* a 9-slice piece baked into one picture by nine.js: the browser's own 9-piece drawing is switched off */
.nine {
  border-image: none !important;
  background-size: 100% 100% !important;
  background-origin: border-box !important;
  background-clip: border-box !important;
  background-repeat: no-repeat !important;
}
.app:fullscreen #btn-full .ico.on {
  display: none;
}
.app:fullscreen #btn-full .ico.off {
  display: block;
}

/* ---------------- entry ---------------- */
.entry {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(1.2em + var(--safe-t)) 1em calc(0.8em + var(--safe-b));
  z-index: 20;
}
.entry-logo {
  width: min(86vw, 34em, 50vh);
  height: auto;
  filter: drop-shadow(0 0.5em 0.8em rgba(0, 0, 0, 0.6));
  animation: floaty 4s ease-in-out infinite;
  flex: none;
}
/* the fox from hat to boots (art/mascot-entry.webp), centred over TAP TO PLAY: the button only overlaps his boots */
.entry-host {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 92vw;
  object-fit: contain;
  object-position: 50% 100%;
  margin-bottom: -0.4em;
  filter: drop-shadow(0 0.6em 0.8em rgba(0, 0, 0, 0.6));
}
.entry-cta {
  flex: none;
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 4.4em;
  margin-top: -0.6em;
}
.loading {
  --ph: max(2.6em, 34px);
  position: relative;
  z-index: 1;
  width: min(86vw, 24em);
  height: var(--ph);
  margin-top: -1.3em;
  border-radius: 1.4em;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  box-shadow:
    0 0 0 0.08em var(--gold-4),
    0 0.4em 0.7em rgba(0, 0, 0, 0.55);
  overflow: hidden;
} /* thick, and over the host's cut: he stands behind it */
.loading i {
  position: absolute;
  inset: 22% calc(var(--ph) * 0.72);
  border-radius: 1em;
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #ffcf5a, #ff8a3d);
  transition: transform 0.15s;
}
.loading span {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 1em;
  font-weight: 900;
  color: #3a1c08;
  text-shadow: 0 0.06em 0 rgba(255, 240, 200, 0.7);
} /* dark-brown % on the parchment track */
.btn-play {
  width: min(80vw, 18em);
  animation: play-breathe 1.6s ease-in-out infinite;
}
.btn-play.pop {
  animation:
    pop-in 0.45s cubic-bezier(0.2, 1.4, 0.35, 1),
    play-breathe 1.6s ease-in-out 0.45s infinite;
}
.disclaimer {
  flex: none;
  margin: 0.6em 0 0;
  max-width: 34em;
  font-size: max(0.68em, 12px);
  font-weight: 600;
  text-align: center;
  opacity: 0.85;
  text-shadow: 0 0.08em 0.15em #000;
}
.age {
  position: absolute;
  top: calc(0.6em + var(--safe-t));
  right: 0.8em;
  margin: 0;
  padding: 0.2em 0.5em;
  font-size: 0.8em;
  border: 0.12em solid #fff;
  border-radius: 0.4em;
  background: rgba(0, 0, 0, 0.5);
}

/* ---------------- game ---------------- */
.game {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.top {
  position: relative;
  z-index: 6;
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: calc(0.4em + var(--safe-t)) calc(0.6em + var(--safe-r)) 0.3em calc(0.6em + var(--safe-l));
}
.plaque {
  --ph: 2.7em;
  padding: 0 calc(var(--ph) * 0.3);
}
.balance {
  flex: 1 1 0;
  max-width: 13em;
  gap: 0.4em;
  justify-content: flex-start;
}
.coin-ico {
  height: 1.7em;
  width: auto;
  flex: none;
  margin-left: -0.4em;
}
.coin-ico.bump {
  animation: coin-bump 0.18s ease-out;
}
#balance {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 1.15em;
  overflow: visible;
  white-space: nowrap;
}
#balance.spring {
  animation: spring 0.42s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.btn-free {
  --ph: 2em;
  flex: none;
  font-size: 0.75em;
  margin-right: -0.5em;
  animation: glow-breathe 1.2s ease-in-out infinite;
}
.level {
  flex: 1 1 0;
  max-width: 11em;
  gap: 0.4em;
}
.level .lv {
  font-size: 1.05em;
  color: var(--gold-1);
  text-shadow: 0 0.08em 0 #000;
  flex: none;
  white-space: nowrap;
}
.level .lv small {
  font-size: 0.7em;
  color: #fff;
}
.level .xp {
  position: relative;
  flex: 1;
  height: max(1.15em, 16px);
  border-radius: 1em;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  border: 0.06em solid rgba(140, 200, 255, 0.5);
}
.level .xp-text {
  position: relative;
  display: block;
  text-align: center;
  font-size: max(0.62em, 10px);
  line-height: max(1.85em, 15px);
  white-space: nowrap;
  text-shadow: 0 0.08em 0.1em #000;
}
.level .xp i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--xp, 0));
  background: linear-gradient(90deg, #6fd3ff, #2f7dff);
}
.level.up {
  animation: bump 0.4s ease-out 2;
}
.top-buttons {
  margin-left: auto;
  display: flex;
  gap: 0.4em;
  position: relative;
  flex: none;
}
.menu-pop {
  position: absolute;
  top: 3.2em;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  padding: 0.4em;
  border-radius: 1.6em;
  background: rgba(58, 30, 12, 0.92);
  border: 0.1em solid var(--gold-3);
}

/* the wheel: size and place from layout() */
.stage {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-height: 0;
}
.wheel-box {
  position: absolute;
  left: var(--wx, 0px);
  top: var(--wy, 0px);
  width: var(--wd, 300px);
  height: var(--wd, 300px);
  transform-origin: 50% 0;
}
.wheel-box canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0.8em 1.2em rgba(0, 0, 0, 0.6));
}
.wheel-box.shake {
  animation: shake 0.3s linear;
}
.pointer {
  position: absolute;
  left: 50%;
  top: calc(var(--wd) * -0.042);
  width: calc(var(--wd) * 0.086); /* round 3: shorter, the gem stops above the number */
  height: auto;
  translate: -50% 0;
  transform-origin: 50% 18%;
  filter: drop-shadow(0 0.3em 0.3em rgba(0, 0, 0, 0.55));
}
.podium,
.podium-logo,
.stand {
  display: none;
}
.hist-label {
  flex: none;
  align-self: center;
  padding: 0 0.35em 0 0.15em;
  font-size: 0.68em;
  letter-spacing: 0.06em;
  color: var(--gold-1);
  text-shadow: 0 0.08em 0 #000;
  white-space: nowrap;
}
.stand {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 84%;
  width: 76%;
  height: auto;
  translate: -50% 0;
  pointer-events: none;
  filter: drop-shadow(0 0.6em 0.8em rgba(0, 0, 0, 0.6));
}
.host {
  position: absolute;
  z-index: 3;
  height: var(--hh, 10em);
  width: auto;
  left: var(--hx, 0px);
  top: var(--hy, 0px);
  pointer-events: none;
  filter: drop-shadow(0 0.4em 0.5em rgba(0, 0, 0, 0.5));
  transform-origin: 50% 100%;
}
.host {
  animation: host-breathe 3.4s ease-in-out infinite;
}
.host.bob {
  animation: host-bob 0.5s ease-out;
}

/* last results */
.history {
  position: absolute;
  z-index: 5;
  left: var(--rx, 50%);
  top: var(--ry, 0px);
  display: flex;
  gap: 0.18em;
  padding: 0.25em 0.45em;
  border-radius: 2em;
  background: linear-gradient(180deg, #5a3014, #2a1406);
  border: 0.1em solid var(--gold-3);
  box-shadow: 0 0.2em 0.4em rgba(0, 0, 0, 0.5);
}
.token {
  position: relative;
  width: 2.2em;
  height: 2.2em;
  display: grid;
  place-items: center;
  background: center / contain no-repeat;
  font-size: 0.82em;
  flex: none;
}
.token.new {
  animation: token-in 0.45s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.token b {
  display: flex;
  white-space: nowrap;
  font-size: 0.95em;
  line-height: 1;
}
.token b .glyph {
  filter: drop-shadow(0 0 0.06em #3a0a06) drop-shadow(0 0 0.06em #3a0a06) drop-shadow(0 0.06em 0.04em #3a0a06);
}
.token img {
  width: 70%;
  height: 70%;
}

/* ---------------- the table ---------------- */
.table {
  position: relative;
  z-index: 4;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45em;
  padding: 0 calc(0.4em + var(--safe-r)) calc(0.25em + var(--safe-b)) calc(0.4em + var(--safe-l));
}
.ribbon {
  position: relative;
  z-index: 2;
  align-self: flex-end; /* phone upright: the host sits on the left of the board */
  width: min(66%, 17em);
  aspect-ratio: 900 / 273;
  margin-bottom: -1.9em;
  background: url(../../art/ribbon.webp) center / 100% 100% no-repeat;
  /* the text box is the measured blue enamel (art.js): set from main.js as --rg */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rg, 12% 13% 4% 13%);
  filter: drop-shadow(0 0.25em 0.3em rgba(0, 0, 0, 0.5));
}
.ribbon > span {
  display: block;
  min-width: 0;
  white-space: nowrap;
  font-size: 0.95em;
  letter-spacing: 0.06em;
  color: var(--gold-1);
  text-shadow:
    0 0.08em 0 #08302e,
    0 0 0.3em rgba(0, 0, 0, 0.6);
}
.ribbon.pop > span {
  animation: pop-in 0.35s cubic-bezier(0.2, 1.4, 0.35, 1);
}
/* a real win: the ribbon glows gold and beats, louder than "BET" or "NO MORE BETS" */
.ribbon.won {
  animation: ribbon-won 0.55s ease-in-out 3;
  filter: brightness(1.22) saturate(1.2) drop-shadow(0 0 0.35em #ffd76a) drop-shadow(0 0 1.1em rgba(255, 200, 80, 0.95));
}
.ribbon.won > span {
  text-shadow:
    0 0.08em 0 #08302e,
    0 0 0.35em rgba(255, 214, 90, 0.8);
} /* the same lettering as BET, only a warm glow */
@keyframes ribbon-won {
  50% {
    scale: 1.12;
  }
}
.board {
  --ph: 7.2em; /* the frame's scale: its bulbs stay round at any board size */
  border-width: 1px;
  border-style: solid;
  border-color: transparent; /* longhands: the "border" shorthand would reset the plate's border-image */
  padding: 1.55em 0.9em 0.85em;
  filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.55));
}
.board.win {
  animation: board-win 0.7s ease-in-out 3;
}
.spots {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 0.35em;
}
.spot {
  --ph: 3.95em;
  position: relative;
  height: var(--ph);
  border-width: 1px;
  border-style: solid;
  border-color: transparent; /* longhands: the "border" shorthand would reset the plate's border-image */
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto; /* the number gives way, the payout keeps its place on the glass */
  justify-items: center;
  align-items: center;
  /* the content stays on the glass of the tile (measured) */
  padding: calc(var(--ph) * var(--gy0) + 0.1em) calc(var(--ph) * var(--pr) * var(--gx0) + 0.2em)
    calc(var(--ph) * var(--gy1) + 0.12em);
  transition:
    transform 0.09s,
    filter 0.15s;
}
.spot.wide {
  grid-column: 1 / -1;
  --ph: 3.1em;
  display: flex;
  justify-content: center;
  gap: 0.6em;
  padding-right: 3.2em;
  padding-left: 3.2em;
}
.spot.wide .pays {
  font-size: max(0.62em, 10px);
}
.spot:active:not(:disabled) {
  transform: scale(0.96);
}
.spot .name {
  font-size: calc(var(--ph) * 0.46); /* a share of the tile: it fits the glass on every screen */
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}
.spot:not(.wide) {
  padding-right: calc(var(--ph) * 0.62);
}
.spot.wide[data-spot='@bonus'] .pays {
  display: none;
} /* BONUS explains itself; the rules say what it pays */
.spot.wide[data-spot='@bonus'] .name {
  display: block;
  flex: none;
  align-self: stretch;
  height: auto;
  width: auto;
  aspect-ratio: 640 / 159;
  margin: 0.12em 0;
  max-width: 100%; /* fills the tile's glass (its padding), whatever the size */
  background: url(../../art/word-bonus.webp) center / contain no-repeat;
  filter: drop-shadow(0 0.08em 0.1em rgba(60, 10, 0, 0.6));
}
.spot.wide::before,
.spot.wide::after {
  content: '★';
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  font-size: calc(var(--ph) * 0.34);
  color: #fff3b0;
  text-shadow: 0 0 0.3em rgba(255, 200, 80, 0.9);
}
.spot.wide::before {
  left: 8%;
}
.spot.wide::after {
  right: 22%;
}
.spot.wide[data-spot='@bonus'] .name {
  max-width: 56%;
} /* the painted word stays between the two stars */
.spot .pays {
  margin-bottom: 0.3em;
  font-size: max(0.78em, 10px);
  line-height: 1;
  padding: 0.15em 0.6em;
  border-radius: 1em;
  background: rgba(36, 18, 6, 0.72);
  border: 0.08em solid rgba(255, 201, 60, 0.6);
  color: var(--gold-1);
  white-space: nowrap;
  min-width: 0;
}
.spot.hit {
  animation: spot-hit 0.5s ease-in-out 6;
  filter: brightness(1.15) drop-shadow(0 0 0.3em #ffd76a) drop-shadow(0 0 0.8em rgba(255, 200, 80, 0.8));
} /* the paying spot glows gold for the whole payout */
.spot.lose {
  filter: brightness(0.7);
}
.spot.lose.plate-tile-cream,
.spot.lose.plate-tile-gold {
  filter: brightness(0.74) sepia(0.4) saturate(1.5) hue-rotate(-10deg);
}
.spot.flash {
  animation: spot-flash 0.25s ease-out;
}
@keyframes spot-flash {
  0% {
    filter: brightness(1.25) drop-shadow(0 0 0.5em rgba(255, 220, 120, 0.9));
  }
}
/* the chips on a spot: a little stack, the total on top */
.stack {
  position: absolute;
  right: 4%;
  top: 50%;
  translate: 0 -62%;
  width: max(2.2em, 40px);
  height: max(2.2em, 40px);
  pointer-events: none;
}
.stack img {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0.1em 0.06em rgba(0, 0, 0, 0.6));
}
.stack b {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
.stack.land {
  animation: chip-land 0.22s ease-out;
}

/* chip rack */
.rack {
  display: flex;
  justify-content: center;
  gap: 0.35em;
}
.chip {
  position: relative;
  width: 3.3em;
  height: 3.3em;
  flex: none;
  transition:
    transform 0.12s,
    filter 0.12s;
}
.chip img {
  width: 100%;
  height: 100%;
}
.chip b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86em;
  white-space: nowrap;
}
.chip[aria-pressed='true'] {
  transform: translateY(-0.35em) scale(1.08);
  filter: drop-shadow(0 0 0.45em rgba(255, 220, 120, 0.95));
}
.chip:disabled {
  filter: saturate(0.55) brightness(0.62);
}
.chip.locked img {
  filter: none;
  opacity: 0.78;
}
.chip.locked b {
  opacity: 0.6;
}
.chip.locked::after {
  content: '';
  position: absolute;
  right: -4%;
  top: -6%;
  width: 42%;
  height: 42%;
  background: url(../../art/icon-star.webp) center / contain no-repeat;
  filter: drop-shadow(0 0.08em 0.1em rgba(0, 0, 0, 0.7));
}
/* gold digits on the cream centre of a chip: a dark edge keeps them readable */
.chip b .glyph,
.stack b .glyph {
  filter: brightness(0.3) sepia(0.7) saturate(1.6) drop-shadow(0 0 0.04em rgba(255, 244, 220, 0.8));
} /* dark-brown values on the cream chip centres (round 3) */

/* actions: pills and the big round SPIN */
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  gap: 0.3em;
}
.actions .pill {
  --ph: max(2.5em, 44px);
  font-size: 1.04em;
}
.actions .pill > span {
  font-size: var(--act-fs, inherit);
}
.actions .pill {
  letter-spacing: 0;
}
/* the serif lettering is wider: on the narrowest phones the label may come closer to the round ends (still on the measured glass) */
@media (max-width: 380px) {
  .actions .pill {
    padding: 0 calc(var(--ph) * 0.2);
  }
}
.spin {
  position: relative;
  width: max(5.2em, 76px);
  height: max(5.2em, 76px);
  display: grid;
  place-items: center;
  container-type: size;
  filter: drop-shadow(0 0.3em 0.4em rgba(0, 0, 0, 0.6));
  animation: spin-idle 2.2s ease-in-out infinite;
}
.spin img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.spin .spin-label {
  position: relative;
  display: block;
  max-width: 58%;
  white-space: nowrap;
  font-size: 23cqw; /* a share of the button itself: the same on every screen */
  letter-spacing: 0;
  font-weight: 900;
  color: #ffe08a;
  text-shadow:
    0 0 0.06em #3a0604,
    0.04em 0.04em 0 #3a0604,
    -0.04em 0.04em 0 #3a0604,
    0 -0.03em 0 #3a0604,
    0 0.1em 0.2em rgba(0, 0, 0, 0.6);
}
.spin.busy {
  animation: none;
  filter: brightness(0.7) saturate(0.7);
}
.spin.charge {
  animation: spin-charge 0.3s ease-out;
}
.spin:active:not(.busy) {
  transform: scale(0.92);
}
.notice {
  font-style: italic;
  font-weight: 400;
  margin: 0;
  align-self: center;
  padding: 0.2em 0.9em;
  border-radius: 1em;
  background: rgba(36, 18, 6, 0.82);
  border: 0.08em solid rgba(255, 201, 60, 0.45);
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 0.08em 0.1em #000;
}

/* ---------------- x2 / x7 stamp ---------------- */
.stamp {
  position: absolute;
  z-index: 31;
  left: var(--sx, 50%);
  top: var(--sy, 40%);
  translate: -50% -50%;
  pointer-events: none;
  font-size: 4.4em;
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  background: url(../../art/seal.webp) center / contain no-repeat; /* the painted medallion: the number sits on its plain centre */
  filter: drop-shadow(0 0 0.35em rgba(255, 210, 110, 0.85)) drop-shadow(0 0.15em 0.25em rgba(0, 0, 0, 0.6));
  transition:
    left 0.38s cubic-bezier(0.5, 0, 0.3, 1),
    top 0.38s cubic-bezier(0.5, 0, 0.3, 1),
    font-size 0.38s cubic-bezier(0.5, 0, 0.3, 1);
}
.stamp b {
  display: flex;
  white-space: nowrap;
  font-size: 0.6em;
  max-width: 1.9em;
}
.stamp.gold {
  filter: drop-shadow(0 0 0.6em rgba(255, 220, 120, 1)) drop-shadow(0 0.15em 0.25em rgba(0, 0, 0, 0.6)) brightness(1.08);
}
.stamp.parked {
  font-size: 1.7em;
  z-index: 7;
}
.app.stamping .history {
  opacity: 0;
  transition: opacity 0.15s;
}
.stamp.out {
  transition:
    opacity 0.25s,
    scale 0.25s;
  opacity: 0;
  scale: 0.4;
}
.stamp.go {
  animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}

/* ---------------- celebration ---------------- */
.celebrate {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  cursor: pointer;
}
/* the veil sits under the flying coins, the title and the amount over them */
.veil {
  animation: veil-in 0.2s ease-out both;
  position: absolute;
  inset: 0;
  z-index: 32;
  background: radial-gradient(
    ellipse at 50% 38%,
    rgba(255, 180, 80, 0.38),
    rgba(110, 50, 14, 0.28) 45%,
    rgba(36, 16, 4, 0.6) 88%
  );
  backdrop-filter: blur(2px) saturate(1.1);
  pointer-events: none;
}
.app.celebrating .table,
.app.celebrating .history,
.app.celebrating .host {
  visibility: hidden;
}
.app.celebrating .fx {
  z-index: 34;
} /* the coins fly in front of the veil, behind the title and the amount */ /* one amount on screen: the celebration's */
.cel-box {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9em;
  width: min(84vw, 34em);
  margin-top: -12vh;
}
.cel-host {
  position: absolute;
  z-index: 1;
  left: max(3vw, calc(50% - 26em));
  bottom: 0;
  height: min(40vh, 26em);
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.6));
}
.cel-title {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.8));
}
.cel-title.slam {
  animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.cel-title.step {
  animation: step-punch 0.35s ease-out;
}
.cel-plate {
  --ph: 4.4em;
  width: 86%;
  height: var(--ph);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3em;
  background: radial-gradient(ellipse at 50% 30%, #c41a35, #6e0a18);
  border: 0.22em solid var(--gold-2);
  box-shadow:
    0 0 0 0.12em var(--gold-4),
    0 0 1.6em rgba(255, 210, 110, 0.8),
    0 0.5em 0.8em rgba(0, 0, 0, 0.6),
    inset 0 0.2em 0.4em rgba(255, 255, 255, 0.25);
  padding: 0 2.4em;
  position: relative;
}
.cel-plate::before,
.cel-plate::after {
  content: '★';
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  color: var(--gold-1);
  font-size: 1.5em;
  text-shadow: 0 0 0.4em rgba(255, 210, 110, 0.9);
}
.cel-plate::before {
  left: 0.5em;
}
.cel-plate::after {
  right: 0.5em;
}
.cel-plate.step {
  animation: banner-step 0.35s ease-out;
}
.cel-amount {
  font-size: 3.4em;
  white-space: nowrap;
  min-width: 0;
}
.cel-amount.slam {
  animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.35, 1);
}
.cel-amount.mile {
  animation: mile 0.26s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.skip {
  --ph: 2.4em;
  font-size: 0.75em;
  opacity: 0.85;
  animation: glow-breathe 1.4s ease-in-out infinite;
}
.skip > span {
  display: block;
  padding: 0.3em 1em;
  border-radius: 1em;
  background: rgba(0, 0, 0, 0.45);
}

/* ---------------- bonus / daily free spin stage ---------------- */
.bonus-stage {
  position: absolute;
  inset: 0;
  z-index: 34;
  display: grid;
  grid-template-areas: '.' 'title' 'wheel' '.' 'foot';
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  row-gap: 0.4em;
  padding: calc(var(--hud-b, 3.4em) + 2.8em) 0.8em calc(2.4em + var(--safe-b));
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 214, 130, 0.45), rgba(255, 196, 110, 0) 50%),
    radial-gradient(ellipse at 50% 45%, #8a4a1a, #3a1a08 75%);
  animation: stage-in 0.35s ease-out both; /* a curtain-in, never a hard cut */
}
.app.bonus .top {
  z-index: 35;
}
.app.bonus .fx {
  z-index: 36;
}
.bonus-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 160, 60, 0.16), rgba(255, 160, 60, 0) 55%),
    linear-gradient(rgba(30, 12, 2, 0.12), rgba(30, 12, 2, 0.42)),
    var(--stage-bg, url(../../art/bg-portrait.webp)) center / cover;
  pointer-events: none;
} /* the saloon stays in sight behind the bonus wheel */
/* the credits notice on its own dark band at the bottom: it never crosses a button, a plate or the host */
.stage-notice {
  position: absolute;
  left: 50%;
  top: calc(var(--hud-b, 3.4em) + 4px);
  translate: -50% 0;
  z-index: 3;
  margin: 0;
  padding: 0.25em 0.9em;
  border-radius: 1em;
  background: rgba(36, 18, 6, 0.82);
  border: 0.08em solid rgba(255, 201, 60, 0.45);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  pointer-events: none;
}
.bs-rays {
  position: absolute;
  inset: -30%;
  mix-blend-mode: soft-light;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 170, 60, 0.3) 0 6deg, transparent 6deg 18deg);
  animation: ring 30s linear infinite;
  pointer-events: none;
}
.bs-title {
  grid-area: title;
  position: relative;
  margin: 0;
  width: min(72vw, 26em);
}
.bs-title img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.8));
  animation: slam 0.5s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.bs-wheel {
  grid-area: wheel;
  position: relative;
  width: var(--bd, 70vmin);
  height: var(--bd, 70vmin);
  animation: rise 0.6s cubic-bezier(0.2, 1.2, 0.35, 1) both;
  filter: drop-shadow(0 0 1.6em rgba(255, 170, 70, 0.4));
}
.bs-wheel canvas {
  width: 100%;
  height: 100%;
}
/* the prize sits over the wheel's lower half, centred (the won wedge is at the top, under the pointer) */
.bs-wheel > .bs-won {
  position: absolute;
  left: 50%;
  bottom: -4%;
  translate: -50% 0;
  z-index: 3;
  max-width: none;
  animation: pop-in 0.4s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.bs-wheel > .bs-won.painted {
  width: min(26em, 96vw, 104%);
}
.bs-wheel.punch {
  animation: wheel-punch 0.35s ease-out;
}
@keyframes wheel-punch {
  40% {
    transform: scale(1.05);
  }
}
.bs-pointer {
  --wd: var(--bd, 70vmin);
}
/* the foot: the host on the left, the prize or the buttons beside him (never over him) */
.bs-foot {
  grid-area: foot;
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * var(--foot-lap, 0px));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6em;
  width: 100%;
  margin-bottom: calc(-2.4em - var(--safe-b));
} /* the host stands on the screen's edge */
.bs-host {
  flex: 0 1 auto;
  height: min(35vh, 22em, 66vw);
  max-width: 52vw;
  object-fit: contain;
  object-position: bottom;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.6));
}
.bs-side {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  padding-bottom: calc(3.4em + var(--safe-b));
}
.bs-note {
  margin: 0;
  padding: 0.3em 0.9em;
  border-radius: 1em;
  white-space: nowrap;
  text-align: center;
  font-size: max(0.95em, 13px);
  letter-spacing: 0.04em;
  color: var(--gold-1);
  background: rgba(36, 18, 6, 0.78);
  border: 0.08em solid rgba(255, 201, 60, 0.55);
  text-shadow: 0 0.08em 0.1em #000;
}
.bs-won {
  --ph: 4em;
  position: relative;
  min-width: min(10em, 44vw);
  max-width: 48vw;
  height: var(--ph);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2em;
  border-radius: 3em;
  background: radial-gradient(ellipse at 50% 30%, #d0213d, #6e0a18);
  border: 0.24em solid var(--gold-2);
  box-shadow:
    0 0 0 0.12em var(--gold-4),
    0 0 1.4em rgba(255, 210, 110, 0.75),
    0 0.5em 0.8em rgba(0, 0, 0, 0.6),
    inset 0 0.2em 0.4em rgba(255, 255, 255, 0.25);
  animation: pop-in 0.4s cubic-bezier(0.2, 1.4, 0.35, 1);
}
.bs-won::before,
.bs-won::after {
  content: '★';
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  color: var(--gold-1);
  font-size: 1.2em;
  text-shadow: 0 0 0.4em rgba(255, 210, 110, 0.9);
}
.bs-won::before {
  left: 0.45em;
}
.bs-won::after {
  right: 0.45em;
}
.bs-won b {
  font-size: 2em;
  white-space: nowrap;
}
.bs-won.painted,
.cel-plate.painted {
  background: url(../../art/prize-plate.webp) center / 100% 100% no-repeat;
  border: 0;
  box-shadow: none;
  aspect-ratio: var(--pp-ar, 3);
  height: auto;
  padding: 0 var(--pp-px, 24%);
  align-items: center;
}
/* vertical centring on the ruby (its rim is thicker at the bottom): the amount moves by half the difference */
.bs-won.painted > b,
.cel-plate.painted > div {
  translate: 0 calc((var(--pp-py0, 21%) - var(--pp-py1, 16%)) * 0.12);
}
.bs-won.painted::before,
.bs-won.painted::after,
.cel-plate.painted::before,
.cel-plate.painted::after {
  display: none;
}
.bs-won.painted {
  width: min(26em, 84vw, 100%);
}
.bs-won.painted b {
  font-size: 2.8em;
}
.cel-plate.painted {
  width: min(30em, 90vw);
}
.bs-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
}
.bs-actions {
  width: min(clamp(140px, 34vw, 210px), 100%);
}
.bs-actions .btn-gold,
.bs-actions .pill {
  width: 100%;
}
.bs-actions .pill {
  font-size: 1.1em;
}

/* ---------------- sheets ---------------- */
.sheet {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1em;
  background: rgba(24, 12, 4, 0.72);
}
.sheet-card {
  position: relative;
  display: flex;
  width: min(100%, 40em);
  max-height: calc(100dvh - 2em);
  /* the studded wooden frame round its parchment (art/sheet-frame.webp, a measured 9-slice: .plate-sheet-frame) */
  --ph: 21em; /* the frame's wood about 1.3em thick */
  border-style: solid;
  border-color: transparent;
  border-width: 1.6em 1.35em 1.35em 1.35em;
  filter: drop-shadow(0 1em 1.2em rgba(0, 0, 0, 0.7));
  color: #3a2410;
  animation: banner-in 0.3s cubic-bezier(0.2, 1.3, 0.35, 1) both;
}
.sheet-card:has(.tabs) {
  height: min(100dvh - 2em, 44em);
}
.sheet-close {
  position: absolute;
  top: 0.4em;
  right: 0.4em;
  z-index: 2;
}
.sheet-close svg {
  width: 1.3em;
  height: 1.3em;
  fill: none;
  stroke: var(--gold-1);
  stroke-width: 2.6;
  stroke-linecap: round;
}
.sheet-body {
  overflow-y: auto;
  padding: 1.2em 1.1em;
  width: 100%;
  min-width: 0;
  font-weight: 600;
  font-size: 0.85em;
  line-height: 1.45;
}
.sheet-body h2 {
  margin: 0 0 0.5em;
  padding: 0 2.4em;
  font-size: 1.5em;
  text-align: center;
}
.sheet-body h2 > span {
  display: inline-block;
  white-space: nowrap;
  padding: 0.32em 2.3em 0.42em;
  background: url(../../art/header-plaque.webp) center / 100% 100% no-repeat;
  color: #ffe08a;
  font-weight: 900;
  text-shadow:
    0 0 0.06em #2a0804,
    0.05em 0.05em 0 #2a0804,
    -0.05em 0.05em 0 #2a0804,
    0 -0.04em 0 #2a0804,
    0 0.1em 0.2em rgba(0, 0, 0, 0.5);
} /* the title on its red header plaque */
.sheet-body h3 {
  margin: 1em 0 0.4em;
  color: #9a2a10;
  font-size: 1.05em;
}
.sheet-body p {
  margin: 0.45em 0;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4em;
  margin: 0.4em 0 0.9em;
}
.tabs .pill {
  --ph: 2.9em;
  width: 100%;
  font-size: max(0.72em, 11px);
}
.tabs .pill[aria-pressed='true'] {
  filter: drop-shadow(0 0 0.35em rgba(255, 210, 110, 0.8)) brightness(1.1);
} /* the open tab: teal and lit */
.tabs .pill[aria-pressed='false'] {
  border-image: url(../../art/btn-gold.webp) 0 96 0 96 fill / 0 calc(var(--ph) * 0.4974) 0 calc(var(--ph) * 0.4974)
    stretch;
  --gx0: 0.0886;
  --gx1: 0.0886;
  --gy0: 0.1451;
  --gy1: 0.1451;
} /* the others: ruby */
.opt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin: 0.6em 0;
}
.opt-row > span {
  color: #4a2a10;
  text-align: left;
}
.opt-row > span small {
  display: block;
  font-size: 0.8em;
  opacity: 0.8;
  color: inherit;
}
.opt-row .pill,
.opt-row .btn-gold {
  flex: none;
  min-width: 8.5em;
  --ph: max(3.2em, 42px);
  font-size: 1em;
}
.pay-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0;
  font-variant-numeric: tabular-nums;
}
.pay-table th {
  color: #8a4a10;
  font-size: 0.8em;
  text-align: center;
  padding: 0.3em;
}
.pay-table td {
  text-align: center;
  padding: 0.35em 0.2em;
  border-top: 0.06em solid rgba(110, 60, 20, 0.3);
}
.pay-table img {
  width: 1.7em;
  height: 1.7em;
  display: inline-block;
  vertical-align: middle;
}
.muted {
  opacity: 0.78;
  font-size: 0.9em;
}
.xp-bar {
  position: relative;
  height: 1.8em;
  border-radius: 1em;
  background: linear-gradient(180deg, #1a0c04, #3a2210);
  overflow: hidden;
  border: 0.1em solid var(--gold-3);
}
.xp-bar i {
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(var(--p));
  background: linear-gradient(90deg, #6fd3ff, #2f7dff);
}
.xp-bar span {
  position: relative;
  display: block;
  text-align: center;
  line-height: 1.8em;
  font-size: 0.85em;
  color: #ffe9b0;
  text-shadow:
    0 0 0.1em #000,
    0 0.08em 0.1em #000;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(40% + var(--safe-b));
  z-index: 45;
  padding: 0.5em 1.1em;
  max-width: 90vw;
  font-size: 0.82em;
  text-align: center;
  border-radius: 1.2em;
  background: rgba(40, 4, 12, 0.94);
  border: 0.12em solid var(--gold-2);
  translate: -50% 0;
  pointer-events: none;
  white-space: nowrap;
}
.toast > span {
  display: block;
}
.fx {
  position: absolute;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------------- phone lying down ---------------- */
@media (orientation: landscape) and (max-height: 520px) {
  .app {
    font-size: clamp(10px, 3.1vh, 15px);
  }
  .bg-img {
    background-image: url(../../art/bg-landscape.webp);
  }
  .game {
    display: block;
  }
  .top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding-top: calc(0.25em + var(--safe-t));
  }
  .stage {
    position: absolute;
    inset: 0;
  }
  .table {
    position: absolute;
    right: 0;
    top: max(3.4em, 44px);
    bottom: 2em;
    width: 43%;
    justify-content: center;
    gap: 0.35em;
  } /* above the floor rail */
  /* the status ribbon sits over the wheel's lower part (the screen edge cuts the wheel there) */
  .ribbon {
    position: fixed;
    left: 29vw;
    bottom: calc(0.3em + var(--safe-b));
    translate: -50% 0;
    width: min(36vw, 17em);
    margin: 0;
  }
  .board {
    --ph: 6.4em;
    padding: 0.75em 0.7em 0.7em;
  }
  .spot {
    --ph: max(3.5em, 42px);
  }
  .spot.wide {
    --ph: max(3em, 40px);
  }
  .spot .pays {
    font-size: max(0.7em, 9px);
  }
  .spot.wide .pays {
    font-size: max(0.62em, 9px);
  }
  .chip {
    width: max(3em, 40px);
    height: max(3em, 40px);
  }
  .actions {
    grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.3em 0.4em;
  }
  .actions #undo {
    grid-area: 1 / 1;
  }
  .actions #clear {
    grid-area: 1 / 2;
  }
  .actions #rebet {
    grid-area: 2 / 1;
  }
  .actions #double {
    grid-area: 2 / 2;
  }
  .actions .spin {
    grid-area: 1 / 3 / 3 / 4;
    width: max(6em, 84px);
    height: max(6em, 84px);
  }
  .actions .pill {
    --ph: 44px;
    font-size: max(1.04em, 12px);
  }
  /* the credits notice sits in the top bar, between the level and the buttons (the host and the wheel own the bottom) */
  /* the credits notice closes the bet panel (the top bar is full) */
  .notice {
    position: static;
  }
  .bs-title {
    width: min(40vw, 26em, 60vh);
  }
  .bs-won {
    --ph: 3em;
  }
  .bs-won b {
    font-size: 1.7em;
  }
  .bs-actions .btn-gold {
    --ph: max(3em, 40px);
    font-size: 1.25em;
  }
  .bs-actions .pill {
    --ph: 44px;
  }
  .stage::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.6em;
    z-index: 3;
    height: 0.9em;
    background: linear-gradient(180deg, #5a3416, #2a1406);
    box-shadow:
      0 -0.15em 0.4em rgba(0, 0, 0, 0.5),
      inset 0 0.1em 0 rgba(255, 200, 120, 0.25);
    border-top: 0.08em solid #1a0a02;
  } /* a dark wood plank closes the stage */
  .entry-logo {
    width: min(46vw, 34em, 56vh);
  }
  /* phone lying down: the host stands in the bottom-left corner, in front of the wheel's rim (the screen's edge hides his cut) */
  /* rules sheet on a short screen: one language per row, so each name keeps a readable size */
  .sheet-body {
    font-size: max(0.85em, 11px);
  }
}

/* ---------------- wide screens: desktop, tablet lying down ---------------- */
@media (orientation: landscape) and (min-height: 521px) {
  .app {
    font-size: clamp(11px, min(1.25vw, 2.1vh), 19px);
  }
  .bg-img {
    background-image: url(../../art/bg-landscape.webp);
  }
  .game {
    display: block;
  }
  .top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding-top: calc(0.6em + var(--safe-t));
  }
  .stage {
    position: absolute;
    inset: 0;
  }
  .podium {
    display: block;
    position: absolute;
    z-index: 4;
    left: var(--px0, 2vw);
    bottom: 0;
    width: var(--pw, 16em);
    height: auto;
    filter: drop-shadow(0 0.6em 0.8em rgba(0, 0, 0, 0.6));
  }
  .table {
    position: absolute;
    right: calc(1.2em + var(--safe-r));
    top: 5.6em;
    bottom: 3.6em;
    width: min(30vw, 27em);
    font-size: 1.28em; /* the bet panel is the big thing on the right */
    justify-content: center;
    gap: 0.55em;
  }
  .ribbon {
    align-self: center;
    width: min(100%, 19em);
  }
  .table {
    border-width: 1px;
    border-style: solid;
    border-color: transparent;
    border-image: url(../../art/board.webp) 70 66 65 66 fill / 1.1em 1.05em 1.05em 1.05em stretch;
    padding: 0.4em 1.2em 1em;
  }
  .table .ribbon {
    margin-top: -1.6em;
    margin-bottom: 0.2em;
  }
  .board {
    border-image: none !important;
    padding: 0.2em 0;
    filter: none;
  }
  .spots {
    gap: 0.45em;
  } /* 2 columns up to 4 numbers, 3 above (set by the board) */
  .spot {
    --ph: 4.3em;
  }
  .spot.wide {
    --ph: 3.5em;
  }
  .actions {
    grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.35em 0.45em;
  }
  .actions #undo {
    grid-area: 1 / 1;
  }
  .actions #clear {
    grid-area: 1 / 2;
  }
  .actions #rebet {
    grid-area: 2 / 1;
  }
  .actions #double {
    grid-area: 2 / 2;
  }
  .actions .spin {
    grid-area: 1 / 3 / 3 / 4;
    width: 6.4em;
    height: 6.4em;
  }
  .top {
    font-size: 1.3em;
  }
  .podium-logo {
    display: none; /* the barrel podium has the name carved in (round 2) */
    position: absolute;
    z-index: 5;
    left: calc(var(--px0) + var(--pw) * 0.24);
    width: calc(var(--pw) * 0.52);
    bottom: calc(var(--pw) * 0.83 * 0.2);
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 0.15em 0.2em rgba(0, 0, 0, 0.6));
  }
  .stand {
    display: block;
  }
  .notice {
    position: absolute;
    left: 50%;
    bottom: -2.5em;
    translate: -50% 0;
    font-size: 13px;
  } /* under the panel's frame */
  .toast {
    bottom: 18%;
  }
}

/* ---------------- tablet upright: the prize and the buttons right under the wheel, the host at the bottom ---------------- */
@media (orientation: portrait) and (min-width: 600px) {
  .bonus-stage {
    grid-template-areas: '.' 'title' 'wheel' 'side' '.';
    grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  }
  .bs-foot {
    display: contents;
  }
  /* the host leans in from the bottom-left corner (the screen's edge hides his cut) */
  .bs-host {
    position: absolute;
    left: 1vw;
    bottom: 0;
    height: min(22vh, 16em);
    z-index: 1;
  } /* low enough that his raised hand stays under the wedge labels */
  .bs-side {
    grid-area: side;
    padding: 0.6em 0 0;
  }
}

/* ---------------- bonus stage lying down: host | wheel | prize ---------------- */
@media (orientation: landscape) {
  .bonus-stage {
    grid-template-areas: 'title title title' 'host wheel side';
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 1.2em;
    padding-bottom: calc(2.2em + var(--safe-b));
    padding-top: calc(var(--hud-b, 3.4em) + 2.6em); /* air between the credits pill and the title */
    --stage-bg: url(../../art/bg-landscape.webp);
  }
  .bs-foot {
    display: contents;
  }
  .bs-host {
    grid-area: host;
    justify-self: start;
    align-self: end;
    height: min(72vh, 36em);
    max-width: 30vw;
    margin-left: calc(1vw + var(--safe-l));
    margin-bottom: calc(-2.2em - var(--safe-b));
  }
  .bs-side {
    padding-bottom: 0;
  }
  .bs-side {
    grid-area: side;
    justify-self: stretch;
    align-items: flex-start;
    padding-bottom: 0;
    padding-right: calc(1em + var(--safe-r));
    min-width: 0;
  }
  .bs-note {
    max-width: 100%;
  }
  .bs-wheel {
    align-self: center;
  }
  .bs-foot {
    margin-top: 0;
  }
  .bs-note {
    font-size: max(1.05em, 14px);
  }
  .cel-host {
    height: min(76vh, 36em);
    left: 1vw;
  }
  .cel-box {
    width: min(58vw, 30em);
    translate: 14vw 0;
    margin-top: 4vh;
  }
}

/* ---------------- animations ---------------- */
/* the edges of the screen catch a warm gold light on the big beats (never a full-screen flash) */
.app::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 37;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 6vmin 1.5vmin rgba(255, 196, 80, 0.55);
}
.app.glow::after {
  animation: edge-glow 1.1s ease-out;
}
@keyframes edge-glow {
  0% {
    opacity: 0;
  }
  27% {
    opacity: 0.65;
  }
  100% {
    opacity: 0;
  }
}
@keyframes veil-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes stage-in {
  from {
    transform: scale(1.06);
  }
  to {
    transform: none;
  }
} /* no fade: the host on it never goes see-through */
@keyframes glow-breathe {
  50% {
    filter: brightness(1.25) drop-shadow(0 0 0.5em rgba(255, 210, 110, 0.85));
  }
}
@keyframes sweep {
  from {
    transform: rotate(-16deg);
  }
  to {
    transform: rotate(16deg);
  }
}
@keyframes board-win {
  50% {
    filter: drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0.9em rgba(255, 220, 120, 0.95))
      brightness(1.12);
  }
}
@keyframes floaty {
  50% {
    transform: translateY(-0.45em);
  }
}
@keyframes breathe {
  50% {
    transform: scale(1.05);
    filter: brightness(1.12);
  }
}
@keyframes play-breathe {
  50% {
    filter: drop-shadow(0 0.18em 0.25em rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0.8em rgba(255, 200, 90, 0.8))
      brightness(1.12);
  }
}
@keyframes pop-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes slam {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  60% {
    transform: scale(1.07);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes step-punch {
  0% {
    transform: scale(1.07);
    filter: brightness(2.1) drop-shadow(0 0.4em 0.6em rgba(0, 0, 0, 0.8));
  }
  100% {
    transform: scale(1);
  }
}
@keyframes banner-step {
  0% {
    transform: scale(1.035);
    filter: brightness(2);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes banner-in {
  0% {
    transform: scale(0.3) rotate(-4deg);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes mile {
  0% {
    transform: scale(1.06);
    filter: brightness(1.7);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes spring {
  30% {
    transform: scale(1.08);
    filter: brightness(1.3);
  }
  100% {
    transform: scale(1);
  }
} /* uniform: numbers never stretch */
@keyframes coin-bump {
  40% {
    transform: scale(1.35);
    filter: brightness(1.5);
  }
}
@keyframes bump {
  40% {
    transform: scale(1.12);
  }
}
@keyframes ring {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spin-idle {
  50% {
    filter: drop-shadow(0 0.3em 0.4em rgba(0, 0, 0, 0.6)) drop-shadow(0 0 0.9em rgba(255, 200, 80, 0.9))
      brightness(1.08);
  }
} /* the light breathes, not the size */
@keyframes spin-charge {
  0% {
    transform: scale(0.86);
    filter: brightness(1.6) drop-shadow(0 0 1em rgba(255, 220, 120, 0.9));
  }
}
@keyframes shake {
  15% {
    transform: translate(0.22em, -0.12em);
  }
  35% {
    transform: translate(-0.2em, 0.14em);
  }
  55% {
    transform: translate(0.14em, 0.1em);
  }
  75% {
    transform: translate(-0.08em, -0.06em);
  }
}
@keyframes spot-hit {
  50% {
    filter: brightness(1.45) drop-shadow(0 0 0.6em rgba(255, 225, 130, 1));
    transform: scale(1.03);
  }
}
@keyframes chip-land {
  0% {
    transform: translateY(-0.35em) scale(1.12);
  }
  60% {
    transform: translateY(0.06em) scale(0.97);
  }
}
@keyframes token-in {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  70% {
    transform: scale(1.18);
    opacity: 1;
  }
}
@keyframes host-breathe {
  50% {
    transform: scale(1.012, 0.988) translateY(0.4%);
  }
}
@keyframes host-bob {
  30% {
    transform: scale(1.03, 0.97);
  }
  60% {
    transform: scale(0.99, 1.02);
  }
}
@keyframes rise {
  0% {
    transform: translateY(40%) scale(0.6);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.app.calm *,
.app.calm *::before,
.app.calm *::after {
  animation: none !important;
  transition: none !important;
}
#status.bump {
  display: inline-block;
  animation: status-sigh 0.4s ease-out;
} /* a small "almost": a dip, never a jelly */
@keyframes status-sigh {
  35% {
    transform: translateY(0.08em) scale(0.96);
  }
}
button:focus-visible,
.spot:focus-visible {
  outline: 0.16em solid #ffe08a;
  outline-offset: 0.1em;
} /* keyboard focus: a gold ring */
.spot.wide .stack {
  width: max(2em, 38px);
  height: max(2em, 38px);
  right: 6%;
  translate: 0 -55%;
} /* the BONUS bar is lower: the chip stays on its glass */

/* ---------------- the rules / options sheet ---------------- */
/* the title and the tabs stay put; only the page scrolls, with a gold scrollbar */
.sheet-body:has(.sheet-scroll) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.sheet-head {
  flex: none;
}
.sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-right: -0.6em;
  padding: 0.1em 0.6em 1.2em 0;
}
.sheet-body,
.sheet-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-3) rgba(90, 50, 20, 0.2);
}
.sheet-body::-webkit-scrollbar,
.sheet-scroll::-webkit-scrollbar {
  width: 0.55em;
}
.sheet-body::-webkit-scrollbar-track,
.sheet-scroll::-webkit-scrollbar-track {
  background: rgba(90, 50, 20, 0.2);
  border-radius: 1em;
  margin: 0.4em 0;
}
.sheet-body::-webkit-scrollbar-thumb,
.sheet-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
  border-radius: 1em;
  border: 0.1em solid rgba(60, 20, 0, 0.6);
}

/* groups: parchment cards in a thin wooden line, with hairline rows */
.opt-group {
  --ph: 3.4em;
  margin: 0.7em 0;
  padding: 0.35em 1.1em;
} /* a parchment card with ink corner flourishes (art/opt-card.webp, .plate-opt-card) */
.opt-group .opt-row {
  margin: 0;
  padding: 0.7em 0;
  min-height: 44px;
}
.opt-group .opt-row + .opt-row {
  border-top: 0.06em solid rgba(110, 60, 20, 0.25);
}
.opt-group h3 {
  margin: 0.75em 0 0.5em;
}
.opt-group .muted {
  margin: 0.5em 0 0.7em;
}
.opt-row label {
  color: #4a2a10;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4em;
}
.choice-grid .pill {
  --ph: 2.8em;
  width: 100%;
}
.choice-grid .pill[aria-pressed='true'] {
  filter: brightness(1.25) drop-shadow(0 0 0.35em rgba(255, 220, 120, 0.9));
}
.choice-grid .pill[aria-pressed='false'] {
  filter: brightness(0.8) saturate(0.85);
}
/* the switch: a dark track that lights teal, a gold knob that slides */
.switch {
  position: relative;
  flex: none;
  width: 3.6em;
  height: 2em;
  min-height: 32px;
  padding: 0;
  border-radius: 2em;
  cursor: pointer;
  border: 0.12em solid var(--gold-3);
  background: linear-gradient(180deg, #3a2410, #5a3a1c);
  box-shadow: inset 0 0.15em 0.35em rgba(0, 0, 0, 0.7);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.switch i {
  position: absolute;
  top: 50%;
  left: 0.18em;
  width: 1.55em;
  height: 1.55em;
  translate: 0 -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d6, var(--gold-1) 45%, var(--gold-3));
  box-shadow: 0 0.12em 0.25em rgba(0, 0, 0, 0.6);
  transition: left 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.switch[aria-checked='true'] {
  border-color: var(--gold-1);
  background: linear-gradient(180deg, #1f9a92, #0b5650);
  box-shadow:
    inset 0 0.15em 0.35em rgba(0, 0, 0, 0.5),
    0 0 0.5em rgba(255, 215, 110, 0.45);
}
.switch[aria-checked='true'] i {
  left: calc(100% - 1.73em);
}
/* the language dropdown: the game's teal plate, a gold chevron, the system list when opened */
.select {
  position: relative;
  flex: 0 1 13em;
  min-width: 0;
}
.select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0.55em 2.4em 0.55em 1em;
  border-radius: 0.9em;
  border: 0.12em solid var(--gold-2);
  background: linear-gradient(180deg, #1f8a84, #0b4a46);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow:
    inset 0 0.1em 0 rgba(255, 255, 255, 0.25),
    0 0.15em 0.3em rgba(0, 0, 0, 0.5);
}
.select::after {
  content: '';
  position: absolute;
  right: 0.9em;
  top: 50%;
  width: 0.55em;
  height: 0.55em;
  translate: 0 -70%;
  rotate: 45deg;
  border-right: 0.16em solid var(--gold-1);
  border-bottom: 0.16em solid var(--gold-1);
  pointer-events: none;
}
.select select option {
  background: #0b3a38;
  color: #fff;
}
button:disabled.btn-gold {
  filter: saturate(0.35) brightness(0.62);
  cursor: default;
} /* a free spin not ready yet reads as off */

/* bonus title on wide screens: about half the width, so the wheel gets the height (round 2) */
@media (orientation: landscape) and (min-height: 521px) {
  .bs-title {
    width: min(44vw, 26em, 72vh);
  }
  .bonus-stage {
    padding-top: calc(var(--hud-b, 3.4em) + 1.9em);
  }
}

/* the x2 seal a little bigger on an upright screen (round 2) */
@media (orientation: portrait) {
  .stamp:not(.parked) {
    font-size: 5.06em;
  }
}
/* phone upright: the host reaches up beside the wheel's rim, so the prize plate sits a little higher on the wheel (round 2) */
@media (orientation: portrait) and (max-width: 599px) {
  .bs-wheel > .bs-won {
    bottom: 13%;
  }
}
/* the HUD stays sharp over the BIG WIN veil */
.app:has(#celebrate:not([hidden])) .top {
  opacity: 0;
  transition: opacity 0.2s;
} /* the HUD steps aside for the BIG WIN (round 3) */
/* narrow phones: a slimmer frame so the three tabs keep their room (round 2) */
@media (max-width: 400px) {
  .sheet {
    padding: 0.6em;
  }
  .sheet-card {
    --ph: 17em;
    border-width: 1.3em 1.1em 1.1em 1.1em;
  }
  .tabs {
    gap: 0.3em;
  }
}
/* the narrowest phones keep the base host size on the bonus stage: the note and buttons beside him need the room */
@media (orientation: portrait) and (max-width: 380px) {
  .bs-host {
    height: min(30vh, 19em, 58vw);
    max-width: 46vw;
  }
}

/* ---------------- the sheets: frame, cards, headings, footer ---------------- */
/* the HUD stays lit above an open sheet; the sheet starts under it */
.app:has(#sheet:not([hidden])) .top {
  z-index: 41;
  pointer-events: none;
}
.sheet {
  padding-top: calc(var(--hud-b, 3.4em) + 0.4em);
}
.sheet-card {
  max-height: calc(100dvh - var(--hud-b, 3.4em) - 1.4em);
}
.sheet-card:has(.tabs) {
  height: min(100dvh - var(--hud-b, 3.4em) - 1.4em, 44em);
}
/* a faded desert at the foot of the parchment and a gold ornament on the frame's bottom edge */
.sheet-card::before {
  content: '';
  position: absolute;
  left: 0.2em;
  right: 0.2em;
  bottom: 0.3em;
  height: min(30%, 11em);
  background: url(../../art/desert.webp) center bottom / 100% auto no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.sheet-card::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1.75em;
  translate: -50% 0;
  width: min(13em, 46%);
  aspect-ratio: 600 / 135;
  background: url(../../art/ornament.webp) center / contain no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 0.15em 0.2em rgba(0, 0, 0, 0.5));
}
.sheet-body {
  position: relative;
  z-index: 1;
}
/* the BONUS heading: a small red plate, then a rope to the edge */
.sheet-body h3.rope {
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.sheet-body h3.rope > span {
  flex: none;
  padding: 0.22em 1.3em 0.3em;
  background: url(../../art/header-plaque.webp) center / 100% 100% no-repeat;
  color: #ffe08a;
  font-size: 0.95em;
  text-shadow:
    0 0 0.06em #2a0804,
    0.05em 0.05em 0 #2a0804,
    0 0.1em 0.15em rgba(0, 0, 0, 0.4);
}
.sheet-body h3.rope::after {
  content: '';
  flex: 1;
  min-width: 2em;
  height: 1.1em;
  background: url(../../art/rope-divider.webp) center / 100% 100% no-repeat;
}
/* the language list and the XP bar: gold-rimmed capsules like the HUD */
.select select {
  --ph: 44px;
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--ph) * 0.3);
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding-left: 0.4em;
  border-image: url(../../art/pill-blue.webp) 0 107 0 107 fill / 0 calc(var(--ph) * 0.5) 0 calc(var(--ph) * 0.5) stretch;
}
.xp-bar {
  --ph: 2.2em;
  height: var(--ph);
  border-radius: 0;
  border: 0;
  background: none;
  overflow: visible;
  border-image: url(../../art/plaque.webp) 0 62 0 62 fill / 0 calc(var(--ph) * 0.5) 0 calc(var(--ph) * 0.5) stretch;
}
.xp-bar i {
  inset: 24% calc(var(--ph) * 0.4);
  border-radius: 1em;
}
.xp-bar span {
  line-height: 2.2em;
}
/* the tabs' text area: the round ends are 0.32 of the height on both plates, about 9% of a tab's width */
.tabs .pill {
  --gx0: 0.09;
  --gx1: 0.09;
  padding: 0 calc(var(--ph) * 0.26);
  letter-spacing: 0;
}

/* ---------------- round 4 ---------------- */
/* the loading fill: a rounded gold bar that grows (clip-path keeps its round ends), clear of the end stars */
.loading i {
  transform: none;
  clip-path: inset(0 min(calc((1 - var(--p, 0)) * 100%), calc(100% - var(--ph) * 0.56)) 0 0 round 1em);
  transition: clip-path 0.15s;
  background: linear-gradient(180deg, #fff3b8 0%, #ffd45a 40%, #e09a1c 75%, #b86e0a 100%);
  box-shadow:
    inset 0 0.12em 0 rgba(255, 255, 255, 0.55),
    inset 0 -0.1em 0.15em rgba(90, 40, 0, 0.45);
}
/* the sheets' foot: room for the gold ornament; the desert only on the How to play page */
.sheet-body:has(.sheet-scroll) {
  padding-bottom: 1.9em;
} /* the scrolling page ends above the footer ornament */
.sheet-body:not(:has(.sheet-scroll)) {
  padding-bottom: 2.6em;
}
.sheet-card::before {
  display: none;
}
.sheet-card:has(.tab[data-tab='play'][aria-selected='true'])::before {
  display: block;
}
/* the info pills of the bonus / free spin and the credits line on the stages: the HUD's gold-rimmed capsule */
.bs-note,
.stage-notice {
  --ph: 2.3em;
  display: flex;
  align-items: center;
  height: var(--ph);
  padding: 0 1.15em;
  border-radius: 0;
  background: none;
  border: 0 solid transparent;
  border-image: url(../../art/plaque.webp) 0 62 0 62 fill / 0 calc(var(--ph) * 0.5) 0 calc(var(--ph) * 0.5) stretch;
}
.bs-foot {
  padding-right: max(12px, var(--safe-r));
  box-sizing: border-box;
}
/* the bonus wheel stands on the floor: a soft shadow under it */
.bs-wheel::before {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -7%;
  height: 12%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}
/* upright: the bonus stage stands in the title screen's saloon (its posters sit low, never cut by the title) */
@media (orientation: portrait) {
  .bonus-stage {
    --stage-bg: url(../../art/bg-entry.webp);
  }
}
/* the title screen: its own scenery upright, a bigger whole fox (the button covers his boots only) */
.app[data-screen='entry'] .bg-img {
  background-image: url(../../art/bg-entry.webp);
}
@media (orientation: portrait) {
  .entry-logo {
    width: min(84vw, 34em, 40vh);
  }
}
@media (orientation: landscape) {
  .app[data-screen='entry'] .bg-img {
    background-image: url(../../art/bg-entry-wide.webp);
  }
  .entry-logo {
    width: min(40vw, 34em, 56vh);
  }
}
/* upright: a cheering host stands half an em lower (his raised arms stay off the wedge labels) */
@media (orientation: portrait) {
  .host {
    transition: margin-top 0.2s;
  }
  .host[data-pose='cheer'] {
    margin-top: 0.5em;
  }
}

/* ---------------- round 5 ---------------- */
/* the title screen: an opaque dark bar until its frame art paints (the boots never show through), the fox's soles
   resting on the button's top edge, the poster moved clear of his hat, a balanced disclaimer */
.loading {
  background-color: #2a1406;
  border-radius: calc(var(--ph) / 2);
}
.entry-host {
  margin-bottom: 0;
}
.entry-cta {
  margin-top: 0;
}
@media (orientation: portrait) {
  .app[data-screen='entry'] .bg-img {
    background-size: 112% auto;
    background-position: 50% 100%;
  }
}
.disclaimer {
  text-wrap: balance;
}
/* the bonus lying down stands in the title saloon too (no skull or rope near the title) */
@media (orientation: landscape) {
  .bonus-stage {
    --stage-bg: url(../../art/bg-entry-wide.webp);
  }
}
/* an open sheet: the table's credits pill steps aside, the page fades in and out at its edges */
.app:has(#sheet:not([hidden])) .notice {
  visibility: hidden;
}
.sheet-scroll {
  -webkit-mask-image: linear-gradient(transparent, #000 0.8em, #000 calc(100% - 0.8em), transparent);
  mask-image: linear-gradient(transparent, #000 0.8em, #000 calc(100% - 0.8em), transparent);
}
/* the Pays page is short: the sheet fits it */
.sheet-card:has(.tab[data-tab='pays'][aria-selected='true']) {
  height: auto;
}
/* wide screens: sheet text never under 13.5 px */
@media (orientation: landscape) and (min-height: 521px) {
  .sheet-body {
    font-size: max(0.85em, 13.5px);
  }
}
/* the chosen wheel: the ruby plate, like an open tab */
.choice-grid .pill[aria-pressed='true'] {
  border-image: url(../../art/btn-gold.webp) 0 96 0 96 fill / 0 calc(var(--ph) * 0.4974) 0 calc(var(--ph) * 0.4974)
    stretch;
  --gx0: 0.0886;
  --gx1: 0.0886;
  --gy0: 0.1451;
  --gy1: 0.1451;
  filter: drop-shadow(0 0 0.35em rgba(255, 210, 110, 0.8));
}
/* the phone's bonus stage: title and wheel sit higher (less air above them) */
@media (orientation: portrait) and (max-width: 599px) {
  .bonus-stage {
    grid-template-rows: minmax(0, 0.25fr) auto auto minmax(0, 1fr) auto;
  }
}

/* ---------------- final round ---------------- */
/* the loading bar before its frame art paints: a gold-ringed cream capsule, dark-brown % (never a bare dark pill) */
.loading:not(.nine) {
  background: linear-gradient(180deg, #f6e7c2, #e4c88f);
  box-shadow:
    0 0 0 0.16em #f0c04a,
    0 0 0 0.26em #8a4a0a,
    inset 0 0.12em 0.3em rgba(90, 50, 10, 0.35),
    0 0.3em 0.6em rgba(0, 0, 0, 0.5);
}
/* the toasts: one size and one plate everywhere, the HUD's gold-rimmed capsule with cream text */
.toast {
  --ph: 2.7em;
  width: max-content;
  max-width: 92vw;
  display: flex;
  align-items: center;
  height: var(--ph);
  white-space: nowrap;
  padding: 0 1.5em;
  font-size: max(14px, 1em);
  color: #ffe9b0;
  border-radius: 0;
  background: none;
  border: 0 solid transparent;
  border-image: url(../../art/plaque.webp) 0 62 0 62 fill / 0 calc(var(--ph) * 0.5) 0 calc(var(--ph) * 0.5) stretch;
  filter: drop-shadow(0 0.25em 0.4em rgba(0, 0, 0, 0.6));
  text-shadow: 0 0.08em 0.1em #000;
}
@media (orientation: landscape) and (min-height: 521px) {
  .toast {
    font-size: max(16px, 1em);
  }
}
.toast > span {
  padding: 0 2px;
} /* 2 px of air: a capsule as wide as its text must not make fit.js shrink it */

/* End of assets/ui/styles.css */
