/* Part 3 of 4 of the game's styles (they load in this order: styles.css, styles-placement.css, styles-polish.css, styles-final.css). */

/* ============================== S. Polish rounds ============================== */
/* a winning total glows gold (the art is amber: turned toward gold so it never reads as a warning) */
.badge[data-state='win'],
.badge[data-state='blackjack'],
.tag-win,
.tag-blackjack {
  filter: hue-rotate(18deg) saturate(1.2) brightness(1.18) drop-shadow(0 0 0.45em rgba(255, 214, 110, 0.7));
}
.badge[data-state='win'] > span,
.badge[data-state='blackjack'] > span {
  color: #fff6d6;
}
/* panels always fit the screen: the grid track is the screen's width (a long label can no longer widen it),
   the body scrolls inside what is left under the crest, and the close button stays on screen */
.sheet {
  grid-template-columns: minmax(0, 1fr);
}
.sheet-body {
  max-height: calc(100vh - 4.6em - 64px);
  max-height: calc(100dvh - 4.6em - 64px);
}
.sheet-close {
  right: 0;
}
.app[data-mode='landscape'] .sheet-bear {
  width: auto;
  height: min(22vh, 8em);
  margin-top: 0;
}
.app[data-mode='landscape'] .sheet-title-img {
  width: auto;
  height: min(15vh, 4.6em);
  max-width: 96%;
}
.app[data-mode='landscape'] .level-big {
  font-size: 0.72em;
}
.app[data-mode='landscape'] .sheet-body {
  gap: 0.4em;
}
/* rules, ACTIONS: every move plate is the same width on the left; its line of text and the example cards
   share the column on the right (text above, cards under it), so the text never shrinks to one word a line */
