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

/* ============================== Q. Polish director 2 (15/11) ============================== */
/* DEALER BUSTS on a phone lies under the cards (src/main.js banner): its spike and ornament tuck behind them */
#world > .outcome {
  z-index: 0;
}
/* LEVEL UP on wide screens: the party-hat bear stands left of the panel, his cut hidden by the bottom of the screen */
.app[data-mode='landscape'] .sheet[data-spot='thumbs'] .bear-spot {
  display: block;
  left: auto;
  right: calc(50% + 9.5em);
  top: auto;
  bottom: 0;
  height: min(78%, 40vw);
  translate: none;
  z-index: 0;
}
/* the console tray (desktop): 9-slice of public/art/console-bar.webp (1600 x 184; cuts 30 70 35 70), the frame as
   thick as the tray is tall so the art is never stretched out of shape; placed by placeConsole in src/main.js */
.controls > .console {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-style: solid;
  border-color: transparent;
  border-image: url(../../art/console-bar.webp) 30 70 35 70 fill / calc(var(--ch, 80px) * 0.163)
    calc(var(--ch, 80px) * 0.38) calc(var(--ch, 80px) * 0.19) calc(var(--ch, 80px) * 0.38) stretch;
  filter: drop-shadow(0 0.4em 0.6em rgba(14, 12, 6, 0.55));
  transition:
    left 0.25s,
    width 0.25s;
}
.console-div {
  position: absolute;
  top: 24%;
  bottom: 24%;
  width: 2px;
  translate: -50% 0;
  background: linear-gradient(transparent, rgba(254, 240, 201, 0.75) 30%, rgba(254, 240, 201, 0.75) 70%, transparent);
}
.console-div::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.45em;
  height: 0.45em;
  translate: -50% -50%;
  rotate: 45deg;
  background: #fef4d9;
  box-shadow: 0 0 0.4em rgba(252, 217, 123, 0.8);
}
.is-calm .controls > .console {
  transition: none;
}
/* SURRENDER beside HIT in the phone's row of moves: its long word gets a wider plate, the short ones give way */
.app[data-mode='portrait'] .row-act .btn-act {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: calc(var(--ph) * 0.12);
}
/* (the label sits low in the octagon, where its cut corners narrow the glass: the side padding keeps it off the bevel;
   each plate's share of the row follows its word (balanceMoves in src/main.js): AUFGEBEN gets more than HIT) */
/* a phone lying down: the five moves in a compact column on the right edge (each still 40 px tall), clear of the shoe */
.app[data-form='land'] .row-act {
  right: max(1.2%, env(safe-area-inset-right));
  top: 63.5%;
  gap: 0.3em;
}
.app[data-form='land'] .row-act .btn-act {
  --ph: 3.2em;
}
/* panels on a phone lying down fit its 360-390 px of height without scrolling: wider, more columns, smaller art */
.app[data-form='land'] .sheet-card.is-wide:not(.is-modal):not(:has(.toggle)) {
  width: min(62em, 94vw);
}
.app[data-form='land'] .tabs {
  grid-template-columns: repeat(4, 1fr);
}
.app[data-form='land'] .rule-list {
  grid-template-columns: repeat(3, 1fr);
}
.app[data-form='land'] #sheet-body:has(.ach) {
  grid-template-columns: repeat(6, 1fr);
}
.app[data-form='land'] #sheet-body:has(.ach) > .stat-grid {
  grid-column: span 3;
}
.app[data-form='land'] #sheet-body:has(.ach) > .ach {
  grid-column: span 2;
}
.app[data-form='land'] .sheet-art {
  max-height: 21vh;
  width: auto;
}
.app[data-form='land'] .sheet-sub {
  display: none;
} /* RULES says it; HOW TO PLAY would make the panel scroll at 360 px */
/* the five phone moves: icon a little smaller, the word raised toward the octagon's wide middle (off the cut corners) */
.app[data-mode='portrait'] .row-act .btn-act {
  justify-content: center;
  gap: 0.05em;
  padding-bottom: calc(var(--ph) * 0.08);
}
.app[data-mode='portrait'] .row-act .btn-act .ico {
  height: calc(var(--ph) * 0.3);
}
/* review round 1 (15/11) */
/* the console tray leaves with the rack (results on a banner, celebrations): never an empty frame */
.app.has-banner .controls > .console,
.app.celebrating .controls > .console {
  opacity: 0;
  transition:
    opacity 0.2s,
    left 0.25s,
    width 0.25s;
}
/* big / mega / epic on wide screens: the dealer's cards under the gold panel are gone, not peeking out at its corner */
.app.celebrating-big .card.is-dealer {
  opacity: 0;
  transition: opacity 0.2s;
}
/* cards that did not win, during a celebration: dimmed, not muddy grey */
.app.celebrating .card:not(.is-won) .card-in {
  filter: brightness(0.74) saturate(0.85);
}
/* rules on a phone lying down (three columns): the example cards stay inside their cell */
.app[data-form='land'] .rule-cards .mini-card {
  width: 1.6em;
}
.app[data-form='land'] .rule-move {
  min-width: 0;
  overflow: hidden;
}
/* the move column keeps a 12 px gutter from the screen edge */
.app[data-form='land'] .row-act {
  right: max(12px, env(safe-area-inset-right));
}
/* WIN STREAK on a phone lying down: left, under the level, off the shoe */
.app[data-form='land'] .streak {
  left: calc(max(2%, env(safe-area-inset-left)) + 11.5em);
  right: auto;
}

