:root {
  color-scheme: light;
  --bg: #f3e7d2;
  --bg2: #ead8bb;
  --surface: #fffaf1;
  --surface2: #f7ecd9;
  --text: #2a1c12;
  --muted: #6b5240;
  --line: rgba(70, 44, 20, 0.15);
  --accent: #b4560d;
  --accent2: #e08a1e;
  --on-accent: #ffffff;
  --danger: #b3261e;
  --stage: #0b0806;
  --shadow: 0 18px 50px -24px rgba(60, 30, 10, 0.55);
  --ca-accent: #b4560d; /* the accounts SDK's sheets and chip */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, sans-serif;
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #140d09; --bg2: #1d130d; --surface: #22170f; --surface2: #2b1e15; --text: #f4e9dc; --muted: #c2ab93;
    --line: rgba(255, 228, 196, 0.13); --accent: #f0a040; --accent2: #ffc163; --on-accent: #1a0f08; --danger: #ff7a6b;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8); --ca-accent: #f0a040;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #140d09; --bg2: #1d130d; --surface: #22170f; --surface2: #2b1e15; --text: #f4e9dc; --muted: #c2ab93;
  --line: rgba(255, 228, 196, 0.13); --accent: #f0a040; --accent2: #ffc163; --on-accent: #1a0f08; --danger: #ff7a6b;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8); --ca-accent: #f0a040;
}
* { 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%; height: 100%; background: var(--bg); }
body {
  margin: 0; min-height: calc(100dvh / var(--ca-zoom, 1)); height: 100%; overflow: hidden;
  background: radial-gradient(120% 80% at 50% -10%, var(--bg2), var(--bg) 60%);
  color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
/* a game page: no text selection or long-press callouts anywhere, HUD and
   menus included; form fields and long text (the Help sheet) opt back in */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable], .prose p, .prose li { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }

.app {
  height: calc(100dvh / var(--ca-zoom, 1)); display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.app[data-screen="title"] .play-only, .app[data-screen="play"] .title-only { display: none !important; }

/* ------------------------------------------------------------------ the bar */
.bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 12px;
  /* the SDK's round tools (and the pause button) in the game's own icon-button look */
  --ca-tool-bg: var(--surface); --ca-tool-line: var(--line); --ca-tool-ink: var(--text);
}
/* in a round the HUD takes the bar's middle: below 700 px the brand keeps the mark and the icon, the name goes */
@media (max-width: 699.98px) { .app[data-screen="play"] .ca-brand-name { display: none; } }
/* a phone held upright: the bar holds the brand, the HUD and the chip — the pause button moves to the
   mine's top right corner (the goal on its left), the HUD closes up (no clock icon, smaller hearts) */
@media (max-width: 480px) {
  .app[data-screen="play"] .bar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  #pause-btn { position: fixed; z-index: 3; top: calc(env(safe-area-inset-top) + 66px); right: calc(env(safe-area-inset-right) + 10px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
  .goal-chip { max-width: calc(100% - 66px); }
  .hud-time svg { display: none; }
  .heart { width: 16px; height: 15px; }
}
/* where the hearts do not fit beside the clock and the score (a 320 px phone; four or five lives on a
   small one): one heart and the count, "♥×3" (the hidden hearts still count) */