.rule-move {
  display: grid;
  grid-template-columns: 8.4em minmax(0, 1fr);
  grid-template-areas: 'plate text' 'plate cards';
  align-items: center;
  column-gap: 0.6em;
  row-gap: 0.2em;
}
.rule-move .rule-plate {
  grid-area: plate;
  width: 100%;
  min-width: 0;
  padding-left: calc(var(--ph) * 0.16);
  gap: 0.2em;
}
.rule-plus {
  min-width: 0 !important;
}
.rule-move .rule-text {
  grid-area: text;
}
.rule-move .rule-cards {
  grid-area: cards;
  justify-self: start;
}
.rule-cards .mini-card {
  width: 1.35em;
}
.tabs button {
  font-size: max(0.62em, 10px);
}
/* small labels that were under 10 px */
.toggle {
  font-size: max(0.62em, 10px);
}
.stat small {
  font-size: max(0.56em, 10px);
}
.ach-bar {
  height: 1.2em;
}
.ach-bar em {
  font-size: max(0.56em, 10px);
}
.sheet-text {
  text-wrap: balance;
}
.stat small {
  white-space: normal;
  line-height: 1.1;
  min-height: 2.2em;
  display: grid;
  place-items: end center;
}
.opt.reward {
  justify-content: center;
}
/* landscape: the insurance question sits at the bottom, under the seats: the dealer's Ace stays in view */
.app[data-mode='landscape'] .sheet.is-low {
  place-items: end center;
  padding: 0 0.5em 0.4em;
  background: linear-gradient(transparent 45%, rgba(16, 13, 8, 0.55));
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(24em, 58vw);
}
.app[data-mode='landscape'] .sheet.is-low .sheet-body {
  gap: 0.3em;
}
.sheet.is-low {
  padding-top: 44.5vh;
  padding-top: 44.5dvh;
}
/* landscape, after the round: the tray keeps its betting place left of REBET / NEW BET (never under them) */
.app[data-phase='result'][data-mode='landscape'] .rack {
  left: calc(50% - var(--wr) * 0.19);
}
/* a result title is placed and sized by banner (src/main.js): x of its hand, width from the room it has */
.outcome {
  left: var(--out-x, 50%);
  right: auto;
  translate: -50% -50%;
  width: max-content;
}
.outcome .outcome-title {
  max-width: 94vw;
}
.tag {
  min-width: 0;
}
/* the amount joins a beat after its title (impact first, then the number) */
.celebrate:not([hidden]) .cel-amount:not(.step) {
  animation: pop 0.35s 0.2s ease-out both;
}
/* BUST: the red title is softened (errors are gentle) */
.outcome-title[src*='title-bust'] {
  filter: brightness(1.08) drop-shadow(0 0 0.06em rgba(0, 0, 0, 0.95)) drop-shadow(0 0.3em 0.5em rgba(14, 12, 6, 0.75));
}
/* while a hand is played the tray is out of use: it steps back further, so a tip over it reads cleanly */
.app[data-mode='portrait'][data-phase='player'] .rack {
  opacity: 0.3;
}
/* wins in a row: a readable gold badge with its own room under the balance */
.streak {
  top: calc(100% + 0.55em);
  font-size: max(0.78em, 11px);
  --ph: 1.75em;
}
.btn-surrender[hidden] {
  display: none;
}
.row-more {
  left: 12px;
  translate: 0 -50%;
}
.wheel-win.step {
  animation: step-punch 0.34s ease-out both;
}
/* the wheel is its own scene: the lobby does not read through it */
.wheel-stage {
  background: radial-gradient(circle at 50% 46%, rgba(59, 48, 27, 0.95), rgba(18, 15, 8, 0.985));
}
/* lobby: one line per table name (fitted), readable plates */
.table-card h3 {
  min-height: 1.5em;
}
.table-card h3 > span {
  white-space: nowrap;
}
.table-card .range {
  font-size: max(0.7em, 10px);
}
.table-card .state {
  font-size: max(0.64em, 10px);
}
/* bet row: the icon sits on the plate's left bevel, so the word keeps a readable size */
.row-bet .btn-act:has(.ico) {
  padding-left: calc(var(--ph) * 0.14);
  padding-right: calc(var(--ph) * 0.18);
  gap: 0.15em;
}
.row-bet .btn-act .ico {
  height: calc(var(--ph) * 0.38);
}
/* split hands on a phone: HAND 1 / HAND 2 sit where the printed rules are, so the print steps back */
.app[data-mode='portrait'] .world.is-split .felt {
  opacity: 0.12;
}
/* wide screens: the insurance question sits on the empty left of the felt, the dealer's Ace and the hands in view */
.app[data-mode='landscape'] .sheet.is-low {
  place-items: center start;
  padding: 3.4em 0.5em 0.5em 2%;
  background: linear-gradient(90deg, rgba(16, 13, 8, 0.55), transparent 50%);
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(20em, 34vw);
}
.wheel-stage.is-leaving {
  animation: fade-out 0.26s ease-in both;
  pointer-events: none;
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
/* the lobby: the PLAY of the open tables breathes, so the screen is never still */
.table-card:not(.is-locked) .btn-act {
  animation: play-breathe 1.4s ease-in-out infinite alternate;
}
.rule-move .rule-plate > span {
  font-size: max(1.02em, 10px);
}
/* the XP line and "Lv" read on every screen */
.xp em {
  font-size: max(0.62em, 10px);
}
.app[data-mode='landscape'] .xp em {
  font-size: max(0.66em, 11px);
}
.level-badge small {
  font-size: max(0.5em, 9px);
}
.marks {
  z-index: 15;
} /* totals, HAND n and BET plates stay above the cards (cards carry their own z-index) */
.row-next .btn-newbet {
  font-size: 1.08em;
}
/* a result under the cards on a phone (YOU WIN, PUSH, BUST, BLACKJACK): the tray and the idle moves step back */
.app[data-mode='portrait'].has-banner .rack,
.app[data-mode='portrait'].has-banner .row-act,
.app[data-mode='portrait'].celebrating .rack,
.app[data-mode='portrait'].celebrating .row-act {
  opacity: 0.1;
  transition: opacity 0.2s;
}
.fit-noico > .ico {
  display: none;
}
/* settings rows in every language: the toggle grows with its word (LIGADO, ВЫКЛ...), the name is fitted */
.toggle {
  width: auto;
  min-width: 4.2em;
  display: inline-flex;
  align-items: center;
  padding: 0 0.55em 0 1.75em;
}
.toggle[aria-pressed='true'] {
  padding: 0 1.75em 0 0.6em;
}
.toggle span,
.toggle[aria-pressed='true'] span {
  position: static;
  translate: none;
  white-space: nowrap;
}
.opt > .opt-name {
  flex: 0 1 auto;
  min-width: 0;
}
.seg {
  flex: 0 0 auto;
}
.seg button {
  padding: 0.35em 0.5em;
}
/* rules tabs: a long translation puts them on two rows, never cut */
.tabs {
  flex-wrap: wrap;
}
.tabs button {
  flex: 1 1 auto;
  overflow: visible;
}
.app[data-mode='landscape'] .wheel-note {
  left: 31%;
  right: auto;
  top: 96.5%;
  translate: -50% -50%;
  white-space: nowrap;
}
.seg button {
  min-width: 4.6em;
}
.sheet-actions.three .btn-act {
  padding-inline: calc(var(--ph) * 0.38);
}
/* rules tabs: a 2 x 2 grid on a phone (room for long translations), one row on wide screens; labels fitted */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3em;
}
.app[data-mode='landscape'] .tabs {
  grid-template-columns: repeat(4, 1fr);
}
.tabs button {
  min-width: 0;
  overflow: hidden;
}
/* the wheel is a scene of the club: the room shows behind it, the lobby and table UI do not */
.app:has(.wheel-stage:not([hidden])) .lobby,
.app:has(.wheel-stage:not([hidden])) .game,
.app:has(.wheel-stage:not([hidden])) .world {
  visibility: hidden;
}
.wheel-stage {
  background: radial-gradient(circle at 50% 46%, rgba(59, 48, 27, 0.55), rgba(18, 15, 8, 0.86));
}
.app:has(.wheel-stage:not([hidden])) .bear {
  visibility: hidden;
}
/* round 2: the printed rules leave completely under a title, a split or a panel (no ghost letters around them) */
.world.felt-hidden .felt,
.app[data-mode='portrait'] .world.is-split .felt,
.app:has(#sheet:not([hidden])) .felt {
  opacity: 0;
}
/* the HUD stays lit during a celebration: the coins fly to a balance you can read */
.app.celebrating .top {
  filter: none;
}
/* landscape: the tray steps back under a result too (the amount sits over it) */
.app[data-mode='landscape'].has-banner .rack,
.app[data-mode='landscape'].celebrating .rack {
  opacity: 0.12;
  transition: opacity 0.2s;
}
.app[data-mode='landscape'].celebrating .row-act {
  opacity: 0.15;
  transition: opacity 0.2s;
}
/* phone: the insurance question takes the place of the moves (the dealer's Ace and the player's hand stay in view) */
.app[data-mode='portrait'] .sheet.is-low {
  place-items: end center;
  padding: 0 0.5em max(0.6em, env(safe-area-inset-bottom));
  background: linear-gradient(transparent 55%, rgba(16, 13, 8, 0.6));
}
/* a total moves with its hand (the hand re-centres as cards arrive), it never jumps */
.total.placed {
  transition: transform 0.2s ease-out;
}
/* the wheel: the HUD stays on top (the prize flies to a balance in view), SPIN goes grey while it turns,
   the bear jumps once for the prize */