/* ===== owner's requests from his phone (15/11 afternoon) ===== */
/* LEVEL + XP: the same plaque as the coin balance, a matched pair (same art, height, rim, glass, digits) */
.level.plaque {
  flex: 0 1 auto;
  max-width: none;
  min-width: 7.4em;
  min-height: 0;
  gap: 0.3em;
  padding-right: calc(var(--ph) * 0.45);
}
.level.plaque::after {
  content: '';
  position: absolute;
  inset: -0.4em 0;
}
.level-ico {
  width: calc(var(--ph) * 0.98);
  height: calc(var(--ph) * 0.98);
  margin-left: -0.2em;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 0.08em 0.1em rgba(14, 12, 6, 0.6));
}
.level.plaque .lv {
  font: 700 max(0.62em, 11px) var(--serif);
  color: var(--ink-dim);
  margin-right: -0.15em;
}
#level-num {
  font-size: 1em;
}
.app[data-mode='landscape'] #level-num {
  font-size: 1.35em;
}
.level.plaque .xp {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 2.4em;
  height: 0.46em;
  margin: 0 0 0 0.25em;
  border-radius: 1em;
  background: rgba(22, 18, 10, 0.9);
  box-shadow: inset 0 0 0 0.07em rgba(244, 225, 172, 0.65);
  overflow: hidden;
}
.level.plaque .xp i {
  position: absolute;
  inset: 0.08em;
  width: calc((100% - 0.16em) * var(--p, 0));
  min-width: 0.3em;
  height: auto;
  border-radius: 1em;
  background: linear-gradient(#fdebb9, #e0b43b 55%, #bc921e);
}
.app[data-mode='landscape'] .level.plaque .xp {
  min-width: 4.5em;
  height: 0.55em;
}
/* CHOOSE A TABLE: a carousel of illustrated tables on the floor, no boxes. Items are placed by --k (offset from the selected one) with a springy slide. */
.carousel {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: 52em;
  display: grid;
  grid-template-rows: 1fr auto;
}
.car-track {
  position: relative;
  grid-row: 1;
  min-height: 0;
  touch-action: pan-y;
}
.car-item {
  --s: 0.6;
  --step: min(34vw, 15em);
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: min(56vw, 22em);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2em;
  translate: -50% 0;
  transform: translateX(calc(var(--k, 0) * var(--step))) scale(var(--s));
  transform-origin: 50% 85%;
  transition:
    transform 0.5s cubic-bezier(0.3, 1.35, 0.5, 1),
    opacity 0.3s,
    filter 0.3s;
  filter: brightness(0.72) saturate(0.85);
  opacity: 0.9;
  cursor: pointer;
  z-index: 1;
}
.car-item.is-sel {
  --s: 1;
  filter: none;
  opacity: 1;
  z-index: 3;
}
.car-item.is-far {
  opacity: 0;
  pointer-events: none;
}
.car-name {
  --ph: 2.3em;
  font-size: 1em;
  flex: none;
}
.car-stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.car-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.6em 0.6em rgba(14, 12, 6, 0.55));
  position: relative;
  z-index: 1;
}
/* the selected table: a cyan glow on the floor under it, breathing, and the table floating a touch */
.car-item.is-sel .car-stage::before {
  content: '';
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -6%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(252, 217, 123, 0.55), rgba(235, 190, 65, 0.18) 60%, transparent);
  animation: car-glow 1.8s ease-in-out infinite alternate;
}
.car-item.is-sel .car-thumb {
  animation: car-float 2.4s ease-in-out infinite alternate;
}
@keyframes car-glow {
  from {
    opacity: 0.65;
    scale: 0.94 1;
  }
  to {
    opacity: 1;
    scale: 1.04 1;
  }
}
@keyframes car-float {
  to {
    translate: 0 -2.5%;
  }
}
/* a locked table is dimmed */
.car-item.is-locked .car-thumb {
  filter: grayscale(0.55) brightness(0.8) contrast(0.9) drop-shadow(0 0.6em 0.6em rgba(14, 12, 6, 0.55));
}
.car-item.is-locked .car-stage::after {
  content: '';
  position: absolute;
  inset: 8% 6% 4%;
  z-index: 2;
  border-radius: 40% 40% 30% 30%;
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(254, 247, 226, 0.42),
    rgba(253, 237, 192, 0.16) 60%,
    transparent 75%
  );
  pointer-events: none;
}
.car-lock {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 26%;
  translate: -50% -50%;
  z-index: 3;
  filter: drop-shadow(0 0.2em 0.3em rgba(14, 12, 6, 0.7));
}
.car-stage.nope-shake {
  animation: nope-shake 0.38s ease-out;
}
@keyframes nope-shake {
  20% {
    translate: -6px 0;
  }
  45% {
    translate: 5px 0;
  }
  70% {
    translate: -3px 0;
  }
  100% {
    translate: 0 0;
  }
}
.car-arrow {
  position: absolute;
  top: 46%;
  z-index: 5;
  width: 3.2em;
  height: 4.4em;
  min-width: 40px;
  min-height: 40px;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.car-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.2em 0.3em rgba(14, 12, 6, 0.6));
}
.car-arrow.l {
  left: 0.2em;
}
.car-arrow.l img {
  scale: -1 1;
}
.car-arrow.r {
  right: 0.2em;
}
.car-arrow:disabled {
  opacity: 0.25;
  pointer-events: none;
}
.car-arrow:active {
  transform: scale(0.88);
}
.car-info {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding-top: 0.55em;
}
.car-range {
  --ph: 1.9em;
  font-size: max(0.82em, 11px);
}
.car-range.is-locked {
  color: #fef6e0;
}
.car-play {
  --ph: 3.3em;
  min-width: 11em;
  font-size: 1.15em;
}
.car-play:not(:disabled) {
  animation: play-breathe 1.4s ease-in-out infinite alternate;
}
.car-play.is-locked {
  filter: grayscale(0.8) brightness(0.7);
}
.car-dots {
  display: flex;
  gap: 0.45em;
}
.car-dots i {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: rgba(238, 221, 172, 0.4);
  transition:
    background 0.2s,
    scale 0.2s;
}
.car-dots i.is-on {
  background: #fef6e0;
  box-shadow: 0 0 0.5em rgba(252, 217, 123, 0.9);
  scale: 1.3;
}
.app[data-mode='landscape'] .car-item {
  --step: min(22vw, 16em);
  width: min(28vw, 18em);
}
.app[data-mode='landscape'] .carousel {
  max-width: min(60em, 92vw);
}
.app[data-mode='landscape'] .car-info {
  flex-direction: row;
  justify-content: center;
  gap: 1em;
  padding-top: 0.3em;
}
.app[data-mode='landscape'] .car-dots {
  position: absolute;
  bottom: 0.3em;
  left: 50%;
  translate: -50% 0;
  display: none;
}
.is-calm .car-item,
.is-calm .car-thumb,
.is-calm .car-stage::before {
  transition: none;
  animation: none;
}
/* the tab bar: painted plates like the moves (TABLES lit teal), no boxes */
.tab-plate {
  --ph: 3.5em;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 0.08em;
  padding-inline: calc(var(--ph) * 0.14);
}
.tab-plate .ico {
  height: calc(var(--ph) * 0.36);
  width: auto;
}
.tab-plate > span {
  font-size: max(0.62em, 11px);
}
.tab-plate .gift-dot {
  top: 0.35em;
  right: 0.5em;
}
.app[data-mode='landscape'] .tab-plate {
  --ph: 3em;
  flex-direction: row;
  gap: 0.35em;
}
.app[data-mode='landscape'] .tab-plate .ico {
  height: calc(var(--ph) * 0.45);
}
/* the carousel gets the room: the selected table's banner says what this is */
.lobby-title {
  display: none;
}
.car-item:not(.is-sel) .car-name {
  opacity: 0;
} /* a side table's name would be too small to read */
.car-arrow {
  top: 62%;
}
.tab-plate {
  padding-inline: calc(var(--ph) * 0.24);
}
.lobby {
  gap: 0.45em;
}
.app[data-mode='landscape'] .tabbar {
  max-width: min(44em, 86vw);
} /* the tabs with icon and word side by side need the width (they shrank to 9 px) */
/* coordinator's pass (15/11 afternoon) */
/* phone moves: a 12 px gutter each side; SURRENDER as flag-only when its word would shrink the row under 11 px */
.app[data-mode='portrait'] .row-act {
  width: min(calc(var(--wr) * 0.957), calc(100vw - 24px));
}
.app[data-mode='portrait'] .row-act #surrender.is-icon-only > span {
  display: none;
}
.app[data-mode='portrait'] .row-act #surrender.is-icon-only .ico {
  height: calc(var(--ph) * 0.42);
}
/* phone lobby: side tables half off the screen (a sliver on each side), arrows low at the edges beside PLAY */
.car-item {
  --step: min(44vw, 19em);
}
.car-arrow {
  top: auto;
  bottom: 1.6em;
  translate: none;
  width: 2.7em;
  height: 3.6em;
}
/* desktop lobby: the selected table, its banner and PLAY about twice as big, side tables bigger and closer */
.app[data-form='desk'] .car-item {
  --s: 0.62;
  --step: min(27vw, 25em);
  width: min(34vw, 30em);
}
.app[data-form='desk'] .car-item.is-sel {
  --s: 1;
}
.app[data-form='desk'] .car-name {
  --ph: 2.6em;
  font-size: 1.35em;
}
.app[data-form='desk'] .car-play {
  --ph: 3.4em;
  font-size: 1.45em;
  min-width: 12em;
}
.app[data-form='desk'] .car-range {
  --ph: 2.1em;
  font-size: 1.05em;
}
.app[data-form='desk'] .car-arrow {
  bottom: auto;
  top: 45%;
  translate: 0 -50%;
  width: 3.6em;
  height: 5em;
}
.app[data-form='desk'] .car-arrow.l {
  left: calc(50% - min(27vw, 25em) - 6.5em);
}
.app[data-form='desk'] .car-arrow.r {
  right: calc(50% - min(27vw, 25em) - 6.5em);
}
.app[data-form='desk'] .carousel {
  max-width: none;
}
.app[data-form='desk'] .tabbar {
  max-width: min(52em, 70vw);
  gap: 0.6em;
}
.app[data-form='desk'] .tab-plate {
  --ph: 3.4em;
  font-size: 1.05em;
}
.app[data-form='land'] .car-arrow {
  bottom: auto;
  top: 45%;
  translate: 0 -50%;
}
/* the daily wheel's bear (owner, 15/11): the full-body drawing, ALWAYS whole on screen, feet on the floor beside the
   wheel's base, pointing AT the wheel. Portrait: left of the wheel, mirrored; sized by the smaller of a height and a
   width share so a short or narrow phone shrinks him instead of pushing him off the edge. Wide: right of the wheel. */
