/* Blueprint Bridge Workshop — the base layer from 1.0: paper, ink and copper, double-ruled frames,
   ribbons with notched tails, serif capitals for titles and a monospace for measures. Phone
   first (320 px up), both themes, every target 44 px. */

:root {
  color-scheme: light dark;
  --paper: #efe6d0;
  --ink: #2a2420;
  --copper: #7a3b2e;
  --ca-accent: #7a3b2e; /* the accounts SDK's sheets and chip: white on it reads at 9:1 */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hatch: repeating-linear-gradient(135deg, var(--copper) 0 1px, transparent 1px 5px);
  --ease: cubic-bezier(.2, .8, .2, 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);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #1d1915; --ink: #e8dec6; --copper: #d0794f; }
}
:root[data-theme="dark"] { --paper: #1d1915; --ink: #e8dec6; --copper: #d0794f; }
:root[data-theme="light"] { --paper: #efe6d0; --ink: #2a2420; --copper: #7a3b2e; }

* { 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(--paper); }
body {
  margin: 0; height: calc(100dvh / var(--ca-zoom, 1)); overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  background: var(--paper); color: var(--ink);
  font: 16px/1.45 var(--serif);
  -webkit-font-smoothing: antialiased;
}
/* a game page: no text selection or long-press callouts anywhere, HUD and
   menus included; form fields and the rules' prose opt back in */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input[type="text"], textarea, .prose p { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }

/* ---------------------------------------------------------------- icons, buttons, ribbons */
svg.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink);
  font: 600 15px/1.15 var(--serif); letter-spacing: .02em; cursor: pointer; text-align: center;
  transition: background-color .15s, color .15s, transform .08s;
}
/* an icon beside a button's words sits in its own box, not on the text's baseline (§6: exactly in the middle) */
.btn > span[data-icon] { display: grid; place-items: center; }
.btn:hover { background-image: var(--hatch); background-size: 7px 7px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; border-style: dashed; box-shadow: none; background-image: none; }
.btn.primary { background-color: var(--copper); color: var(--paper); border-color: var(--copper); box-shadow: inset 0 0 0 2px var(--copper), inset 0 0 0 3px var(--paper); }
.btn.primary:hover { background-image: repeating-linear-gradient(135deg, var(--paper) 0 1px, transparent 1px 6px); }
.btn.primary:disabled { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.danger { color: var(--copper); border-color: var(--copper); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--copper); }
.btn.small { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn.on { background-color: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--paper); }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink);
}
.icon-btn:hover { background-image: var(--hatch); background-size: 7px 7px; }
.icon-btn:disabled { opacity: .45; cursor: default; background-image: none; }
.icon-btn.small { width: 44px; height: 44px; box-shadow: none; }
.icon-btn.on { background: var(--ink); color: var(--paper); }
.ribbon {
  position: relative; display: inline-block; margin: 0 16px; padding: 3px 12px 2px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  background: var(--paper); font: 600 14px/1.25 var(--serif); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: inset 0 2px 0 var(--paper), inset 0 3px 0 var(--ink), inset 0 -2px 0 var(--paper), inset 0 -3px 0 var(--ink);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 5px; bottom: -5px; width: 16px; z-index: -1;
  background: var(--hatch); background-color: var(--paper); border: 1px solid var(--ink);
}
.ribbon::before { left: -14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 7px 50%); }
.ribbon::after { right: -14px; clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%); }
.ribbon.big { font-size: clamp(17px, calc(4.6vw / var(--ca-zoom, 1)), 24px); padding: 4px 16px 3px; max-width: calc(100% - 32px); overflow-wrap: anywhere; }
.ribbon.small { font-size: 12px; letter-spacing: .06em; padding: 2px 10px 1px; margin: 0 14px; }
.card {
  position: relative; border: 1px solid var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink);
}
.card::before, .card::after {
  content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--ink); background: var(--paper);
  transform: rotate(45deg); z-index: 1;
}
.card::before { left: -5px; top: -5px; }
.card::after { right: -5px; bottom: -5px; }
.card-h { margin: 0; font: 600 16px/1.2 var(--serif); letter-spacing: .12em; text-transform: uppercase; }
.sub-h { margin: 18px 0 8px; font: 600 14px/1.2 var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.note { font-size: 14px; margin: 6px 0; font-style: italic; }
.note.warn { color: var(--copper); font-style: normal; }

/* ---------------------------------------------------------------- the bar */
.bar {
  position: relative; z-index: 5; min-width: 0; max-width: calc(100vw / var(--ca-zoom, 1));
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: calc(6px + var(--safe-t)) calc(10px + var(--safe-r)) 6px calc(10px + var(--safe-l));
  border-bottom: 3px double var(--ink); background: var(--paper);
}
/* both ends are the SDK's (App Standard §4.1); on a drawing board and in a shared test the brand's
   name gives way to the work's title — its mark and icon stay */
body:is([data-screen="work"], [data-screen="exam"]) .bar .ca-brand-name { display: none; }
/* the game's own Back and ⋯ are round bar tools like the SDK's; the free room is before the ⋯ and
   the chip's end, at the right */
.bar > #open-more { margin-left: auto; }
.bar > .ca-end { margin-left: auto; }
.bar > #open-more:not([hidden]) + .ca-end { margin-left: 0; }
.work-title { display: flex; align-items: center; min-width: 0; flex: 1; gap: 4px; }
/* (on the smallest phone the ribbon gives way last, cut short rather than over the ⋯) */
.work-title .ribbon { margin: 0 14px; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a phone: beside the brand the ribbon says where the player is (the work's name was on the start
   screen); the smallest one draws the ribbon a little tighter */
@media (max-width: 479px) { .bar .work-name { display: none; } }
@media (max-width: 359px) {
  body:is([data-screen="work"], [data-screen="exam"]) .bar { gap: 6px; }
  .bar .work-title .ribbon { margin: 0; padding: 2px 8px 1px; font-size: 11px; }
}
.work-name { font: italic 15px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.meters { display: flex; align-items: center; gap: 6px; order: 0; }
.meter { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 8px; border: 1px solid var(--ink); font-size: 13px; white-space: nowrap; }
.meter .m-k { font: 600 12px/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; }
.meter .m-v { font: 600 14px/1 var(--mono); font-variant-numeric: tabular-nums; }
.meter .m-ico svg.ico { width: 18px; height: 18px; }
.meter.over { color: var(--copper); border-color: var(--copper); }
.meter.shake { animation: shiver .3s linear; }
@keyframes shiver { 0%, 100% { transform: none; } 15% { transform: translateX(-3px); } 35% { transform: translateX(3px); } 55% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.dial { width: 40px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.dial .dial-red { stroke: var(--copper); stroke-width: 2.6; }
.dial circle { fill: var(--paper); }
.needle { transform-origin: 20px 21px; transform: rotate(var(--deg, -90deg)); transition: transform .3s cubic-bezier(.33, 1, .68, 1); }
.needle path { stroke-width: 1.8; }
.gauge.over .needle path { stroke: var(--copper); }
.gauge.pulse .needle { animation: needle-pulse .18s ease-in-out 2; }
@keyframes needle-pulse { 50% { transform: rotate(calc(var(--deg, -90deg) + 9deg)); } }

/* ---------------------------------------------------------------- screens */
main { position: relative; min-height: 0; }
.screen { position: absolute; inset: 0; }

/* the home screen */
.home {
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
}
.home > * { flex: none; }
.home > .friends { flex: 1 1 0; min-height: 96px; }
.hero { display: grid; grid-template-rows: auto auto; min-height: min-content; }
.hero-pic { height: clamp(100px, calc(24dvh / var(--ca-zoom, 1)), 300px); margin: 4px; border-bottom: 1px solid var(--ink); }
.hero-pic canvas { display: block; width: 100%; height: 100%; }
.hero-text { padding: 8px 14px 12px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.kicker { margin: 0; font: italic 14px/1.2 var(--serif); }
.hero-line { margin: 2px 0 0; font: italic 15px/1.35 var(--serif); max-width: 52ch; }
.hero-cargo { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.hero-cargo .cargo-ico svg.ico { color: var(--copper); }
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.g-card { border: 1px solid var(--ink); padding: 6px 8px; display: grid; gap: 2px; align-content: start; min-width: 0; position: relative; }
.g-k { font: 600 12px/1.15 var(--serif); letter-spacing: .06em; text-transform: uppercase; overflow-wrap: break-word; hyphens: auto; }
.g-v { font: 600 18px/1.1 var(--mono); }
.g-card.best .g-v { color: var(--copper); }
.g-seal { position: absolute; right: 6px; top: 6px; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.actions.two { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.big-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-content: center; text-align: left;
  min-height: 64px; padding: 10px 14px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink);
}
.big-btn:hover { background-image: var(--hatch); background-size: 7px 7px; }
.big-btn:active { transform: translateY(1px); }
.big-btn .b-ico { grid-row: 1 / 3; align-self: center; display: grid; }
.big-btn .b-ico svg.ico { width: 28px; height: 28px; }
.big-btn .b-t { font: 600 16px/1.2 var(--serif); letter-spacing: .06em; text-transform: uppercase; }
.big-btn .b-s { font: italic 13px/1.25 var(--serif); }
.big-btn.primary { background-color: var(--copper); color: var(--paper); border-color: var(--copper); box-shadow: inset 0 0 0 3px var(--copper), inset 0 0 0 4px var(--paper); }
.friends { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: 12px 12px 6px; }
.friends-list { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.friends-list .empty { padding: 10px 4px; font-style: italic; }
.f-row { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto auto 26px; gap: 8px; align-items: center; min-height: 44px; padding: 0 6px; border-bottom: 1px dashed var(--ink); cursor: pointer; }
.f-row:hover { background-image: var(--hatch); background-size: 7px 7px; }
.f-row.me { position: sticky; bottom: 0; top: 0; background: var(--paper); color: var(--copper); border-top: 1px solid var(--copper); border-bottom: 1px solid var(--copper); cursor: default; font-weight: 600; }
.f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-cost { font-size: 13px; }
.seal { display: inline-grid; place-items: center; width: 26px; height: 26px; color: var(--ink); }
.seal svg.ico { width: 24px; height: 24px; }
.seal.copper, .seal.gold { color: var(--copper); }
.seal.gold svg.ico { stroke-width: 2.2; }
.seal.copper svg.ico { stroke-width: 2.4; }
.seal.silver svg.ico { stroke-dasharray: 2 1.4; }

@media (max-width: 559px) {
  .home { gap: 10px; padding-top: 10px; }
  .kicker { display: none; }
  .hero-pic { height: clamp(96px, calc(21dvh / var(--ca-zoom, 1)), 220px); }
  .hero-text { padding: 6px 10px 10px; }
  .hero-line { font-size: 14px; }
  .g-card { padding: 5px 6px; }
  .g-k { font-size: 12px; letter-spacing: .03em; }
  .g-v { font-size: 16px; }
  .g-seal { right: 2px; top: auto; bottom: 2px; }
  .actions { gap: 6px; }
  .big-btn { grid-template-columns: 1fr; grid-template-rows: auto auto; justify-items: center; text-align: center; min-height: 72px; padding: 8px 4px; row-gap: 4px; }
  .big-btn .b-ico { grid-row: auto; }
  .big-btn .b-ico svg.ico { width: 24px; height: 24px; }
  .big-btn .b-t { font-size: 13px; letter-spacing: .03em; line-height: 1.15; }
  .big-btn .b-s { display: none; }
}
@media (max-width: 459px) {
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .g-card { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 6px; padding: 6px 8px; }
  .g-k { overflow-wrap: normal; }
  .g-v { justify-self: end; }
  .g-card.best { padding-right: 34px; }
  .g-seal { top: 50%; bottom: auto; transform: translateY(-50%); }
}
@media (max-height: 620px) and (orientation: portrait) {
  .hero-line { display: none; }
  .hero-pic { height: clamp(90px, calc(18dvh / var(--ca-zoom, 1)), 160px); }
}
@media (max-height: 560px) and (orientation: landscape) {
  .home { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .home .hero { grid-row: 1 / 3; }
  .home .gauges { grid-column: 2; grid-row: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home .actions { grid-column: 2; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home .friends { grid-column: 1 / 3; grid-row: 3; }
  .big-btn { min-height: 48px; grid-template-columns: 1fr; padding: 4px 8px; }
  .big-btn .b-ico, .big-btn .b-s { display: none; }
  .hero-pic { height: clamp(80px, calc(36dvh / var(--ca-zoom, 1)), 220px); }
  .hero-line, .kicker, .hero-cargo { display: none; }
  .g-v { font-size: 15px; }
}
@media (min-width: 960px) {
  .home { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); align-content: start; column-gap: 18px; }
  .home .hero { grid-column: 1; grid-row: 1; }
  .home .gauges { grid-column: 1; grid-row: 2; }
  .home .actions { grid-column: 1; grid-row: 3; align-self: start; }
  .home .friends { grid-column: 2; grid-row: 1 / 5; }
  .hero-pic { height: clamp(200px, calc(36dvh / var(--ca-zoom, 1)), 360px); }
}

/* ---------------------------------------------------------------- the workshop */
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "band" "board" "palette" "dock";
}
.band { grid-area: band; }
.board { grid-area: board; position: relative; min-height: 0; overflow: hidden; }
.board canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.board canvas:focus-visible { outline-offset: -3px; }
.palette { grid-area: palette; border-top: 1px solid var(--ink); background: var(--paper); position: relative; }
.tools { display: grid; grid-template-columns: repeat(7, 44px); justify-content: center; gap: 0; padding: 4px calc(4px + var(--safe-r)) 4px calc(4px + var(--safe-l)); }
.tool {
  position: relative; display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.tool .tool-t, .tool .tool-p { display: none; }
.tool.on { background: var(--ink); color: var(--paper); }
.tool:hover:not(.on) { background-image: var(--hatch); background-size: 7px 7px; }
.tool.dim { opacity: .4; }
.tool .tool-ico { width: 26px; height: 26px; }
.pal-fold { position: absolute; right: calc(4px + var(--safe-r)); top: -45px; width: 44px; height: 44px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.palette.open .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 2px 8px; max-height: calc(40dvh / var(--ca-zoom, 1)); overflow-y: auto; overscroll-behavior: contain; }
.palette.open .tool { width: auto; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; padding: 4px 8px; column-gap: 8px; }
.palette.open .tool .tool-ico { grid-row: 1 / 3; }
.palette.open .tool .tool-t { display: block; font: 600 14px/1.15 var(--serif); }
.palette.open .tool .tool-p { display: block; font: 12px/1.2 var(--mono); }
.dock {
  grid-area: dock; display: flex; align-items: center; gap: 2px;
  padding: 4px calc(4px + var(--safe-r)) calc(4px + var(--safe-b)) calc(4px + var(--safe-l));
  border-top: 3px double var(--ink); background: var(--paper);
}
.dock .go { margin-left: auto; flex: 0 1 auto; min-width: 0; padding: 0 12px; }
.dock .pre-btn { margin-left: auto; padding: 0 10px; }
.dock .pre-btn + .go { margin-left: 4px; }
.dock .tool-del.on { background: var(--ink); color: var(--paper); }
body.locked .palette, body.locked #d-undo, body.locked #d-redo, body.locked #d-del { pointer-events: none; opacity: .45; }

.view-tools { position: absolute; left: calc(8px + var(--safe-l)); bottom: 8px; display: flex; gap: 4px; }
@media (min-width: 720px) { .view-tools { left: auto; right: calc(8px + var(--safe-r)); } }
.view-tools .icon-btn { background: var(--paper); }
.tut {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  width: max-content; max-width: calc(100% - 16px); padding: 6px 6px 6px 12px;
  border: 1px solid var(--copper); background: var(--paper); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--copper);
}
.tut-step { font: 12px/1 var(--mono); color: var(--copper); }
.tut-text { font: italic 15px/1.3 var(--serif); }
.msg {
  position: absolute; left: 50%; bottom: 60px; transform: translate(-50%, 6px); margin: 0; z-index: 3;
  max-width: calc(100% - 24px); width: max-content; padding: 6px 12px; text-align: center;
  border: 1px solid var(--ink); background: var(--paper); font: italic 14px/1.3 var(--serif);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.msg.on { opacity: 1; transform: translate(-50%, 0); }
.phase { position: absolute; top: 8px; left: 0; right: 0; display: grid; justify-items: center; gap: 2px; pointer-events: none; z-index: 2; }
.phase .ribbon { font-size: 15px; }
.phase-time { font-size: 13px; }
.test-tools { position: absolute; right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); display: flex; gap: 6px; z-index: 2; }
.test-tools .btn svg.ico { width: 18px; height: 18px; }
.paused { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; }
.replay-tools {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px calc(8px + var(--safe-r)) calc(6px + var(--safe-b)) calc(8px + var(--safe-l));
  border-top: 3px double var(--ink); background: var(--paper);
}
.rp-speed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.rp-speed .rp-k { font: 600 12px/1 var(--serif); text-transform: uppercase; letter-spacing: .06em; }
.rp-speed input { width: 80px; }
.rp-time { flex: 1 1 120px; min-width: 100px; }
input[type="range"] { accent-color: var(--copper); height: 44px; }

/* the info and pre-test panels: a bottom sheet on a phone, a card at the side on a wide screen */
.sheetish {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 52%;
  display: flex; flex-direction: column;
  padding: 10px calc(12px + var(--safe-r)) calc(10px + var(--safe-b)) calc(12px + var(--safe-l));
  border-top: 3px double var(--ink); background: var(--paper);
  animation: rise .24s var(--ease);
}
.work .info, .work .pre { grid-area: unset; }
.side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 4px 0 10px; font-size: 15px; }
.info-list dt { font-style: italic; }
.info-list dd { margin: 0; text-align: right; }
.pre-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.pre-note { margin: 0 0 6px; font: italic 14px/1.35 var(--serif); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.check { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 6px; min-height: 26px; font-size: 14px; line-height: 1.25; }
.check .ck-ico svg.ico { width: 20px; height: 20px; }
.check.warn, .check.bad { color: var(--copper); }
.check.bad .ck-t { font-weight: 600; }
.pre-block { margin: 6px 0; color: var(--copper); font-size: 14px; font-style: italic; min-height: 0; }
.pre-block:empty { display: none; }
.pre-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 4px; }
.pre-actions .btn { flex: 1 1 140px; }

@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }

@media (min-width: 720px) {
  .work { grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "band band" "palette board" "palette dock"; }
  .palette { border-top: 0; border-right: 3px double var(--ink); overflow-y: auto; overscroll-behavior: contain; }
  .pal-fold { display: none; }
  .tools, .palette.open .tools { grid-template-columns: 1fr; gap: 2px; padding: 8px; max-height: none; }
  .tool, .palette.open .tool { width: auto; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; padding: 6px 8px; column-gap: 8px; }
  .tool .tool-ico { grid-row: 1 / 3; }
  .tool .tool-t { display: block; font: 600 14px/1.15 var(--serif); }
  .tool .tool-p { display: block; font: 12px/1.2 var(--mono); }
  .dock { padding-left: 10px; }
  .sheetish { left: auto; right: calc(10px + var(--safe-r)); top: 10px; bottom: auto; width: 300px; max-height: calc(100% - 20px); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); padding: 12px 14px; }
  .work[data-panel] .view-tools { right: 320px; }
  body[data-view="pre"] .view-tools { right: 320px; }
}
/* a phone on its side: the palette a narrow column of icons at the left, the dock at the right */
@media (max-height: 500px) and (orientation: landscape) {
  .bar { flex-wrap: nowrap; padding-top: calc(2px + var(--safe-t)); padding-bottom: 2px; }
  .meter .m-k { display: none; }
  body[data-screen="work"] .work-name { display: none; }
  body[data-screen="work"] .meters { order: 0; flex: 0 1 auto; min-width: 0; }
  body[data-screen="work"] .meter { flex: 0 1 auto; padding: 0 6px; gap: 4px; min-height: 36px; }
  body[data-screen="work"] .work-title { flex: 0 1 auto; }
  body[data-screen="work"] .work-title .ribbon { font-size: 11px; padding: 2px 8px 1px; }
  .work { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "band band band" "palette board dock"; }
  .palette { border-top: 0; border-right: 3px double var(--ink); overflow-y: auto; overscroll-behavior: contain; padding-left: var(--safe-l); }
  .pal-fold { display: none; }
  .tools, .palette.open .tools { grid-template-columns: repeat(2, 44px); padding: 2px; max-height: none; }
  .palette.open .tool { width: 44px; grid-template-columns: 1fr; padding: 0; }
  .palette.open .tool .tool-t, .palette.open .tool .tool-p { display: none; }
  .tool .tool-t, .tool .tool-p { display: none; }
  .tool { width: 44px; }
  .dock { flex-direction: column; border-top: 0; border-left: 3px double var(--ink); padding: 2px calc(2px + var(--safe-r)) calc(2px + var(--safe-b)) 2px; overflow-y: auto; }
  .dock .go, .dock .pre-btn { margin: auto 0 0; width: 44px; padding: 0; }
  .dock .pre-btn + .go { margin: 2px 0 0; }
  .dock .go span:not([data-icon]), .dock .pre-btn span:not([data-icon]) { display: none; }
  .sheetish { left: auto; right: 60px; top: 4px; bottom: 4px; width: min(300px, 50%); max-height: none; border: 1px solid var(--ink); }
  .msg { bottom: 10px; }
  .home .hero { min-height: 0; }
}
@media (max-width: 719px) and (min-height: 501px) {
  body[data-screen="work"] .bar { row-gap: 2px; }
  body[data-screen="work"] .meters { order: 10; flex: 1 0 100%; justify-content: space-between; }
  body[data-screen="work"] .meter { flex: 1 1 0; justify-content: center; min-width: 0; padding: 0 4px; gap: 4px; }
  body[data-screen="work"] .meter .m-v { font-size: 13px; letter-spacing: -.02em; }
  body[data-screen="work"] .meter .m-ico svg.ico { width: 16px; height: 16px; }
  .work-title .ribbon { font-size: 12px; }
  .work-name { font-size: 14px; }
  .meter .m-k { display: none; }
}
@media (max-width: 719px) and (min-height: 501px) {
  .dock .icon-btn { box-shadow: none; }
  body[data-view="pre"] .view-tools { display: none; }
}

/* the group's band over the board while building */
.band { display: flex; align-items: center; gap: 8px; padding: 4px calc(8px + var(--safe-r)) 4px calc(8px + var(--safe-l)); border-bottom: 1px solid var(--ink); overflow: hidden; }
.b-clock { display: grid; gap: 2px; flex: none; }
.b-status { font: italic 12px/1.2 var(--serif); }
.b-seats { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior: contain; flex: 1; min-width: 0; }
.b-seat { display: grid; grid-template-columns: auto; gap: 1px; justify-items: center; flex: none; padding: 2px 4px; border: 1px dashed var(--ink); }
.b-seat.ready { border-style: solid; border-color: var(--copper); color: var(--copper); }
.b-seat canvas.mini { width: 72px; height: 33px; }
.b-name { font-size: 12px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-state { font: 12px/1 var(--mono); }
@media (max-width: 559px) {
  .b-seat canvas.mini { width: 54px; height: 25px; }
  .band .btn.small { padding: 0 8px; font-size: 13px; }
}
.lobby-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.l-seat { display: grid; gap: 4px; padding: 6px; border: 1px solid var(--ink); }
.l-seat.me { border-color: var(--copper); }
.l-seat.empty { border-style: dashed; }
.l-seat.left { opacity: .5; }
.l-seat .seat-pic { width: 100%; height: 76px; }
.l-name { font-weight: 600; }
.l-state.ready { color: var(--copper); }
.l-cost { font-size: 12px; }

/* the shared test's lanes */
.exam { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0 calc(8px + var(--safe-r)) calc(8px + var(--safe-b)) calc(8px + var(--safe-l)); }
.exam-head { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; }
.exam-grid { display: grid; gap: 8px; grid-auto-rows: minmax(0, 1fr); min-height: 0; }
.exam-grid.cols { grid-template-columns: 1fr 1fr; }
.lane { position: relative; border: 1px solid var(--ink); min-height: 0; transition: opacity .2s, box-shadow .5s; }
.lane-pic { position: absolute; inset: 0; width: 100%; height: 100%; }
.lane-tag { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 8px; align-items: baseline; padding: 2px 8px; border: 1px solid var(--ink); background: var(--paper); font-size: 13px; }
.lane.me .lane-tag { border-color: var(--copper); color: var(--copper); }
.lane-name { font-weight: 600; }
.lane.flash { box-shadow: 0 0 0 3px var(--copper); z-index: 1; }
.lane.dim { opacity: .4; }
.lane.left .lane-pic { opacity: .45; }
.lane.winner { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--copper), 0 0 0 5px var(--paper), 0 0 0 6px var(--copper); }
.lane.nostart .lane-state { color: var(--copper); }
@media (max-width: 719px) and (orientation: portrait) {
  .exam-grid, .exam-grid.cols { grid-template-columns: 1fr; grid-auto-rows: auto; overflow-y: auto; overscroll-behavior: contain; }
  .lane { height: calc(22dvh / var(--ca-zoom, 1)); }
  .lane.me { height: calc(34dvh / var(--ca-zoom, 1)); }
}

/* ---------------------------------------------------------------- sheets */
dialog.sheet {
  border: 1px solid var(--ink); border-radius: 0; padding: 0; margin: auto;
  width: min(calc(94vw / var(--ca-zoom, 1)), 480px); max-height: min(calc(90dvh / var(--ca-zoom, 1)), 760px);
  background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink), 0 24px 60px -24px rgba(0, 0, 0, .45);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .26s var(--ease); }
dialog.sheet.wide { width: min(calc(96vw / var(--ca-zoom, 1)), 780px); }
dialog.sheet.small { width: min(calc(92vw / var(--ca-zoom, 1)), 380px); }
dialog.sheet::backdrop { background: rgba(20, 16, 12, .5); }
@keyframes sheet-in { from { transform: translateY(18px); } to { transform: none; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px 18px; border-bottom: 3px double var(--ink); flex: none; }
.sheet-h .ribbon.big { margin: 4px 18px; }
.sheet-body { padding: 12px 18px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.sheet-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 10px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--ink); flex: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px dashed var(--ink); }
.row select, .field input[type="text"] { min-height: 44px; padding: 0 10px; border: 1px solid var(--ink); background: var(--paper); border-radius: 0; font-size: 16px; max-width: 60%; }
.row input[type="range"] { width: min(55%, 220px); }
.switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; margin: 0; border: 1px solid var(--ink); background: var(--paper); position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border: 1px solid var(--ink); background: var(--paper); transition: transform .18s var(--ease); }
.switch:checked { background: var(--copper); border-color: var(--copper); }
.switch:checked::after { transform: translateX(20px); border-color: var(--paper); background: var(--paper); }
.field { display: grid; gap: 6px; margin: 4px 0; }
.field input[type="text"] { max-width: none; width: 100%; }
.field input[type="range"] { width: 100%; }
.about { font-size: 14px; margin: 4px 0; }
.about-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tabs { display: flex; gap: 0; padding: 0 12px; border-bottom: 1px solid var(--ink); flex: none; overflow-x: auto; }
.tabs [role="tab"] { min-height: 44px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; font: 600 14px/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--copper); color: var(--copper); }
.board-slot { min-height: 120px; }
.cargo-pick { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.cargo-pick legend { font: 600 14px/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.radio-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-height: 52px; padding: 6px 10px; border: 1px solid var(--ink); cursor: pointer; }
.radio-card input { grid-row: 1 / 3; width: 20px; height: 20px; accent-color: var(--copper); }
.radio-card:has(input:checked) { border-color: var(--copper); box-shadow: inset 0 0 0 1px var(--copper); }
.rc-t { font-weight: 600; }
.rc-s { font: italic 13px/1.2 var(--serif); }

/* the result */
.result .sheet-h { justify-content: center; }
.res-why { margin: 0 0 8px; color: var(--copper); font-style: italic; }
.res-why:empty { display: none; }
.res-seal { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 0; }
.res-seal:empty { display: none; }
.res-seal .seal { width: 44px; height: 44px; }
.res-seal .seal svg.ico { width: 40px; height: 40px; }
.seal-t { font: 600 15px/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; }
.res-rows { width: 100%; border-collapse: collapse; margin: 6px 0; }
.res-rows th { text-align: left; font-weight: 400; padding: 6px 0; border-bottom: 1px dashed var(--ink); }
.res-rows td.v { text-align: right; padding: 6px 0; border-bottom: 1px dashed var(--ink); font-size: 16px; }
.res-rows tr.total th, .res-rows tr.total td { border-top: 3px double var(--ink); border-bottom: 0; font-weight: 600; font-size: 19px; }
.rrow.enter { animation: row-in .3s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes row-in { from { transform: translateX(-10px); opacity: .001; } to { transform: none; opacity: 1; } }
.rrow.flash td, .rrow.flash th { animation: copper-flash .25s linear; }
@keyframes copper-flash { 50% { color: var(--copper); } }
.rrow.jolt { animation: jolt .22s linear; }
@keyframes jolt { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.goals { margin-top: 6px; }
.goal { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.goal.ok { color: var(--copper); }
.goal svg.ico { width: 20px; height: 20px; }
.res-note { font: italic 14px/1.35 var(--serif); margin: 8px 0 0; }
.res-actions .btn { flex: 1 1 130px; }
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table td, .rank-table th { padding: 6px 4px; border-bottom: 1px dashed var(--ink); text-align: left; }
.rank-table th { font-weight: 600; }
.rank-table tr.me { color: var(--copper); }
.rank-table tr.first td:first-child { font-weight: 700; }
.rank-table .note { font-size: 12px; margin: 0; }

/* my designs, the atlas, the records */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cards.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-top: 8px; }
.d-card { border: 1px solid var(--ink); display: grid; grid-template-rows: auto auto auto; }
.d-card .card-pic { width: 100%; height: 100px; border-bottom: 1px solid var(--ink); }
.d-meta { padding: 8px 10px 4px; display: grid; gap: 2px; }
.d-name { margin: 0; font: 600 16px/1.2 var(--serif); overflow-wrap: anywhere; }
.d-sub { margin: 0; font-size: 13px; }
.d-by { justify-self: start; margin: 6px 14px 2px; }
.d-acts { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
.d-acts .btn { flex: 1 1 auto; }
.pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; text-align: left; margin-bottom: 6px; }
.pick[aria-pressed="true"] { border-color: var(--copper); color: var(--copper); box-shadow: inset 0 0 0 1px var(--copper); }
.pick:hover { background-image: var(--hatch); background-size: 7px 7px; }
.atlas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.a-card { border: 1px solid var(--ink); padding: 6px; display: grid; gap: 2px; font-size: 13px; position: relative; content-visibility: auto; contain-intrinsic-size: 150px 150px; }
.a-card .a-pic { width: 100%; height: 66px; }
.a-card.missed { border-style: dashed; min-height: 110px; align-content: center; text-align: center; }
.a-date { font-size: 12px; }
.a-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.a-score { font-size: 15px; color: var(--copper); }
.a-card .seal { position: absolute; right: 4px; bottom: 4px; }
.a-miss { font-style: italic; }
.records { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.records dt { font-style: italic; }
.records dd { margin: 0; text-align: right; }
.help-sec { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--ink); }
.help-sec .fig { width: 200px; height: 110px; border: 1px solid var(--ink); }
.help-sec .sub-h { margin-top: 0; }
.help-sec p { margin: 4px 0; }
.help-t { min-width: 0; }
.keys { font-family: var(--mono); font-size: 13px; }
.table-wrap { overflow-x: auto; overscroll-behavior: contain; max-width: 100%; }
.el-table { border-collapse: collapse; margin-top: 8px; font-size: 13px; width: 100%; }
.el-table th, .el-table td { padding: 4px 6px; border-bottom: 1px dashed var(--ink); text-align: left; }
.el-table tbody th { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.el-table svg.ico { width: 18px; height: 18px; }
@media (max-width: 559px) {
  dialog.sheet, dialog.sheet.wide { width: calc(100vw / var(--ca-zoom, 1)); max-width: calc(100vw / var(--ca-zoom, 1)); max-height: calc(92dvh / var(--ca-zoom, 1)); margin: auto 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .help-sec { grid-template-columns: 1fr; }
  .help-sec .fig { width: 100%; height: 120px; }
  .sheet-body { padding: 10px 14px; }
  .sheet-foot { padding: 8px 14px calc(10px + var(--safe-b)); }
  .res-actions .btn { flex: 1 1 calc(50% - 8px); }
}
.preview-pic { display: block; width: 100%; height: 170px; border: 1px solid var(--ink); }
.confirm-text { font-size: 17px; margin: 6px 0; }

/* the more menu, the message, the count */
.more-menu {
  position: fixed; z-index: 30; top: calc(56px + var(--safe-t)); right: calc(10px + var(--safe-r));
  display: grid; min-width: 220px; padding: 4px; border: 1px solid var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink), 0 18px 40px -20px rgba(0, 0, 0, .5);
}
.more-menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 15px; }
.more-menu button:hover, .more-menu button:focus-visible { background-image: var(--hatch); background-size: 7px 7px; }
.toast {
  position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); z-index: 40; transform: translate(-50%, 10px);
  display: flex; align-items: center; gap: 10px; max-width: calc(calc(100vw / var(--ca-zoom, 1)) - 24px); width: max-content;
  padding: 8px 12px; border: 1px solid var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink);
  font: italic 15px/1.3 var(--serif); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-act { min-height: 40px; padding: 0 10px; border: 1px solid var(--copper); color: var(--copper); background: var(--paper); cursor: pointer; font: 600 14px/1 var(--serif); }
.count { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; pointer-events: none; }
.count-n { font: 600 clamp(80px, calc(22vw / var(--ca-zoom, 1)), 180px)/1 var(--serif); color: var(--copper); -webkit-text-stroke: 1px var(--ink); animation: count-in 1s linear both; }
@keyframes count-in { 0% { transform: scale(.8); opacity: .001; } 25% { transform: none; opacity: 1; } 85% { opacity: 1; } 100% { opacity: .001; } }

/* the landing page's stage (the SDK's) */
.cb-demo { display: block; width: 100%; height: 100%; }

/* calm: the player's own "reduce motion", as the system's */
.calm *, .calm *::before, .calm *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
}
@media (hover: none) {
  .btn:hover, .icon-btn:hover, .big-btn:hover, .tool:hover:not(.on), .pick:hover, .f-row:hover { background-image: none; }
}

/* ================================================================ the second release's look
   The game is a retro travel poster: paper, ink, a sun-orange accent, flat colour fields and
   heavy wide-tracked capitals. The drawing board and its tools are a blueprint: deep blue,
   white technical lines, monospace figures, light-blue and yellow highlights. These rules come
   last and win over the engraver's shop above. */
:root {
  --paper: #f3e6cc; --ink: #1d3436; --copper: #b8471f; --sun: #e4683f;
  --sky: #f6d8a8; --sky2: #f2bd8c; --hill: #7fa38f; --hill2: #2f5a57;
  --ca-accent: #b8471f;
  --serif: "Avenir Next", "Futura", "Gill Sans", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  --display: "Futura", "Avenir Next", "Gill Sans", "Helvetica Neue", Arial, sans-serif;
  --tint: rgba(228, 104, 63, .14);
  --hatch: linear-gradient(var(--tint), var(--tint));
  --bp-bg: #16457e; --bp-grid: #2a5c99; --bp-line: #f2f7ff; --bp-aux: #9fd3ff; --bp-hi: #ffd85c;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14262a; --ink: #f3e6cc; --copper: #ef8a63; --sun: #e4683f; --sky: #1d3436; --sky2: #2a4447; --hill: #2f5a57; --hill2: #7fa38f;
    --tint: rgba(239, 138, 99, .16); --ca-accent: #c4532d;
    --bp-bg: #0d2a4e; --bp-grid: #1b3f6e; --bp-line: #e3ecfa; --bp-aux: #86c0ef; --bp-hi: #f2cd55;
  }
}
:root[data-theme="dark"] {
  --paper: #14262a; --ink: #f3e6cc; --copper: #ef8a63; --sun: #e4683f; --sky: #1d3436; --sky2: #2a4447; --hill: #2f5a57; --hill2: #7fa38f;
  --tint: rgba(239, 138, 99, .16); --ca-accent: #c4532d;
  --bp-bg: #0d2a4e; --bp-grid: #1b3f6e; --bp-line: #e3ecfa; --bp-aux: #86c0ef; --bp-hi: #f2cd55;
}
:root[data-theme="light"] { --paper: #f3e6cc; --ink: #1d3436; --copper: #b8471f; }
body { font: 16px/1.45 var(--serif); }

/* buttons, cards, labels: flat fields, firm borders, rounded corners */
.btn, .icon-btn, .big-btn { border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: none; font-family: var(--serif); }
.btn { font-weight: 700; letter-spacing: .04em; }
.btn.primary, .big-btn.primary { background: var(--copper); color: var(--paper); border-color: var(--copper); box-shadow: none; }
.btn.primary:hover, .big-btn.primary:hover { background-image: none; filter: brightness(1.06); }
.btn.on, .icon-btn.on { box-shadow: none; }
.btn.danger { box-shadow: none; }
.icon-btn.small { border-width: 2px; }
.card { border: 2px solid var(--ink); border-radius: 14px; box-shadow: none; overflow: hidden; }
.card::before, .card::after { display: none; }
.card-h, .sub-h, .big-btn .b-t, .tabs [role="tab"], .cargo-pick legend, .meter .m-k, .g-k, .rp-speed .rp-k { font-family: var(--display); font-weight: 800; letter-spacing: .14em; }
.ribbon { border: 0; border-radius: 6px; background: var(--ink); color: var(--paper); font: 800 13px/1.2 var(--display); letter-spacing: .16em; padding: 4px 12px 3px; }
.ribbon::before, .ribbon::after { display: none; }
.ribbon.big { font-size: clamp(16px, calc(4.4vw / var(--ca-zoom, 1)), 22px); }
.kicker, .hero-line, .note, .work-name, .tut-text, .msg, .pre-note, .rc-s, .big-btn .b-s, .res-why, .info-list dt { font-style: normal; }
.bar { border-bottom: 2px solid var(--ink); }
.poster-title { margin: 0; font: 800 clamp(20px, calc(5.4vw / var(--ca-zoom, 1)), 30px)/1.05 var(--display); letter-spacing: .16em; text-transform: uppercase; overflow-wrap: anywhere; }
.kicker { font: 700 13px/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--copper); }
.hero-line { color: color-mix(in srgb, var(--ink) 82%, transparent); }
.hero-pic { margin: 0; border-bottom: 2px solid var(--ink); background: var(--sky); }
.hero-cargo { font-weight: 600; }
.hero-cargo .cargo-ico svg.ico { color: var(--copper); }
.tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--sun); color: var(--copper); }
dialog.sheet { border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .5); overflow: hidden; }
.sheet-h, .dock, .replay-tools { border-bottom-width: 2px; border-top-width: 2px; border-style: solid; }
.sheet-h { border-top: 0; border-bottom: 2px solid var(--ink); }
.radio-card { border: 2px solid var(--ink); border-radius: var(--radius); grid-template-columns: auto auto 1fr; }
.radio-card input { grid-row: 1 / 3; }
.radio-card .rc-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--sky); color: var(--ink); }
.radio-card:has(input:checked) { border-color: var(--copper); box-shadow: none; background: var(--tint); }
.radio-card .rc-t, .radio-card .rc-s { grid-column: 3; }