.app:has(.wheel-stage:not([hidden])) .top {
  z-index: 66;
}
.btn-spin:disabled {
  filter: grayscale(0.8) brightness(0.72);
  animation: none;
}
.wheel-bear.hop {
  animation: bear-hop 0.55s cubic-bezier(0.3, 1.4, 0.5, 1);
}
@keyframes bear-hop {
  40% {
    transform: translateY(-7%) rotate(-2deg);
  }
  100% {
    transform: none;
  }
}
/* REBET and NEW BET: a matching pair, the same plate shape and size */
.row-next .btn-again,
.row-next .btn-newbet {
  flex: 1 1 0;
  --ph: 3.3em;
  font-size: 1.12em;
  min-width: 0;
}
.app[data-mode='landscape'] .row-next .btn-again,
.app[data-mode='landscape'] .row-next .btn-newbet {
  --ph: 3em;
}
.row-next .btn-again:not(:disabled) {
  animation: play-breathe 1.4s ease-in-out infinite alternate;
}
/* a side bet with chips on it keeps its name while betting: it moves just above its circle */
.spots.is-open .spot-side.has-bet .spot-label {
  opacity: 1;
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% -0.15em;
  max-width: none;
  white-space: nowrap;
}
/* the language list closes like the other controls (own arrow, no system look) */
.opt select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.7em;
  background: rgba(33, 27, 15, 0.9)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23bff3ff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    right 0.6em center / 0.75em auto no-repeat;
}
/* a panel whose content scrolls says so: the last line fades out until the end is reached */
.sheet-body.is-scroll:not(.at-end) {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 2.2em), transparent);
  mask-image: linear-gradient(#000 calc(100% - 2.2em), transparent);
}
.maker {
  bottom: 2.2%;
}
.btn-tab .gift-dot {
  top: 0.35em;
  right: 0.35em;
}
.app.celebrating .felt {
  opacity: 0;
}
.rule-move .rule-plate {
  font-size: max(0.95em, 11px);
  --ph: 2.45em;
}

/* ---------- round 3 ---------- */
/* once the round is decided the moves leave (they come back with the next decision); the tray stays and,
   after the round, it can already pick the next chip */