.wheel-bear {
  top: auto;
  bottom: calc(53% - min(66vw, 40vh) * 0.63);
  left: max(1%, env(safe-area-inset-left));
  height: min(28%, 46vw);
  width: auto;
  translate: none;
  scale: -1 1;
  z-index: 2;
  filter: drop-shadow(0 1.2em 0.6em rgba(14, 12, 6, 0.55));
  animation:
    spot-in 0.5s 0.15s cubic-bezier(0.3, 1.4, 0.5, 1) both,
    bear-cheer 1.6s 0.7s ease-in-out infinite alternate;
}
.app[data-mode='landscape'] .wheel-bear {
  bottom: 21%;
  left: 64%;
  height: min(54%, 30vw);
  scale: none;
}
/* the wheel a little right and smaller on a phone: room for him, his paw meets the rim (his feet follow its base: bottom above) */
.app[data-mode='portrait'] .wheel-wrap {
  left: 62%;
  width: min(66vw, 40vh);
}
/* desktop lobby, take 2: the tabs stand in a column on the free felt at the left, the arrows sit low beside PLAY */
.app[data-form='desk'] .tabbar {
  position: absolute;
  left: max(2.5%, env(safe-area-inset-left));
  top: 52%;
  translate: 0 -50%;
  flex-direction: column;
  width: 12em;
  max-width: none;
  gap: 0.5em;
}
.app[data-form='desk'] .tab-plate {
  flex: none;
  width: 100%;
  --ph: 3.2em;
  justify-content: flex-start;
  padding-left: calc(var(--ph) * 0.45);
}
.app[data-form='desk'] .car-arrow {
  top: auto;
  bottom: 0.3em;
  translate: none;
  width: 3em;
  height: 4.2em;
}
.app[data-form='desk'] .car-arrow.l {
  left: calc(50% - 16em);
}
.app[data-form='desk'] .car-arrow.r {
  right: calc(50% - 16em);
}
.app[data-form='desk'] .tabbar {
  width: 13.5em;
  gap: 0.6em;
}
.app[data-form='desk'] .tab-plate {
  --ph: 3.5em;
  font-size: 1.2em;
}
.app[data-form='desk'] .car-arrow.l {
  left: calc(50% - 19.5em);
}
.app[data-form='desk'] .car-arrow.r {
  right: calc(50% - 19.5em);
}
/* review round 2 (15/11) */
/* a move whose icon had to go (a phone lying down, 740 px): its word sits in the middle of the plate */
.app[data-mode='landscape'] .row-act .btn-act.fit-noico {
  justify-content: center;
  padding-left: calc(var(--ph) * 0.35);
}
/* the party bear beside LEVEL UP: his fan of cards clear of the panel's frame */
.app[data-mode='landscape'] .sheet[data-spot='thumbs'] .bear-spot {
  right: calc(50% + 11em);
}
/* the wheel's dot on its tab sits on the plate's corner, not on the word */
.tab-plate .gift-dot {
  top: 0.3em;
  right: 0.3em;
}
/* lobby labels keep their full size (a plate as wide as its word was shrunk a pixel at a time) and the tabs of a
   phone lying down are 40 px touch targets */
