/* BlockX — a handheld console in the light, an arcade cabinet in the dark. Pixel frames with
   cut corners, the pixel font for titles, numbers and the HUD, a clean sans for reading. The
   board's colours never change with the theme; the shell around it does. */

@font-face {
  font-family: 'BlockX Pixel';
  src: url('/fonts/blockx-pixel.woff') format('woff');
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --pixel: 'BlockX Pixel', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Inter, 'Helvetica Neue', Arial, sans-serif;
  --ca-accent: #7a2fd0; /* the accounts SDK's buttons: white on it is 6.3:1 */
  --cut: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
  --cut2: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* dark: the arcade cabinet */
:root,
:root[data-theme='dark'] {
  --bg: #14121a;
  --bg2: #1b1824;
  --surface: #211d2c;
  --surface2: #2b2639;
  --edge: #3d3554;
  --edge-hi: #6b5a96;
  --glow: rgba(176, 72, 248, 0.55);
  --neon: #c27bff;
  --neon2: #36d8ff;
  --text: #f3effa;
  --muted: #b3abc6;
  --faint: #9c93b2;
  --accent: #7a2fd0;
  --accent-hi: #9446ea;
  --on-accent: #ffffff;
  --good: #5ee07a;
  --warn: #ffcf4a;
  --bad: #ff6a6a;
  --shadow: rgba(0, 0, 0, 0.55);
  --backdrop: rgba(8, 6, 14, 0.62);
}
:root[data-theme='light'] {
  --bg: #d4d1c8;
  --bg2: #cbc7bd;
  --surface: #e6e3db;
  --surface2: #dad6cc;
  --edge: #8a8780;
  --edge-hi: #5c5953;
  --glow: rgba(106, 44, 192, 0.35);
  --neon: #5b23a8;
  --neon2: #0d6a8a;
  --text: #1c1a21;
  --muted: #47434f;
  --faint: #55505c;
  --accent: #6a2cc0;
  --accent-hi: #5a22a8;
  --on-accent: #ffffff;
  --good: #1f7a33;
  --warn: #8a5a00;
  --bad: #b3261e;
  --shadow: rgba(60, 56, 48, 0.35);
  --backdrop: rgba(40, 36, 30, 0.42);
}

* { 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));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
input, textarea { user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--neon2); outline-offset: 2px; }
:root[data-theme='light'] :focus-visible { outline-color: #0d5a76; }

/* the cabinet's backdrop: a faint pixel weave in the dark, the plastic's grain in the light */
.app {
  min-height: calc(100dvh / var(--ca-zoom, 1));
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    var(--bg);
}

/* ----------------------------------------------------------------- the top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l));
  min-height: calc(60px + var(--safe-t));
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  clip-path: var(--cut2);
  box-shadow: inset 0 0 0 2px var(--edge), inset 0 -3px 0 var(--shadow);
  transition: transform 0.1s var(--ease), background-color 0.1s;
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; shape-rendering: crispEdges; }
.icon-btn:hover { background: var(--surface2); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2), inset 0 -3px 0 var(--shadow); }

/* ----------------------------------------------------------------- screens */
.main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l));
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}
.screen-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.screen-head h2 { margin: 0; font: 32px/1.2 var(--pixel); letter-spacing: 0.02em; }
.back-btn {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--surface);
  cursor: pointer;
  clip-path: var(--cut2);
  box-shadow: inset 0 0 0 2px var(--edge);
  transition: transform 0.1s var(--ease);
}
.back-btn svg { width: 18px; height: 18px; fill: currentColor; shape-rendering: crispEdges; }
.back-btn:hover { transform: scale(1.05); }
.back-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }
.lead { margin: 0 0 16px; color: var(--muted); max-width: 60ch; }
.hint { margin: 16px 0 0; color: var(--faint); font-size: 14px; text-align: center; }