.app.is-settling .row-act,
.app.is-settling .row-more {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.app[data-phase='result'] .rack {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}
.app.has-banner .rack,
.app.celebrating .rack {
  opacity: 0 !important;
  transition: opacity 0.2s;
}
.row-next .btn-act {
  flex-direction: row;
  gap: 0.35em;
}
.row-next .btn-act .ico {
  height: calc(var(--ph) * 0.42);
}
/* rules tabs always 2 x 2 (landscape included: room for TABLE RULES in every language) */
.app[data-mode='landscape'] .tabs {
  grid-template-columns: 1fr 1fr;
}
.sheet-body.is-scroll:not(.at-end) {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 3.2em), transparent);
  mask-image: linear-gradient(#000 calc(100% - 3.2em), transparent);
}
/* title screen: the notice and the maker never meet */
.disclaimer {
  top: 93.6%;
}
/* the streak badge and +XP: hidden under a panel, +XP rises from the bar's right end */
.app:has(#sheet:not([hidden])) .streak {
  visibility: hidden;
}
.float-xp {
  left: auto;
  right: 0.6em;
}
/* panels that wait for an answer cover the screen behind them better */
.sheet[data-modal='1']:not(.is-low) {
  background: rgba(16, 13, 8, 0.84);
}
.app[data-mode='portrait'] .sheet.is-low {
  padding-bottom: max(1.4em, env(safe-area-inset-bottom));
}
/* landscape phone: controls of panels and the title row reach 40 px */
.app[data-mode='landscape'] .opt {
  --ph: 3.4em;
}
.app[data-mode='landscape'] .entry-row .btn-act {
  --ph: 3.4em;
}
.app[data-mode='landscape'] .sheet-actions .btn-act {
  --ph: 3.4em;
}
.app[data-mode='landscape'] .spot-side .spot-label {
  font-size: max(0.56em, 10px);
}
.spot-side .spot-label {
  font-size: max(0.5em, 10px);
}
.sheet-body > * {
  flex-shrink: 0;
} /* rows keep their height; the body scrolls instead */
.app:has(.wheel-stage:not([hidden])) .fx {
  z-index: 67;
} /* the prize coins fly over the wheel scene, to the balance */