.car-range > span,
.car-name > span {
  padding-inline: 3px;
}
.app[data-form='land'] .tab-plate {
  min-height: 40px;
}
.app[data-form='land'] .car-name,
.app[data-form='land'] .car-range {
  font-size: max(1em, 11px);
}
.app[data-mode='portrait'] .tab-plate {
  padding-inline: calc(var(--ph) * 0.16);
}
/* review round P2-R3 (15/11) */
/* Japanese, Chinese and Korean have no italic: their rule text stands upright */
:lang(ja) .rule-text,
:lang(zh) .rule-text,
:lang(ko) .rule-text,
:lang(ja) .sheet-small,
:lang(zh) .sheet-small,
:lang(ko) .sheet-small {
  font-style: normal;
}
/* a side bet's name above its circle takes two lines rather than leave the screen (ИДЕАЛЬНЫЕ ПАРЫ, PARES PERFEITOS) */
.spots.is-open .spot-side.has-bet .spot-label {
  white-space: normal;
  width: max-content;
  max-width: calc(var(--wr, 360px) * 0.3);
}
/* the console tray snaps to the rack when the bet buttons leave (a sliding frame left a 1-px line behind) */
.controls > .console,
.app.has-banner .controls > .console,
.app.celebrating .controls > .console {
  transition: opacity 0.2s;
}
/* a settings name never slides under its control: a long single word may break (Spieltempo) */
.opt > .opt-name {
  hyphens: auto;
}
/* the tip in two lines when a long translation meets the edge of a phone */
.tip.is-two {
  height: auto;
  min-height: var(--ph);
  padding-block: 0.5em;
}
.tip.is-two > span {
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  top: 0;
}
/* a side table never shows its (small) name, not even while the carousel slides */
.car-item:not(.is-sel) .car-name {
  visibility: hidden;
  transition: none;
}
/* panel titles on the crystal-winged plate, a size under the felt's PLACE YOUR BET */
.sheet-title.banner {
  --ph: 2.15em;
  padding-inline: calc(var(--ph) * 1.1);
  max-width: 100%;
}
.sheet-title.small.banner {
  --ph: 2.1em;
}
/* chip values never under 11 px (a phone lying down drew 100 / 500 at 9.9 px) */
.chip-btn span {
  font-size: max(var(--fs, 1em), 11px);
}
/* insurance on a short phone (360 x 560): a tighter panel, so it stops under the bet plate instead of on it */
@media (max-height: 600px) and (orientation: portrait) {
  .app[data-mode='portrait'] .sheet.is-low {
    padding-bottom: max(1.9em, env(safe-area-inset-bottom));
  }
  .app[data-mode='portrait'] .sheet.is-low .sheet-body {
    gap: 0.2em;
    padding-block: 0;
  }
}
/* phone lying down: the arrows beside the side tables, not at the screen edges (they floated 230 px away) */
.app[data-form='land'] .car-arrow.l {
  left: calc(50% - min(22vw, 16em) - 6.8em);
}
.app[data-form='land'] .car-arrow.r {
  right: calc(50% - min(22vw, 16em) - 6.8em);
}
/* +XP under the level plate, never clipped by the top of the screen (it rose off it) */
.float-xp {
  top: calc(100% + 0.15em);
}
@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0.7em);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-0.15em);
  }
}
.cel-skip {
  font-size: max(0.75em, 11px);
}
/* Japanese wraps between phrases, never inside a word (ハン / ド) */
:lang(ja) .rule-text,
:lang(ja) .tip > span,
:lang(ja) .sheet-small {
  word-break: auto-phrase;
}
.tip.is-two > span {
  text-wrap: balance;
}
/* rules rows, stat tiles and achievements on the painted row plate, not CSS boxes */
.rule-row,
.stat,
.ach {
  background: none;
  box-shadow: none;
  border-radius: 0;
  border: 0 solid transparent;
  border-image: url(../../art/row.webp) 68 127 67 127 fill / 0.75em 1.15em 0.75em 1.15em stretch;
}
.stat {
  padding-inline: 0.55em;
}
.rule-row,
.ach {
  padding-inline: 0.85em;
}
/* the rules tabs on the painted plates of the moves (navy, the open one teal) */
.tabs button,
.tabs button[aria-selected='true'] {
  background: none;
  box-shadow: none;
  border-radius: 0;
  border: 0 solid transparent;
  border-image: url(../../art/btn-navy.webp) 90 122 87 122 fill / 1.1em 1.45em 1.05em 1.45em stretch;
}
.tabs button[aria-selected='true'] {
  border-image-source: url(../../art/btn-teal.webp);
}
.app[data-form='desk'] .tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.app[data-form='desk'] .tabs button {
  min-height: 3em;
}