/* the main menu */
.menu-wrap { flex: 1; display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; justify-items: center; }
.menu-col { width: min(100%, 420px); display: flex; flex-direction: column; align-items: stretch; }
.logo { margin: 6px 0 2px; text-align: center; font: 64px/1 var(--pixel); letter-spacing: 0; white-space: nowrap; }
.lg { display: inline-block; width: 0.75em; text-align: center; text-shadow: 0.0625em 0.0625em 0 rgba(0, 0, 0, 0.45); }
.lg-b { color: #00b8f0; } .lg-l { color: #f8d800; } .lg-o { color: #b048f8; } .lg-c { color: #38d038; } .lg-k { color: #f83800; } .lg-x { color: #f88800; }
:root[data-theme='light'] .lg { text-shadow: 0.0625em 0.0625em 0 #1c1a21; }
.tagline { margin: 4px 0 0; text-align: center; color: var(--muted); }
.weekly { min-height: 1.5em; margin: 6px 0 10px; text-align: center; color: var(--neon); font-size: 14px; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.continue-slot:has(> [hidden]) { display: none; }
.menu-btn {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: 16px/1.2 var(--pixel);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px var(--edge), inset 0 -4px 0 var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s;
}
.menu-btn::before {
  content: '▶';
  position: absolute;
  left: 18px;
  opacity: 0;
  transform: translateX(-6px);
  color: var(--neon2);
  transition: opacity 0.15s, transform 0.15s var(--ease);
}
:root[data-theme='light'] .menu-btn::before { color: var(--accent); }
.menu-btn:hover,
.menu-btn:focus-visible { outline: none; transform: scale(1.05); background: var(--surface2); box-shadow: inset 0 0 0 2px var(--neon), inset 0 -4px 0 var(--shadow), 0 0 18px var(--glow); }
.menu-btn:hover::before,
.menu-btn:focus-visible::before { opacity: 1; transform: none; }
.menu-btn:active { transform: scale(0.95); }
.menu-btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent-hi), inset 0 -4px 0 rgba(0, 0, 0, 0.3); }
.menu-btn.primary:hover,
.menu-btn.primary:focus-visible { background: var(--accent-hi); box-shadow: inset 0 0 0 3px #fff, inset 0 -4px 0 rgba(0, 0, 0, 0.3), 0 0 18px var(--glow); }
.menu-btn.primary::before { color: #fff; }
.mb-label { padding: 0 36px; text-align: center; }
.free { margin: 14px 0 0; text-align: center; color: var(--faint); font-size: 13px; }
.demo-col { display: none; }
.demo { width: 192px; height: 352px; image-rendering: pixelated; }

/* cards: modes, online, practice */
.mode-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  border: 0;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px var(--edge), inset 0 -4px 0 var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.mode-card:hover,
.mode-card:focus-visible { outline: none; transform: scale(1.03); box-shadow: inset 0 0 0 3px var(--neon), inset 0 -4px 0 var(--shadow), 0 0 22px var(--glow); }
.mode-card:active { transform: scale(0.97); }
.mode-card h3 { margin: 0; font: 32px/1.1 var(--pixel); }
.mode-card p { margin: 0; color: var(--muted); font-size: 15px; }
.mode-card .best { margin-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mode-card .best span:first-child { color: var(--faint); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.mode-card .best strong { font: 16px/1.3 var(--pixel); color: var(--text); }
.mode-card .chip { position: absolute; top: 14px; right: 14px; width: 40px; height: 22px; image-rendering: pixelated; }
.card-go { margin-top: 10px; align-self: flex-start; font: 16px/1 var(--pixel); color: var(--neon2); }
:root[data-theme='light'] .card-go { color: var(--accent); }

/* the pieces' choice (Classic | Extended): before every game */
.set-host:empty { display: none; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.set-label { font: 16px/1.3 var(--pixel); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.set-pick { display: flex; gap: 8px; flex: 1 1 18em; min-width: 0; }
.set-opt {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  text-align: left;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  clip-path: var(--cut2);
  box-shadow: inset 0 0 0 2px var(--edge);
  transition: transform 0.1s var(--ease), background-color 0.1s;
}
.set-opt b { display: block; font: 16px/1.2 var(--pixel); }
.set-opt small { display: block; font-size: 13px; color: var(--muted); }
.set-opt[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.set-opt[aria-pressed='true'] small { color: inherit; opacity: 0.85; }
.set-opt:hover { transform: scale(1.03); }
.set-opt:active { transform: scale(0.97); }
.set-opt:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }
.set-art { flex: none; width: 36px; height: 36px; image-rendering: pixelated; image-rendering: crisp-edges; }
.set-row .note { flex-basis: 100%; margin: 0; }
.panel .set-row { margin: 0 0 6px; }
.lobby-set { text-align: center; color: var(--muted); margin: 0 0 10px; }
.set-tabs { margin: 0 0 10px; }

/* panels and form rows */
.panel {
  background: var(--surface);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px var(--edge), inset 0 -4px 0 var(--shadow);
  padding: 18px;
}
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--edge) 55%, transparent); min-height: 56px; }
.row:last-child { border-bottom: 0; }
.row > span:first-child { flex: 1 1 9em; min-width: 0; }
.row small { display: block; color: var(--faint); font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper output { min-width: 3ch; text-align: center; font: 16px/1 var(--pixel); white-space: nowrap; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.seg button,
.stepper button,
.btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  clip-path: var(--cut2);
  box-shadow: inset 0 0 0 2px var(--edge);
  transition: transform 0.1s var(--ease), background-color 0.1s;
  font-size: 15px;
}
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.seg button:hover,
.stepper button:hover,
.btn:hover { transform: scale(1.05); }
.seg button:active,
.stepper button:active,
.btn:active { transform: scale(0.95); }
.seg button:focus-visible,
.stepper button:focus-visible,
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }
.btn { font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent-hi), inset 0 -3px 0 rgba(0, 0, 0, 0.3); }
.btn.primary:focus-visible { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--neon2); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--surface2);
  clip-path: var(--cut2);
  box-shadow: inset 0 0 0 2px var(--edge);
}
.switch::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  background: var(--muted);
  clip-path: var(--cut2);
  transition: transform 0.15s var(--ease), background-color 0.15s;
}
.switch[aria-checked='true'] { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.switch[aria-checked='true']::after { transform: translateX(26px); background: #fff; }
.switch:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }
/* the extra hit area beyond the switch's drawing */
.switch-hit { min-height: 44px; display: flex; align-items: center; }
input[type='range'] { width: min(calc(52vw / var(--ca-zoom, 1)), 220px); accent-color: var(--accent); height: 44px; cursor: pointer; }
select {
  min-height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface2);
  border: 2px solid var(--edge);
}
.practice .btn.primary { width: 100%; margin-top: 16px; min-height: 52px; font: 16px/1 var(--pixel); text-transform: uppercase; }
.note { color: var(--faint); font-size: 14px; margin: 10px 0 0; }