/* ---------- round 4 (coordinator's list) ---------- */
/* the bet ellipse glows like the design (04, 05): a bright ring framing the stack and the BET plate */
.spot .ring {
  border: 0.16em solid rgba(253, 237, 192, 0.85);
  box-shadow:
    0 0 0.9em rgba(251, 215, 115, 0.55),
    inset 0 0 1em rgba(251, 215, 115, 0.25);
}
.spot-label {
  color: #fffaee;
  font-weight: 700;
  text-shadow:
    0 0 0.4em rgba(251, 215, 115, 0.7),
    0 1px 2px rgba(22, 17, 8, 0.9);
}
.spot-side .spot-label::before,
.spot-side .spot-label::after {
  content: '✦';
  margin: 0 0.25em;
  color: rgba(253, 237, 192, 0.9);
  font-size: 0.8em;
}
/* the tray stays in view during the round (only a little dimmer: it is not in use) */
.app[data-phase='player'] .rack,
.app[data-phase='deal'] .rack,
.app[data-phase='dealer'] .rack,
.app[data-phase='insurance'] .rack,
.app[data-mode='portrait'][data-phase='player'] .rack {
  opacity: 0.85;
  filter: saturate(0.85);
}
/* WIN STREAK: under the round buttons on the right, away from the balance and the coins' path */
.streak {
  left: auto;
  right: max(0.5em, env(safe-area-inset-right));
}
/* the strategy tip on a painted plate (badge art), not a plain box */
.tip.plate {
  padding: 0 calc(var(--ph) * var(--gr, 0.4)) 0 calc(var(--ph) * var(--gl, 0.4));
  background: none;
  box-shadow: none;
  border-radius: 0;
  --ph: 2.4em;
}
/* SURRENDER as tall as a touch target */
/* insurance: on a phone without the crest (it would reach the hand), on wide screens beside the hand */
.app[data-mode='portrait'] .sheet.is-low .sheet-card::before {
  display: none;
}
.app[data-mode='landscape'] .sheet.is-low {
  place-items: center start;
  padding: 3.4em 0.5em 0.5em calc(50% + var(--wr) * 0.1);
  background: none;
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(20em, 30vw);
}
/* results on their painted panels (placed and sized by banner in src/main.js) */
.outcome {
  left: var(--out-x, 50%);
  top: var(--out-y, 50%);
  translate: -50% -50%;
  width: var(--pw, 60vw);
  height: var(--ph, 20vw);
  display: block;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0.4em 0.6em rgba(14, 12, 6, 0.6));
}
.outcome .outcome-title {
  position: absolute;
  left: 50%;
  top: calc(var(--ty) * 100%);
  translate: -50% -50%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 0.15em 0.2em rgba(14, 12, 6, 0.7));
}
.outcome .outcome-amount {
  position: absolute;
  left: 50%;
  top: calc(var(--ay) * 100%);
  translate: -50% -50%;
  margin: 0;
  font-size: calc(var(--ph) * 0.34);
  white-space: nowrap;
}
.outcome .outcome-sub {
  position: absolute;
  left: 50%;
  top: 76%;
  translate: -50% -50%;
  margin: 0;
  border-image: none !important;
  background: none !important;
  padding: 0;
  height: auto;
  font-size: max(calc(var(--ph) * 0.17), 13px);
  white-space: nowrap;
  color: #fef9eb;
  text-shadow: 0 1px 2px rgba(22, 17, 8, 0.9);
  animation: none;
}
.outcome.panel-in {
  animation: panel-in 0.32s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
@keyframes panel-in {
  from {
    scale: 0.7;
    opacity: 0;
  }
}
.outcome-title[src*='title-bust'] {
  filter: drop-shadow(0 0.15em 0.2em rgba(14, 12, 6, 0.7));
}
/* the tray no longer leaves under a result: the panels have their own room above it */
.app.has-banner .rack {
  opacity: 0.85 !important;
}
.cel-panel {
  position: absolute;
  translate: -50% -50%;
  filter: drop-shadow(0 0.5em 0.8em rgba(14, 12, 6, 0.7));
}
.cel-panel.panel-in {
  animation: panel-in 0.36s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.cel-title,
.cel-amount {
  left: var(--cel-x, 50%);
}
.cel-panel:not([hidden]) ~ .cel-amount {
  font-size: var(--cel-amount-size, 3.1em);
}
/* the wheel scene: the felt shows through, coin piles at the wheel's foot, a close button,
   the bear on a soft shadow */
.wheel-stage {
  background: radial-gradient(circle at 50% 46%, rgba(59, 48, 27, 0.35), rgba(18, 15, 8, 0.72));
}
.wheel-pile {
  position: absolute;
  width: 16%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0.3em 0.4em rgba(14, 12, 6, 0.6));
}
.wheel-pile.l {
  left: 4%;
  top: 68%;
}
.wheel-pile.r {
  right: 4%;
  top: 70%;
  transform: scaleX(-1);
}
.app[data-mode='landscape'] .wheel-pile {
  width: 9%;
}
.app[data-mode='landscape'] .wheel-pile.l {
  left: 8%;
  top: 70%;
}
.app[data-mode='landscape'] .wheel-pile.r {
  right: auto;
  left: 47%;
  top: 70%;
}
.wheel-close:not([hidden]) {
  z-index: 3;
}

/* ---------- round 5 ---------- */
/* the decided round's moves are gone, celebration or not (they no longer show faintly behind a title) */
.app.is-settling .row-act,
.app.is-settling .row-more,
.app[data-phase='insurance'] .row-act {
  opacity: 0 !important;
  pointer-events: none;
}
/* the wheel's close button sits under the HUD, never on the sound button */
.wheel-close {
  top: calc(max(0.6em, env(safe-area-inset-top)) + 3.4em);
  right: 0.6em;
}
.app[data-mode='landscape'] .wheel-close {
  top: calc(max(0.9em, env(safe-area-inset-top)) + 3.8em);
}
/* WIN STREAK under the XP bar (clear of the balance, the bear's paws and the shoe) */
.streak {
  left: calc(max(0.45em, env(safe-area-inset-left)) + 7.6em);
  right: auto;
  top: calc(100% + 0.35em);
}
.app[data-mode='landscape'] .streak {
  left: calc(max(2%, env(safe-area-inset-left)) + 11.5em);
}
/* SURRENDER: a real touch target in every size */
/* PUSH line readable */
.outcome .outcome-sub {
  font-size: max(calc(var(--ph) * 0.2), 13px);
}
/* insurance: phone, clear of the footer; wide screens, on the empty left of the felt (totals and hands in view) */
.app[data-mode='portrait'] .sheet.is-low {
  padding-bottom: max(2.4em, env(safe-area-inset-bottom));
}
.app[data-mode='landscape'] .sheet.is-low {
  place-items: center start;
  padding: 3.4em 0.5em 0.5em 4%;
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(20em, calc(50% - var(--wr) * 0.12));
}
/* settings in landscape: two columns of rows, so everything fits without scrolling */
.app[data-mode='landscape'] #sheet-card:has(.toggle) {
  width: min(54em, 94vw);
}
.app[data-mode='landscape'] #sheet-body:has(.toggle) > .opt {
  min-width: 0;
  width: 100%;
}
.app[data-mode='landscape'] #sheet-body:has(.toggle) .slider {
  min-width: 2.5em;
}
.app[data-mode='landscape'] #sheet-body:has(.toggle) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.8em;
  align-items: center;
}
.app[data-mode='landscape'] #sheet-body:has(.toggle) > .sheet-title,
.app[data-mode='landscape'] #sheet-body:has(.toggle) > .sheet-actions {
  grid-column: 1 / -1;
  justify-self: center;
}

/* ---------- round 6 ---------- */
/* the wheel's prize sits on its hub; SPIN becomes a glowing COLLECT that waits for the tap */
.wheel-win {
  left: 58%;
  top: 47%;
  z-index: 4;
  padding: 0.15em 0.5em;
  border-radius: 1em;
  background: radial-gradient(ellipse at center, rgba(25, 20, 11, 0.85) 40%, rgba(25, 20, 11, 0) 75%);
}
.app[data-mode='landscape'] .wheel-win {
  left: 31%;
  top: 44%;
}
.btn-spin.is-collect {
  font-size: 1.6em;
  animation: play-breathe 0.9s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 0.8em rgba(255, 214, 110, 0.9)) drop-shadow(0 0.25em 0.4em rgba(14, 12, 6, 0.55));
}
/* wide screens: the printed rules are big and bright under the bear */
.app[data-mode='landscape'] .felt-t1 {
  fill: rgba(254, 246, 223, 0.86);
  filter: drop-shadow(0 0 0.35em rgba(251, 215, 115, 0.45));
}
.app[data-mode='landscape'] .felt-t2 {
  fill: rgba(252, 240, 207, 0.7);
}
.app[data-mode='landscape'] .spots.is-open .spot-main .spot-label {
  font-size: max(0.8em, 12px);
}
.app[data-mode='landscape'] .spot-side .spot-label {
  font-size: max(0.66em, 11px);
}
/* top bar on wide screens: a MENU plate, the rules "?" and a "+" on the balance that opens
   the free-coins gift (never a purchase); on a phone only the round buttons */