/* desktop lobby, take 3: the tabs go back to a row under PLAY, the carousel has the
   middle to itself with the arrows at its outer ends, and the whole group is centred on the felt */
.app[data-form='desk'] .lobby {
  justify-content: center;
  gap: 0.8em;
}
.app[data-form='desk'] .carousel {
  flex: 0 1 auto;
  height: min(100%, 31em);
  max-width: min(78em, 96vw);
}
.app[data-form='desk'] .car-item {
  --s: 0.6;
  --step: min(25vw, 21em);
  width: min(30vw, 25em);
}
.app[data-form='desk'] .car-item.is-sel {
  --s: 1;
}
.app[data-form='desk'] .car-arrow {
  top: 45%;
  bottom: auto;
  translate: 0 -50%;
  width: 3.6em;
  height: 5em;
}
.app[data-form='desk'] .car-arrow.l {
  left: calc(50% - min(25vw, 21em) * 1.62 - 3.6em);
}
.app[data-form='desk'] .car-arrow.r {
  right: calc(50% - min(25vw, 21em) * 1.62 - 3.6em);
}
.app[data-form='desk'] .tabbar {
  position: static;
  translate: none;
  flex-direction: row;
  width: 100%;
  max-width: min(56em, 80vw);
  gap: 0.6em;
}
.app[data-form='desk'] .tab-plate {
  flex: 1 1 0;
  width: auto;
  --ph: 3.2em;
  font-size: 1.1em;
  justify-content: center;
  padding-left: 0;
}