/* ----------------------------------------------------------------- results view */
.results { display: flex; flex-direction: column; gap: 22px; }
.results h3 { margin: 0 0 10px; font: 16px/1.3 var(--pixel); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.bests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.best-card { background: var(--surface); clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--edge); padding: 12px; text-align: center; }
.best-card span { display: block; color: var(--faint); font-size: 13px; }
.best-card strong { display: block; font: 16px/1.4 var(--pixel); margin-top: 4px; overflow-wrap: anywhere; }
.board-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; justify-content: flex-start; }
.board-host { min-height: 180px; }
.syncing { color: var(--warn); font-size: 13px; margin-left: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--surface); clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--edge); padding: 10px 12px; }
.stat span { display: block; color: var(--faint); font-size: 13px; }
.stat strong { display: block; font: 16px/1.5 var(--pixel); }
.stat small { display: block; color: var(--faint); font-size: 12px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; text-align: center; background: var(--surface); clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--edge); }
.badge canvas { width: 48px; height: 48px; image-rendering: pixelated; }
.badge b { font-size: 14px; }
.badge small { color: var(--faint); font-size: 12px; line-height: 1.35; }
.badge.locked canvas { opacity: 0.45; filter: grayscale(1); }
.badge.locked b { color: var(--muted); }

