/* Liar's Dice play page. Loaded after the MENDAX viewer stylesheet (assets/viewer.*.css,
 * a verbatim copy of src/mendax/viewer/static/app.css), whose tokens and classes it reuses.
 * The viewer is a fixed-height desktop app; this page scrolls and works at phone width. */

/* ---- colour: the viewer's tokens, adjusted so text meets WCAG AA (4.5:1) on this page -- */
:root { --muted: #8a929d; }
:root[data-theme="light"] {
  --muted: #646c75;
  --accent: #167159;
  --accent-soft: rgba(22, 113, 89, 0.12);
  --lose: #a9433a;
  --gain: #1f7a45;
  --palifico: #7448b0;
  --call: #8a5c0c;
  --felt-1: #2c6858;
  --felt-2: #255a4c;
  --felt-3: #1e4c40;
}
:root[data-theme="light"] .tag.win { color: var(--call); }
.ptable .eyebrow, .ptable .verdict .need { color: rgba(243, 245, 242, 0.85); }
.ptable .by { color: rgba(243, 245, 242, 0.88); }
.ptable .bid-big .times { color: rgba(243, 245, 242, 0.7); }
/* Words are written in sentence case (screen readers spell out capitals); shown in caps. */
.count-badge .l, .action-chip.call, .h-item.call .bid { text-transform: uppercase; }
/* Seat colours by class (no inline style attributes: the CSP has no 'unsafe-inline'). */
.sc-0 { --c: var(--seat-0); } .sc-1 { --c: var(--seat-1); } .sc-2 { --c: var(--seat-2); }
.sc-3 { --c: var(--seat-3); } .sc-4 { --c: var(--seat-4); } .sc-5 { --c: var(--seat-5); }
.swatch { background: var(--c); }
/* Revealed dice in the light theme: non-counting dice stay readable (pips about 3.7:1 on
 * the white card), and counting dice glow in the light accent. */
:root[data-theme="light"] .die.dim { opacity: 0.55; }
:root[data-theme="light"] .die.hit { filter: drop-shadow(0 0 4px rgba(22, 113, 89, 0.65)); }
:root[data-theme="light"] .die.hit.paco { filter: drop-shadow(0 0 4px rgba(176, 120, 20, 0.7)); }

/* ---- page frame: let it scroll ------------------------------------------------------ */
html, body { height: auto; min-height: 100%; }
body { overflow-x: hidden; overflow-y: auto; min-height: 100vh; min-height: 100dvh; }
.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
a { color: var(--accent); }

.site-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.brand-link { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand-link img { display: block; border-radius: 6px; }
.brand-name { font-weight: 650; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }
.top-meta {
  flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden;
}
.top-meta b { color: var(--text); font-weight: 600; }
.top-meta .sep { color: var(--muted); }
.top-meta .pal { color: var(--palifico); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.banner { border-radius: 0; }

.main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 16px 16px 24px; line-height: 1.6; }
.site-foot a { color: var(--text-2); }

.card {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---- buttons and inputs --------------------------------------------------------------- */
.pbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px; border-radius: 12px; cursor: pointer;
  font-weight: 600; font-size: 14px; line-height: 1.15;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.pbtn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.pbtn:disabled { opacity: 0.38; cursor: not-allowed; }
.pbtn:focus-visible, .face-btn:focus-visible, .step:focus-visible, .pround summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.pbtn.primary { background: var(--accent); color: var(--bg); border-color: transparent; }
.pbtn.primary:hover:not(:disabled) { opacity: 0.9; }
.pbtn.ghost { background: transparent; }
.pbtn.small { min-height: 32px; padding: 5px 12px; font-size: 13px; margin-top: 8px; }
.pbtn .inline-bid { color: inherit; }
.pbtn.primary .die { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.input {
  font: inherit; font-size: 15px; color: var(--text); width: 100%; min-width: 0;
  padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2);
}
select.input { cursor: pointer; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented.big { align-self: flex-start; }
.segmented.big button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.segmented.big button { font-size: 15px; padding: 7px 18px; }

/* ---- setup screen --------------------------------------------------------------------- */
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 20px; align-items: start; }
.setup-title { font-size: 22px; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
.setup-title:focus { outline: none; } /* focused by script when the setup screen returns */
.setup-title.small { font-size: 17px; margin-bottom: 10px; }
.lede { color: var(--text-2); margin: 0 0 16px; }
.rules-card p { margin: 0 0 10px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.rules-card b { color: var(--text); }
.rules-card p:last-child { margin-bottom: 0; }

.loading {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px;
  border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.loading-step { font-weight: 600; }
.loading-note { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.loading.error { background: color-mix(in srgb, var(--lose) 14%, transparent); border-color: color-mix(in srgb, var(--lose) 40%, transparent); }
.loading.error:not(.waiting) .spinner { display: none; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0; }
.seat-hint { margin: -6px 0 0; }
.opponents legend { margin-bottom: 6px; }
.opp-list { display: flex; flex-direction: column; gap: 10px; }
.opp { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.opp-label { font-size: 13px; color: var(--text-2); }
.opp-desc { grid-column: 2; margin: 0; }
.form-error {
  padding: 8px 12px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--lose) 16%, transparent); border: 1px solid color-mix(in srgb, var(--lose) 40%, transparent);
}
.start { width: 100%; min-height: 48px; font-size: 16px; }
.resume {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.resume-title { font-weight: 650; }
.resume .hint { color: var(--text-2); } /* --muted is too faint on the tinted box */
.resume-info { min-width: 0; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.dialog {
  width: min(420px, calc(100vw - 32px)); padding: 20px; border-radius: 16px;
  border: 1px solid var(--line-2); background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.dialog-text { margin: 0; color: var(--text-2); line-height: 1.5; }
.dialog .btn-row { margin-top: 18px; justify-content: flex-end; }

/* ---- play screen ----------------------------------------------------------------------- */
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.play-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 10px; }
.pseat { min-width: 0; }
.pseat .plate { padding: 10px 12px; box-shadow: none; height: 100%; }
.pseat .avatar { width: 32px; height: 32px; font-size: 13px; }
.pseat .plate-top { gap: 9px; }
.pseat .tray { justify-content: flex-start; gap: 4px; margin-top: 8px; min-height: 22px; }
.pseat .tray .die { width: 22px; height: 22px; }
.pseat .pchip { margin-top: 8px; min-height: 26px; display: flex; align-items: center; }
.pseat .who-chip { display: none; }
.pseat .action-chip { box-shadow: none; font-size: 12px; padding: 3px 9px 3px 7px; }
.pseat .action-chip.call { padding: 3px 10px; }
.pseat .delta { top: -9px; right: 10px; }
.pseat .type { white-space: normal; line-height: 1.25; } /* "Inference (cap)" in full, at any width */
.pseat.active .plate { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pseat.hurt .plate { border-color: color-mix(in srgb, var(--lose) 60%, transparent); }
.pseat.helped .plate { border-color: color-mix(in srgb, var(--gain) 60%, transparent); }
.pseat.winner .plate { border-color: var(--paco-1); box-shadow: 0 0 0 3px rgba(243, 207, 122, 0.18); }
/* Out: a dashed, empty card; the text stays readable (no opacity on it). */
.pseat.out .plate { background: transparent; border-style: dashed; }
.pseat.out .avatar, .pseat.out .tray { opacity: 0.5; }
.pseat.out .name, .pseat.out .out-tag { color: var(--text-2); }
.pseat.me .plate { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.tag.you { color: var(--accent); margin-right: 6px; }
.tag.pal { margin-right: 6px; }

.ptable {
  border-radius: 30px; padding: 10px;
  background: linear-gradient(180deg, var(--rim-2), var(--rim-1));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ptable .felt { border-radius: 22px; min-height: 230px; height: auto; padding: 22px 14px; }
.ptable .felt::after { inset: 8px; border-radius: 16px; }
.ptable .center { max-width: 100%; }
.headline.small { font-size: 24px; }
.turn-status { margin-top: 12px; font-size: 13px; color: rgba(243, 245, 242, 0.88); display: inline-flex; align-items: center; }
.turn-status.you {
  color: #fff; font-weight: 650; letter-spacing: 0.02em; padding: 5px 14px; border-radius: 999px;
  background: rgba(143, 211, 191, 0.24); border: 1px solid rgba(143, 211, 191, 0.5);
}
.ptable .by .inline-bid { color: #fff; }
/* From the call on, your hand is in your seat with everyone else's, and the felt is only
 * as tall as the verdict: the hands, the count and Next fit on one screen. */
#play[data-mode="call"] #mine, #play[data-mode="reveal"] #mine { display: none; }
#play[data-mode="reveal"] .ptable .felt { min-height: 0; }

.mine { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; }
.mine-label { font-weight: 650; font-size: 15px; }
.mine-label .hint { font-weight: 400; margin-left: 6px; }
.mine-dice { display: flex; gap: 8px; flex-wrap: wrap; }
.mine-dice .die { width: 52px; height: 52px; }

.panel { scroll-margin: 72px 0 16px; transition: border-color 0.2s, box-shadow 0.2s; }
.panel:focus { outline: none; } /* focused for keyboard users on their turn; .turn marks it */
.panel.turn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 26px; }
.panel-head .hint { font-size: 13px; color: var(--text-2); }
.panel-head .inline-bid { color: var(--text); }
.you-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.face-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; min-width: 0;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.face-btn .die { width: 34px; height: 34px; }
.face-btn .min { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.face-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.face-btn.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.face-btn.on .min { color: var(--accent); }
.face-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.bid-row { display: flex; gap: 10px; margin-top: 10px; align-items: stretch; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); flex: none; }
.step { width: 44px; height: 46px; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text); border-radius: 12px; }
.step:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-input {
  width: 2.4em; min-height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent;
  font: inherit; font-size: 22px; font-weight: 650; text-align: center; color: var(--text);
}
.qty-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.qty-input:disabled { color: var(--muted); }
.qty-note { margin: 8px 0 0; font-size: 13px; color: var(--lose); }
.qty-note:empty { margin: 0; }
.countdown { align-self: center; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.bid-btn { flex: 1; min-height: 48px; font-size: 16px; }
.call-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.call-row.one { grid-template-columns: 1fr; }
.pbtn.call {
  flex-direction: column; gap: 1px; min-height: 52px; letter-spacing: 0.06em; font-size: 15px;
  color: var(--call); border-color: color-mix(in srgb, var(--call) 45%, transparent);
  background: color-mix(in srgb, var(--call) 8%, var(--surface-2));
}
.pbtn.call small { font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.pal-hint { margin: 10px 0 0; color: var(--palifico); }
.status-line { margin: 0; color: var(--text-2); }
.out-msg { margin: 0; font-weight: 600; }
.verdict-text p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.verdict-text .inline-bid { color: var(--text); }
.panel-title { font-size: 16px; margin: 0 0 10px; }
.final-ranking { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.final-ranking li { display: grid; grid-template-columns: 34px 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.final-ranking .place { color: var(--muted); text-align: right; font-size: 13px; }
.final-ranking li:first-child .rname { font-weight: 700; }
.final-ranking .rname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-ranking .rtype { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.panel > .hint { margin: 10px 0 0; }

/* ---- long names (up to 24 characters, maybe without spaces) wrap or clip ---------------- */
.ptable .center, .panel-head, .verdict-text, .status-line, .out-msg, .pround, .h-empty { overflow-wrap: anywhere; }
.h-item { grid-template-columns: 10px minmax(0, 1fr) auto; }
.h-item > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tchip { max-width: 100%; }

/* ---- history ------------------------------------------------------------------------------ */
.side {
  position: sticky; top: 72px; max-height: calc(100vh - 92px); max-height: calc(100dvh - 92px); overflow: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 16px;
}
.h-note { letter-spacing: 0; text-transform: none; font-size: 11px; }
.pround {
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2);
}
.pround[open] { border-color: var(--line-2); }
.pround summary {
  list-style: none; cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; border-radius: 12px;
}
.pround summary::-webkit-details-marker { display: none; }
.pround summary:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.pround .rt { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.pround .rt::after { content: "+"; font-size: 13px; letter-spacing: 0; }
.pround[open] .rt::after { content: "−"; }
.pround .rt .tag { margin: 0 auto 0 8px; }
.pround .res b { color: var(--text); font-weight: 600; }
.pround .inline-bid { color: var(--text); }
.pround .lose { color: var(--lose); font-weight: 600; }
.pround .gain { color: var(--gain); font-weight: 600; }
.rbody { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.rbody .h-item { padding: 4px 8px; }
.rhands { display: flex; flex-direction: column; gap: 5px; }
.rhand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rname { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdice { display: flex; gap: 3px; flex: none; }
.rdice .die { width: 20px; height: 20px; }
.rverdict p { margin: 0 0 4px; color: var(--text-2); line-height: 1.45; }

/* ---- narrower windows --------------------------------------------------------------------- */
@media (max-width: 980px) {
  .play-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; overflow: visible; }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .playing .top-meta { display: none; }
  .site-top { padding: 8px 16px; gap: 8px; }
  .segmented button { padding: 5px 9px; }
}
@media (max-height: 900px) {
  /* Laptop screens: a 5-6 player reveal (two rows of hands, the felt, the verdict and
   * Next) still fits under the header. */
  #play[data-mode="reveal"] .ptable .felt { padding-top: 14px; padding-bottom: 14px; }
  #play[data-mode="reveal"] .bid-big { margin: 2px 0; }
  #play[data-mode="reveal"] .bid-big .qty { font-size: 48px; }
  #play[data-mode="reveal"] .bid-big .die { width: 44px; height: 44px; }
}
@media (max-width: 600px) {
  .main { padding: 12px 16px; }
  .card { padding: 14px; border-radius: 14px; }
  .input { font-size: 16px; } /* no zoom-on-focus on iOS */
  .field-row { grid-template-columns: 1fr; }
  .opp { grid-template-columns: minmax(0, 1fr); }
  .opp-desc { grid-column: 1; }
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pseat .plate { padding: 8px 10px; }
  .pseat .avatar { width: 28px; height: 28px; font-size: 12px; }
  .pseat .plate-top { gap: 7px; }
  .pseat .count-badge .n { font-size: 17px; }
  .pseat .tray.hidden-dice, .pseat .tray.own-dice { display: none; }
  /* "Out" over the place, like the dice count, so the action chip beside it has room. */
  .pseat .out-tag { text-align: right; line-height: 1.25; }
  .pseat .out-tag .out-sep { display: none; }
  .pseat .out-tag .out-pl { display: block; }
  .pseat .tray .die { width: 20px; height: 20px; }
  .pseat .tray { gap: 3px; }
  /* No last-action row: the chip takes the bot type's place once the seat has acted. */
  .pseat .pchip { display: none; }
  .pseat .who-chip { display: block; margin-top: 3px; }
  .pseat.acted .type { display: none; }
  .pseat .who-chip .action-chip { font-size: 12px; padding: 2px 8px 2px 6px; }
  .pseat .who-chip .action-chip.call { padding: 2px 9px; }
  /* The reveal (all hands, the count, the verdict and Next) fits on one phone screen. */
  #play[data-mode="reveal"] .ptable .felt { padding: 14px 10px; }
  #play[data-mode="reveal"] .bid-big { margin: 2px 0; }
  #play[data-mode="reveal"] .bid-big .qty { font-size: 42px; }
  #play[data-mode="reveal"] .bid-big .die { width: 40px; height: 40px; }
  #play[data-mode="reveal"] .verdict { margin-top: 4px; gap: 4px; }
  .ptable { border-radius: 24px; padding: 8px; }
  .ptable .felt { min-height: 190px; padding: 16px 10px; border-radius: 18px; }
  .bid-big .qty { font-size: 50px; }
  .bid-big .die { width: 48px; height: 48px; }
  .call-big { font-size: 40px; }
  .headline { font-size: 28px; }
  .mine { padding: 12px 14px; }
  .mine-dice { gap: 6px; }
  .mine-dice .die { width: 44px; height: 44px; }
  .face-btn .die { width: 30px; height: 30px; }
  .face-btn { padding: 7px 0 5px; }
  .verdict-text p { font-size: 14.5px; }
}
@media (max-width: 420px) {
  .playing .brand-name { display: none; }
  .segmented button { padding: 5px 8px; font-size: 12px; }
}
@media (max-width: 360px) {
  /* "Bid 10 × five" still fits beside the stepper at 320 px. */
  .step { width: 36px; }
  .qty-input { width: 2em; }
  .bid-btn { min-width: 0; padding: 8px 10px; }
  /* A seat card is about 140 px wide: a smaller avatar and chip keep "12 × five" or
   * "Calza" clear of the dice count beside it. */
  .pseat .avatar { width: 22px; height: 22px; font-size: 11px; }
  .pseat .plate-top { gap: 5px; }
  .pseat .who-chip .action-chip { font-size: 11px; padding: 2px 6px 2px 5px; }
  .pseat .who-chip .action-chip.call { padding: 2px 7px; letter-spacing: 0.04em; }
  .pseat .who-chip .inline-bid { gap: 3px; }
  .pseat .who-chip .die { width: 13px; height: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 3s; }
}