/* side-bet spots on wide screens: bigger circles (table.js), no sparkles beside the words, a readable size */
.app[data-mode='landscape'] .spot-side .spot-label::before,
.app[data-mode='landscape'] .spot-side .spot-label::after {
  content: none;
}
.app[data-mode='landscape'] .spot-side .spot-label {
  font-size: max(0.72em, 11px);
  max-width: 88%;
}
.app[data-form='desk'] .spot-side .spot-label {
  font-size: 1em;
}
.app[data-form='desk'] .spots.is-open .spot-main .spot-label {
  font-size: 1.05em;
}

/* a panel with more below the fold (rules, stats on a phone): besides the fade, a small chevron bobs at the bottom
   edge until the player reaches the end */
.sheet-card:has(.sheet-body.is-scroll:not(.at-end))::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.75em;
  z-index: 6;
  width: 0.85em;
  height: 0.85em;
  border-right: 0.2em solid #fef8e7;
  border-bottom: 0.2em solid #fef8e7;
  border-radius: 0.08em;
  transform: translateX(-50%) rotate(45deg);
  filter: drop-shadow(0 0 0.35em rgba(251, 215, 115, 0.95)) drop-shadow(0 1px 1px rgba(22, 17, 8, 0.9));
  animation: more-bob 0.9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes more-bob {
  from {
    translate: 0 -0.15em;
  }
  to {
    translate: 0 0.3em;
  }
}
.is-calm .sheet-card::after {
  animation: none;
}

/* desktop panels (settings, rules, stats): a quarter larger; on a big screen they were a small box with 8-10 px text */
.app[data-form='desk'] .sheet-card {
  font-size: 1.25em;
}

/* 16/11/2026, review round 2: old-style figures made "50" read as "5o" and "10-500" as "10-5oo" */
.app {
  font-variant-numeric: lining-nums;
}
/* desktop: the legal line and the "Lv" word were 8-10 px on a big screen */
.app[data-form='desk'] .notice {
  font-size: max(0.8em, 13px);
}
.app[data-form='desk'] .level .lv {
  font-size: max(0.72em, 12px);
}

/* daily wheel: a SPIN as big as the design, the bear larger beside the wheel on wide screens */
.btn-spin {
  font-size: 1.85em;
}
.app[data-mode='landscape'] .wheel-bear {
  bottom: 13%;
  left: 60%;
  height: min(70%, 37vw);
}
.app[data-mode='landscape'] .btn-spin,
.app[data-mode='landscape'] .wheel-win:not([hidden]) ~ .btn-spin {
  top: 89%;
}
.app[data-mode='landscape'] .btn-spin,
.app[data-mode='landscape'] .wheel-win:not([hidden]) ~ .btn-spin {
  top: 86.5%;
}
.app[data-form='land'] .wheel-bear {
  bottom: 12%;
  left: 62%;
  height: min(58%, 30vw);
}
.app[data-form='land'] .btn-spin {
  font-size: 1.55em;
  top: 85%;
}
.app[data-mode='portrait'] .wheel-wrap {
  width: min(72vw, 43vh);
  left: 61%;
}
.app[data-mode='portrait'] .wheel-bear {
  height: min(32%, 52vw);
}

/* a phone: the insurance question sits a little lower, clear of the hand's BET plate (it covered 6-9 px of it) */
.app[data-mode='portrait'] .sheet.is-low {
  padding-bottom: max(0.55em, env(safe-area-inset-bottom));
}
@media (max-height: 600px) and (orientation: portrait) {
  .app[data-mode='portrait'] .sheet.is-low {
    padding-bottom: max(0.4em, env(safe-area-inset-bottom));
  }
}

/* daily wheel: the coin piles lie on the floor IN FRONT of the wheel's base (owner, 16/11/2026: the crystals covered them) */
.wheel-pile {
  z-index: 3;
}
.wheel-pile.l {
  top: 73%;
}
.wheel-pile.r {
  top: 75%;
}
.app[data-mode='landscape'] .wheel-pile.l {
  left: 6.5%;
  top: 76%;
}
.app[data-mode='landscape'] .wheel-pile.r {
  left: 48%;
  top: 77%;
}

