/* ==========================================================================
   BANK — party dice game. Mobile-first, thumb-zone controls, desktop scales up.
   Look: neon arcade / sticker-book. Chunky shapes, hard shadows, loud color.
   ========================================================================== */

:root {
  --bg-0: #12002b;
  --bg-1: #24074d;
  --ink: #0d0020;

  --gold:  #ffd23f;
  --pink:  #ff2e93;
  --cyan:  #22e5d6;
  --green: #24d968;
  --red:   #ff3b5c;
  --violet:#a855f7;

  --paper:   rgba(255,255,255,.075);
  --paper-2: rgba(255,255,255,.13);
  --line:    rgba(255,255,255,.16);
  --text:    #f6efff;
  --text-dim:#b9a5d6;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 11px;

  /* Hard "sticker" shadow, the signature of the whole UI */
  --lift: 0 5px 0 rgba(0,0,0,.42);
  --lift-lg: 0 7px 0 rgba(0,0,0,.45);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  font-family: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg-0);
  background-image:
    radial-gradient(70% 55% at 12% 6%,  rgba(255,46,147,.34), transparent 62%),
    radial-gradient(65% 50% at 88% 12%, rgba(34,229,214,.24), transparent 60%),
    radial-gradient(85% 60% at 50% 108%, rgba(168,85,247,.36), transparent 65%),
    linear-gradient(170deg, var(--bg-1), var(--bg-0) 68%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Screens ---------------------------------------------------------------- */
.screen { display: none; }
.screen.active { display: flex; }
.screen:not(.active) { display: none !important; }

/* ==========================================================================
   LOBBY
   ========================================================================== */
#lobby-screen {
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  overflow-y: auto;
}
.lobby-inner { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }

.logo { text-align: center; margin-bottom: 4px; }
.logo-word {
  margin: 2px 0 0;
  font-size: clamp(58px, 19vw, 92px);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: .95;
  background: linear-gradient(180deg, #fff 8%, var(--gold) 52%, #ff9a2e 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.4));
}
.logo-tag { margin: 6px 0 0; color: var(--text-dim); font-size: 15px; font-weight: 500; }

/* Panels ----------------------------------------------------------------- */
.panel {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.panel-title { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--text-dim); letter-spacing: .04em; }
.join-panel { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.field-label small { text-transform: none; letter-spacing: 0; opacity: .7; }

input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 14px 15px;
  font: inherit;
  font-size: 17px;               /* >=16px stops iOS zoom-on-focus */
  font-weight: 500;
  color: var(--text);
  background: rgba(0,0,0,.3);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: rgba(255,255,255,.32); }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34,229,214,.18); }
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%23b9a5d6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px; padding-right: 40px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  font: inherit;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  border: 2px solid rgba(0,0,0,.4);
  border-radius: var(--r-md);
  padding: 15px 20px;
  cursor: pointer;
  background: #ccc;
  box-shadow: var(--lift);
  transform: translateY(0);
  transition: transform .09s ease, box-shadow .09s ease, filter .15s;
  user-select: none;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 rgba(0,0,0,.4); }
.btn:disabled { filter: grayscale(.65) brightness(.7); cursor: not-allowed; box-shadow: var(--lift); }
.btn-xl { width: 100%; font-size: 21px; padding: 18px; border-radius: var(--r-lg); box-shadow: var(--lift-lg); }