@media (max-width: 400px) {
  .hud-lives:has(.heart:nth-child(4)) { counter-reset: lives; }
  .hud-lives:has(.heart:nth-child(4)) .heart.on { counter-increment: lives; }
  .hud-lives:has(.heart:nth-child(4)) .heart:not(:first-child) { width: 0; margin-left: -2px; visibility: hidden; }
  .hud-lives:has(.heart:nth-child(4))::after { content: "×" counter(lives); margin-left: 1px; font-weight: 750; }
}
@media (max-width: 360px) {
  .hud { gap: 6px; }
  .hud-lives { counter-reset: lives; }
  .hud-lives .heart.on { counter-increment: lives; }
  .hud-lives .heart:not(:first-child) { width: 0; margin-left: -2px; visibility: hidden; }
  .hud-lives::after { content: "×" counter(lives); margin-left: 1px; font-weight: 750; }
}
.icon-btn {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 0;
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.hud { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-variant-numeric: tabular-nums; }
.hud > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hud > span[hidden] { display: none; } /* (an empty part — the miners outside a team game, lives and score in a battle — takes no room) */
.hud svg { width: 18px; height: 18px; color: var(--muted); }
.hud b { font-weight: 750; }
.hud-time.hurry b { color: var(--danger); }
.hud-lives { gap: 2px !important; }
.heart { width: 20px; height: 18px; display: inline-block; background: no-repeat center / contain; }
.heart.on { background-image: url("/icons/heart.svg"); }
.heart.off { background-image: url("/icons/heart-off.svg"); }
.hud-players { gap: 8px !important; overflow: hidden; }
.pchip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; max-width: 110px; }
.pchip i { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--c, #e08a1e); box-shadow: 0 0 0 2px rgba(0,0,0,0.25) inset; }
.pchip span { overflow: hidden; text-overflow: ellipsis; }
.pchip.out { opacity: 0.45; }
.pchip em { font-style: normal; font-weight: 800; }

/* ---------------------------------------------------------------- screens */
.screens { flex: 1; min-height: 0; position: relative; }
.screen { position: absolute; inset: 0; }
.screen[hidden] { display: none; }

/* the title */
.title-screen {
  overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 4px 16px calc(18px + env(safe-area-inset-bottom));
}
.hero {
  position: relative; width: min(100%, 560px); aspect-ratio: 16 / 10; flex: none; border-radius: 24px; overflow: hidden;
  background: radial-gradient(90% 90% at 50% 70%, #3a2416, #120a06); box-shadow: var(--shadow);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.logo-wrap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(transparent, rgba(10, 6, 3, 0.82)); text-align: center; }
.logo {
  margin: 0; padding: 0.16em 0 0.04em; font: 900 clamp(34px, calc(9vw / var(--ca-zoom, 1)), 52px)/0.95 var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  color: #ffd27a; background: linear-gradient(180deg, #fff3c4 0%, #ffc45c 45%, #e0701c 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 0 #4a1e08) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
}
.tagline { margin: 6px 0 0; color: #f3e2c8; font-size: 14px; text-shadow: 0 1px 2px #000; }
.menu { width: min(100%, 560px); display: flex; flex-direction: column; gap: 10px; }
.menu-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; text-align: left; cursor: pointer;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 18px -14px rgba(60, 30, 10, 0.6);
  transition: transform 0.12s ease, background-color 0.2s ease;
}
.menu-btn:active { transform: scale(0.985); }
.menu-btn[hidden] { display: none; }
.menu-btn .ico { width: 40px; height: 40px; flex: none; }
.menu-btn span { display: flex; flex-direction: column; min-width: 0; }
.menu-btn b { font-size: 17px; font-weight: 750; }
.menu-btn small { color: var(--muted); font-size: 13.5px; }
.menu-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--on-accent); border-color: transparent; }
.menu-btn.primary small { color: var(--on-accent); opacity: 0.9; }
.records { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; min-height: 1.45em; }
@media (max-height: 640px) and (orientation: portrait) { .hero { aspect-ratio: 16 / 8; } }
@media (max-height: 560px) and (orientation: portrait) { .hero { aspect-ratio: 16 / 6; } .tagline { display: none; } .logo { font-size: 32px; } }
@media (orientation: landscape) and (max-height: 600px) {
  /* centred by auto margins: a menu taller than the screen (long strings) scrolls instead of being cut at the top */
  .title-screen { flex-direction: row; align-items: flex-start; justify-content: center; gap: 18px; padding-top: 0; }
  .hero { width: min(48%, 520px); height: calc(100% - 20px); aspect-ratio: auto; max-height: 360px; margin-block: auto; }
  .menu { width: min(48%, 440px); margin-block: auto; }
  .menu-btn { min-height: 54px; padding: 7px 14px; }
  .logo { font-size: clamp(30px, calc(7.6vw / var(--ca-zoom, 1)), 52px); }
}
/* a laptop, a monitor (1440p and 4K are laid out at about 1600 × 900) or a TV: the picture large beside the
   menu, in the middle of the room; a tall portrait monitor keeps the column, larger and in the middle */
@media (orientation: landscape) and (min-width: 1100px) and (min-height: 700px) {
  .title-screen { flex-direction: row; align-items: center; justify-content: center; gap: 28px; padding-top: 0; }
  .hero { width: min(56%, 820px); }
  .menu { width: min(38%, 460px); }
  .logo { font-size: 72px; }
  .tagline { font-size: 16px; }
  .menu-btn { min-height: 76px; padding: 12px 20px; gap: 16px; }
  .menu-btn b { font-size: 19px; }
  .menu-btn small { font-size: 14.5px; }
}
@media (orientation: portrait) and (min-width: 900px) and (min-height: 1300px) {
  .title-screen { justify-content: center; }
  .hero, .menu { width: min(100%, 760px); }
  .logo { font-size: 68px; }
  .tagline { font-size: 16px; }
  .menu-btn { min-height: 76px; padding: 12px 20px; gap: 16px; }
  .menu-btn b { font-size: 19px; }
  .menu-btn small { font-size: 14.5px; }
}

/* play */
.play-screen { display: flex; flex-direction: column; background: var(--stage); }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.goal-chip {
  position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 999px; background: rgba(12, 8, 5, 0.66); color: #f6ead8; font-size: 13.5px; pointer-events: none;
  border: 1px solid rgba(255, 220, 170, 0.18);
}
.goal-chip b { color: #ffc45c; white-space: nowrap; }
.goal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-chip.done { border-color: rgba(120, 255, 170, 0.6); }
.goal-chip.done span { color: #a6ffc4; }
.bossbar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: min(70%, 380px); text-align: center; pointer-events: none; color: #fff; }
.bossbar span { font: 800 14px/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-shadow: 0 2px 4px #000; }
.boss-track { margin-top: 4px; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.25); overflow: hidden; }
.boss-track i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--hp, 1)); background: linear-gradient(90deg, #ff4f3a, #ffb13b); transition: transform 0.25s ease; }
.banner {
  position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(0.92); max-width: 92%; text-align: center; pointer-events: none;
  font: 900 clamp(22px, calc(6vw / var(--ca-zoom, 1)), 40px)/1.05 var(--display); letter-spacing: 0.02em; color: #fff3d6; opacity: 0;
  text-shadow: 0 3px 0 #4a1e08, 0 0 24px rgba(255, 150, 50, 0.6), 0 6px 18px rgba(0, 0, 0, 0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.banner.small { font-size: clamp(17px, calc(4.4vw / var(--ca-zoom, 1)), 26px); }
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(88%, 420px); padding: 20px 22px; text-align: center;
  border-radius: 22px; background: rgba(18, 12, 8, 0.86); color: #f6ead8; border: 1px solid rgba(255, 210, 150, 0.22);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.9); pointer-events: none; transition: opacity 0.3s ease;
}
.card.fade { opacity: 0; }
.card .depth { margin: 0; color: #ffc45c; font: 800 13px/1.2 var(--display); letter-spacing: 0.16em; text-transform: uppercase; }
.card h2 { margin: 6px 0 8px; font: 900 30px/1.05 var(--display); color: #fff3d6; }
.card p { margin: 6px 0 0; font-size: 15px; color: #e8d8c0; }
.upbar { flex: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px; overflow-x: auto; overscroll-behavior: contain; scrollbar-width: none; background: #120c08; border-top: 1px solid rgba(255, 220, 170, 0.08); }
.upbar::-webkit-scrollbar { display: none; }
.up { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(255, 220, 170, 0.08); color: #f2e4cc; font-size: 12.5px; font-weight: 700; }
.up canvas { width: 26px; height: 26px; }
.up.flash { animation: upflash 0.9s ease; }
@keyframes upflash { 0% { background: rgba(255, 210, 90, 0.7); } 100% { background: rgba(255, 220, 170, 0.08); } }
.up.curse { background: rgba(140, 230, 100, 0.2); }

/* touch controls */
.pad { display: none; }
html.touch .pad {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 176px;
  padding: 10px 22px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(#120c08, #0b0806); touch-action: none;
}
html.touch .pad.left-hand { flex-direction: row-reverse; }
/* a game controller in use (the SDK marks <html data-ca-pad>): the touch pad steps aside */
html.touch[data-ca-pad] .pad { display: none; }
.stick { width: 150px; height: 150px; display: grid; place-items: center; touch-action: none; }
.stick-base { position: relative; width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2a1f, #1a120c); border: 2px solid rgba(255, 220, 170, 0.18); box-shadow: inset 0 6px 16px rgba(0, 0, 0, 0.6); }
.arrow { position: absolute; width: 0; height: 0; border: 9px solid transparent; opacity: 0.5; }
.arrow.a0 { left: 50%; top: 8px; margin-left: -9px; border-bottom-color: #e8d0a8; border-top-width: 0; }
.arrow.a2 { left: 50%; bottom: 8px; margin-left: -9px; border-top-color: #e8d0a8; border-bottom-width: 0; }
.arrow.a3 { top: 50%; left: 8px; margin-top: -9px; border-right-color: #e8d0a8; border-left-width: 0; }
.arrow.a1 { top: 50%; right: 8px; margin-top: -9px; border-left-color: #e8d0a8; border-right-width: 0; }
.stick[data-dir="0"] .a0, .stick[data-dir="1"] .a1, .stick[data-dir="2"] .a2, .stick[data-dir="3"] .a3 { opacity: 1; }
.knob {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f6c27a, #b5651d 70%); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.3);
  transform: translate(var(--kx, 0px), var(--ky, 0px));
}
.pad-btns { position: relative; width: 170px; height: 150px; }
.pad-btn { position: absolute; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; touch-action: none; padding: 0; }
.pad-btn.bomb { right: 4px; bottom: 6px; width: 96px; height: 96px; background: radial-gradient(circle at 40% 35%, #ff7a52, #a8200c 75%); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55), inset 0 -5px 10px rgba(0, 0, 0, 0.35); }
.pad-btn.bomb .ico { width: 56px; height: 56px; }
.pad-btn.act { left: 6px; top: 4px; width: 66px; height: 66px; color: #1a0f08; background: radial-gradient(circle at 40% 35%, #ffe08a, #c98a1e 75%); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); }
.pad-btn.act svg { width: 30px; height: 30px; }
.pad-btn.act[hidden] { display: none; }
.pad-btn.down { filter: brightness(1.25); transform: scale(0.94); }
.left-hand .pad-btns { transform: scaleX(-1); }
.left-hand .pad-btn > * { transform: scaleX(-1); }
@media (orientation: landscape) and (max-height: 560px) {
  html.touch .pad { position: absolute; left: 0; right: 0; bottom: 0; height: auto; background: none; pointer-events: none; padding: 0 calc(14px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left)); }
  html.touch .pad > * { pointer-events: auto; }
  .stick-base { opacity: 0.82; }
  .upbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(6px + env(safe-area-inset-bottom)); max-width: 40%; background: rgba(12, 8, 5, 0.6); border-radius: 999px; border: 0; }
  .play-screen { position: absolute; }
}
@media (max-width: 360px) { html.touch .pad { height: 158px; padding-left: 12px; padding-right: 12px; } .stick-base { width: 118px; height: 118px; } .stick { width: 128px; height: 128px; } .pad-btns { width: 150px; } .pad-btn.bomb { width: 86px; height: 86px; } }

/* ----------------------------------------------------------------- sheets */
.sheet {
  border: 0; border-radius: 24px; padding: 0; width: min(calc(94vw / var(--ca-zoom, 1)), 440px); max-height: min(calc(88dvh / var(--ca-zoom, 1)), 720px); 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; }
.sheet.wide { width: min(calc(94vw / var(--ca-zoom, 1)), 560px); }
.sheet::backdrop { background: rgba(14, 8, 4, 0.55); }
.sheet h2 { margin: 0; padding: 20px 22px 8px; font: 850 22px/1.15 var(--display); letter-spacing: 0.01em; }
.sheet-body { padding: 4px 22px 8px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.sheet-body h3 { margin: 18px 0 8px; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn { margin: 0; }
@media (max-width: 520px) {
  .sheet { width: calc(100vw / var(--ca-zoom, 1)); max-width: calc(100vw / var(--ca-zoom, 1)); margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: calc(90dvh / var(--ca-zoom, 1)); }
  .sheet-foot .btn { flex: 1; }
}
.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 select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); max-width: 60%; }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background-color 0.2s; margin: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); transition: transform 0.2s ease; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.btn {
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.soft { background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.note { color: var(--muted); font-size: 14px; margin: 8px 0; }
.version { color: var(--muted); font-size: 13px; }
.prose p { margin: 8px 0; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legend li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.legend b { display: block; font-size: 15px; }
.legend span { color: var(--muted); font-size: 14px; }
.choices { display: grid; gap: 8px; margin: 8px 0; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border-radius: 14px; text-align: left; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface2);
}
.choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface2)); }
.choice:disabled { opacity: 0.55; cursor: default; }
.choice .ico { width: 36px; height: 36px; flex: none; }
.choice span { display: flex; flex-direction: column; min-width: 0; }
.choice small { color: var(--muted); font-size: 13px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 64px; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface2); cursor: pointer; font-weight: 650; }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface2)); }
.field { margin: 10px 0 4px; }
.field > label, .field > p { display: block; margin: 0 0 6px; font-size: 14px; color: var(--muted); font-weight: 650; }
.tally { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.tally b { text-align: right; }
.tally .total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 6px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 10px; }
.stars i { width: 34px; height: 34px; background: no-repeat center / contain url("/icons/star-off.svg"); }
.stars i.on { background-image: url("/icons/star.svg"); animation: pop 0.5s ease both; }
.stars i.on:nth-child(2) { animation-delay: 0.15s; }
.stars i.on:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.standings { display: grid; gap: 6px; margin: 6px 0; }
.standings div { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface2); }
.standings div.win { outline: 2px solid var(--accent); }
.standings i { width: 14px; height: 14px; border-radius: 50%; background: var(--c, #e08a1e); flex: none; }
.standings span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 6px; margin: 0 0 8px; }
.tabs button { flex: 1; min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); cursor: pointer; font-weight: 650; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.board { min-height: 120px; }
.records-list { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 0; }
.records-list dt { color: var(--muted); }
.records-list dd { margin: 0; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: min(calc(92vw / var(--ca-zoom, 1)), 440px);
  padding: 12px 18px; border-radius: 14px; background: rgba(24, 16, 10, 0.94); color: #f6ead8; font-size: 15px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 5;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 480px) { .pchip > span { display: none; } .hud { gap: 8px; } }

/* 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 ---- */