/* final review pass (16/11/2026) */
/* every figure is a lining figure: .num set tabular-nums alone, which dropped the lining ones (a stat of 0 read as the letter o) */
.app,
.app * {
  font-variant-numeric: lining-nums;
}
.app .num {
  font-variant-numeric: lining-nums tabular-nums;
}
/* wide screens: the chip tray leaves while a hand is played (the tip sits there, under the hand in turn) */
.app[data-mode='landscape'][data-phase='player'] .rack,
.app[data-mode='landscape'][data-phase='deal'] .rack,
.app[data-mode='landscape'][data-phase='dealer'] .rack,
.app[data-mode='landscape'][data-phase='insurance'] .rack,
.app[data-mode='landscape'][data-phase='player'] .console,
.app[data-mode='landscape'][data-phase='deal'] .console,
.app[data-mode='landscape'][data-phase='dealer'] .console,
.app[data-mode='landscape'][data-phase='insurance'] .console {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
/* desktop: nothing under 12 px */
.app[data-form='desk'] .stat small {
  font-size: max(0.62em, 12px);
}
.app[data-form='desk'] .wheel-note {
  font-size: max(0.85em, 13px);
}

/* a room for each table (owner, 16/11/2026): the first table (lounge) plays in the main club hall on emerald felt, the stage table faces the jazz stage on ruby
   felt, the rooftop table is on the roof terrace over the night skyline on sapphire felt.
   main.js sets data-scene from the table chosen. */
.bg-img {
  transition:
    transform 0.6s ease-out,
    background-image 0.35s;
}
.app[data-scene='stage'] .bg-img {
  background-image: url(../../art/bg-stage-portrait.webp);
}
.app[data-scene='stage'][data-mode='landscape'] .bg-img {
  background-image: url(../../art/bg-stage-landscape.webp);
}
.app[data-scene='stage'] .table {
  background-image: url(../../art/table-stage-portrait.webp);
}
.app[data-scene='stage'][data-mode='landscape'] .table {
  background-image: url(../../art/table-stage-landscape.webp);
}
.app[data-scene='rooftop'] .bg-img {
  background-image: url(../../art/bg-rooftop-portrait.webp);
}
.app[data-scene='rooftop'][data-mode='landscape'] .bg-img {
  background-image: url(../../art/bg-rooftop-landscape.webp);
}
.app[data-scene='rooftop'] .table {
  background-image: url(../../art/table-rooftop-portrait.webp);
}
.app[data-scene='rooftop'][data-mode='landscape'] .table {
  background-image: url(../../art/table-rooftop-landscape.webp);
}

/* ---------- Onyx Club, round 2 ---------- */
/* settings: the panel's gold corner fans sit at the ends of the RULES / STATS / TABLES row: the row keeps clear of them */
.sheet-actions.three {
  padding-inline: calc(var(--k, 1px) * 52px);
  box-sizing: border-box;
}
/* desktop wheel: the panther's raised fist cleared the DAILY WHEEL title (it overlapped its right end), and the right coin
   pile moved off the COLLECT button's ornament (COLLECT +2K is wider than SPIN) */
.app[data-mode='landscape'] .wheel-bear {
  bottom: 11%;
  height: min(60%, 32vw);
}
.app[data-mode='landscape'] .wheel-title {
  top: 13%;
}
.app[data-mode='landscape'] .wheel-pile.r {
  left: 53%;
  top: 79%;
}
/* landscape bet row: the gold plates have wider ornamented ends, so CLEAR / REBET / x2 / DEAL get 56 px more (the row
   grows to the right, into the free felt beside the console) and keep their labels at 11 px or more */
.app[data-mode='landscape'] .row-bet,
.app[data-mode='landscape'] .row-next {
  left: calc(50% + var(--wr) * 0.225 + 28px);
  width: calc(var(--wr) * 0.38 + 56px);
}
/* action plates: the measured glass box stops before the small gold fans in the glass corners, but those sit at the top
   and bottom only; a one-line label is centred vertically, so it may use the glass up to the chamfer (rim inner edge at
   0.25 of the plate height) plus air. Measured on btn-plate: rim inner x = 60 of 240. */
.app .btn-act {
  --gl: calc(var(--cap, 1) * 0.29) !important;
  --gr: calc(var(--cap, 1) * 0.29) !important;
} /* rim inner edge at mid-height: 0.25 of the plate height */
/* round 3: action plates and the DEAL pill draw their gold frame and ornamented ends at 72% (75%), and every label sits
   on the glass (the padding is the measured glass, whatever older rules said for tight rows) */
.app .btn-act {
  --cap: 0.72;
  padding-left: calc(var(--ph) * var(--gl)) !important;
  padding-right: calc(var(--ph) * var(--gr)) !important;
}
.app .btn-pill {
  --cap: 0.75;
}
/* the x2 plate only ever says "x2": its share goes to CLEAR and REBET, whose words are long in some languages (pt, de) */
.row-bet #x2 {
  flex: 11 1 0;
}
.row-bet #clear {
  flex: 26 1 0;
}
.row-bet #rebet {
  flex: 26 1 0;
}
.app[data-mode='landscape'] .row-bet #x2 {
  flex: 0.45 1 0;
}
/* before any chip DEAL keeps its emerald plate, only dimmed: the bet screen never looks dead */
.btn-pill:disabled {
  filter: saturate(0.8) brightness(0.7) drop-shadow(0 0.25em 0.4em rgba(14, 12, 6, 0.45));
}
/* the prize plate over the hub covered two wedge labels: 78% (it still reads, the labels stay free) */
.wheel-win {
  scale: 0.78;
}
/* the tight rows draw the gold frame thinner still, so a long translation keeps the plain middle at 11 px or more */
.app[data-mode='portrait'] .row-act .btn-act {
  --cap: 0.38;
}
.app[data-mode='portrait'] .tabbar {
  gap: 0.22em;
}
.app[data-mode='portrait'] .tab-plate {
  --cap: 0.4 !important;
}
.app[data-mode='portrait'] .tab-plate,
.row-bet .btn-act,
.rule-plate {
  --cap: 0.5;
}
.sheet-actions .btn-act {
  --cap: 0.5;
}
.row-bet .btn-pill {
  --cap: 0.6;
}
/* landscape panels: the gold corner fans covered the ends of the last tiles and touched the RULES / TABLES plates;
   the content keeps clear of the four corners */