/* ----------------------------------------------------------------- lobby */
.lobby { display: flex; flex-direction: column; gap: 14px; }
.seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.seat { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; background: var(--surface); clip-path: var(--cut); box-shadow: inset 0 0 0 2px var(--edge); text-align: center; }
.seat.me { box-shadow: inset 0 0 0 2px var(--neon), 0 0 16px var(--glow); }
.seat .face { width: 48px; height: 48px; display: grid; place-items: center; font: 32px/1 var(--pixel); background: var(--surface2); clip-path: var(--cut2); }
.seat .who { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .state { font: 16px/1 var(--pixel); color: var(--faint); }
.seat .state.ready { color: var(--good); }
.seat.empty .who { color: var(--faint); font-weight: 400; }
/* a party of six: three rows of two on a phone, two rows of three where there is room */
.seats.n6 .seat { min-height: 96px; padding: 10px 8px; }
.seats.n6 .seat .face { width: 40px; height: 40px; font-size: 28px; }
.lobby-status { text-align: center; color: var(--muted); min-height: 1.5em; margin: 0; }
.lobby-actions { display: flex; gap: 10px; }
.lobby-actions .btn { flex: 1; min-height: 52px; font: 16px/1 var(--pixel); text-transform: uppercase; }

/* ----------------------------------------------------------------- the play screen */
/* the page under the play screen never scrolls */
body.playing { overflow: hidden; }
.play {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  background: #08070e;
  touch-action: none;
}
.scene { position: absolute; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
.scene.off { visibility: hidden; }
.crt-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(to bottom, transparent 0 1px, rgba(0, 0, 0, 0.5) 1px 2px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
  transition: opacity 0.3s;
}
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-box { position: absolute; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; color: #fff; background: rgba(20, 18, 34, 0.86); clip-path: var(--cut); box-shadow: inset 0 0 0 2px #5a5f9a, inset 2px 2px 0 2px rgba(0, 0, 0, 0.35); }
.hud-box:empty { display: none; }
.play[data-style='gb'] .hud-box, .play[data-style='gb'] .hud-bar { background: rgba(15, 56, 15, 0.9); box-shadow: inset 0 0 0 2px #306230; }
.play[data-style='neon'] .hud-box, .play[data-style='neon'] .hud-bar { box-shadow: inset 0 0 0 2px #b048f8, 0 0 10px rgba(176, 72, 248, 0.4); }
.play[data-style='gb'] .hud-item .k { color: #9bbc0f; }
.play[data-style='gb'] .hud-item .v { color: #e0f0b0; }
.hud-item { display: flex; flex-direction: column; }
.hud-item .k { font: 16px/1.2 var(--pixel); color: #c9c3dd; letter-spacing: 0.04em; }
.hud-item .v { font: 16px/1.2 var(--pixel); color: #fff; white-space: nowrap; transform-origin: left center; }
.hud-item.target .v { overflow: hidden; text-overflow: ellipsis; }
/* a box too narrow for its words (a small phone, a long score or name): the smaller type */
.hud-box.tight { padding: 8px 4px; gap: 6px; }
.hud-bar.tight { gap: 2px; padding: 2px 3px; }
.hud-box.tight .hud-item .k, .hud-box.tight .hud-item .v, .hud-bar.tight .hud-item .k, .hud-bar.tight .hud-item .v, .hud-bar.tight .score .v, .tight .b2b { font-size: 12px; }
.hud-box.big .hud-item .v { font-size: 32px; line-height: 1.15; }
.hud-item .v.pulse { animation: pulse 0.4s var(--ease); }
.hud-box.flash { animation: hudflash 0.4s ease-out; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes hudflash { 0% { background: rgba(255, 255, 255, 0.35); } 100% { background: transparent; } }
.b2b { display: inline-block; margin-left: 6px; padding: 0 4px; font: 16px/1.3 var(--pixel); color: #1c1030; background: #ffd84a; vertical-align: middle; animation: b2b 0.3s ease-in-out infinite alternate; }
@keyframes b2b { from { transform: scale(1); } to { transform: scale(1.12); } }
.hud-bar { position: absolute; display: flex; align-items: center; justify-content: space-evenly; gap: 6px; padding: 2px 6px; color: #fff; text-align: center; background: rgba(20, 18, 34, 0.86); clip-path: var(--cut); box-shadow: inset 0 0 0 2px #5a5f9a; }
.hud-bar .hud-item { align-items: center; }
.hud-bar .hud-item .k { font-size: 16px; }
.hud-bar .score .v { font-size: 16px; }
.hints { position: absolute; inset: 0; }
.hints p { position: absolute; margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 0 #000; max-width: 13em; line-height: 1.3; }
.opp-names { position: absolute; inset: 0; }
.opp-name { position: absolute; display: block; padding: 0 2px; font-size: 12px; color: #e8e2f6; text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.opp-hit { position: absolute; pointer-events: auto; background: transparent; border: 0; cursor: crosshair; }
.opp-hit:focus-visible { outline: 2px solid #ffe066; outline-offset: 2px; }
.play-tools {
  position: absolute;
  top: calc(6px + var(--safe-t));
  right: calc(6px + var(--safe-r));
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}
.play-tools .icon-btn { background: rgba(20, 18, 30, 0.72); color: #fff; box-shadow: inset 0 0 0 2px rgba(194, 123, 255, 0.55); }
.play[data-shape='portrait'] .play-tools { right: auto; flex-direction: column; align-items: flex-start; }
.play[data-shape='portrait'] #btn-help-play, .play[data-shape='portrait'] #btn-layers { display: none; }
.play[data-shape='portrait'] .net { position: absolute; left: 50px; top: 12px; }
.net { font-size: 13px; color: #ffe066; text-shadow: 0 1px 0 #000; max-width: calc(40vw / var(--ca-zoom, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* gestures: the whole play surface under the HUD (its friends' boards stay buttons) and the tools */
.gest { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gest-hint {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(300px, calc(calc(100vw / var(--ca-zoom, 1)) - 32px));
  margin: 0;
  padding: 14px 16px;
  color: #fff;
  background: rgba(20, 18, 34, 0.9);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px #b048f8;
  pointer-events: none;
  font-size: 15px;
  line-height: 1.35;
}
.gest-hint .gh-title { margin: 0 0 8px; font: 16px/1.2 var(--pixel); color: #ffe066; }
.gest-hint ul { margin: 0; padding: 0 0 0 18px; display: grid; gap: 6px; }
/* a phone on its side: a low, wide card along the bottom (the count-down stays in sight) */
@media (max-height: 500px) {
  .gest-hint { top: auto; bottom: calc(8px + var(--safe-b)); transform: translateX(-50%); width: min(520px, calc(calc(100vw / var(--ca-zoom, 1)) - 32px)); padding: 10px 14px; font-size: 13px; }
  .gest-hint ul { grid-template-columns: 1fr 1fr; column-gap: 26px; gap: 4px 26px; }
}

/* touch buttons: one grid, placed per shape (bottom bar upright, both edges on its side) */
.touch {
  --tb: 56px;
  --gap: 8px;
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  gap: var(--gap);
  padding: 6px calc(10px + var(--safe-r)) calc(6px + var(--safe-b)) calc(10px + var(--safe-l));
  grid-template-columns: var(--tb) var(--tb) var(--tb) 1fr var(--tb) var(--tb);
  grid-template-rows: 1fr var(--tb) var(--tb);
  grid-template-areas:
    '. . . . . .'
    'hold . . . . hard'
    'left right soft . ccw cw';
}
.touch.large { --tb: 72px; }
.touch.lefty { grid-template-columns: var(--tb) var(--tb) 1fr var(--tb) var(--tb) var(--tb); grid-template-areas: '. . . . . .' 'hard . . . . hold' 'ccw cw . left right soft'; }
.touch.sides {
  grid-template-columns: var(--tb) var(--tb) 1fr var(--tb) var(--tb);
  grid-template-rows: 1fr var(--tb) var(--tb) 12px;
  grid-template-areas: '. . . . .' 'left right . ccw cw' 'soft soft . hold hard' '. . . . .';
}
.touch.sides.lefty { grid-template-areas: '. . . . .' 'ccw cw . left right' 'hold hard . soft soft' '. . . . .'; }
.tg { display: contents; }
.tb {
  pointer-events: auto;
  width: 100%;
  height: var(--tb);
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 32px/1 var(--pixel);
  background: rgba(24, 20, 36, 0.62);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px rgba(194, 123, 255, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.4);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.06s, background-color 0.06s;
}
.tb span { pointer-events: none; }
.tb-hold span { font-size: 16px; }
.tb.down { transform: scale(0.95); background: rgba(176, 72, 248, 0.6); box-shadow: inset 0 0 0 2px #e8d4ff; }
.tb[data-act='left'] { grid-area: left; } .tb[data-act='right'] { grid-area: right; } .tb[data-act='soft'] { grid-area: soft; }
.tb[data-act='hold'] { grid-area: hold; } .tb[data-act='hard'] { grid-area: hard; } .tb[data-act='ccw'] { grid-area: ccw; } .tb[data-act='cw'] { grid-area: cw; }

/* the cards over the board: pause and results */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(8, 6, 14, 0.45);
}
.card {
  width: min(calc(92vw / var(--ca-zoom, 1)), 380px);
  max-height: 100%;
  overflow: auto;
  padding: 22px 20px 18px;
  background: var(--surface);
  color: var(--text);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px var(--edge-hi), inset 0 -5px 0 var(--shadow);
  animation: rise 0.25s var(--ease);
  text-align: center;
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.card-title { margin: 0 0 14px; font: 32px/1.15 var(--pixel); letter-spacing: 0.02em; }
.card-actions { display: flex; flex-direction: column; gap: 8px; }
.card-actions.row { flex-direction: row; justify-content: flex-end; margin-top: 16px; }
.card-actions .btn { min-height: 48px; }
.res-main { font: 32px/1.2 var(--pixel); margin: 2px 0 8px; }
.res-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; margin: 10px 0 16px; text-align: left; font-size: 15px; }
.res-rows dt { color: var(--muted); }
.res-rows dd { margin: 0; font: 16px/1.5 var(--pixel); text-align: right; }
.res-note { color: var(--faint); font-size: 14px; margin: 0 0 12px; }
.record { display: inline-block; margin: 0 0 8px; padding: 4px 10px; font: 16px/1.2 var(--pixel); color: #2a1300; background: #ffd84a; clip-path: var(--cut2); animation: spring 0.4s var(--spring); }
@keyframes spring { from { transform: scale(0.3); } to { transform: scale(1); } }
.res-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 14px; }
.res-table th { color: var(--faint); font-weight: 500; text-align: right; padding: 4px 6px; }
.res-table th:nth-child(2), .res-table td:nth-child(2) { text-align: left; }
.res-table td { padding: 6px; text-align: right; border-top: 1px solid color-mix(in srgb, var(--edge) 50%, transparent); }
.res-table td:first-child { font: 16px/1 var(--pixel); }
.res-table td:nth-child(2) { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-table tr.me td { color: var(--neon); }
:root[data-theme='light'] .res-table tr.me td { color: var(--accent); }
.res-sections { text-align: left; margin-top: 16px; }
.res-sections h3 { font: 16px/1.3 var(--pixel); margin: 0 0 8px; color: var(--muted); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.confetti i { position: absolute; top: -10px; left: var(--x); width: 6px; height: 6px; background: var(--c); animation: fall 1s linear var(--d) forwards; }
@keyframes fall { to { transform: translate(var(--dx), calc(105vh / var(--ca-zoom, 1))) rotate(var(--r)); } }
.overlay.match { background: rgba(8, 6, 14, 0.25); }
.overlay.match #p-restart, .overlay.match #p-settings { display: none; }
.small-ov { z-index: 7; background: rgba(8, 6, 14, 0.85); }

/* ----------------------------------------------------------------- sheets */
.sheet {
  width: min(calc(94vw / var(--ca-zoom, 1)), 560px);
  max-height: min(calc(88dvh / var(--ca-zoom, 1)), 760px);
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--text);
  clip-path: var(--cut);
  box-shadow: inset 0 0 0 2px var(--edge-hi);
  overflow: hidden;
  flex-direction: column;
}
.sheet[open] { display: flex; animation: rise 0.25s var(--ease); }
.sheet::backdrop { background: var(--backdrop); }
.sheet.small { width: min(calc(92vw / var(--ca-zoom, 1)), 400px); padding: 20px; }
.sheet.small p { margin: 0; font-size: 16px; }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 8px 20px; }
.sheet-head h2 { margin: 0; font: 32px/1.2 var(--pixel); }
.tabs { flex: none; display: flex; gap: 6px; padding: 4px 16px 10px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { flex: none; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--edge); font-size: 15px; }
.tabs button[aria-selected='true'] { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 2px var(--accent-hi); }
.tabs button:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }
.sheet-body { overflow: auto; padding: 4px 20px 22px; overscroll-behavior: contain; }
.sheet-body h3 { font: 16px/1.3 var(--pixel); margin: 18px 0 6px; color: var(--muted); text-transform: uppercase; }
.sheet-body h4 { font: 14px/1.3 var(--pixel); margin: 12px 0 4px; color: var(--muted); }
.sheet-body h3:first-child { margin-top: 4px; }
.sheet-body p { margin: 0 0 10px; }
.sheet-body:not([data-tab='general']) > #settings-content ~ * { display: none; }
.drawer { margin: 0 0 0 auto; height: calc(100dvh / var(--ca-zoom, 1)); max-height: calc(100dvh / var(--ca-zoom, 1)); width: min(calc(92vw / var(--ca-zoom, 1)), 420px); }
.drawer[open] { animation: slidein 0.25s var(--ease); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer.live::backdrop { background: transparent; }
.keys { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.kbd { display: inline-block; min-width: 28px; padding: 2px 6px; margin: 0 2px 2px 0; font: 16px/1.3 var(--pixel); text-align: center; background: var(--surface2); box-shadow: inset 0 0 0 2px var(--edge), inset 0 -2px 0 var(--shadow); clip-path: var(--cut2); }
.kbd.wait { color: var(--warn); }
.bind { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.help-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; font-size: 15px; }
.help-list { margin: 4px 0 12px; padding-left: 20px; display: grid; gap: 6px; }
/* the pieces of the set, as they come in (help: rules) */
.pieces { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 8px 0 14px; padding: 12px; background: #121428; clip-path: var(--cut); }
.pieces canvas { image-rendering: pixelated; image-rendering: crisp-edges; height: auto; }
.set-note { margin-top: 8px; }
.help-table th, .help-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid color-mix(in srgb, var(--edge) 50%, transparent); }
.help-table td:not(:first-child), .help-table th:not(:first-child) { text-align: right; font-family: var(--pixel); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 0; background: var(--surface2); cursor: pointer; clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--edge); font-size: 12px; color: var(--text); min-height: 44px; }
.thumb canvas { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; }
.thumb[aria-pressed='true'] { box-shadow: inset 0 0 0 3px var(--neon), 0 0 12px var(--glow); }
.thumb:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--neon2); }

/* ----------------------------------------------------------------- toasts and the mosaic */
.toasts { position: fixed; z-index: 50; left: 50%; top: calc(10px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(calc(92vw / var(--ca-zoom, 1)), 460px); }
.toast { pointer-events: auto; padding: 10px 16px; background: var(--surface2); color: var(--text); clip-path: var(--cut2); box-shadow: inset 0 0 0 2px var(--neon), 0 8px 24px var(--shadow); font-size: 15px; animation: rise 0.25s var(--ease); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: opacity 0.25s, transform 0.25s; }
.mosaic { position: fixed; inset: 0; z-index: 40; pointer-events: none; width: calc(100vw / var(--ca-zoom, 1)); height: calc(100vh / var(--ca-zoom, 1)); visibility: hidden; image-rendering: pixelated; }
.mosaic.on { visibility: visible; }
.screen.fade-in { animation: fadein 0.15s ease-out; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ----------------------------------------------------------------- wider screens */
@media (min-width: 560px) {
  .mode-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .online-cards { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .seats { grid-template-columns: repeat(4, 1fr); }
  .seats.n2 { grid-template-columns: repeat(2, 1fr); }
  .seats.n6 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .menu-wrap { grid-template-columns: 420px 240px; justify-content: center; gap: 64px; }
  .demo-col { display: block; padding: 18px; background: #0c0b14; clip-path: var(--cut); box-shadow: inset 0 0 0 2px var(--edge-hi), 0 0 40px var(--glow); }
  .logo { font-size: 64px; }
}
/* three cards in a row on a phone on its side or a tablet: each name whole and clear of its chip */
@media (min-width: 560px) and (max-width: 759px) {
  .mode-card h3 { font-size: 16px; }
}
@media (min-width: 760px) and (max-width: 899px) {
  .mode-card h3 { font-size: 24px; }
}
/* a big screen (a laptop, and zoomed past it a 4K monitor or a TV): the screens after the menu
   stand in the middle as the menu does, not along the top over an empty band */
@media (min-width: 900px) and (min-height: 760px) {
  .screen { justify-content: center; }
}
/* a short phone upright (an iPhone SE): the whole main menu without scrolling */
@media (max-height: 620px) and (orientation: portrait) {
  .menu-btn { min-height: 46px; }
  .weekly { margin: 4px 0 8px; }
}
@media (max-height: 340px) and (orientation: landscape) {
  .menu-btn { min-height: 44px; }
  .weekly { margin: 2px 0 6px; }
}
@media (max-width: 380px) {
  .logo { font-size: 48px; }
  .screen-head h2, .card-title, .sheet-head h2 { font-size: 16px; }
  .mode-card h3 { font-size: 16px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .seats.n6 .seat { min-height: 0; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 10px; text-align: left; }
  .seats.n6 .seat .face { flex: none; width: 32px; height: 32px; font-size: 24px; }
  .seats.n6 .seat .who { flex: 1; min-width: 0; }
  .menu-wrap { align-items: start; }
  .logo { font-size: 32px; }
  .tagline, .free { display: none; }
  .menu-list { display: grid; grid-template-columns: 1fr 1fr; }
}

/* reduced motion: crossfades instead of travel, nothing pulses — the system's wish unless the
   player turned "Reduce motion" off (data-motion='full'), and the player's own "on" */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion='full']) *, :root:not([data-motion='full']) *::before, :root:not([data-motion='full']) *::after { animation-duration: 0.15s !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; }
  :root:not([data-motion='full']) :is(.menu-btn, .mode-card):is(:hover, :focus-visible) { transform: none; }
  :root:not([data-motion='full']) .confetti { display: none; }
}
:root[data-motion='reduced'] *, :root[data-motion='reduced'] *::before, :root[data-motion='reduced'] *::after { animation-duration: 0.15s !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; }
:root[data-motion='reduced'] .confetti { display: none; }
:root[data-motion='reduced'] :is(.menu-btn, .mode-card):is(:hover, :focus-visible) { transform: none; }
html[data-ca-lite] .sheet::backdrop { backdrop-filter: none; }

/* a game controller in use (the SDK marks <html data-ca-pad>): the on-screen buttons step aside */
html[data-ca-pad] .touch { display: none; }

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