.btn-gold  { background: linear-gradient(180deg, #ffe37a, var(--gold) 55%, #f5a623); }
.btn-green { background: linear-gradient(180deg, #7ff0a8, var(--green) 55%, #12a94e); }
.btn-danger{ background: linear-gradient(180deg, #ff8095, var(--red) 55%, #d31338); color: #fff; }
.btn-ghost { background: var(--paper-2); color: var(--text); border-color: var(--line); }

/* Rules ------------------------------------------------------------------ */
.rules-panel { padding: 0; overflow: hidden; }
.rules-panel summary {
  list-style: none; cursor: pointer; padding: 16px 18px;
  font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center;
}
.rules-panel summary::-webkit-details-marker { display: none; }
.rules-panel summary::after { content: '▾'; color: var(--text-dim); transition: transform .2s; }
.rules-panel[open] summary::after { transform: rotate(180deg); }
.rules-list { margin: 0; padding: 0 18px 18px 34px; display: flex; flex-direction: column; gap: 10px;
  font-size: 14.5px; line-height: 1.5; color: var(--text-dim); font-weight: 400; }
.rules-list.compact { padding: 4px 4px 4px 22px; font-size: 13.5px; }
.rules-list b { color: var(--text); }
.c-cyan { color: var(--cyan) !important; } .c-pink { color: var(--pink) !important; }
.c-green { color: var(--green) !important; } .c-gold { color: var(--gold) !important; }

/* ==========================================================================
   GAME — fixed app shell, never scrolls. Rows: topbar / rail / stage / dock
   ========================================================================== */
#game-screen {
  position: fixed; inset: 0;
  flex-direction: column;
  padding-top: var(--safe-t);
  overflow: hidden;
}

.topbar {
  position: relative; z-index: 2;
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
}
.icon-btn {
  position: relative;
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 19px;
  background: var(--paper); color: var(--text);
  border: 2px solid var(--line); border-radius: 13px;
  cursor: pointer; touch-action: manipulation;
}
.icon-btn:active { transform: scale(.93); }
.icon-btn svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.topbar-spacer { flex: 0 0 auto; width: 42px; }
.topbar-pills { flex: 1 1 auto; display: flex; gap: 6px; justify-content: center; min-width: 0; }
.pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5px 10px; min-width: 0;
  background: var(--paper); border: 2px solid var(--line); border-radius: 13px;
}
.pill-k { font-size: 9px; font-weight: 600; letter-spacing: .12em; color: var(--text-dim); }
.pill-v { font-size: 15px; font-weight: 700; line-height: 1.15; white-space: nowrap; }

/* Player rail — horizontal scroller on phones ---------------------------- */
.players-rail {
  position: relative; z-index: 2;
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 4px 12px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.players-rail::-webkit-scrollbar { display: none; }

.player-item {
  flex: 0 0 auto;
  position: relative;
  min-width: 82px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  transition: transform .2s, border-color .2s, background .2s;
}
.player-name {
  font-size: 13px; font-weight: 600; max-width: 88px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-score { font-size: 21px; font-weight: 700; line-height: 1.1; color: var(--gold); }
.player-item.is-me { border-color: rgba(34,229,214,.55); }
.player-item.is-me .player-name::after { content: ' (you)'; color: var(--cyan); font-weight: 500; }
.player-name.banker { color: var(--gold); }

.player-item.current-turn {
  background: linear-gradient(180deg, rgba(255,210,63,.28), rgba(255,210,63,.08));
  border-color: var(--gold);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 22px rgba(255,210,63,.35);
}
.player-item.banked { opacity: .55; }
/* Connection dropped; their seat is held for a while. */
.player-item.away { opacity: .4; filter: grayscale(1); }
.player-item.away .player-name::before { content: '\231B  '; }
.player-status {
  position: absolute; top: -8px; right: -4px;
  font-size: 9px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 8px;
  background: var(--green); color: var(--ink);
}

/* Stage ------------------------------------------------------------------ */
.stage {
  position: relative; z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 0 12px;
  overflow: hidden;
}

/* Pre-game */
.setup-zone { width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center;
  gap: 10px; overflow-y: auto; max-height: 100%; padding: 4px 0; }
.waiting-art { animation: bob 2.4s ease-in-out infinite; line-height: 0; }
.waiting-art svg { width: 64px; height: 64px; }
.waiting-art rect { fill: none; stroke: var(--gold); stroke-width: 3.5; }
.waiting-art circle { fill: var(--gold); }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
.setup-title { margin: 0; font-size: 22px; font-weight: 700; text-align: center; }
.setup-sub { margin: 0 0 4px; font-size: 14px; color: var(--text-dim); text-align: center; }
.config-panel { width: 100%; }
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Dice --------------------------------------------------------------------
   The dice table covers the whole viewport and floats ABOVE the interface, so
   the dice tumble across the UI. It never takes pointer events, so every
   control underneath stays tappable.
   ------------------------------------------------------------------------ */
.dice-display {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.dice-canvas { display: none; width: 100%; height: 100%; }
.dice-display.dice-3d-active .dice-canvas { display: block; }
.dice-display.dice-3d-active .dice-2d { display: none; }

.dice-2d { display: flex; gap: 18px; }
.dice {
  width: 82px; height: 82px;
  display: grid; place-items: center;
  font-size: 44px; font-weight: 700; color: var(--ink);
  background: linear-gradient(160deg, #fff, #d8d2e8);
  border-radius: 18px;
  border: 3px solid rgba(0,0,0,.3);
  box-shadow: var(--lift-lg);
}
.dice.rolling { animation: shake .28s linear infinite; }
@keyframes shake {
  0% { transform: rotate(-11deg) translateY(0) }
  50% { transform: rotate(12deg) translateY(-7px) }
  100% { transform: rotate(-11deg) translateY(0) }
}
.dice.landing { animation: land .45s cubic-bezier(.3,1.7,.5,1); }
@keyframes land { 0% { transform: scale(1.3) } 100% { transform: scale(1) } }
.dice.doubles {
  background: linear-gradient(160deg, #fff6d0, var(--gold));
  animation: dblglow 1s ease-in-out infinite;
}
@keyframes dblglow {
  0%,100% { box-shadow: var(--lift-lg); }
  50% { box-shadow: var(--lift-lg), 0 0 30px 6px rgba(255,210,63,.75); }
}

/* Flick-to-throw -----------------------------------------------------------
   The stage is the throwing area. It sits under the dice layer and above
   nothing else, so a drag there never fights the dock buttons.
   ------------------------------------------------------------------------ */
.stage.can-throw { cursor: grab; touch-action: none; }
.stage.throwing { cursor: grabbing; }

.aim-layer {
  position: fixed; inset: 0; z-index: 25;
  pointer-events: none;
  width: 100%; height: 100%;
}
.aim-layer line {
  stroke: var(--gold); stroke-width: 6; stroke-linecap: round;
  opacity: .85;
}
.aim-layer circle { fill: var(--gold); opacity: .5; }

.swipe-hint {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-dim);
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  opacity: .75;
  animation: hintbob 2s ease-in-out infinite;
  pointer-events: none;
}
.stage.throwing .swipe-hint { opacity: 0; }
.swipe-hint svg {
  width: 26px; height: 26px;
  fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes hintbob {
  0%,100% { transform: translateY(4px); opacity: .5; }
  50%     { transform: translateY(-4px); opacity: .9; }
}

/* Dock — the thumb zone -------------------------------------------------- */
.dock {
  position: relative; z-index: 2;
  /* On desktop the dock shares the stage's grid cell, so its status text would
     otherwise sit invisibly over the throwing area and swallow drags. Only the
     buttons need to catch pointers; everything else lets them through. */
  pointer-events: none;
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 12px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(9,0,22,.72) 32%);
}
.dock .btn { pointer-events: auto; }
.status-row { display: flex; align-items: center; gap: 12px; justify-content: center; min-height: 26px; }
.status-text { flex: 1 1 auto; min-width: 0; }
.status-msg {
  font-size: 15px; font-weight: 500; line-height: 1.3;
  text-align: center; color: var(--text-dim);
}
.status-msg.highlight { color: var(--gold); font-weight: 700; font-size: 17px; }

.action-buttons { display: grid; grid-template-columns: 1fr; }
.btn-action {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px;
  border-radius: var(--r-lg);
  box-shadow: var(--lift-lg);
  min-height: 88px;                /* generous thumb target */
  justify-content: center;
}
/* BANK carries the pot: a small label over a big, bright total. */
.btn-label {
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  line-height: 1; opacity: .72;
}
.bank-amount {
  font-size: clamp(38px, 12vw, 52px);
  font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #ffffff 12%, #fff6d0 48%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.42));
  transition: transform .2s;
}
.bank-amount.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 0% { transform: scale(1) } 40% { transform: scale(1.22) } 100% { transform: scale(1) } }

/* Once the pot is worth fighting over, the whole button pulses. */
.bank-btn.hot {
  animation: hotbtn 1.15s ease-in-out infinite;
}
@keyframes hotbtn {
  0%,100% { box-shadow: var(--lift-lg); }
  50% { box-shadow: var(--lift-lg), 0 0 26px 4px rgba(255,210,63,.7); }
}
/* Disabled still has to read clearly - it is the scoreboard as well as a button. */
.bank-btn:disabled { filter: grayscale(.45) brightness(.82); opacity: .9; }

/* Timer ------------------------------------------------------------------ */
.timer-display { position: relative; flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; }
.timer-svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.timer-bg { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 9; }
.timer-progress {
  fill: none; stroke: var(--cyan); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 283; stroke-dashoffset: 0;
  transition: stroke .3s;
}
.timer-progress.timer-warning { stroke: var(--gold); }
.timer-progress.timer-critical { stroke: var(--red); }
.timer-text { position: absolute; font-size: 17px; font-weight: 700; }

/* Sheets (log + menu) ---------------------------------------------------- */
.sheet-scrim { position: fixed; inset: 0; background: rgba(5,0,15,.6); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-height: 72dvh;
  display: flex; flex-direction: column;
  padding: 8px 16px calc(20px + var(--safe-b));
  background: #1d0740;
  border-top: 2px solid var(--line);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.5);
  animation: slideUp .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.sheet-grab { width: 44px; height: 5px; background: var(--line); border-radius: 3px; margin: 4px auto 10px; flex: 0 0 auto; }
.sheet-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.menu-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* Toast ------------------------------------------------------------------ */
.error-toast {
  position: fixed; z-index: 60;
  left: 50%; top: calc(14px + var(--safe-t));
  transform: translate(-50%, -150%);
  max-width: min(92vw, 420px);
  padding: 13px 20px;
  font-weight: 600; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, #ff5c78, var(--red));
  border: 2px solid rgba(0,0,0,.35); border-radius: var(--r-md);
  box-shadow: var(--lift);
  transition: transform .32s cubic-bezier(.2,1.4,.4,1);
}
.error-toast.show { transform: translate(-50%, 0); }

/* Round-over overlay ----------------------------------------------------- */
.round-over-overlay {
  position: fixed; inset: 0; z-index: 55;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(6,0,18,.8);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none;
  transition: opacity .28s;
}
.round-over-overlay.show { opacity: 1; pointer-events: auto; }
.round-over-content {
  text-align: center; max-width: 460px; width: 100%;
  padding: 34px 26px;
  background: linear-gradient(170deg, #2b0b52, #17032e);
  border: 3px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 18px 60px rgba(0,0,0,.6);
  transform: scale(.8);
  transition: transform .34s cubic-bezier(.2,1.5,.4,1);
}
.round-over-overlay.show .round-over-content { transform: scale(1); }
.round-over-content.seven-rolled { border-color: var(--red); box-shadow: 0 0 60px rgba(255,59,92,.45); }
.round-over-content.all-banked  { border-color: var(--green); box-shadow: 0 0 60px rgba(36,217,104,.4); }
.round-over-content.game-over   { border-color: var(--gold);  box-shadow: 0 0 70px rgba(255,210,63,.5); }
.round-over-title { font-size: 34px; font-weight: 700; letter-spacing: .04em; }
.round-over-message { margin-top: 10px; font-size: 17px; font-weight: 500; color: var(--text-dim); line-height: 1.45; }

/* Confetti --------------------------------------------------------------- */
.confetti-canvas { position: fixed; inset: 0; z-index: 58; pointer-events: none; display: none; }
.confetti-canvas.active { display: block; }

/* Screen shake for a killer 7 */
.shake-hard { animation: shakehard .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shakehard {
  10%,90% { transform: translateX(-2px) } 20%,80% { transform: translateX(4px) }
  30%,50%,70% { transform: translateX(-8px) } 40%,60% { transform: translateX(8px) }
}

/* ==========================================================================
   TABLET / DESKTOP — three columns, players and log always visible
   ========================================================================== */
@media (min-width: 900px) {
  #game-screen.active {
    display: grid;
    grid-template-columns: 260px minmax(0,1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "top top" "players stage";
    gap: 16px;
    padding: calc(16px + var(--safe-t)) 20px 20px;
  }
  /* Grid items default to min-height:auto, so a long game log would stretch the
     row past the viewport and shove the action dock off the bottom of the
     screen. Pinning them to 0 makes the columns scroll internally instead. */
  #game-screen.active > * { min-height: 0; min-width: 0; }
  .topbar { grid-area: top; padding: 0; }
  .topbar-pills { justify-content: flex-start; gap: 10px; }
  .pill { padding: 8px 16px; }
  .pill-v { font-size: 18px; }
  #menu-toggle { display: none; }
  .topbar-spacer { display: none; }

  /* Players become a vertical panel */
  .players-rail {
    grid-area: players;
    min-height: 0;
    flex-direction: column; overflow-y: auto; overflow-x: hidden;
    padding: 16px; gap: 10px;
    align-content: start;
    background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-lg);
  }
  .player-item {
    width: 100%;
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 12px 14px;
  }
  .player-name { max-width: none; flex: 1 1 auto; text-align: left; font-size: 15px; }
  .player-score { font-size: 24px; }
  .player-item.current-turn { transform: translateX(5px) scale(1.02); }
  .player-status { position: static; margin-left: 8px; }

  /* Stage holds hero, dice and dock together */
  .stage {
    grid-area: stage;
    justify-content: center;
    padding: 0;
  }
  .dock {
    grid-area: stage;
    align-self: end;
    background: none;
    padding: 0;
    max-width: 620px; width: 100%; margin: 0 auto;
    z-index: 5;
  }
  .btn-action:hover:not(:disabled) { filter: brightness(1.08); }
  .btn-action { min-height: 104px; }
  .bank-amount { font-size: 58px; }

  .sheet-grab { display: none; }
  #menu-sheet { max-width: 420px; left: 50%; transform: translateX(-50%); border-radius: var(--r-lg); bottom: 24px; }

  #lobby-screen { padding: 40px; }
  .lobby-inner { max-width: 500px; }
}

/* Desktop hover states only where a pointer exists */
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.07); }
  .icon-btn:hover { background: var(--paper-2); }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Short screens (landscape phone): tighten the vertical rhythm */
@media (max-height: 620px) and (max-width: 899px) {
  .bank-amount { font-size: clamp(28px, 8vh, 40px); }
  .btn-action { min-height: 64px; padding: 8px; }
  .players-rail { padding-bottom: 6px; }
  .player-item { padding: 6px 10px; min-width: 72px; }
  .player-score { font-size: 17px; }
}