.app[data-mode='landscape'] #sheet-card.panel {
  padding-left: calc(var(--k, 1px) * 92px);
  padding-right: calc(var(--k, 1px) * 92px);
  padding-bottom: calc(var(--k, 1px) * 112px);
}
/* the panel's three buttons share the row by their words (STATISTIK, ESTATÍSTICAS), not in equal thirds */
.sheet-actions.three .btn-act {
  flex-basis: 0;
  flex-shrink: 1;
  min-width: 0;
} /* grow = word length + 5 (sheets.js) */
.sheet-actions.three {
  padding-inline: calc(var(--k, 1px) * 22px);
  gap: 0.3em;
}
/* small phones (360 px): the tight rows draw their frames thinner still, the panel row and the rules plates get more of
   the width, and the strategy tip never goes under 11 px */
@media (max-width: 380px) {
  .app[data-mode='portrait'] .row-act .btn-act {
    --cap: 0.3;
  }
  .app[data-mode='portrait'] .tab-plate {
    --cap: 0.3 !important;
  }
  .app[data-mode='portrait'] .tabbar {
    gap: 0.15em;
  }
  .sheet-actions .btn-act,
  .row-bet .btn-act,
  .rule-plate {
    --cap: 0.38;
  }
  .sheet-actions.three {
    padding-inline: calc(var(--k, 1px) * 10px);
    gap: 0.2em;
  }
  .rule-move {
    grid-template-columns: 9.4em minmax(0, 1fr);
  }
}
.tip {
  font-size: max(0.8em, 11px);
}
/* icon-over-word plates (phone tabs, moves on phones and tablets): the pair is centred on the glass, a little above the
   middle, never on the lower fan ornament */
.app[data-mode='portrait'] .tab-plate,
.app[data-mode='portrait'] .row-act .btn-act {
  justify-content: center;
  padding-top: calc(var(--ph) * 0.06);
  padding-bottom: calc(var(--ph) * 0.16);
  gap: 0.04em;
}
.app[data-mode='portrait'] .tab-plate .ico,
.app[data-mode='portrait'] .row-act .btn-act .ico {
  height: calc(var(--ph) * 0.32);
}
/* desktop lobby tabs: coloured plates with their icons, words 13 px or more */
.app[data-form='desk'] .tab-plate {
  --ph: 3.4em;
  gap: 0.45em;
}
.app[data-form='desk'] .tab-plate > span {
  font-size: max(1em, 13px);
}
.app[data-form='desk'] .tab-plate .ico {
  display: block;
  height: calc(var(--ph) * 0.5);
}
.badge > span {
  font-size: max(1em, 11px);
}
.toggle,
.toggle span {
  font-family: var(--serif);
}

/* round 4: frames back to their full scale where there is room (desktop / landscape panel buttons and bet row), the
   compact plaque (see plateRules) at a readable scale on the tight rows; never a hairline frame */
.app[data-mode='landscape'] .btn-act,
.app[data-mode='landscape'] .sheet-actions .btn-act,
.app[data-mode='landscape'] .row-bet .btn-act {
  --cap: 1;
}
.app[data-mode='portrait'] .row-act .btn-act,
.app[data-mode='portrait'] .tab-plate,
.app[data-mode='portrait'] .row-bet .btn-act,
.app[data-mode='portrait'] .sheet-actions .btn-act,
.rule-plate {
  --cap: 0.62 !important;
}
@media (max-width: 380px) {
  .app[data-mode='portrait'] .row-act .btn-act,
  .app[data-mode='portrait'] .tab-plate {
    --cap: 0.55 !important;
  }
}
/* phone panel buttons: the panel's padding already clears the corner fans (round 4), so the row takes the full width */
.app[data-mode='portrait'] .sheet-actions.three {
  padding-inline: calc(var(--k, 1px) * 26px);
  gap: 0.25em;
}
.app[data-mode='portrait'] .sheet-actions .btn-act {
  --cap: 0.52 !important;
}
.app[data-mode='landscape'] .sheet-actions.three {
  padding-inline: calc(var(--k, 1px) * 36px);
} /* clear of the bottom corner fans */
/* phone moves: the compact plaque at half scale keeps its chamfers and rim and leaves the five words their middle */
.app[data-mode='portrait'] .row-act .btn-act {
  --cap: 0.5 !important;
}
@media (max-width: 380px) {
  .app[data-mode='portrait'] .row-act .btn-act {
    --cap: 0.45 !important;
  }
}
/* round 4b: on a 360 px phone the panel buttons' words already at 9 px get a hair more plain middle */
@media (max-width: 380px) {
  .app[data-mode='portrait'] .sheet-actions .btn-act {
    --gl: calc(var(--cap, 1) * 0.2) !important;
    --gr: calc(var(--cap, 1) * 0.2) !important;
  }
}
.plate.bet-label {
  padding-left: 0.95em !important;
  padding-right: 0.95em !important;
} /* round 5: the bet plate keeps 10% clear at both ends; it grows with its words */

/* round 5: on a 360 px phone the panel row gives its side inset to the buttons (СТАТИСТИКА kept its 10% clear) */
@media (max-width: 380px) {
  .app[data-mode='portrait'] .sheet-actions.three {
    padding-inline: 0 !important;
    gap: 0.12em;
  }
}

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