:root {
  color-scheme: light dark;
  --bg: #f5efe0; --surface: #fffdf7; --well: #efe8d6; --text: #1f1c15; --muted: #625b4b; --line: rgba(40, 30, 10, 0.13);
  --accent: #3253c4; --accent-text: #2b49b3; --gold: #a9781c; --good: #1c7a4c; --bad: #b3362d;
  --ca-accent: #3253c4; /* the accounts SDK's sheets and chip */
  --plate: rgba(255, 255, 255, 0.72); --plate-edge: rgba(40, 30, 10, 0.1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #13151d; --surface: #1c1f2a; --well: #252a37; --text: #eef0f5; --muted: #a4aab7; --line: rgba(255, 255, 255, 0.12); --accent: #5873e0; --accent-text: #a8b8ff; --gold: #e2b85a; --good: #6fd3a0; --bad: #ff8d84; --plate: rgba(255, 255, 255, 0.06); --plate-edge: rgba(255, 255, 255, 0.08); }
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; --bg: #13151d; --surface: #1c1f2a; --well: #252a37; --text: #eef0f5; --muted: #a4aab7; --line: rgba(255, 255, 255, 0.12); --accent: #5873e0; --accent-text: #a8b8ff; --gold: #e2b85a; --good: #6fd3a0; --bad: #ff8d84; --plate: rgba(255, 255, 255, 0.06); --plate-edge: rgba(255, 255, 255, 0.08); }
* { box-sizing: border-box; }
/* no double-tap zoom on iOS: js/touch-guard.js adds the same rule plus a JS
   fallback; this copy covers Safari before 16.4 under the strict CSP */
:where(html, body, body *) { touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; height: calc(100dvh / var(--ca-zoom, 1)); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* in a Shared Space the call rests in a strip at the top: nothing of the game is under it */
  padding: calc(env(safe-area-inset-top) + var(--ca-space-top, 0px)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* a game page: no text selection or long-press callouts anywhere, HUD and
   menus included; form fields and long text (the rules) opt back in */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input[type='text'], textarea, [contenteditable], .prose p, .prose li { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---- the bar ---- */
.bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 16px; min-height: 54px; flex: none; }
/* the match menu (a pause, or the table's menu online): the game's own round button, at the right end
   beside the bar's tools and the chip (App Standard §4.1) */
.bar > .ca-start { margin-right: auto; }
.icon-btn { width: 44px; height: 44px; margin-left: -8px; flex: none; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon-btn:active { transform: scale(0.94); }

/* ---- the first screen ---- */
.home { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 22px 22px; }
/* (centred while it fits, from the top once it does not) */
.home > :first-child { margin-top: auto; }
.home > :last-child { margin-bottom: auto; }
.hero { position: relative; width: min(100%, 300px, calc(36vh / var(--ca-zoom, 1))); aspect-ratio: 1; flex: none; border-radius: 22px; filter: drop-shadow(0 18px 26px rgba(40, 25, 0, 0.28)); }
.hero-wrap { position: absolute; inset: 0; }
.hero canvas { width: 100%; height: 100%; display: block; }
.tagline { margin: 2px 0 0; max-width: 34ch; text-align: center; text-wrap: balance; color: var(--muted); font-size: 15.5px; }
.home-actions { width: min(100%, 440px); display: flex; flex-direction: column; gap: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* a child profile has no "With friends" (App Standard §4.13): the daily race takes the whole row */
html.ca-kid .pair { grid-template-columns: 1fr; }
.pair .btn { min-width: 0; font-size: clamp(14.5px, calc(4.4vw / var(--ca-zoom, 1)), 17px); white-space: nowrap; padding-inline: 8px; }
.home-stats { width: min(100%, 440px); display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; background: var(--well); padding: 8px 4px; }
.home-stats div { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.home-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.home-stats span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.home-links { display: flex; justify-content: center; width: min(100%, 440px); }
.link-btn { flex: 1 1 auto; min-height: 44px; padding: 0 6px; font-size: clamp(13px, calc(3.9vw / var(--ca-zoom, 1)), 16px); white-space: nowrap; border: 0; background: none; color: var(--accent-text); font-weight: 650; border-radius: 12px; cursor: pointer; }
.card-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px 10px 16px; text-align: left; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.35); }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-btn:active, .btn:active, .seg button:active, .looks button:active { transform: scale(0.975); }

.btn { min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; font-weight: 650; cursor: pointer; transition: transform 0.12s; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { color: var(--bad); }
.btn.big { min-height: 54px; font-size: 17px; width: 100%; }
.btn.daily { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 4px 8px; }
.btn.daily > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.btn.daily small { font-size: 12px; font-weight: 550; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.btn:disabled { opacity: 0.5; }

/* ---- the board and around it ---- */
.game { flex: 1; min-height: 0; container-type: size; }
.grid {
  /* the board as big as the room allows, the players right at its corners, the die at the thumb */
  --side: min(calc(100cqw - 20px), calc(100cqh - 214px));
  height: 100%; display: grid; gap: 6px 8px; padding: 0 10px 8px;
  grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto var(--side) auto minmax(0, 1fr) auto;
  grid-template-areas: '. .' 'tl tr' 'stage stage' 'bl br' '. .' 'ctl ctl';
}
.plate-slot { min-width: 0; min-height: 48px; display: flex; }
.plate-slot[data-corner='tl'] { grid-area: tl; }
.plate-slot[data-corner='tr'] { grid-area: tr; justify-content: flex-end; }
.plate-slot[data-corner='bl'] { grid-area: bl; }
.plate-slot[data-corner='br'] { grid-area: br; justify-content: flex-end; }
.stage { grid-area: stage; position: relative; min-height: 0; container-type: size; display: grid; place-items: center; }
.wrap { position: relative; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); transform: rotate(var(--turn, 0deg)); }
.wrap.turning { transition: transform 0.75s cubic-bezier(0.3, 0.75, 0.25, 1); }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; filter: drop-shadow(0 14px 22px rgba(40, 25, 0, 0.25)); }
.spots { position: absolute; inset: 0; pointer-events: none; }
.spot { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); padding: 0; border: 0; border-radius: 50%; background: none; pointer-events: auto; cursor: pointer; touch-action: none; }
.spot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--hue), 0 0 14px 2px var(--hue); animation: ring 0.9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes ring { from { transform: scale(0.92); opacity: 0.55; } to { transform: scale(1.06); opacity: 1; } }
.spot:focus-visible { outline: none; }
.spot:focus-visible::after { border-color: #ffe38a; box-shadow: 0 0 0 3px #1f1c15, 0 0 18px 4px #ffe38a; }
.spots.nudge .spot::after { animation: ring 0.9s ease-in-out infinite alternate, nudge 0.35s ease; }
@keyframes nudge { 30% { translate: -4px 0; } 70% { translate: 4px 0; } }
.pops { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.pop { position: absolute; left: var(--x); top: var(--y); z-index: 4; font-weight: 820; font-size: 20px; color: #fff; white-space: nowrap; padding: 2px 10px; border-radius: 12px; background: rgba(25, 22, 18, 0.78); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6); animation: pop 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.pop.big { font-size: 24px; background: #fff3c2; color: #2a2206; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); } 16% { opacity: 1; transform: translate(-50%, -120%) scale(1.12); } 28% { transform: translate(-50%, -125%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -210%) scale(1); } }

.plate { position: relative; width: min(100%, 230px); display: grid; grid-template: 'pc nm' auto 'pc meta' auto / auto minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 6px 10px 6px 6px; border-radius: 16px; background: var(--plate); box-shadow: inset 0 0 0 1px var(--plate-edge); line-height: 1.2; transition: box-shadow 0.25s, background 0.25s; }
.plate.turn { box-shadow: inset 0 0 0 2px var(--hue), 0 6px 18px -8px var(--hue); }
.plate .pc { grid-area: pc; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--hue) 16%, transparent); }
.plate.turn .pc { animation: bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-2px) scale(1.05); } }
.pawn-pic { display: block; width: var(--size); height: var(--size); flex: none; }
.plate .nm { grid-area: nm; align-self: end; font-size: 14px; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 46px; }
.plate .meta { grid-area: meta; align-self: start; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate.away .pc, .plate.away .nm { opacity: 0.5; }
.homes { display: inline-flex; gap: 3px; }
.homes i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hue) 70%, var(--text)); transition: background 0.3s, transform 0.3s; }
.homes i.on { background: var(--hue); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.plate .homes { position: absolute; right: 9px; top: 9px; }
.say { position: absolute; left: 50%; top: 100%; z-index: 5; transform: translate(-50%, 4px); padding: 5px 12px; border-radius: 12px; background: #fff3c2; color: #2a2206; font-weight: 700; font-size: 13px; white-space: nowrap; pointer-events: none; animation: say 1.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5); }
.plate-slot[data-corner^='b'] .say { top: auto; bottom: 100%; transform: translate(-50%, -4px); }
@keyframes say { 0% { opacity: 0; scale: 0.7; } 14% { opacity: 1; scale: 1; } 82% { opacity: 1; } 100% { opacity: 0; scale: 0.96; } }

.controls { grid-area: ctl; display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 0 2px 0 6px; }
.status-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* this match (it was the title's subtitle) over whose turn it is */
.game-line { margin: 0; font-size: 12.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { min-width: 0; margin: 0; font-size: 15px; font-weight: 640; line-height: 1.25; text-wrap: balance; }
.tray { position: relative; flex: none; width: 66px; height: 66px; border-radius: 20px; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--hue, #888) 14%, var(--surface)), var(--well)); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.16), inset 0 0 0 1px var(--line); transition: box-shadow 0.25s; }
.tray.ready { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.16), 0 0 0 3px var(--hue), 0 8px 20px -6px var(--hue); }
.tray.ready .die { animation: wobble 1.4s ease-in-out infinite; }
@keyframes wobble { 0%, 70%, 100% { rotate: 0deg; } 78% { rotate: -9deg; } 88% { rotate: 7deg; } }
.tray[aria-disabled='true'] { cursor: default; }
/* the die: an ivory face with rounded edges, its thickness below and to the right */
.die { display: block; width: 38px; height: 38px; }
.die .face { display: grid; width: 100%; height: 100%; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 5px; border-radius: 10px;
  background: radial-gradient(circle at 32% 26%, #ffffff, #f4eee2 62%, #e2d8c3);
  box-shadow: inset 0 -2px 3px rgba(120, 100, 60, 0.22), inset 0 1px 0 #fff, 2px 3px 0 #cfc3a8, 3px 5px 9px rgba(30, 20, 0, 0.3); }
.die .face i { display: block; }
.die .face .pip { place-self: center; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a443a, #15120d); box-shadow: 0 0.6px 0 rgba(255, 255, 255, 0.8); }
.die .face[data-n='1'] .pip { width: 10px; height: 10px; background: radial-gradient(circle at 40% 35%, #f0675b, #b3261d); }

/* sideways (a phone on its side, a laptop): the board in the middle, the players beside it */
@container (min-aspect-ratio: 5 / 4) {
  .grid {
    grid-template-columns: minmax(0, 1fr) min(calc(100cqh - 10px), calc(100cqw - 2 * 168px)) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto; grid-template-areas: 'tl stage tr' '. stage ctl' 'bl stage br';
    padding-bottom: 10px; align-items: start;
  }
  .stage { align-self: stretch; }
  .plate-slot[data-corner^='b'] { align-self: end; }
  .plate-slot { justify-content: stretch !important; }
  .plate { width: 100%; }
  .controls { flex-direction: column-reverse; align-items: stretch; text-align: center; gap: 8px; align-self: center; }
  .tray { align-self: center; width: 76px; height: 76px; }
  .tray .die { width: 44px; height: 44px; }
  .status { font-size: 14px; }
}
@container (max-height: 380px) and (min-aspect-ratio: 5 / 4) {
  .plate { grid-template: 'pc nm' auto / auto minmax(0, 1fr); padding-block: 4px; }
  .plate .meta { display: none; }
  .plate .nm { font-size: 13px; align-self: center; }
  .plate .pc { width: 28px; height: 28px; }
  .tray { width: 60px; height: 60px; }
}
@media (max-height: 480px) and (orientation: landscape) { .bar { min-height: 44px; padding-block: 0; } }
@media (max-width: 360px) {
  .grid { padding-inline: 6px; gap: 5px 6px; }
  .plate { padding-right: 6px; column-gap: 6px; }
  .plate .nm { font-size: 13px; padding-right: 42px; }
  .plate .homes { right: 6px; gap: 2px; }
}

/* ---- sheets ---- */
.sheet { border: 0; padding: 0; border-radius: 22px; width: min(calc(94vw / var(--ca-zoom, 1)), 440px); max-height: min(calc(100dvh / var(--ca-zoom, 1) - 20px), 700px); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.12); }
@keyframes sheet { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.sheet.wide { width: min(calc(94vw / var(--ca-zoom, 1)), 560px); }
.sheet.narrow { width: min(calc(94vw / var(--ca-zoom, 1)), 370px); }
.sheet::backdrop { background: rgba(8, 10, 14, 0.55); }
.sheet h2 { margin: 0; padding: 20px 22px 6px; font-size: 20px; letter-spacing: -0.01em; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; padding-right: 10px; }
.sheet-head h2 { flex: 1; min-width: 0; padding-bottom: 8px; }
.x { width: 44px; height: 44px; margin-top: 8px; flex: none; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.x:active { transform: scale(0.92); }
.sheet h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sheet .lead { margin: 0; padding: 0 22px 10px; color: var(--muted); flex: none; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 22px 14px; }
.sheet-body.stack { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; padding-bottom: 22px; }
.sheet-foot { flex: none; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px 16px; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 0 1 auto; min-width: 104px; }
.sheet-foot .btn:only-child, .sheet-foot .btn:not([hidden]):last-child:first-of-type { flex: 1; }
.sheet > .tabs { margin: 6px 22px 6px; flex: none; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px; border-radius: 12px; border: 0; background: var(--well); font-weight: 620; font-size: 14.5px; line-height: 1.15; cursor: pointer; transition: transform 0.12s, background 0.18s, color 0.18s; }
.seg button[aria-pressed='true'] { background: var(--accent); color: #fff; }
.hint { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.name { display: flex; align-items: center; gap: 6px; min-width: 0; padding-left: 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); }
.name input { flex: 1; min-width: 0; min-height: 42px; padding: 0 10px 0 2px; border: 0; background: none; color: var(--text); font: inherit; outline-offset: 0; }
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.looks button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; min-height: 96px; padding: 10px 4px 8px; border-radius: 14px; border: 0; background: var(--well); font-weight: 620; font-size: 13.5px; cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: transform 0.12s, box-shadow 0.18s; }
.looks button[aria-pressed='true'] { box-shadow: inset 0 0 0 2.5px var(--accent); }
.swatch { width: 66px; height: 66px; display: block; border-radius: 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row .two { display: flex; flex-direction: column; min-width: 0; }
.row .two b { font-weight: 600; }
.row .two small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.row-btn { width: 100%; border-width: 0 0 1px; border-color: var(--line); border-style: solid; background: none; text-align: left; cursor: pointer; }
.row select { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 30px; margin: 0; border-radius: 15px; background: color-mix(in srgb, var(--muted) 45%, transparent); position: relative; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.rules-set .row:last-child { border-bottom: 0; }
.version { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.prose { font-size: 15px; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose h4 { margin: 16px 0 6px; font-size: 15px; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rows li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: var(--well); }
.rows li.win { box-shadow: inset 0 0 0 2px var(--gold); }
.rows .place { width: 1.4em; font-weight: 780; color: var(--muted); font-variant-numeric: tabular-nums; }
.rows .nm { font-weight: 650; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .caps { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rows .homes i { --hue: var(--muted); }
.rows li.win .homes i { --hue: var(--gold); }
.podium { position: relative; display: flex; justify-content: center; padding: 26px 0 0; flex: none; }
.podium::before { content: ''; position: absolute; left: 50%; top: 14px; width: 120px; height: 90px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--hue) 45%, transparent), transparent); }
.podium .pawn-pic { position: relative; animation: cheer 1.1s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes cheer { from { transform: translateY(18px) scale(0.6); opacity: 0; } }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.stat { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; padding: 8px 4px; border-radius: 14px; background: var(--well); text-align: center; }
.stat b { font-size: 21px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.2; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 90px); z-index: 30; transform: translateX(-50%); max-width: min(92%, 420px); padding: 10px 16px; border-radius: 14px; background: rgba(20, 22, 30, 0.94); color: #fff; font-size: 14.5px; font-weight: 600; text-align: center; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6); animation: toast 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px) scale(0.96); } }
@media (max-height: 700px) { .tagline { display: none; } }
@media (max-height: 620px) {
  .sheet h3 { margin: 10px 0 6px; }
  .sheet h2 { padding-top: 14px; }
  .x { margin-top: 4px; }
  .sheet-foot { padding-block: 10px 12px; }
  .home { gap: 10px; }
}
@media (max-height: 480px) {
  .hero { display: none; }
  .home { gap: 8px; }
  .sheet { max-height: calc(100dvh / var(--ca-zoom, 1) - 8px); }
  .sheet h2 { padding: 8px 22px 0; font-size: 18px; }
  .sheet-head h2 { padding-bottom: 0; }
  .x { margin-top: 2px; height: 40px; }
  .sheet h3 { margin: 6px 0 4px; font-size: 12px; }
  .sheet .lead { padding-bottom: 6px; }
  .sheet-foot { padding-block: 6px 8px; }
  .seg button { min-height: 40px; }
  .row { min-height: 44px; }
  .sheet-body.stack { gap: 6px; padding-block: 6px 12px; }
  .podium { padding-top: 10px; }
  .podium .pawn-pic { --size: 40px !important; }
}
@media (max-height: 640px) and (min-width: 560px) {
  #new { width: min(calc(96vw / var(--ca-zoom, 1)), 680px); }
  #new .sheet-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-content: start; }
}
@media (max-height: 480px) and (min-width: 520px) {
  .sheet-body.stack { display: grid; grid-template-columns: 1fr 1fr; }
  #menu { width: min(calc(94vw / var(--ca-zoom, 1)), 520px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* cloud-apps bar 1.30.0 */
:root { --ca-brand-icon-w: 89px; } /* the brand's width with the icon alone (the mark, the divider, the app's icon) */
.ca-start { display: flex; align-items: center; flex: 0 100 auto; min-width: min(var(--ca-brand-icon-w), 100%); }
.ca-brand { display: flex; align-items: center; min-width: 0; height: 40px; color: inherit; font-family: inherit; }
.ca-brand a { display: flex !important; align-items: center !important; box-sizing: border-box !important; color: inherit !important; text-decoration: none !important; border-radius: 12px !important; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
.ca-brand-home { flex: none !important; justify-content: center !important; width: 40px !important; height: 40px !important; padding: 0 !important; margin: 0 0 0 -5px !important; }
.ca-brand-home img { display: block !important; width: 30px !important; height: 30px !important; margin: 0 !important; transition: transform .38s cubic-bezier(.34, 1.56, .64, 1); }
.ca-brand-sep { flex: none; display: block; width: 1.5px; height: 18px; margin: 0 4px; border-radius: 1px; background: currentColor; opacity: .22; transform: rotate(18deg); }
.ca-brand-app { flex: 0 1 auto !important; min-width: 44px !important; height: 40px !important; padding: 0 9px 0 5px !important; margin: 0 !important; }
.ca-brand-in { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; column-gap: 9px; min-width: 0; height: 40px; overflow: hidden; }
.ca-brand-in img { flex: none; display: block !important; width: 30px !important; height: 30px !important; margin: 5px 0 !important; border-radius: 8px; }
.ca-brand[data-ca-icon] .ca-brand-name { display: none !important; }
.ca-brand[data-ca-icon] .ca-brand-app { padding-right: 5px !important; }
.ca-brand-name { display: block; height: 40px; margin: 0 !important; padding: 0 !important; line-height: 40px !important; white-space: nowrap; font-family: var(--ca-brand-font, inherit); font-size: 17px !important; font-weight: 700; letter-spacing: -.015em; color: inherit; text-shadow: var(--ca-brand-shadow, none); }
@media (hover: hover) { .ca-brand a:hover { background-color: color-mix(in srgb, currentColor 7%, transparent); } .ca-brand-home:hover img { transform: rotate(-6deg) scale(1.06); } }
.ca-brand a:focus-visible { outline: 3px solid var(--ca-accent, #4f6bff); outline-offset: -3px; }
.ca-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: none; min-width: 0; }
.ca-tools { display: flex; align-items: center; gap: 6px; }
.ca-tools[hidden] { display: none !important; }
.ca-tool { position: relative; flex: none; display: inline-grid; place-items: center !important; box-sizing: border-box !important; width: 36px !important; height: 36px !important; min-width: 0 !important; min-height: 0 !important; max-width: none !important; padding: 0 !important; margin: 0; border-radius: 50% !important;
  border: 1px solid var(--ca-tool-line, color-mix(in srgb, currentColor 16%, transparent)) !important; background: var(--ca-tool-bg, color-mix(in srgb, currentColor 6%, transparent)) !important; color: var(--ca-tool-ink, inherit) !important;
  font: inherit; line-height: 0 !important; letter-spacing: 0; text-decoration: none !important; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, transform .12s ease; }
.ca-tool[hidden] { display: none !important; }
.ca-tool::before { content: ""; position: absolute; inset: -4px; }
.ca-tool svg { display: block; width: 20px !important; height: 20px !important; margin: 0 !important; pointer-events: none; }
.ca-tool svg[hidden] { display: none !important; }
@media (hover: hover) { .ca-tool:hover { background: var(--ca-tool-hover, color-mix(in srgb, currentColor 13%, transparent)) !important; } }
.ca-tool:active { transform: scale(.94); }
.ca-tool:focus-visible { outline: 3px solid var(--ca-accent, #4f6bff); outline-offset: 2px; }
.ca-tool-talk { color: var(--ca-accent, #4f6bff) !important; border-color: color-mix(in srgb, var(--ca-accent, #4f6bff) 50%, transparent) !important; background: color-mix(in srgb, var(--ca-accent, #4f6bff) 13%, transparent) !important; }
.ca-tool .ca-tlive { position: absolute; top: 1px; right: 1px; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent); }
.ca-tool-talk.ca-new::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; pointer-events: none; animation: ca-bar-ring 1.2s ease-out 2; }
@keyframes ca-bar-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ca-accent, #4f6bff) 55%, transparent); } to { box-shadow: 0 0 0 11px transparent; } }
.ca-tool .ca-tcount, .ca-tool .ca-tunread { position: absolute; right: -5px; display: grid; place-items: center; box-sizing: border-box; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; font: 700 10.5px/1 -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; pointer-events: none; }
.ca-tool .ca-tcount { bottom: -5px; background: #1f9d55; }
.ca-tool .ca-tunread { top: -5px; background: #e5484d; }
@media (max-width: 599.98px), (max-height: 499.98px) { .ca-tools-app { display: none !important; } }
.ca-end[data-ca-cramped] .ca-tools-app { display: none !important; }
.ca-end[data-ca-tight] .ca-tool-friends { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ca-tool, .ca-brand a, .ca-brand-home img { transition: none; } .ca-tool-talk.ca-new::after { animation: none; } }
/* end of the cloud-apps bar */
/* ---- cloud-apps: big screens (App Standard §6.5) — written by `cloud-apps vendor-sdk`; do not edit ---- */
/* Past 1584 × 990 the page is laid out at about 1440 × 900 and zoomed to fill the screen; viewport
   units in this file are divided by --ca-zoom. cloud-kit.js turns it off where the engine has no
   standard zoom (html[data-ca-zoom="off"]). */
@media (min-width: 1585px) and (min-height: 991px) { :root { --ca-zoom: 1.1; } }
@media (min-width: 1656px) and (min-height: 1035px) { :root { --ca-zoom: 1.15; } }
@media (min-width: 1728px) and (min-height: 1080px) { :root { --ca-zoom: 1.2; } }
@media (min-width: 1800px) and (min-height: 1125px) { :root { --ca-zoom: 1.25; } }
@media (min-width: 1872px) and (min-height: 1170px) { :root { --ca-zoom: 1.3; } }
@media (min-width: 1945px) and (min-height: 1215px) { :root { --ca-zoom: 1.35; } }
@media (min-width: 2016px) and (min-height: 1260px) { :root { --ca-zoom: 1.4; } }
@media (min-width: 2088px) and (min-height: 1305px) { :root { --ca-zoom: 1.45; } }
@media (min-width: 2160px) and (min-height: 1350px) { :root { --ca-zoom: 1.5; } }
@media (min-width: 2232px) and (min-height: 1395px) { :root { --ca-zoom: 1.55; } }
@media (min-width: 2304px) and (min-height: 1440px) { :root { --ca-zoom: 1.6; } }
@media (min-width: 2376px) and (min-height: 1485px) { :root { --ca-zoom: 1.65; } }
@media (min-width: 2448px) and (min-height: 1530px) { :root { --ca-zoom: 1.7; } }
@media (min-width: 2520px) and (min-height: 1575px) { :root { --ca-zoom: 1.75; } }
@media (min-width: 2592px) and (min-height: 1620px) { :root { --ca-zoom: 1.8; } }
@media (min-width: 2664px) and (min-height: 1665px) { :root { --ca-zoom: 1.85; } }
@media (min-width: 2736px) and (min-height: 1710px) { :root { --ca-zoom: 1.9; } }
@media (min-width: 2808px) and (min-height: 1755px) { :root { --ca-zoom: 1.95; } }
@media (min-width: 2880px) and (min-height: 1800px) { :root { --ca-zoom: 2; } }
@media (min-width: 2952px) and (min-height: 1845px) { :root { --ca-zoom: 2.05; } }
@media (min-width: 3024px) and (min-height: 1890px) { :root { --ca-zoom: 2.1; } }
@media (min-width: 3096px) and (min-height: 1935px) { :root { --ca-zoom: 2.15; } }
@media (min-width: 3169px) and (min-height: 1981px) { :root { --ca-zoom: 2.2; } }
@media (min-width: 3240px) and (min-height: 2025px) { :root { --ca-zoom: 2.25; } }
@media (min-width: 3312px) and (min-height: 2070px) { :root { --ca-zoom: 2.3; } }
@media (min-width: 3384px) and (min-height: 2115px) { :root { --ca-zoom: 2.35; } }
@media (min-width: 3456px) and (min-height: 2160px) { :root { --ca-zoom: 2.4; } }
@media (min-width: 3529px) and (min-height: 2205px) { :root { --ca-zoom: 2.45; } }
@media (min-width: 3600px) and (min-height: 2250px) { :root { --ca-zoom: 2.5; } }
@media (min-width: 3672px) and (min-height: 2295px) { :root { --ca-zoom: 2.55; } }
@media (min-width: 3744px) and (min-height: 2340px) { :root { --ca-zoom: 2.6; } }
@media (min-width: 3816px) and (min-height: 2385px) { :root { --ca-zoom: 2.65; } }
@media (min-width: 3889px) and (min-height: 2430px) { :root { --ca-zoom: 2.7; } }
@media (min-width: 3960px) and (min-height: 2475px) { :root { --ca-zoom: 2.75; } }
@media (min-width: 4032px) and (min-height: 2520px) { :root { --ca-zoom: 2.8; } }
@media (min-width: 4104px) and (min-height: 2565px) { :root { --ca-zoom: 2.85; } }
@media (min-width: 4176px) and (min-height: 2610px) { :root { --ca-zoom: 2.9; } }
@media (min-width: 4248px) and (min-height: 2655px) { :root { --ca-zoom: 2.95; } }
@media (min-width: 4320px) and (min-height: 2700px) { :root { --ca-zoom: 3; } }
@media (min-width: 4392px) and (min-height: 2745px) { :root { --ca-zoom: 3.05; } }
@media (min-width: 4464px) and (min-height: 2790px) { :root { --ca-zoom: 3.1; } }
@media (min-width: 4536px) and (min-height: 2835px) { :root { --ca-zoom: 3.15; } }
@media (min-width: 4608px) and (min-height: 2880px) { :root { --ca-zoom: 3.2; } }
@media (min-width: 4680px) and (min-height: 2925px) { :root { --ca-zoom: 3.25; } }
@media (min-width: 4752px) and (min-height: 2970px) { :root { --ca-zoom: 3.3; } }
@media (min-width: 4824px) and (min-height: 3015px) { :root { --ca-zoom: 3.35; } }
@media (min-width: 4896px) and (min-height: 3060px) { :root { --ca-zoom: 3.4; } }
@media (min-width: 4968px) and (min-height: 3105px) { :root { --ca-zoom: 3.45; } }
@media (min-width: 5040px) and (min-height: 3150px) { :root { --ca-zoom: 3.5; } }
@media (min-width: 5112px) and (min-height: 3195px) { :root { --ca-zoom: 3.55; } }
@media (min-width: 5184px) and (min-height: 3240px) { :root { --ca-zoom: 3.6; } }
@media (min-width: 5256px) and (min-height: 3285px) { :root { --ca-zoom: 3.65; } }
@media (min-width: 5328px) and (min-height: 3330px) { :root { --ca-zoom: 3.7; } }
@media (min-width: 5400px) and (min-height: 3375px) { :root { --ca-zoom: 3.75; } }
@media (min-width: 5472px) and (min-height: 3420px) { :root { --ca-zoom: 3.8; } }
@media (min-width: 5544px) and (min-height: 3465px) { :root { --ca-zoom: 3.85; } }
@media (min-width: 5616px) and (min-height: 3510px) { :root { --ca-zoom: 3.9; } }
@media (min-width: 5688px) and (min-height: 3555px) { :root { --ca-zoom: 3.95; } }
@media (min-width: 5760px) and (min-height: 3600px) { :root { --ca-zoom: 4; } }
@media (min-width: 5832px) and (min-height: 3645px) { :root { --ca-zoom: 4.05; } }
@media (min-width: 5904px) and (min-height: 3690px) { :root { --ca-zoom: 4.1; } }
@media (min-width: 5977px) and (min-height: 3736px) { :root { --ca-zoom: 4.15; } }
@media (min-width: 6048px) and (min-height: 3780px) { :root { --ca-zoom: 4.2; } }
@media (min-width: 6120px) and (min-height: 3825px) { :root { --ca-zoom: 4.25; } }
@media (min-width: 6192px) and (min-height: 3870px) { :root { --ca-zoom: 4.3; } }
@media (min-width: 6264px) and (min-height: 3915px) { :root { --ca-zoom: 4.35; } }
@media (min-width: 6337px) and (min-height: 3961px) { :root { --ca-zoom: 4.4; } }
@media (min-width: 6408px) and (min-height: 4005px) { :root { --ca-zoom: 4.45; } }
@media (min-width: 6480px) and (min-height: 4050px) { :root { --ca-zoom: 4.5; } }
@media (min-width: 6552px) and (min-height: 4095px) { :root { --ca-zoom: 4.55; } }
@media (min-width: 6624px) and (min-height: 4140px) { :root { --ca-zoom: 4.6; } }
@media (min-width: 6697px) and (min-height: 4185px) { :root { --ca-zoom: 4.65; } }
@media (min-width: 6768px) and (min-height: 4230px) { :root { --ca-zoom: 4.7; } }
@media (min-width: 6840px) and (min-height: 4275px) { :root { --ca-zoom: 4.75; } }
@media (min-width: 6912px) and (min-height: 4320px) { :root { --ca-zoom: 4.8; } }
@media (min-width: 6984px) and (min-height: 4365px) { :root { --ca-zoom: 4.85; } }
@media (min-width: 7057px) and (min-height: 4410px) { :root { --ca-zoom: 4.9; } }
@media (min-width: 7128px) and (min-height: 4455px) { :root { --ca-zoom: 4.95; } }
@media (min-width: 7200px) and (min-height: 4500px) { :root { --ca-zoom: 5; } }
@media (min-width: 1585px) and (min-height: 991px) {
  html { zoom: var(--ca-zoom, 1); }
  html[data-ca-zoom='off'] { --ca-zoom: 1 !important; }
}
/* ---- end of big screens ---- */