.menu-word,
.btn-help,
.balance-plus {
  display: none;
}
.app[data-mode='landscape'] .btn-help {
  display: grid;
}
.app[data-mode='landscape'] #btn-menu {
  --ph: 3em;
  width: auto;
  height: var(--ph);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4em;
  padding: 0 1.1em;
  background: none;
}
.app[data-mode='landscape'] #btn-menu .ico {
  width: 1.35em;
  height: 1.35em;
}
.app[data-mode='landscape'] .menu-word {
  display: inline;
  font: 700 1.05em var(--serif);
  letter-spacing: 0.08em;
  color: #fffbf2;
  text-shadow: 0 0.07em 0 rgba(25, 20, 9, 0.9);
}
.app[data-mode='landscape'] .balance-plus {
  display: block;
  position: relative;
  width: 1.9em;
  height: 1.9em;
  margin: 0 -0.5em 0 0.2em;
  flex: none;
}
.balance-plus img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.balance-plus:active {
  transform: scale(0.9);
}
.app[data-mode='landscape'] .balance {
  gap: 0.4em;
}
/* stats: an icon on every tile, a medal on every achievement; a locked one is greyed */
.stat-ico {
  display: block;
  height: 1.9em;
  width: auto;
  max-width: 70%;
  margin: 0 auto 0.15em;
  object-fit: contain;
  filter: drop-shadow(0 0.1em 0.12em rgba(14, 12, 6, 0.6));
}
.ach .medal {
  width: 2.9em;
  height: 2.9em;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 0.12em 0.15em rgba(14, 12, 6, 0.6));
}
.ach:not(.is-done) .medal {
  filter: grayscale(0.85) brightness(0.75);
}
.ach.is-done > .ico {
  position: absolute;
  left: 2.1em;
  top: 0.35em;
  width: 1.1em;
  height: 1.1em;
}
.ach {
  position: relative;
}
/* rules: the example cards are big enough to read */
.rule-cards .mini-card {
  width: 2.15em;
}
.mini-card + .mini-card {
  margin-left: -0.75em;
}
.rule-cards .ico {
  width: 1.5em;
  height: 1.5em;
}
.rule-plus {
  font-size: 1.15em;
}
/* the wheel stands on a crystal base in the club itself: no felt behind it, the bear on the floor */
.app:has(.wheel-stage:not([hidden])) .table {
  visibility: hidden;
}
.wheel-stage {
  background: radial-gradient(circle at 50% 46%, rgba(59, 48, 27, 0.25), rgba(18, 15, 8, 0.6));
}
.wheel-base {
  position: absolute;
  left: 50%;
  top: 84%;
  width: 112%;
  height: auto;
  translate: -50% 0;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 0.6em 0.6em rgba(14, 12, 6, 0.55));
}
.wheel-wrap {
  margin-bottom: 2%;
}
.app[data-mode='landscape'] .wheel-wrap {
  top: 42%;
  width: min(60vh, 36vw);
}
.app[data-mode='landscape'] .btn-spin,
.app[data-mode='landscape'] .wheel-win:not([hidden]) ~ .btn-spin {
  top: 86%;
}
.app[data-mode='landscape'] .wheel-note {
  top: 97%;
}
.app[data-mode='landscape'] .wheel-win {
  top: 42%;
}
.app[data-mode='portrait'] .opt select {
  max-width: 6.8em;
  min-width: 0;
}
/* blackjack: the amount on a light plate; the tray stays in view (only big wins take the bottom of the screen) */
.cel-amount.has-plate {
  font-size: var(--cel-amount-size, 2.6em);
  padding: 0.18em 1.3em 0.24em;
  background: url(../../art/panel-push.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 0.25em 0.35em rgba(14, 12, 6, 0.6));
}
.app.celebrating-bj .felt {
  opacity: 0 !important;
}
/* a placed plate (positioned by transform) pops its label, not itself: scaling the plate scaled its position */
.bet-label.bump {
  animation: none;
}
.bet-label.bump > span {
  animation: bump 0.28s ease-out;
}
.app.is-settling .row-act,
.app.is-settling .row-more {
  transition: opacity 0.12s;
}
/* the wheel's prize on a light plate over the hub (it no longer mixes with the wedge labels) */
.wheel-win {
  background: url(../../art/panel-push.webp) center / 100% 100% no-repeat;
  padding: 0.3em 1.1em 0.36em;
  border-radius: 0;
  filter: drop-shadow(0 0.3em 0.5em rgba(14, 12, 6, 0.7));
}
.seg button {
  min-width: 0;
  padding: 0.4em 0.55em;
  font-size: max(0.74em, 10px);
}
.seg {
  max-width: 10em;
}
.tabs button {
  padding: 0.85em 0.45em;
}
/* level up: the bear stands bigger so the cut of his legs goes behind the panel */
.sheet[data-spot='thumbs'] .bear-spot {
  top: 6%;
  height: 41%;
}
/* a settings row's name may take two lines when a long translation meets its control (it is not a button) */
.opt > .opt-name {
  white-space: normal;
  line-height: 1.05;
  font-size: max(0.88em, 11px);
}
.sheet-actions.three .btn-act {
  padding-inline: calc(var(--ph) * 0.24);
}
.sheet-actions.three {
  gap: 0.4em;
}