/* stars */
svg.ico.star { stroke-width: 1.4; }
svg.ico.star.on { fill: var(--sun); stroke: var(--ink); }

/* ---------------------------------------------------------------- home: the next level, the chapters */
.home .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* a child profile has no shared test (data-social, App Standard §4.13): Free build takes the last row */
html.ca-kid .home .actions #go-free { grid-column: 1 / -1; }
.big-btn { border-radius: 14px; }
.campaign { padding: 12px; display: grid; gap: 10px; }
.camp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.camp-sum { margin: 0; font-size: 14px; }
.chapters { display: grid; gap: 10px; }
.chapter { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: var(--paper); }
.chapter.locked { opacity: .55; }
.ch-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; background: var(--band, var(--sky)); color: var(--band-ink, var(--ink)); border-bottom: 2px solid var(--ink); }
.chapter[data-ch="0"], .chapter[data-ch="5"] { --band: var(--sky); }
.chapter[data-ch="1"], .chapter[data-ch="6"] { --band: var(--hill); --band-ink: #10221f; }
.chapter[data-ch="2"], .chapter[data-ch="7"] { --band: var(--sky2); }
.chapter[data-ch="3"], .chapter[data-ch="8"] { --band: var(--sun); --band-ink: #1d1410; }
.chapter[data-ch="4"] { --band: var(--hill2); --band-ink: #f3e6cc; }
.ch-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.ch-text { display: grid; min-width: 0; }
.ch-n { font: 700 11px/1.1 var(--serif); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ch-t { margin: 0; font: 800 15px/1.15 var(--display); letter-spacing: .12em; text-transform: uppercase; overflow-wrap: anywhere; }
.ch-stars { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; }
.ch-stars svg.ico { width: 18px; height: 18px; }
.lv-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 8px; }
@media (min-width: 640px) { .lv-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.lv {
  position: relative; display: grid; place-items: center; align-content: center; gap: 2px; min-height: 52px; padding: 4px 2px;
  border: 2px solid var(--ink); border-radius: 9px; background: var(--paper); color: var(--ink); cursor: pointer;
  font: 800 16px/1 var(--display);
}
.lv:hover:not(:disabled) { background: var(--tint); }
.lv.done { background: color-mix(in srgb, var(--sky) 70%, var(--paper)); }
.lv.next { border-color: var(--copper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 45%, transparent); }
.lv:disabled { cursor: default; opacity: .5; border-style: dashed; }
.lv-stars { display: flex; gap: 0; }
.lv-stars svg.ico { width: 13px; height: 13px; }
.lv .lv-lock { width: 16px; height: 16px; }
.day-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.day-meta { margin: 0; font-size: 13px; }
.day-best { margin: 6px 0 0; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.home { overflow-y: auto; overscroll-behavior: contain; }
.home > .friends { flex: none; min-height: 0; }
.friends { padding: 12px; }
.friends-list { max-height: 260px; }

/* ---------------------------------------------------------------- the drawing board: a blueprint */
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .bar,
body[data-screen="work"] .palette, body[data-screen="work"] .dock, body[data-screen="work"] .work .info, body[data-screen="work"] .work .pre {
  background: var(--bp-bg); color: var(--bp-line); border-color: var(--bp-aux);
}
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .bar { border-bottom: 1px solid var(--bp-aux); }
body[data-screen="work"] .dock .btn, body[data-screen="work"] .dock .icon-btn, body[data-screen="work"] .view-tools .icon-btn,
body[data-screen="work"] .work .info .btn, body[data-screen="work"] .work .pre .btn, body[data-screen="work"] .pal-fold, body[data-screen="work"] .work .info .icon-btn {
  background: transparent; color: var(--bp-line); border: 1px solid var(--bp-aux); border-radius: 6px;
}
body[data-screen="work"] .dock .btn.primary, body[data-screen="work"] .work .pre .btn.primary { background: var(--bp-hi); color: #0d2a4e; border-color: var(--bp-hi); }
body[data-screen="work"] .dock .btn:hover, body[data-screen="work"] .dock .icon-btn:hover:not(:disabled), body[data-screen="work"] .view-tools .icon-btn:hover { background: rgba(159, 211, 255, .14); }
body[data-screen="work"] .dock .tool-del.on { background: var(--bp-hi); color: #0d2a4e; }
body[data-screen="work"] .view-tools .icon-btn { background: var(--bp-bg); }
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .work-title .ribbon { background: var(--bp-hi); color: #0d2a4e; font-family: var(--mono); letter-spacing: .08em; }
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .work-name { font-family: var(--mono); font-size: 14px; }
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .meter .m-k { font-family: var(--mono); font-weight: 600; letter-spacing: .06em; }
body[data-screen="work"]:is([data-view="edit"], [data-view="pre"]) .meter.over { color: var(--bp-hi); }
.board { background: var(--bp-bg); }
.tool { color: var(--bp-line); border-radius: 6px; }
.tool.on { background: transparent; color: var(--bp-hi); box-shadow: inset 0 0 0 1.5px var(--bp-hi); }
.tool:hover:not(.on) { background: rgba(159, 211, 255, .14); background-image: none; }
.tool.deck::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--bp-hi); }
.palette.open .tool .tool-t { font: 600 14px/1.15 var(--mono); }
.palette.open .tool .tool-p { font: 12px/1.2 var(--mono); color: var(--bp-aux); }
.tut, .msg { background: var(--bp-bg); color: var(--bp-line); border: 1px solid var(--bp-hi); border-radius: 8px; box-shadow: none; }
.tut-step { color: var(--bp-hi); }
.tut .btn { background: transparent; color: var(--bp-line); border: 1px solid var(--bp-aux); border-radius: 6px; }
.work .info .info-list dt, .work .pre .pre-note { color: var(--bp-aux); }
.work .info .info-list dd, .work .pre .checks { font-family: var(--mono); }
.work .pre .check.warn, .work .pre .check.bad, .work .pre .pre-block { color: var(--bp-hi); }
.work .info .side-h .card-h, .work .pre .side-h .card-h { font-family: var(--mono); letter-spacing: .1em; }

/* ---------------------------------------------------------------- the test: back to the poster */
.phase .ribbon { background: var(--ink); color: var(--paper); font-size: 14px; }
.phase-time { font: 700 13px/1.2 var(--mono); color: var(--ink); text-shadow: 0 0 6px var(--paper); }
.test-tools .btn, .replay-tools .btn, .replay-tools .icon-btn { background: var(--paper); }
.test-tools { bottom: calc(76px + var(--safe-b)); }

/* the result: the stars light one after the other */
.res-stars { display: flex; justify-content: center; gap: 10px; margin: 2px 0 10px; }
.res-stars .rs svg.ico { width: 46px; height: 46px; stroke-width: 1.3; color: var(--ink); }
.res-stars .rs.on svg.ico { fill: var(--sun); animation: star-in .5s var(--ease) var(--d, 0ms) both; }
@keyframes star-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.18); } to { transform: none; opacity: 1; } }
.calm .res-stars .rs.on svg.ico { animation: none; }
.goal.ok svg.ico { color: var(--copper); }
.goal svg.ico.star { color: var(--ink); }
.goal svg.ico.star.on { fill: var(--sun); }
.goal.no { color: color-mix(in srgb, var(--ink) 70%, transparent); }

/* the rules */
.fam-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.fam-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.help-sec .fig { border-radius: 10px; border: 2px solid var(--ink); }

/* the home screen's arrangement: the next level and the buttons, the chapters, the day's friends */
.home > .friends { flex: none; }
@media (max-width: 559px) {
  .kicker { display: block; }
  .home .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big-btn.primary { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; text-align: left; min-height: 60px; padding: 8px 14px; }
  .big-btn.primary .b-ico { grid-row: 1 / 3; }
  .big-btn.primary .b-s { display: block; }
  .big-btn.primary .b-t { font-size: 15px; }
}
@media (min-width: 900px) {
  .home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1.05fr); grid-template-rows: auto auto minmax(0, 1fr); align-content: start; column-gap: 18px; row-gap: 12px; }
  .home .hero { grid-column: 1; grid-row: 1; }
  .home .actions { grid-column: 1; grid-row: 2; align-self: start; }
  .home .friends { grid-column: 1; grid-row: 3; align-self: start; }
  .home .campaign { grid-column: 2; grid-row: 1 / 4; align-self: start; }
  .home .gauges { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) {
  /* rows as tall as what they hold: auto rows in the page's own height squeezed the poster card to a
     sliver (a phone on its side) or let the buttons slide under it (960 × 540); the long level list
     only adds to the last row */
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: max-content max-content minmax(0, 1fr); align-content: start; }
  .home .hero { grid-column: 1; grid-row: 1; }
  .home .actions { grid-column: 1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .friends { grid-column: 1; grid-row: 3; }
  .home .campaign { grid-column: 2; grid-row: 1 / 4; align-self: start; }
  .hero-cargo, .kicker { display: block; }
}
/* the palette: only the level's tools, centred; with a few of them their names show too (phone) */
@media (max-width: 719px) and (min-height: 501px) {
  .palette:not(.open) .tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .palette:not(.open) .tools.few { flex-wrap: nowrap; }
  .palette:not(.open) .tools.few .tool { flex: 1 1 0; width: auto; min-width: 0; max-width: 96px; padding: 4px 3px; grid-template-rows: auto auto; gap: 2px; }
  .palette:not(.open) .tools.few .tool .tool-t { display: block; font: 600 10.5px/1.1 var(--mono); letter-spacing: 0; text-align: center; overflow-wrap: anywhere; }
}
@media (max-width: 559px) {
  .home .actions #go-daily { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; text-align: left; min-height: 56px; padding: 8px 14px; }
  .home .actions #go-daily .b-ico { grid-row: 1 / 3; }
  .home .actions #go-daily .b-s { display: block; }
}
/* level tiles at least 44 px wide, as many in a row as the column holds */
.lv-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
/* the test, the replay and the result: the poster takes the palette's column too */
body:is([data-view="test"], [data-view="replay"], [data-view="result"]) .work .board { grid-column: 1 / -1; }

/* the magnet switch on the board: lit while the ends snap to joints */
.view-tools .icon-btn.mag.on { background: var(--ink); color: var(--paper); }

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