/* ---------- round 7: a type floor of 11 px for small labels, 40 px hit areas ---------- */
.spot-label,
.spot-side .spot-label,
.app[data-mode='landscape'] .spot-side .spot-label {
  font-size: max(0.6em, 11px);
}
.level-badge small {
  font-size: max(0.5em, 10px);
}
.xp em,
.app[data-mode='landscape'] .xp em {
  font-size: max(0.62em, 11px);
}
.table-card h3 {
  font-size: max(0.86em, 11px);
}
.table-card .range,
.table-card .state,
.btn-tab > span {
  font-size: max(0.66em, 11px);
}
.notice,
.app[data-mode='landscape'] .notice {
  font-size: max(0.66em, 11px);
}
.toggle,
.seg button {
  font-size: max(0.66em, 11px);
}
.toggle::before,
.seg::before {
  content: '';
  position: absolute;
  inset: -0.6em -0.2em;
}
.toggle,
.seg {
  position: relative;
}
.tabs button {
  font-size: max(0.66em, 11px);
  min-height: 2.6em;
}
.sheet-sub {
  font-size: max(0.66em, 11px);
}
.stat small,
.ach-bar em {
  font-size: max(0.6em, 11px);
}
.ach-bar {
  height: 1.45em;
}
.outcome .outcome-sub {
  font-size: max(calc(var(--ph) * 0.2), 13px);
  top: 74%;
}
.float-xp {
  font-size: max(0.7em, 12px);
}
.streak {
  font-size: max(0.72em, 11px);
}
.app[data-mode='landscape'] .chip-btn {
  font-size: 1.05em;
}
.app[data-mode='landscape'] .row-bet .btn-act,
.app[data-mode='landscape'] .row-next .btn-act {
  --ph: 3.7em;
}
/* the footer line is inside every panel that asks something: not twice */
.app:has(.sheet[data-modal='1']:not(.is-low):not([hidden])) .controls .notice {
  visibility: hidden;
}
/* WIN STREAK: right-aligned under the round buttons (clear of the balance, the coins' path and the bear) */
.streak {
  left: auto;
  right: max(0.5em, env(safe-area-inset-right));
  top: calc(100% + 0.4em);
}
/* insurance on wide screens: right of the dealer's cards, the moves stepped aside (Ace and hand in view) */
.app[data-mode='landscape'] .sheet.is-low {
  place-items: start start;
  padding: 34vh 0.5em 0.5em calc(50% + var(--wr) * 0.12);
  background: none;
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(20em, calc(50vw - var(--wr) * 0.12 - 1.5em));
}
/* rules and stats on wide screens: wider panels, two columns of rows */
.app[data-mode='landscape'] .sheet-card.is-wide:not(:has(.toggle)) {
  width: min(46em, 84vw);
}
.app[data-mode='landscape'] .rule-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35em;
}
.app[data-mode='landscape'] #sheet-body:has(.ach) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4em;
  align-items: start;
}
.app[data-mode='landscape'] #sheet-body:has(.ach) > :not(.ach) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
}
.app[data-mode='landscape'] #sheet-body:has(.ach) > .sheet-title {
  width: auto;
}
/* wide screens: SURRENDER keeps its slot when hidden (the four moves never jump), the tray never slides */
.app[data-mode='landscape'] .rack,
.app[data-phase][data-mode='landscape'] .rack {
  left: calc(50% - var(--wr) * 0.19);
}
/* the play-area shake reads (about 4 px), still only the felt */
@keyframes shake {
  15% {
    transform: translate(0.32em, -0.16em);
  }
  35% {
    transform: translate(-0.28em, 0.2em);
  }
  55% {
    transform: translate(0.18em, 0.12em);
  }
  75% {
    transform: translate(-0.1em, -0.08em);
  }
}
/* level up: a coin pile and the gift in painted digits, a bigger crest */
.level-gift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  font-size: 2em;
}
.level-pile {
  height: 1.7em;
  width: auto;
  filter: drop-shadow(0 0.15em 0.2em rgba(14, 12, 6, 0.6));
}
.level-big {
  width: 8.6em;
  height: 8.3em;
}
.app[data-mode='landscape'] .level-gift {
  font-size: 1.6em;
}
/* the wheel's close button beside the title, away from the HUD buttons */
.wheel-close {
  top: 10.5%;
  right: 0.8em;
}
.app[data-mode='landscape'] .wheel-close {
  top: 13%;
  right: 2%;
}
/* WIN STREAK on wide screens: a pill right-aligned under the round buttons (never stretched across) */
.app[data-mode='landscape'] .streak {
  left: auto;
  right: max(2%, env(safe-area-inset-right));
  top: calc(100% + 0.4em);
}

/* ---------- round 8 ---------- */
.app[data-mode='portrait'] .sheet.is-low .sheet-card {
  --k: 0.34;
}
.app[data-mode='portrait'] .sheet.is-low .sheet-body {
  gap: 0.35em;
}
.app[data-mode='portrait'] .sheet.is-low .sheet-actions .btn-act {
  --ph: 2.7em;
}
.app[data-mode='portrait'] .sheet.is-low .sheet-title {
  font-size: 1.15em;
}
.sheet[data-modal='1']:not(.is-low) {
  background: rgba(16, 13, 8, 0.9);
}
.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sheet {
  padding-top: max(3.6em, 58px);
}
.sheet[data-spot='thumbs'],
.sheet[data-spot='clipboard'] {
  padding-bottom: max(4%, 24px);
}
.btn-tab > span {
  padding: 0 0.45em;
}
.btn-tab .gift-dot {
  top: 0.3em;
  right: 0.3em;
}
.wheel-wrap {
  left: 56%;
}
.float-xp {
  top: 115%;
}

/* ---------- round 9 ---------- */
/* the HUD and the totals stay above flying coins */
.top {
  z-index: 46;
}
.marks {
  z-index: 46;
}
/* a winning hand lifts a little (it no longer climbs into the printed rules), the print steps back under a result */
@keyframes card-hop {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-4%) scale(1.03);
  }
  100% {
    transform: translateY(0);
  }
}
.app.has-banner .world:not(.felt-hidden) .felt {
  opacity: 0;
} /* no ghost of the rules under a result */
/* +XP rises from the XP bar, upward, away from the bear and the streak */
.float-xp {
  top: -0.2em;
}
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0.4em);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-0.9em);
  }
}
/* BUST: the cranberry letters get a dark rim on the light plate */
.outcome-title[src*='title-bust'] {
  filter: drop-shadow(0 0 1px #242018) drop-shadow(0 0 2px #242018) drop-shadow(0 0.12em 0.15em rgba(14, 12, 6, 0.7));
}
/* phone bet screen: side-bet names without ornaments (they reached the edge), PLACE YOUR BET clear of the rules */
.app[data-mode='portrait'] .spot-side .spot-label::before,
.app[data-mode='portrait'] .spot-side .spot-label::after {
  content: none;
}
/* stat names: one size, no letter-spacing, so BLACKJACKS fits its tile */
.stat small {
  letter-spacing: 0;
  font-size: max(0.52em, 9.5px);
  overflow-wrap: normal;
  word-break: keep-all;
}
/* lines never end with one lonely word */
.sheet-small,
.rule-text,
.rule-row > span,
.sheet-text {
  text-wrap: balance;
}
/* wide screens: insurance below the shoe, clear of the player's total; reward panels narrower */
.app[data-mode='landscape'] .sheet.is-low {
  padding-top: 40vh;
  padding-left: calc(50% + var(--wr) * 0.16);
}
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  width: min(19em, calc(50vw - var(--wr) * 0.16 - 1.5em));
}
.app[data-mode='landscape'] .sheet-card.is-modal.is-wide {
  width: min(24em, 62vw);
}
/* round 10: the blackjack panel takes the tray's room on a phone (like a big win) */
.app[data-mode='landscape'] .entry-logo {
  height: 26%;
  top: 2.5%;
}

/* ---------- round 10 ---------- */
/* a busted hand is dimmed but stays solid (it read as see-through) */
.card.is-bust .card-in {
  filter: brightness(0.92) saturate(0.6);
}
.card.is-bust .card-in::after {
  background: linear-gradient(
    155deg,
    rgba(254, 249, 235, 0.36),
    rgba(238, 215, 152, 0.14) 45%,
    rgba(254, 245, 221, 0.3)
  );
}
/* the insurance panel on a phone lying down is never narrower than its title */
.app[data-mode='landscape'] .sheet.is-low .sheet-card {
  min-width: 16.5em;
}
.app[data-mode='landscape'] .sheet.is-low .sheet-title {
  font-size: 1.05em;
  letter-spacing: 0.04em;
}

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