/* v109 — self-hosted fonts (SIL OFL, latin subset). Licenses: public/fonts/OFL-*.txt */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/barlow-condensed-800.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/courier-prime-400.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/courier-prime-700.woff2") format("woff2"); }

:root {
  /* Theme tokens — E1 red/cream. To switch palette later, edit values here only. */
  --bg: #f3ead6;
  --card: #fffaf2;
  --surface: #e8dfc9;
  --board: #e3d9c2;
  --canvas: #e8dfc9;
  --ink: #26221e;
  --muted: #5f574d;
  --brand: #c8352b;
  --brand-strong: #a52a22;
  --spot: #c8352b;
  --on-brand: #fffaf2;
  --black: #171412;
  --wash: rgba(255, 250, 242, .5);
  --line: rgba(38, 34, 30, .18);
  --line-strong: rgba(38, 34, 30, .42);
  --grid: rgba(38, 34, 30, .09);
  --overlay: rgba(38, 34, 30, .72);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", Arial, sans-serif;
  --font-mono: "Courier Prime", "Courier New", monospace;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(38, 34, 30, .06);
  --shadow-2: 0 8px 24px rgba(38, 34, 30, .08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--font-body); font-size: 16px; font-weight: 400; line-height: 1.6; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: #a84826; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.site-header { background: var(--bg); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand, h1.brand, h1.brand a { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--ink); text-decoration: none; margin: 0; }
.nav { display: flex; flex-wrap: wrap; gap: 16px; }
.nav a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.nav a:hover { color: var(--brand); }
main { padding-bottom: 32px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: 36px; margin: 16px 0; }
h2 { font-size: 28px; margin: 0 0 12px; }
h3 { font-size: 22px; margin: 0 0 12px; }
.stage { position: relative; width: 100%; height: 560px; height: calc(100svh - 136px); min-height: 480px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.btn { appearance: none; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); min-height: 44px; padding: 10px 18px; font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.btn:hover { background: #a84826; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.secondary:hover { background: var(--card); }
[data-sg-like][data-sg-liked], [data-sg-like][aria-pressed="true"] { background: var(--brand); color: #fff; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.lead, .phone { font-size: 16px; max-width: 70ch; margin: 16px 0 0; }
.phone { color: var(--muted); }
.block { padding: 32px 0; }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 8px 0; }
.band, .split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 24px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.prose { max-width: 70ch; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 8px 0; }
.qa summary { font-weight: 600; cursor: pointer; }
.qa p { margin: 8px 0 0; }
.invite { display: none; margin: 0 0 16px; }
[data-sg-comments][data-sg-empty] .invite { display: block; }
.comment { border-top: 1px solid var(--line); padding: 12px 0; }
.comment .who { margin: 0 0 8px; }
.comment .meta, .comment-count { color: var(--muted); font-size: 14px; }
[data-sg-owner] { background: var(--card); border-radius: var(--radius); padding: 12px; }
[data-sg-c-owner] { color: var(--brand); font-size: 12px; font-weight: 600; }
.text-btn { background: none; border: 0; color: var(--brand); font: 600 14px/1.2 var(--font-body); cursor: pointer; min-height: 44px; }
.comment-form { display: grid; gap: 12px; max-width: 70ch; }
label { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
input, textarea { width: 100%; font: 400 16px/1.6 var(--font-body); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
textarea { min-height: 96px; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer p { color: var(--muted); font-size: 14px; }
.site-footer .credits { flex: 1 0 100%; margin: 4px 0 12px; font-size: 13px; line-height: 1.45; }
.site-footer .credits a { color: inherit; }
html:has(body.bare) { height: 100%; }
body.bare { background: var(--card); height: 100%; overflow: hidden; }
body.bare .sg { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; overflow: hidden; }
.status, .names { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.round-label, .names p, .kicker { margin: 0; font-size: 14px; color: var(--muted); }
.names p { width: 50%; text-align: center; }
.board { flex: 1 1 auto; min-height: 160px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 2px solid var(--ink); overflow: hidden; }
.slot { min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.slot.live { cursor: ns-resize; touch-action: none; }
.board svg { max-width: none; display: block; }
.ref-shape .body { fill: var(--ink); }
.tgt-shape .body { fill: var(--brand); }
.ref-shape .line { stroke: var(--ink); }
.tgt-shape .line { stroke: var(--brand); }
.mark { fill: var(--card); stroke: var(--card); stroke-width: 4; }
.slider-label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--brand); height: 28px; }
#sg-readout, #sg-result, #sg-board, #sg-msg { margin: 0; font-size: 14px; }
.total { font-family: var(--font-display); font-size: 28px; line-height: 1.2; margin: 0; }
body.bare .actions { margin: 0; }
body.bare .btn { min-height: 44px; }
@media (min-width: 641px) { .wrap { padding: 0 24px; } .block { padding: 40px 0; } }
@media (max-width: 640px) { h1 { font-size: 32px; } h1.brand, h1.brand a { font-size: 22px; } .stage { height: 70vh; min-height: 420px; } .band, .split { grid-template-columns: 1fr; } .btn { width: 100%; } .actions .btn, }
@media (prefers-reduced-motion: reduce) { }

.ask { margin: 0; text-align: center; font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
.board { position: relative; display: flex; flex-direction: column; border-bottom: 0; }
.canvas { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 28px; overflow: hidden; border-bottom: 2px solid var(--ink); cursor: ew-resize; touch-action: none; }
.piece { position: relative; flex: none; }
.piece svg { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); max-width: none; }
.truth-shape .body { fill: none; stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.truth-shape .mark, .truth-shape .line { display: none; }
.bar { display: block; height: 2px; background: var(--ink); }
.zoom { position: absolute; right: 8px; top: 8px; display: flex; gap: 0; }
.zoom button { appearance: none; width: 36px; height: 36px; border: 2px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 18px/1 var(--font-body); cursor: pointer; }

.canvas { display: block; position: relative; }
.piece { position: absolute; bottom: 22px; left: 0; }
.piece svg { left: 0; bottom: 0; transform: none; }
.names { position: relative; min-height: 22px; }
.names p { width: auto; text-align: left; }
.ruler { position: relative; height: 18px; border-top: 2px solid var(--ink); }
.ruler .tick {
  position: absolute;
  top: 1px;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
  white-space: nowrap;
}

.piece { bottom: 50px; }
.names { display: none; }
.chip {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 16px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
}
.callout {
  position: absolute;
  z-index: 3;
  margin: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fffaf2;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}
.ruler-svg { display: block; width: 100%; height: 46px; max-width: none; }
svg.truth-shape { display: none !important; }

.stage {
  height: calc(100svh - 210px);
}
@media (max-width: 640px) {
  .stage {
    height: calc(100svh - 196px);
    min-height: 420px;
  }
}
.canvas {
  background-color: transparent;
  background-image:
    linear-gradient(to right, rgba(43, 33, 24, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 33, 24, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: left bottom;
}
#sg-result:empty { display: none; }
#sg-result:not(:empty) {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.ask { margin-top: auto; }
.board { flex: 0 1 auto; min-height: 0; }
.canvas {
  height: clamp(240px, 34vh, 420px);
  flex: none;
}

.ask { margin-top: 0; }
.board { flex: 1 1 auto; min-height: 160px; }
.canvas {
  height: auto;
  flex: 1 1 auto;
  min-height: 180px;
}

.stage {
  height: calc(100svh - 76px);
  min-height: 640px;
}
@media (max-width: 640px) {
  .stage {
    height: calc(100svh - 64px);
    min-height: 520px;
  }
}

.stage {
  height: calc(100svh - 124px);
}
@media (max-width: 640px) {
  .stage { height: calc(100svh - 112px); }
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.play-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px;
}
.play-pic {
  height: 112px;
  margin-bottom: 10px;
  border-radius: 8px;
  background-color: #f4efe6;
  background-image:
    linear-gradient(to right, rgba(43, 33, 24, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 33, 24, 0.055) 1px, transparent 1px);
  background-size: 16px 16px;
}
.play-pic svg, .figure-grid svg, .door-note svg { display: block; width: 100%; height: 100%; }
.play-card p { margin: 0; }
.play-card b {
  font-family: var(--font-display);
  color: var(--brand);
  margin-right: 4px;
}
.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: center;
}
.score-row p { margin: 0; }
.score-scale {
  display: flex;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.score-band, .score-drop, .score-floor {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
}
.score-band { background: #7f341b; color: #ffffff; min-width: 108px; }
.score-drop { flex: 1; background: var(--card); }
.score-floor { background: var(--ink); color: #fffaf2; min-width: 52px; }
.score-scale span { font-family: var(--font-display); font-size: 28px; line-height: 1; }
.score-scale small { font-size: 13px; font-weight: 600; }
.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.figure-grid figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
}
.figure-grid svg { height: 72px; }
.figure-grid figcaption { font-size: 14px; }
.figure-grid b, .figure-grid small { display: block; }
.figure-grid b { font-family: var(--font-display); font-size: 18px; line-height: 1.2; }
.figure-grid small { color: var(--muted); font-size: 13px; }
.door-note {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.door-note svg { height: 120px; }
.door-note .prose p:last-child { margin-bottom: 0; }
@media (min-width: 700px) {
  .figure-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .figure-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .play-grid, .score-row, .door-note { grid-template-columns: 1fr; }
}

.prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px 10px; vertical-align: top; }
.prose th { font-size: 14px; }
.prose details { margin: 12px 0 16px; }
.prose details summary { cursor: pointer; font-weight: 600; }
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; }
}

/* Palette tokens now live in the single :root block at the top of this file. */
.stage,
body.bare {
  background: #2a231e;
}
.canvas {
  border-bottom-color: rgba(244, 239, 230, .22);
  background-image:
    linear-gradient(to right, rgba(244, 239, 230, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 239, 230, 0.07) 1px, transparent 1px);
}
.play-pic {
  background-color: #2a231e;
  background-image:
    linear-gradient(to right, rgba(244, 239, 230, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 239, 230, 0.07) 1px, transparent 1px);
}
.score-band { background: #b3502d; color: #ffffff; }
.score-drop { background: #28221d; color: #f4efe6; }
.score-floor { background: #f2ede4; color: #1c1714; }
.ref-shape .mark { fill: #2a231e; stroke: #2a231e; }
.tgt-shape .mark { fill: #f4efe6; stroke: #f4efe6; }
.callout { background: #f4efe6; color: #1c1714; }

.ruler-svg rect { fill: #2a231e; }
.ruler-svg line { stroke: #f4efe6; }
.ruler-svg text { fill: #b7a89a; }

.canvas { min-height: 420px; }
.stage { min-height: 740px; }
.zoom {
  right: 10px;
  top: 8px;
  flex-direction: column;
  gap: 0;
}
.zoom button { width: 44px; height: 44px; }
.zoom button + button { margin-top: -2px; }
@media (max-width: 640px) {
  .canvas { min-height: 300px; }
  .stage { min-height: 560px; }
  body.bare #sg-lock,
  body.bare #sg-next { width: 100%; }
}

body.bare { background: #1c1714; }
body.bare .sg { gap: 12px; background: transparent; }
.sg-board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #2a231e;
  border: 1px solid rgba(244, 239, 230, 0.22);
  border-radius: 16px;
  overflow: hidden;
}
.sg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #342c26;
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
}
.sg-head .round-label { color: #b7a89a; font-size: 12px; font-weight: 600; }
.sg-ticks { display: flex; gap: 3px; }
.sg-ticks i { display: block; width: 7px; height: 12px; border-radius: 1px; background: #5c5148; }
.sg-ticks .is-now, .sg-ticks .is-full { background: #f4efe6; }
.sg-ticks .is-scored { background: #c2562f; }
.sg-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.sg-tool {
  appearance: none;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 2px solid rgba(244, 239, 230, 0.2);
  border-radius: 7px;
  background: transparent;
  color: #f4efe6;
  font: 600 12px/26px var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.sg-score {
  margin: 0 0 0 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(244, 239, 230, 0.2);
  color: #f4efe6;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.sg-board .ask { margin: 0; padding: 16px 16px 12px; font-size: 26px; }
.sg-board .board { flex: 1 1 auto; min-height: 0; margin: 0 12px; border-radius: 12px; overflow: hidden; background: #14110f; }
.sg-board .canvas {
  min-height: 240px;
  background-color: #14110f;
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.1);
}
.zoom button { background: #1c1714; color: #f4efe6; border-color: rgba(244, 239, 230, 0.2); }
.sg-foot { margin-top: 12px; padding: 12px 14px 14px; background: #241e1a; border-top: 1px solid rgba(244, 239, 230, 0.12); }
.sg-foot .actions { margin: 0; }
.stage { min-height: 860px; }
@media (max-width: 640px) {
  .sg-head { align-items: flex-start; flex-wrap: wrap; }
  .sg-board .ask { font-size: 20px; padding: 12px; }
  .sg-board .canvas { min-height: 200px; }
  .stage { min-height: 720px; }
}

html, body { background: #1c1714; color: #f4efe6; }
html:has(body.bare) { height: auto; min-height: 100%; }
body.bare { height: auto; min-height: 100%; overflow: auto; background: #1c1714; }
body.bare .sg { height: auto; min-height: 100%; overflow: visible; }
.sg-board { flex: none; overflow: visible; }
.sg-board .board {
  flex: none;
  height: 320px;
  min-height: 320px;
  overflow: hidden;
}
.sg-board .canvas { height: 100%; min-height: 0; }
@media (max-width: 640px) {
  .sg-board .board { height: 280px; min-height: 280px; }
  .stage { height: auto; min-height: 680px; }
  .stage iframe { height: 100%; }
}

.stage {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.site-header { border-bottom: 1px solid var(--line); }
.slider-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ruler-handle, .ruler-handle * { pointer-events: auto; cursor: grab; touch-action: none; }
.ruler-handle line { stroke: #c2562f; }
.ruler-handle path { stroke: #fffaf2; }
.ruler-handle circle { fill: #c2562f; }

.stage { height: 660px; min-height: 0; }
@media (max-width: 640px) {
  .stage { height: 620px; min-height: 0; }
}

.sg-board { overflow: hidden; border-radius: 16px; }
.sg-head { border-radius: 15px 15px 0 0; }
.sg-foot { border-radius: 0 0 15px 15px; }
.sg-board .board {
  height: 500px;
  min-height: 500px;
  border-radius: 12px;
  overflow: hidden;
}
.stage { height: 900px; min-height: 0; }
.sg-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
}
.sg-foot #sg-readout { grid-column: 1; grid-row: 1; margin: 0; }
.sg-foot #sg-result { grid-column: 1; grid-row: 2; margin: 0; }
.sg-foot .actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
}
.sg-foot #sg-end,
.sg-foot #sg-msg { grid-column: 1 / -1; }
.sg-foot #sg-lock,
.sg-foot #sg-next,
body.bare #sg-lock,
body.bare #sg-next { width: auto; }
@media (max-width: 640px) {
  .sg-board .board { height: 360px; min-height: 360px; }
  .stage { height: 780px; min-height: 0; }
}

.sg-foot #sg-readout { align-self: center; }
.sg-foot .actions { grid-row: 1; align-self: center; }
.stage { height: 800px; }
@media (max-width: 640px) {
  .stage { height: 680px; }
}

html:has(body.bare), body.bare { overflow: hidden; height: 100%; }
#sg-result { display: none !important; }
.sg-scorebox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 23, 20, 0.78);
}
.sg-scorecard {
  width: min(420px, 100%);
  max-height: 100%;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(244, 239, 230, 0.22);
  border-radius: 16px;
  background: #2a231e;
}
.sg-score-points {
  margin: 0;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  text-align: center;
  color: #f4efe6;
}
.sg-score-line {
  margin: 6px 0 12px;
  text-align: center;
  color: #f4efe6;
  font-weight: 600;
}
.sg-score-shot {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #14110f;
}
.sg-score-shot .canvas {
  position: absolute;
  left: 0;
  top: 0;
  min-height: 0;
  pointer-events: none;
}
.sg-score-actions { display: grid; gap: 8px; margin-bottom: 8px; }
.sg-scorecard .btn { width: 100%; }
.sg-scorecard .btn.secondary {
  background: transparent;
  color: #f4efe6;
  border: 1px solid rgba(244, 239, 230, 0.28);
}
.sg-scorecard #sg-end { margin-top: 12px; }
.sg-scorecard .total { text-align: center; }

body.bare .sg-scorecard .btn { width: 100%; }

body.bare .sg-scorecard #sg-next { width: 100%; }

.sg-scorecard { width: min(760px, calc(100vw - 32px)); padding: 20px 20px 16px; }
.sg-score-kicker { margin: 0 0 4px; color: #b7a89a; font-size: 13px; font-weight: 600; }
.sg-score-points { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px; margin: 0; font-size: 72px; text-align: left; }
.sg-score-of { font-family: var(--font-body); font-size: 28px; font-weight: 600; color: #b7a89a; }
.sg-score-line { margin: 6px 0 16px; text-align: left; font-weight: 400; color: #f4efe6; }
.sg-score-split { display: grid; grid-template-columns: minmax(0, 300px) minmax(220px, 1fr); gap: 16px; align-items: stretch; }
.sg-score-shot {
  height: 260px;
  margin: 0;
  background-color: #14110f;
  background-image:
    linear-gradient(to right, rgba(244, 239, 230, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 239, 230, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.sg-shot-stage { position: absolute; inset: 0; overflow: hidden; }
.sg-shot-canvas { position: absolute; min-height: 0 !important; background: transparent !important; pointer-events: none; }
.sg-shot-canvas .chip, .sg-shot-canvas .callout { display: none !important; }
.sg-score-side { display: flex; flex-direction: column; justify-content: center; }
.sg-score-invite { margin: 0 0 12px; font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.sg-score-actions { margin: 0; }
#sg-challenge { background: #c2562f; color: #fff; border: 0; }
#sg-share-result { background: #14110f; color: #f4efe6; border: 0; }
#sg-save-image { background: transparent; color: #f4efe6; border: 1px solid rgba(244, 239, 230, 0.45); }
body.bare .sg-scorecard #sg-next { width: 100%; margin-top: 16px; background: #14110f; color: #f4efe6; }
@media (max-width: 720px) {
  .sg-score-split { grid-template-columns: 1fr; }
  .sg-score-shot { height: 180px; }
  .sg-score-points { font-size: 48px; }
  .sg-score-invite { font-size: 22px; }
}

.piece svg { overflow: visible; }
.piece svg.ref-shape,
.piece svg.tgt-shape {
  filter: drop-shadow(2px 3px 1.5px rgba(0, 0, 0, 0.55));
}
.piece svg.truth-shape { filter: none; }
.truth-shape .body {
  fill: none;
  stroke: #f4efe6;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
svg.truth-shape .body { fill: none; stroke: #f4efe6; stroke-width: 2px; vector-effect: non-scaling-stroke; }

.piece svg.ref-shape,
.piece svg.tgt-shape {
  filter: drop-shadow(1px 1px 0 rgba(244, 239, 230, 0.14));
}

.sg-log {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 0;
}
.sg-log li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
  color: #f4efe6;
  font-size: 14px;
}
.sg-log b {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  min-width: 2ch;
  text-align: right;
}
.sg-log-note { color: #b7a89a; white-space: nowrap; }
.sg-scorecard.is-sheet {
  overflow: auto;
  max-height: calc(100vh - 32px);
}
.sg-scorecard.is-sheet .sg-score-split { grid-template-columns: 1fr; }

#sg.is-done { height: 100%; min-height: 0; overflow: hidden; }
#sg.is-done .sg-board { display: none; }
#sg.is-done .sg-scorebox {
  position: static;
  inset: auto;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: transparent;
  overflow: auto;
}
#sg.is-done .sg-scorecard {
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 28px 32px 22px;
  border-radius: 16px;
  background: #2a231e;
  box-shadow: none;
}
#sg.is-done .sg-score-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}
#sg.is-done .sg-score-points { font-size: 96px; }
#sg.is-done .sg-score-line {
  max-width: 36em;
  margin: 10px 0 22px;
  padding-top: 14px;
  border-top: 3px solid #c2562f;
}
#sg.is-done .sg-log { margin-bottom: 22px; }
#sg.is-done .sg-log li { padding: 13px 0; font-size: 16px; }
#sg.is-done .sg-log b { font-size: 24px; }
#sg.is-done .sg-score-invite { font-size: 32px; max-width: 16ch; }
#sg.is-done .sg-score-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 640px;
}
#sg.is-done #sg-end {
  max-width: 640px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
#sg.is-done #sg-savebox label { color: #b7a89a; font-weight: 400; }
@media (max-width: 720px) {
  #sg.is-done .sg-scorecard { padding: 20px 16px 16px; }
  #sg.is-done .sg-score-points { font-size: 64px; }
  #sg.is-done .sg-score-invite { font-size: 26px; }
  #sg.is-done .sg-score-actions { grid-template-columns: 1fr; }
  #sg.is-done .sg-log li { font-size: 14px; gap: 8px; }
  #sg.is-done .sg-log b { font-size: 20px; }
}

#sg.is-done .sg-scorecard {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#sg.is-done .sg-score-kicker,
#sg.is-done .sg-score-points,
#sg.is-done .sg-score-line,
#sg.is-done .sg-log,
#sg.is-done .sg-score-split,
#sg.is-done #sg-end {
  width: min(760px, 100%);
}
#sg.is-done .sg-score-line { max-width: none; }
#sg.is-done .sg-score-actions,
#sg.is-done #sg-end { max-width: none; }

#sg.is-done .sg-scorecard { min-height: 100%; padding: 20px 28px 14px; }
#sg.is-done .sg-score-points { font-size: 80px; }
#sg.is-done .sg-score-line { margin: 8px 0 12px; padding-top: 10px; }
#sg.is-done .sg-log { margin-bottom: 14px; }
#sg.is-done .sg-log li { padding: 8px 0; }
#sg.is-done .sg-score-invite { font-size: 28px; }
#sg.is-done #sg-end { margin-top: 14px; padding-top: 12px; }

#sg.is-done { height: auto; min-height: 0; overflow: visible; }
#sg.is-done .sg-scorebox {
  flex: none;
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}
#sg.is-done .sg-scorecard {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  column-gap: 28px;
  row-gap: 0;
  align-items: start;
  width: min(840px, 100%);
  min-height: 0;
  overflow: visible;
  padding: 22px 28px 18px;
}
#sg.is-done .sg-score-shot {
  grid-column: 1;
  grid-row: 1 / span 4;
  height: 300px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #14110f;
}
#sg.is-done .sg-poster { display: block; width: 100%; height: 100%; }
#sg.is-done .sg-score-kicker { grid-column: 2; grid-row: 1; width: auto; margin-top: 4px; }
#sg.is-done .sg-score-points { grid-column: 2; grid-row: 2; width: auto; font-size: 64px; }
#sg.is-done .sg-score-line {
  grid-column: 2;
  grid-row: 3;
  width: auto;
  max-width: none;
  margin: 6px 0 14px;
  padding-top: 10px;
}
#sg.is-done .sg-score-split { grid-column: 2; grid-row: 4; display: block; width: auto; }
#sg.is-done .sg-score-invite { font-size: 22px; max-width: none; margin: 0 0 12px; }
#sg.is-done .sg-log,
#sg.is-done #sg-end { grid-column: 1 / -1; width: auto; max-width: none; }
#sg.is-done .sg-log { margin: 20px 0 0; }
#sg.is-done #sg-savebox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
#sg.is-done #sg-save { width: auto; min-width: 196px; }
@media (max-width: 720px) {
  #sg.is-done .sg-scorecard { grid-template-columns: 1fr; width: 100%; padding: 16px; }
  #sg.is-done .sg-score-shot { grid-row: auto; grid-column: 1; height: 220px; }
  #sg.is-done .sg-score-kicker,
  #sg.is-done .sg-score-points,
  #sg.is-done .sg-score-line,
  #sg.is-done .sg-score-split,
  #sg.is-done .sg-log,
  #sg.is-done #sg-end { grid-column: 1; grid-row: auto; }
  #sg.is-done .sg-score-points { font-size: 52px; }
  #sg.is-done #sg-savebox { grid-template-columns: 1fr; }
  #sg.is-done #sg-save { width: 100%; }
}

#sg.is-done .sg-scorecard {
  grid-template-columns: 280px minmax(0, 1fr);
  column-gap: 36px;
  width: min(920px, 100%);
  padding: 28px 32px 24px;
}
#sg.is-done .sg-score-shot {
  height: 350px;
  border-radius: 14px;
}
#sg.is-done .sg-score-points { font-size: 88px; }
#sg.is-done .sg-score-line { margin: 8px 0 18px; }
#sg.is-done .sg-score-actions { gap: 12px; }
#sg.is-done .sg-score-actions .btn { min-height: 52px; }
#sg.is-done .sg-log { margin-top: 28px; }
#sg.is-done .sg-log li { padding: 12px 0; }
#sg.is-done #sg-end { margin-top: 8px; padding-bottom: 4px; }
@media (max-width: 720px) {
  #sg.is-done .sg-scorecard { grid-template-columns: 1fr; }
  #sg.is-done .sg-score-shot { height: 280px; }
}
@media (max-width: 640px) {
  .sg-board .board {
    height: auto;
    min-height: 0;
    aspect-ratio: 2.028 / 1;
  }
  .canvas,
  .sg-board .canvas {
    height: 100%;
    min-height: 0;
  }
  .stage {
    height: calc(380px + (100vw - 88px) / 2.028);
    min-height: 0;
  }
  .sg-head {
    flex-wrap: nowrap;
    align-items: center;
  }
  .sg-board .ask {
    font-size: 22px;
    padding: 12px 16px 8px;
  }
}

@media (max-width: 640px) {
  .zoom {
    flex-direction: row;
    top: 8px;
    right: 8px;
    gap: 0;
  }
  .zoom button {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .zoom button + button { margin-top: 0; margin-left: -2px; }
}

@media (max-width: 640px) {
  .stage { height: 550px; min-height: 0; }
  .sg-board .board {
    height: 236px;
    min-height: 236px;
    aspect-ratio: auto;
  }
  .sg-board .canvas {
    height: 100%;
    min-height: 0;
  }
}

/* A-round: widen grid, tighten gridlines, match reference board proportion. Shapes keep the engine default 24% ratio (no enlargement). */
@media (max-width: 640px) {
  body.bare .sg { padding: 10px 8px 12px; }
  .sg-board .board {
    margin: 0 4px;
    height: 270px;
    min-height: 270px;
  }
  .sg-board .canvas,
  .canvas { background-size: 18px 18px; }
  .stage { height: 590px; }
  .sg-foot { grid-template-columns: minmax(0, 1fr); }
  .sg-foot #sg-readout,
  .sg-foot #sg-result,
  .sg-foot .actions { grid-column: 1; grid-row: auto; }
  .sg-foot .actions { margin-top: 4px; }
  .sg-foot .actions .btn { width: 100%; }
}

@media (max-width: 640px) {
  body.bare .sg-foot #sg-lock,
  body.bare .sg-foot #sg-next { width: 100%; }
}

/* Fit shapes to ruler on phone: drop the 50px float gap left over from the overlaid-ruler layout. */
@media (max-width: 640px) {
  .piece { bottom: 4px; }
}

/* Center the live-size callout over its shape (script now sets left to shape center). */
.callout { transform: translateX(-50%); }

/* Relative sizing so phone/UI proportions stay close to desktop, with readable floors. */
@media (max-width: 640px) {
  .chip, .callout { font-size: clamp(11px, 3.2vw, 13px); padding: 5px 8px; }
  #sg-readout { font-size: clamp(11px, 3vw, 14px); }
  .zoom button { width: clamp(28px, 8vw, 36px); height: clamp(28px, 8vw, 36px); font-size: clamp(14px, 4vw, 16px); }
}

/* Ruler: full-length tap/drag + shape +/- buttons + drag hint. Phone only, desktop keeps original layout. */
.ruler-row { display: contents; }
@media (max-width: 640px) {
  .board { position: relative; }
  .ruler-row { display: flex; align-items: stretch; flex: 0 0 46px; }
  .ruler-svg { pointer-events: auto; }
}

/* v27: light shape buttons, magnifier zoom icons, arrow hint, reliable touch drag. */
.zoom button { display: flex; align-items: center; justify-content: center; padding: 0; }
@media (max-width: 640px) {
  .ruler-svg { touch-action: none; }
}

/* v28: ruler row sits on board colour; outline-only shape buttons; drag arrow pinned to the live shape. */
@media (max-width: 640px) {
}
.drag-tag {
  position: absolute;
  z-index: 4;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244,239,230,0.55);
  border-radius: 4px;
  background: rgba(244,239,230,0.92);
  color: #2b2118;
  pointer-events: none;
}
.drag-tag svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .drag-tag { display: flex; }
}

/* P0: one ruler architecture for both viewports. Zero mark follows the live shape's left edge. */
.sg-board { --ruler-h: 46px; --cap-w: 38px; --cap-h: 40px; }
.board { position: relative; display: flex; flex-direction: column; }
.canvas { flex: 1 1 auto; height: auto; min-height: clamp(180px, 26vh, 420px); }
.piece { bottom: 4px; }
.ruler-row { display: block; flex: 0 0 var(--ruler-h); height: var(--ruler-h); }
.ruler { position: relative; width: 100%; height: 100%; }
.ruler-track { position: absolute; inset: 0; touch-action: none; cursor: ew-resize; }
.ruler-track::before { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 1.5px; background: rgba(244,239,230,0.28); }
.ruler-ticks { position: absolute; inset: 0; pointer-events: none; }
.ruler-ticks .tick { position: absolute; top: 1px; width: 1px; height: 8px; background: rgba(244,239,230,0.55); }
.ruler-ticks .tick.major { width: 2px; height: 14px; background: #f4efe6; }
.ruler-ticks .tick b { position: absolute; left: 1px; top: 15px; transform: translateX(-50%); font: 400 12px/1.2 var(--font-body); color: #b7a89a; white-space: nowrap; }
.ruler-thumb { position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--brand); pointer-events: none; }
.ruler-thumb::after { content: ""; position: absolute; left: -5px; top: 20px; width: 13px; height: 13px; border-radius: 50%; background: var(--brand); }
.ruler-cap { position: absolute; top: 3px; left: 6px; z-index: 2; display: flex; align-items: center; justify-content: center; width: var(--cap-w); height: var(--cap-h); padding: 0; border: 1px solid rgba(244,239,230,0.5); border-radius: 4px; background: transparent; color: #f4efe6; cursor: pointer; }
.ruler-cap-right { left: calc(6px + var(--cap-w) - 2px); }
.ruler-cap svg { width: 20px; height: 20px; }
.ruler-unit { position: absolute; right: 6px; bottom: 2px; font: 400 12px/1.2 var(--font-body); color: #b7a89a; pointer-events: none; }
.ruler-mark { position: absolute; left: 0; top: 0; width: 2px; height: 20px; background: var(--brand); pointer-events: none; }
.ruler-mark span { position: absolute; left: 0; top: 20px; font: 600 11px/1.2 var(--font-body); color: #f4efe6; white-space: nowrap; }

/* v30: 28px outline caps, one ruler line, fixed zero anchor. */
.sg-board { --cap-w: 28px; --cap-h: 28px; --cap-gap: 4px; }
.ruler-cap { top: 9px; width: var(--cap-w); height: var(--cap-h); }
.ruler-cap-right { left: calc(6px + var(--cap-w) - 2px); }
.ruler-cap svg { width: 16px; height: 16px; }
.canvas { border-bottom: 0; }
.ruler-track::before { content: none; }

/* C: tick labels carry their own unit; drop the separate corner unit. */
.ruler-unit { display: none; }

/* v32: top-left info card, capsule thumb, diagonal drag tag, readout space into grid. */
.chip { display: flex; flex-direction: column; gap: 3px; padding: 6px 9px; border-radius: 8px; font-size: 12px; line-height: 1.2; }
.ruler-thumb::after { content: "↔"; display: flex; align-items: center; justify-content: center; left: -13px; top: 13px; width: 28px; height: 20px; border-radius: 999px; border: 1px solid rgba(244,239,230,0.6); background: #b04d28; color: #ffffff; font: 700 12px/1 var(--font-body); box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.drag-tag { display: flex !important; }
#sg-readout { display: none !important; }
.sg-board .board { height: 524px; min-height: 524px; }
@media (min-width: 641px) { .sg-board .ask { padding: 2px 16px; } }
@media (max-width: 640px) { .chip { font-size: clamp(11px, 3vw, 12px); } .stage { height: calc(590px - 26px); } .sg-board .board { height: 296px; min-height: 296px; } }

/* v32 accessibility polish: keep card text >=12px and thumb arrow at >=4.5:1. */
.ruler-thumb::after { background: #b04d28; color: #ffffff; }

/* v33: one score sheet for both viewports — scrollable card, sticky next, container-driven columns. */
.sg-scorecard { max-height: 100%; overflow: auto; overscroll-behavior: contain; container-type: inline-size; }
#sg-next { position: sticky; bottom: 0; z-index: 2; }
@container (max-width: 520px) { .sg-score-split { grid-template-columns: 1fr; } }

.sg-inline { margin-top:10px; padding:12px 14px; background:#241e1a; border:1px solid rgba(244,239,230,.12); border-radius:12px; color:#f4efe6; }
.sg-inline-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:0 0 4px; }
.sg-inline-head b { font-family:var(--font-display); font-size:24px; line-height:1; }
.sg-inline-head span { padding:3px 8px; border:1px solid rgba(244,239,230,.28); border-radius:999px; font-size:13px; }
.sg-inline-line { margin:0 0 8px; font-size:13px; line-height:1.5; color:#f4efe6; }
.sg-inline-actions { display:flex; gap:8px; }
.sg-inline-actions .btn { flex:1; min-height:36px; padding:6px 10px; font-size:13px; }
.sg-inline-actions .btn.secondary { background:transparent; color:#f4efe6; border:1px solid rgba(244,239,230,.28); }

@media (max-width:640px) {
}

/* v36: result sheet aligned to sizeitup.games (two columns, red/black/white buttons, left score) */
@media (max-width:640px) {
}

/* v37: one-line result buttons + poster-style round thumbnail */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.sg-shot-poster{position:absolute;inset:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;color:#2b2118;background-color:#e0a03a;background-image:linear-gradient(to right,rgba(43,33,24,.16) 1px,transparent 1px),linear-gradient(to bottom,rgba(43,33,24,.16) 1px,transparent 1px);background-size:12px 12px;box-shadow:inset 0 0 0 3px rgba(43,33,24,.12);font-family:var(--font-body)}
.sg-shot-poster-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 7px;border-bottom:1px solid rgba(43,33,24,.45);background:rgba(255,250,242,.42);font-size:.5em;font-weight:700;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;overflow:hidden}
.sg-shot-poster-head b{font-size:1.125em}
.sg-shot-poster-head span{overflow:hidden;text-overflow:ellipsis}
.sg-shot-poster-main{position:relative;min-height:0;overflow:hidden}
.sg-shot-poster-score{position:absolute;left:7px;top:3px;z-index:3;margin:0;font-family:var(--font-display);font-size:26px;line-height:1;font-weight:800;color:#b3121f;text-shadow:0 1px 0 rgba(255,250,242,.5)}
.sg-shot-poster-score span{font-family:var(--font-body);font-size:.346em;font-weight:700;color:#6b5b4b;margin-left:3px}
.sg-shot-poster-line{position:absolute;left:7px;right:7px;top:31px;z-index:3;margin:0;font-size:.5em;font-weight:700;line-height:1.2;color:#6b5b4b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-shot-poster-figure{position:absolute;left:6px;right:6px;top:40px;bottom:11px;border:1px solid rgba(43,33,24,.36);overflow:hidden}
.sg-shot-poster-baseline{position:absolute;left:7px;right:7px;bottom:7px;height:2px;background:#2b2118;z-index:2}
.sg-shot-poster-foot{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:3px 7px 4px;border-top:1px solid rgba(43,33,24,.45);background:rgba(255,250,242,.42);font-size:.4375em;font-weight:700;white-space:nowrap;overflow:hidden}
.sg-shot-poster-foot span{overflow:hidden;text-overflow:ellipsis}
.sg-shot-poster-foot b{font-size:1em}
.sg-shot-poster .chip,.sg-shot-poster .callout,.sg-shot-poster .drag-tag{display:none!important}
.sg-shot-poster .piece{filter:drop-shadow(0 1px 0 rgba(43,33,24,.18))}
/* 双栏并置海报：参考物与测量物各占一栏、底部同基线、四周留白。 */
.sg-shot-stage.sg-shot-duo{display:flex;align-items:flex-end;justify-content:center;box-sizing:border-box}
.sg-shot-duo-col{flex:1 1 0;min-width:0;height:100%;display:flex;flex-direction:column;align-items:center}
.sg-shot-duo-pic{position:relative;flex:1 1 auto;width:100%;min-height:0}
.sg-shot-duo-label{display:block;width:100%;flex:none;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;font-weight:700;line-height:17px;color:#6b5b4b}
@media(max-width:640px){.sg-shot-poster-head,.sg-shot-poster-foot{padding-left:5px;padding-right:5px}.sg-shot-poster-score{font-size:22px;top:2px}.sg-shot-poster-line{top:27px;font-size:.4375em}.sg-shot-poster-figure{top:35px;bottom:10px}}

/* v38 dark poster palette */
.sg-shot-poster{color:#f4efe6;background-color:#14110f;background-image:linear-gradient(to right,rgba(244,239,230,.1) 1px,transparent 1px),linear-gradient(to bottom,rgba(244,239,230,.1) 1px,transparent 1px);background-size:14px 14px;box-shadow:inset 0 0 0 2px rgba(244,239,230,.16)}
.sg-shot-poster-head{border-bottom:1px solid rgba(244,239,230,.22);background:rgba(244,239,230,.06);color:#b7a89a}
.sg-shot-poster-head b{color:#f4efe6}
.sg-shot-poster-score{color:#f4efe6;text-shadow:none}
.sg-shot-poster-score span{color:#b7a89a}
.sg-shot-poster-line{color:#b7a89a}
.sg-shot-poster-figure{border-color:rgba(244,239,230,.22)}
.sg-shot-poster-baseline{background:#f4efe6}
.sg-shot-poster-foot{border-top:1px solid rgba(244,239,230,.22);background:rgba(244,239,230,.06);color:#b7a89a}
.sg-shot-poster-foot b{color:#f4efe6}
.sg-shot-poster .piece{filter:drop-shadow(1px 1px 0 rgba(244,239,230,.14))}
.sg-shot-duo-label{color:#b7a89a}

/* v39: disabled zoom buttons when view is at its limit */
.zoom button:disabled{opacity:.4;cursor:default}

/* v40 — E1 palette layer. Colour only; layout, sizes and animation untouched. */
html,body{background:var(--bg);color:var(--ink)}
body.bare{background:var(--bg)}
a:hover{color:var(--brand-strong)}
.btn:hover{background:var(--brand-strong)}
.btn {color:var(--on-brand)}
[data-sg-like][data-sg-liked],[data-sg-like][aria-pressed="true"]{color:var(--on-brand)}
.canvas{border-bottom-color:var(--line-strong);background-color:var(--canvas);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px)}
.play-pic{background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px)}
.score-band{background:var(--brand);color:var(--on-brand)}
.score-drop{background:var(--card);color:var(--ink)}
.score-floor{background:var(--black);color:var(--on-brand)}
.ref-shape .mark,.tgt-shape .mark{fill:var(--card);stroke:var(--card)}
.callout{background:var(--ink);color:var(--on-brand)}
.truth-shape .body,svg.truth-shape .body{stroke:var(--ink)}
.ruler-svg rect{fill:var(--card)}
.ruler-svg line{stroke:var(--ink)}
.ruler-svg text{fill:var(--muted)}

.ruler-ticks .tick{background:var(--line-strong)}
.ruler-ticks .tick.major{background:var(--ink)}
.ruler-ticks .tick b{color:var(--muted)}
.ruler-thumb,.ruler-mark{background:var(--brand)}
.ruler-thumb::after{border-color:var(--line-strong);background:var(--brand-strong);color:var(--on-brand);box-shadow:0 1px 4px var(--line-strong)}
.ruler-cap{border:2px solid #000;color:var(--ink)}
.ruler-cap svg path,.ruler-cap svg line{stroke:var(--ink)}
.ruler-unit {color:var(--muted)}
.drag-tag{border-color:var(--line-strong);background:var(--card);color:var(--ink)}
.drag-tag svg path,.drag-tag svg line,.drag-tag svg polyline{stroke:var(--ink)}
.sg-board{background:var(--surface);border-color:var(--line-strong)}
.sg-head{background:var(--card);border-bottom-width:2px;border-bottom-color:#000}
.sg-head .round-label{color:var(--muted)}
.sg-ticks i{background:var(--line-strong)}
.sg-ticks .is-now,.sg-ticks .is-full{background:var(--ink)}
.sg-ticks .is-scored{background:var(--brand)}
.sg-tool{border-color:#000;color:var(--ink)}
.sg-score{border-left-color:#000;color:var(--ink)}
.sg-board .board,.sg-board .canvas{background-color:var(--canvas)}
.sg-board .canvas{box-shadow:inset 0 0 0 1px var(--line)}
.zoom button{background:var(--card);color:var(--ink);border-color:#000}
.sg-foot{background:var(--surface);border-top-color:var(--line)}

.sg-scorebox{background:var(--overlay)}
.sg-scorecard{border-color:var(--line-strong);background:var(--card)}
.sg-score-points,.sg-score-line{color:var(--ink)}
.sg-score-kicker,.sg-score-of,.sg-log-note{color:var(--muted)}
.sg-score-shot{background-color:var(--canvas);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px)}
.sg-scorecard .btn.secondary{color:var(--ink);border-color:var(--line-strong)}
#sg-challenge{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
#sg-share-result,body.bare .sg-scorecard #sg-next{background:var(--black);color:var(--on-brand)}
#sg-save-image{color:var(--ink);border-color:var(--line-strong)}
.sg-log li{border-top-color:var(--line);color:var(--ink)}
#sg.is-done .sg-scorecard{background:var(--card)}
#sg.is-done .sg-score-line{border-top-color:var(--brand)}
#sg.is-done #sg-end{border-top-color:var(--line)}
#sg.is-done #sg-savebox label{color:var(--muted)}

.sg-inline{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.sg-inline-head span{border-color:var(--line-strong)}
.sg-inline-line{color:var(--ink)}
.sg-inline-actions .btn.secondary{color:var(--ink);border-color:var(--line-strong)}

.sg-shot-poster{color:var(--ink);background-color:var(--canvas);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);box-shadow:inset 0 0 0 2px var(--line-strong)}
.sg-shot-poster-head{border-bottom-color:var(--line-strong);background:var(--wash);color:var(--muted)}
.sg-shot-poster-head b{color:var(--ink)}
.sg-shot-poster-score{color:var(--brand);text-shadow:0 1px 0 var(--card)}
.sg-shot-poster-score span{color:var(--muted)}
.sg-shot-poster-line{color:var(--muted)}
.sg-shot-poster-figure{border-color:var(--line-strong)}
.sg-shot-poster-baseline{background:var(--ink)}
.sg-shot-poster-foot{border-top-color:var(--line-strong);background:var(--wash);color:var(--muted)}
.sg-shot-poster-foot b{color:var(--ink)}
.sg-shot-poster .piece{filter:drop-shadow(0 1px 0 var(--line))}
.sg-shot-duo-label{color:var(--muted)}

/* v40 addendum: inline SVG presentation colours follow the palette. */
.play-pic svg [fill="#f4efe6"],.figure-grid svg [fill="#f4efe6"]{fill:var(--card)}
.play-pic svg [stroke="#f4efe6"]{stroke:var(--card)}

/* v41 — grid corner continuity + phone aspect parity. Colour-only layer above; geometry here. To revert, delete this block. */
/* canvas top corners follow the board's 12px arc so the inset stroke reads continuous instead of cut off. */
.sg-board .canvas{border-radius:12px 12px 0 0}
/* phone: lock the canvas to the desktop 2.12:1 ratio, thin the ruler, and shrink the stage to match. Shapes auto-scale with width. */
@media (max-width:640px){
  .sg-board{--ruler-h:34px}
  .sg-board .board{height:auto;min-height:0}
  .sg-board .canvas{flex:0 0 auto;height:auto;min-height:0;aspect-ratio:1014/478}
  .stage{height:465px;min-height:0!important}
}

/* v42 — full-bleed grid and ruler, phone grid height. Geometry only; delete this block to revert. */
/* grid and ruler run to the card's inner edge, square corners (reference style). */
.sg-board .board{margin:0;border-radius:0}
.sg-board .canvas{border-radius:0}
/* phone: give the grid real height (≈1.35:1) instead of locking desktop's 2.12:1; restore ruler so caps are not clipped. */
@media (max-width:640px){
  .sg-board{--ruler-h:46px}
  .sg-board .board{height:auto;min-height:0}
  .sg-board .canvas{flex:0 0 auto;height:240px;min-height:0;aspect-ratio:auto}
  .stage{height:560px;min-height:0!important}
}
/* narrow phones: question wraps taller, so allow a little more stage height. */
@media (max-width:375px){.stage{height:585px}}

/* v43 — zone contrast, hint beside Lock, one-line phone title, grid origin. Geometry/colour only; delete block to revert. */
/* only the grid keeps the sand colour; title strip, ruler strip and footer use paper white. */
.sg-board .ask{background:var(--card)}
.ruler-row{background:var(--card)}
.sg-foot{background:var(--card)}
/* drop the canvas inset stroke (it doubled with the card border) and move the first grid line inward. */
.sg-board .canvas{box-shadow:none;background-position:16px 100%}
/* drag hint sits in the footer row, to the left of Lock this size. */
.sg-foot {grid-column:1;grid-row:1;margin:0;justify-content:flex-start;text-align:left}
.sg-foot .actions{grid-column:2;grid-row:1/span 2;align-self:center}
@media (max-width:640px){
  .sg-board .canvas{background-position:9px 100%}
  .sg-board .ask{font-size:clamp(16px,4.8vw,22px);padding:10px 12px 8px;white-space:nowrap}
  .sg-foot{grid-template-columns:minmax(0,1fr) auto;column-gap:6px;padding:8px}
.sg-foot {font-size:12px;gap:0;white-space:nowrap}
.sg-foot svg {display:none}
  .sg-foot .actions{grid-column:2;grid-row:1;padding:0}
  .sg-foot .actions .btn{width:auto;min-height:38px;padding:6px 8px;font-size:12px}
  body.bare .sg-foot #sg-lock{width:auto}
  .stage{height:527px;min-height:0!important}
}
@media (max-width:375px){.stage{height:525px}}
@media (min-width:641px){.stage{height:775px}}

/* v44 — black dividers + full-width phone Lock. Geometry only; delete this block to revert. */
/* the old 12px footer margin exposed the board's sand background as a stray stripe; replace it with one black rule. */
.sg-foot{margin-top:0;border-top:2px solid var(--ink);border-radius:0}
/* grid panel gets the same black rule on its top edge, as in the reference. */
.sg-board .board{border-top:2px solid var(--ink)}
/* phone: hint on its own centred line, Lock on a full-width, larger button line. */
@media (max-width:640px){
  .sg-foot{grid-template-columns:minmax(0,1fr);padding:10px 12px 12px;row-gap:8px}
.sg-foot {grid-column:1;grid-row:1;justify-content:center;text-align:center;font-size:12px;white-space:normal}
  .sg-foot .actions{grid-column:1;grid-row:2;width:100%;padding:0;margin:0}
  .sg-foot .actions .btn{width:100%;min-height:48px;font-size:16px;padding:10px 16px}
  body.bare .sg-foot #sg-lock{width:100%}
  .stage{height:562px;min-height:0!important}
}
@media (max-width:375px){.stage{height:562px}}
@media (min-width:641px){.stage{height:765px}}

/* v45 — reference silhouette shadow + uniform borders + square corners. Geometry/colour only; delete this block to revert. */
/* restore the soft down-right drop shadow on the two guess shapes (an older light-highlight rule had cancelled it). */
.piece svg.ref-shape,
.piece svg.tgt-shape{filter:drop-shadow(2px 3px 2px rgba(38,34,30,.34))!important}
/* card outline matches the 2px ink dividers used by the ruler and footer. */
.sg-board{border:2px solid var(--ink)!important}
/* the title strip gets the same 2px ink rule below it, as in the reference. */
.sg-board .ask{border-bottom:2px solid var(--ink)}
/* square corners throughout: cards, buttons, chips, zoom caps, magnifiers, result sheets. */
:root{--radius:0}
.stage,
.sg-board,.sg-head,.sg-foot,.sg-board .board,.sg-board .canvas,
.zoom button,.ruler-cap,.chip,.drag-tag,.ruler-thumb::after,.sg-tool,
.btn,.card,.qa,[data-sg-owner],input,textarea,
.sg-inline,.sg-inline-head span{border-radius:0!important}

/* v46 — hard silhouette shadow + the last rounded corners. Geometry/colour only; delete this block to revert. */
/* solid, blur-free offset shadow on the two guess shapes, like the reference */
.piece svg.ref-shape,
.piece svg.tgt-shape{filter:drop-shadow(2px 3px 0 rgba(38,34,30,.82))!important}
/* how-to cards and their sample pictures */
.play-card,.play-pic{border-radius:0!important}
/* score strip */
.score-scale{border-radius:0!important}
/* other panels that still carried an arc */
.sg-scorecard,.sg-score-shot,
#sg.is-done .sg-scorecard,#sg.is-done .sg-score-shot{border-radius:0!important}

/* v47 — subtler shadow, paper-white mode buttons, one-line phone header. Geometry/colour only; delete this block to revert. */
/* keep the hard edge but halve the offset and lighten the coverage */
.piece svg.ref-shape,
.piece svg.tgt-shape{filter:drop-shadow(1px 2px 0 rgba(38,34,30,.55))!important}
/* phone: brand and nav stay on a single header line */
@media (max-width:640px){
  .header-row{flex-wrap:nowrap;gap:8px;min-height:48px}
  .header-row .brand,h1.brand,h1.brand a{font-size:18px;white-space:nowrap}
  .header-row .nav{flex-wrap:nowrap;gap:10px;flex:0 0 auto}
  .header-row .nav a{font-size:12px;white-space:nowrap}
}

/* v48 — chip outline, inline result panel, result-button colours. Geometry/colour only; delete this block to revert. */
/* the reference card in the grid gets a crisp 1px ink outline */
.piece .chip{border:1px solid var(--ink)!important}
/* with the pop-up closed, the inline result replaces the drag-hint row */
#sg:has(#sg-inline:not([hidden])) .sg-foot{display:none!important}
/* inline result panel takes the same paper white as the question strip */
.sg-inline{background:var(--card)!important}
/* Next round is black; Share / Challenge takes the former Next-round red */
#sg-inline-next,
#sg-inline-share,

/* v49 — close the sand gap above the inline result; actually target the grid info chip. Geometry/colour only; delete this block to revert. */
/* the 10px top margin exposed the board's sand background as a stripe; the ink rule replaces it */
.sg-inline{margin-top:0!important}
#sg:has(#sg-inline:not([hidden])) .sg-inline{border-top:2px solid var(--ink)}
/* the chip is a direct child of #sg-pair, not of .piece — that is why v48's border never showed */
#sg-pair .chip{border:2px solid var(--ink)!important;box-shadow:1px 2px 2px rgba(38,34,30,.2)!important}

/* v50 — keep the red ruler mark but drop its "you" text label. Delete this block to revert. */
#sg-mark-you span{display:none!important}

/* v51 — on-page SEO structure: semantic H1, keyword sections, figure internal links. Style only; game untouched. Delete this block to revert. */
.page-h1{font-family:var(--font-display);font-size:clamp(24px,4vw,32px);line-height:1.2;margin:20px 0 0;color:var(--ink)}
.section-note{font-family:var(--font-display);font-size:20px;font-weight:700;margin:0 0 12px;color:var(--ink)}
#big p{max-width:none;margin:0 0 12px;color:var(--ink)}
.fig-lead{max-width:70ch;margin:0 0 12px;color:var(--ink)}
.fig-link{display:block;text-decoration:none;color:inherit;border-radius:0!important}
.fig-link figure{transition:border-color .15s ease}
.fig-link:hover figure{border-color:var(--ink)}
.fig-link:hover figcaption{color:var(--brand)}

/* v53 — H-tag architecture: figure titles and prose subheads carry real numbers. Style only; game untouched. Delete this block to revert. */
/* figure H3 keeps the caption size instead of the global 22px heading */
.figure-grid figcaption h3{margin:0;font-family:var(--font-body);font-size:14px;line-height:1.3;font-weight:700;color:inherit}
/* prose subheads for the three published-size pairs */
.prose h3{font-size:18px;margin:20px 0 6px}
.prose h3+p{margin-top:0}

/* v54 — desktop H1 shares the mode-button row; header divider 2px. Layout only; game/iframe untouched. Delete this block to revert. */
.site-header{border-bottom:2px solid var(--ink)}

/* v56 — de-emphasize nav brand + favicon mark so H1 reads as the single heading. Layout only; game/iframe untouched. Delete this block to revert. */
.site-header .brand{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-body);font-size:16px;font-weight:600;color:var(--muted);letter-spacing:.01em}
.site-header .brand img.brand-logo{width:22px;height:22px;flex:none;border:1px solid var(--line-strong)}
.site-header .brand:hover{color:var(--ink)}
@media (min-width:641px){
  .stage-line{position:relative;display:flow-root}
  /* v80: headline + tagline share one optical line with the parent-page mode nav */
  .stage-head{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:18px 0 12px}
  /* archive: date controls sit on the homepage's title line, vertically centered
     exactly like the four mode buttons; taken out of flow so the long archive
     tagline never pushes the board down. */
  .stage-head.is-archive .stage-actions{position:absolute;right:0;top:50%;transform:translateY(-50%)}
.sg-board-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;pointer-events:none;z-index:5;font-family:var(--font-body);font-size:14px;font-weight:600;color:var(--ink,#000)}
.ask{min-height:44px;box-sizing:border-box}
.sg-board-loading[hidden]{display:none}
.sg-spin{width:28px;height:28px;border:3px solid rgba(0,0,0,.15);border-top-color:var(--brand,#c83428);border-radius:50%;animation:sgSpin .75s linear infinite}
@keyframes sgSpin{to{transform:rotate(360deg)}}

  .stage-title .page-h1{margin:0}
  .stage-title .stage-tagline{margin:4px 0 0;font-family:var(--font-body);font-size:12px;line-height:1.4;font-weight:500;letter-spacing:.04em;color:var(--muted)}
  .stage-line .stage{margin-top:0}
}
.stage-tagline{margin:4px 0 12px;font-family:var(--font-body);font-size:12px;line-height:1.4;font-weight:500;letter-spacing:.04em;color:var(--muted)}
@media (max-width:640px){
  .stage-tagline{font-size:12px}
}

/* v57 — lead becomes a hook + three benefit rows + a note. Outer copy only; game/iframe untouched. Delete this block to revert. */
.lead-block{max-width:70ch;margin:16px 0 0}
.lead-hook{margin:0 0 14px;font-family:var(--font-body);font-size:19px;font-weight:600;line-height:1.35;color:var(--ink)}
.lead-hook span{color:var(--brand)}
.lead-points{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.lead-points li{display:flex;align-items:center;gap:13px}
.lead-points p{margin:0;font-size:14px;line-height:1.45;color:var(--ink)}
.lead-ico{flex:0 0 50px;width:50px;height:50px;background:var(--card);border:2px solid var(--ink);display:flex;align-items:center;justify-content:center}
.lead-ico svg{width:34px;height:34px;display:block}
.lead-note{margin:16px 0 0;padding-top:11px;border-top:1px solid var(--line);font-size:12px;line-height:1.5;color:var(--muted)}
@media (max-width:640px){
  .lead-hook{font-size:17px}
  .lead-ico{flex-basis:44px;width:44px;height:44px}
  .lead-ico svg{width:30px;height:30px}
  .lead-points{gap:8px}
}

/* v60 — #big: four real-size figure cards (CC0/original silhouettes on grid paper + real numbers). Outer copy only; game/iframe untouched. Delete this block to revert. */
.big-figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 14px}
.big-fig{margin:0;background:var(--card);border:2px solid var(--ink);padding:8px 8px 10px}
.big-fig-img{height:110px;background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:16px 16px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.big-fig-img img{display:block;max-width:100%;max-height:100%}
.big-fig-img img.tilt{transform:rotate(-4deg)}
.big-fig figcaption h3{margin:8px 0 2px;font-family:var(--font-body);font-size:14px;line-height:1.3;font-weight:700;color:var(--ink)}
.big-fig figcaption small{font-size:12px;color:var(--muted)}
@media (max-width:640px){
  .big-figs{grid-template-columns:1fr 1fr;gap:10px}
  .big-fig-img{height:96px}
}

/* v63 — #how cross layout (pic left/right alternating) + #score ticks & arrow. Outer copy only; game/iframe untouched. Delete this block to revert. */
.play-grid{grid-template-columns:1fr;gap:10px}
.play-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:center;padding:10px 16px 10px 10px}
.play-card .play-pic{margin-bottom:0;height:280px}
.play-card.flip{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.play-card.flip .play-pic{order:2}
.play-card.flip p{order:1}
@media (max-width:640px){
  .play-card,.play-card.flip{grid-template-columns:1fr}
  .play-card .play-pic{height:200px}
  .play-card.flip .play-pic{order:0}
  .play-card.flip p{order:1}
}
.score-drop{position:relative;padding-top:24px;padding-bottom:20px}
.score-scale .score-arrow{position:absolute;top:7px;left:12px;right:10px;display:flex;align-items:center;gap:7px;font-family:var(--font-body);font-size:11px;font-weight:700;line-height:1;color:var(--brand)}
.score-arrow i{flex:1;height:2px;background:var(--brand);position:relative}
.score-arrow i::after{content:"";position:absolute;right:-1px;top:-3px;width:0;height:0;border-left:6px solid var(--brand);border-top:4px solid transparent;border-bottom:4px solid transparent}
.score-penalty small{display:inline-block;margin-left:4px;font-size:11px;font-weight:600;line-height:1;color:var(--muted);vertical-align:baseline}

/* v64 — #figures: 3×2 cards, uniform 120px grid-backed wells, 2px ink borders. Delete this block to revert. */
#figures .figure-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#figures .figure-grid figure{border:2px solid var(--ink);border-radius:0!important;padding:10px;text-align:left}
#figures .fig-pic{height:120px;margin-bottom:8px;display:flex;align-items:center;justify-content:center;overflow:hidden;background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:16px 16px}
#figures .fig-pic svg{display:block;width:100%;height:100%}
#figures .figure-grid figcaption h3{white-space:nowrap;font-size:14px}
#figures .figure-grid figcaption small{font-size:12px}
#figures .door-note{border:2px solid var(--ink);border-radius:0!important;padding:12px 16px;gap:16px}
#figures .door-pic{height:120px;display:flex;align-items:center;justify-content:center;background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:16px 16px}
#figures .door-pic svg{height:100%;width:auto}
@media (max-width:640px){
  #figures .figure-grid{grid-template-columns:1fr 1fr;gap:10px}
  #figures .fig-pic{height:96px}
  #figures .figure-grid figcaption h3{white-space:normal}
  #figures .door-pic{height:96px}
}
.score-ticks{position:absolute;left:12px;right:10px;bottom:4px;display:flex;justify-content:space-between;align-items:flex-end}
.score-ticks i{width:1px;height:5px;background:var(--line-strong)}
.score-ticks i:nth-child(5n+1){width:2px;height:10px;background:var(--ink)}

/* v65 — #why + #surprise: why-card, ratio cards, note panel. Delete this block to revert. */
#why .why-card{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center;border:2px solid var(--ink);background:var(--card);padding:12px}
#why .why-pic{height:240px;display:flex;align-items:center;justify-content:center;overflow:hidden;background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:16px 16px}
#why .why-pic svg{width:100%;height:100%}
#why .why-copy p{font-size:15px;margin:0 0 10px}
#why .why-copy p:last-child{margin-bottom:0}
#surprise .ratio-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}
#surprise .ratio-card{border:2px solid var(--ink);background:var(--card);padding:10px}
#surprise .ratio-pic{height:150px;margin-bottom:10px;display:flex;align-items:center;justify-content:center;overflow:hidden;background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:16px 16px}
#surprise .ratio-pic svg{width:100%;height:100%}
#surprise .ratio-num{font-family:var(--font-display);font-size:34px;color:var(--brand);line-height:1;margin:0 0 8px}
#surprise .ratio-card h3{font-size:16px;margin:0 0 8px}
#surprise .ratio-card p{font-size:13px;color:var(--muted);margin:0}
#surprise .note-panel{border:2px solid var(--ink);background:var(--card);padding:12px 16px}
#surprise .note-row{display:grid;grid-template-columns:150px 1fr;gap:14px;padding:8px 0}
#surprise .note-row+.note-row{border-top:1px solid var(--line)}
#surprise .note-row b{font-size:14px}
#surprise .note-row p{font-size:14px;margin:0}
@media (max-width:640px){
  #why .why-card{grid-template-columns:1fr}
  #why .why-pic{height:200px}
  #surprise .ratio-grid{grid-template-columns:1fr}
  #surprise .note-row{grid-template-columns:1fr;gap:2px}
}

/* v66 — #faq: single panel, always-visible labels, full-width answers. Delete this block to revert. */
#faq .faq-panel{border:2px solid var(--ink);background:var(--card);padding:4px 16px}
#faq .qa{padding:12px 0;margin:0;border:0;border-top:1px solid var(--line);background:transparent}
#faq .qa:first-child{border-top:0}
#faq .qa summary{position:relative;padding-left:154px;padding-right:22px;font-size:15px;font-weight:600;cursor:pointer;list-style:none}
#faq .qa summary::-webkit-details-marker{display:none}
#faq .qa summary .qa-label{position:absolute;left:0;top:1px;width:140px;font-size:14px;font-weight:700;line-height:1.6;color:var(--ink)}
#faq .qa summary::after{content:"";position:absolute;right:2px;top:7px;width:0;height:0;border-left:7px solid var(--brand);border-top:5px solid transparent;border-bottom:5px solid transparent;transition:transform .15s}
#faq .qa[open] summary::after{transform:rotate(90deg)}
#faq .qa p{margin:10px 0 4px;font-size:14px;color:var(--muted)}
@media (max-width:640px){
  #faq .qa summary .qa-label{position:static;display:block;width:auto}
  #faq .qa summary{padding-left:0}
}

/* v67 — footer: 4-column directory, brand blurb, email. Delete this block to revert. */
.site-footer{border-top:2px solid var(--ink)}
.site-footer .footer-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:24px;padding:28px 0 22px}
.site-footer .footer-brand .brand{display:inline-flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:var(--ink)}
.site-footer .footer-brand .brand-logo{width:22px;height:22px;border:1px solid var(--line-strong)}
.site-footer .footer-desc{margin:12px 0 10px;max-width:46ch;font-size:13px;line-height:1.65;color:var(--muted)}
.site-footer .footer-desc strong{color:var(--ink);font-weight:600}
.site-footer .footer-mail{font-size:13px;color:var(--brand);text-decoration:underline}
.site-footer .footer-col{display:flex;flex-direction:column;gap:2px}
.site-footer .footer-head{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink)}
.site-footer .footer-col a{font-size:13px;line-height:1.9;color:var(--muted)}
.site-footer .footer-col a:hover{color:var(--ink);text-decoration:underline}
.site-footer .footer-bottom{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;border-top:1px solid var(--line-strong);padding:14px 0 20px}
.site-footer .footer-bottom p{margin:0;font-size:12px;line-height:1.5}
.site-footer .credits{max-width:76ch;flex:1 1 auto}
@media (max-width:640px){
  .site-footer .footer-grid{grid-template-columns:1fr 1fr;gap:18px;padding:22px 0}
  .site-footer .footer-brand{grid-column:1/-1}
  .site-footer .footer-bottom{flex-direction:column;gap:6px}
}

/* v72 — sizes.html: real-world size pages. Delete this block to revert. */
.sizes-page{max-width:980px;margin:0 auto}
.sz-kicker{margin:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sz-lead{margin:0 0 20px;font-size:17px;line-height:1.6;color:var(--ink)}
.sz-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:2px solid var(--ink);background:var(--card);margin:0 0 32px}
.sz-fact{padding:12px 16px;border-left:1px solid var(--line)}
.sz-fact:first-child{border-left:0}
.sz-fact span{display:block;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sz-fact b{display:block;margin-top:4px;font-family:var(--font-display);font-size:17px;line-height:1.3;color:var(--ink)}
.sz-split{display:grid;grid-template-columns:320px minmax(0,1fr);gap:32px;align-items:center;padding:8px 0 32px}
.sz-split-flip{grid-template-columns:minmax(0,1fr) 320px}
.sz-copy h2{margin-top:0}
.sz-copy p{max-width:62ch}
.sz-fig{margin:0;border:2px solid var(--ink);background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:20px 20px}
.sz-fig svg{display:block;width:100%;height:auto}
.sz-fig figcaption{padding:8px 12px;border-top:1px solid var(--line);background:var(--card);font-size:12px;line-height:1.5;color:var(--muted)}
.sz-fig .sh{display:none}
.sz-fig[data-shape="circle"] .sh-circle{display:block}
.sz-fig[data-shape="rect"] .sh-rect{display:block}
.sz-fig[data-shape="card"] .sh-card{display:block}
.sz-dim-text{font-family:var(--font-body);font-size:13px;font-weight:600;fill:var(--brand)}
.sz-bars-body{padding:16px 12px;background:var(--card)}
.sz-bar{display:grid;grid-template-columns:76px minmax(0,1fr) 62px;align-items:center;gap:8px;margin:0 0 10px}
.sz-bar:last-child{margin-bottom:0}
.sz-bar span{font-size:12px;line-height:1.3;color:var(--ink)}
.sz-bar i{display:block;height:14px;min-width:4px;background:var(--line-strong);transform-origin:left center}
.sz-bar i.on{background:var(--brand)}
.sz-bar b{text-align:right;font-size:12px;font-weight:600;color:var(--ink)}
.sz-ratios{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.sz-ratios a{display:inline-flex;align-items:baseline;gap:6px;padding:8px 12px;border:2px solid var(--ink);background:var(--card);color:var(--ink);text-decoration:none}
.sz-ratios a:hover{border-color:var(--ink)}
.sz-ratios b{font-family:var(--font-display);font-size:17px;color:var(--brand)}
.sz-ratios span{font-size:13px}
.sz-slips{padding:0 0 32px}
.sz-slip-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.sz-slip{padding:16px 18px;border:2px solid var(--ink);background:var(--card)}
.sz-slip h3{margin:0 0 8px;font-size:17px}
.sz-slip p{margin:0;font-size:14px;line-height:1.6;color:var(--muted)}
.sz-play{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:center;margin:0 0 36px;padding:20px 24px;border:2px solid var(--ink);background:var(--card)}
.sz-play-label{margin:0 0 6px;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--brand)}
.sz-play-copy h3{margin:0 0 8px;font-size:22px}
.sz-play-copy p{margin:0 0 16px;max-width:48ch;font-size:14px;line-height:1.6;color:var(--muted)}
.sz-play-btns{display:flex;flex-wrap:wrap;gap:10px}
.btn:hover{color:var(--on-brand)}
.btn.secondary:hover{color:var(--ink)}
.sz-play .btn{border:2px solid var(--ink)}
.sz-play-art{border:2px solid var(--ink);background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:20px 20px}
.sz-play-art svg{display:block;width:100%;height:auto}
.sz-faq{padding:0 0 28px}
.sz-next{border-top:2px solid var(--ink);padding:16px 0 8px}
.sz-next p{margin:0 0 8px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sz-next a{display:inline-block;margin:0 14px 6px 0;font-size:14px;color:var(--ink);text-decoration:underline;text-decoration-color:var(--line-strong)}
.sz-next a:hover{text-decoration-color:var(--brand);color:var(--brand)}
@media (max-width:720px){
  .sz-facts{grid-template-columns:1fr}
  .sz-fact{border-left:0;border-top:1px solid var(--line)}
  .sz-fact:first-child{border-top:0}
  .sz-split,.sz-split-flip{grid-template-columns:1fr;gap:18px}
  .sz-split .sz-fig,.sz-split-flip .sz-fig{order:-1}
  .sz-slip-grid{grid-template-columns:1fr}
  .sz-play{grid-template-columns:1fr;padding:16px}
  .sz-play-art{order:-1}
  .sz-bar{grid-template-columns:66px minmax(0,1fr) 58px}
}

/* v73 — /sizes hub page. Delete this block to revert. */
.sz-kicker a{color:inherit;text-decoration:underline;text-decoration-color:var(--line-strong)}
.sz-kicker a:hover{color:var(--brand)}
.sz-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 40px}
a.sz-card{display:block;background:var(--card);border:2px solid var(--ink);text-decoration:none;color:var(--ink);transition:transform .12s ease}
a.sz-card:hover{transform:translateY(-2px)}
.sz-card .sz-card-art{padding:14px 12px;border-bottom:1px solid var(--line);background-color:var(--surface);background-image:linear-gradient(to right,var(--grid) 1px,transparent 1px),linear-gradient(to bottom,var(--grid) 1px,transparent 1px);background-size:20px 20px}
.sz-card svg{display:block;width:100%;height:auto}
.sz-card .sc{display:none}
.sz-card[data-shape="quarter"] .sc-quarter{display:block}
.sz-card[data-shape="idcard"] .sc-idcard{display:block}
.sz-card[data-shape="tennis"] .sc-tennis{display:block}
.sz-card[data-shape="basketball"] .sc-basketball{display:block}
.sz-card[data-shape="a4"] .sc-a4{display:block}
.sz-card[data-shape="door"] .sc-door{display:block}
.sz-card-body{padding:12px 14px 14px}
.sz-card h2{margin:0 0 4px;font-family:var(--font-display);font-size:19px;line-height:1.25;color:var(--ink)}
.sz-card-fig{font-family:var(--font-display);font-size:22px;color:var(--brand)}
.sz-card-fig small{display:block;font-family:var(--font-body);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 2px}
.sz-card p{margin:6px 0 0;font-size:13px;line-height:1.5;color:var(--muted)}
.sz-chart{margin:0 0 40px;border:2px solid var(--ink);background:var(--card)}
.sz-chart h2{margin:0;padding:14px 18px 0;font-size:22px}
.sz-chart-body{padding:14px 18px 18px}
.sz-chart-body .sz-bar{grid-template-columns:110px minmax(0,1fr) 74px}
.sz-chart figcaption{padding:8px 18px;border-top:1px solid var(--line);background:var(--surface);font-size:12px;line-height:1.5;color:var(--muted)}
.sz-how{margin:0 0 36px}
.site-footer .footer-head a{color:inherit;text-decoration:none}
.site-footer .footer-head a:hover{color:var(--brand)}
@media (max-width:720px){
  .sz-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:480px){
  .sz-cards{grid-template-columns:1fr}
}

/* v74 — contact / credits / privacy / terms quick blocks. Delete this block to revert. */
.sg-quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:2px solid var(--ink);background:var(--card);margin:0 0 32px}
.sg-quick>div{padding:14px 16px;border-left:1px solid var(--line)}
.sg-quick>div:first-child{border-left:0}
.sg-quick h2,.sg-quick h3{margin:0 0 6px;font-family:var(--font-display);font-size:15px;line-height:1.3;color:var(--ink)}
.sg-quick p{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.sg-channels{display:grid;grid-template-columns:1fr 1fr;border:2px solid var(--ink);background:var(--card);margin:0 0 32px}
.sg-channel{padding:18px;border-left:1px solid var(--line)}
.sg-channel:first-child{border-left:0}
.sg-channel h2,.sg-channel h3{margin:0 0 6px;font-family:var(--font-display);font-size:17px;line-height:1.3;color:var(--ink)}
.sg-channel p{margin:0 0 14px;font-size:13px;line-height:1.5;color:var(--muted)}
.sg-notes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 28px}
.sg-note{padding:12px 14px;background:var(--surface);border:1px solid var(--line)}
.sg-note h2,.sg-note h3{margin:0 0 6px;font-family:var(--font-display);font-size:15px;line-height:1.3;color:var(--ink)}
.sg-note p{margin:0;font-size:13px;line-height:1.5;color:var(--muted)}
.sg-src{width:100%;border-collapse:collapse;margin:0 0 28px;border:2px solid var(--ink);background:var(--card)}
.sg-src th,.sg-src td{padding:9px 12px;border:1px solid var(--line);text-align:left;vertical-align:top;font-size:14px}
.sg-src th{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);background:var(--surface)}
.sg-src td:first-child{font-weight:600;color:var(--ink)}
@media (max-width:900px){
  .sg-quick,.sg-notes{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:720px){
  .sg-channels{grid-template-columns:1fr}
  .sg-channel{border-left:0;border-top:1px solid var(--line)}
  .sg-channel:first-child{border-top:0}
}
@media (max-width:480px){
  .sg-quick>div{border-left:0;border-top:1px solid var(--line)}
  .sg-quick>div:first-child{border-top:0}
  .sg-notes{grid-template-columns:1fr}
}

/* v75 — widen contact / credits / privacy / terms to the sizes-page width. Delete this block to revert. */
article.prose:has(.sg-quick),article.prose:has(.sg-channels),article.prose:has(.sg-notes),article.prose:has(.sg-src),article.prose:has(.sz-ratios){max-width:980px;margin:0 auto}

/* v76 — comments section. Delete this block to revert. */
#comments{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
#comments .section-note{grid-area:1/1;margin:0}
#comments .comment-count{grid-area:1/2;margin:0;border:2px solid var(--ink);background:var(--card);padding:2px 12px;font-family:var(--font-display);font-size:14px;font-weight:700;color:var(--ink);line-height:1.5}
#comments [data-sg-comments]{grid-column:1/-1;margin:20px 0 0}
#comments .invite{display:none;margin:20px 0 0;font-size:14px;color:var(--muted)}
#comments [data-sg-comments][data-sg-empty] .invite{display:block}
#comments .comment{border:2px solid var(--ink);background:var(--card);padding:14px 16px;margin:0 0 12px}
#comments .comment.reply{margin:12px 0 0;border:0;border-left:2px solid var(--brand);padding:0 0 0 14px;background:transparent}
#comments .comment .who{margin:0 0 6px}
#comments .comment .meta{margin:8px 0 0}
#comments [data-sg-c-owner]{margin-left:6px;color:var(--brand);font-size:12px;font-weight:600;letter-spacing:.04em}
#comments .comment-form{grid-column:1/-1;margin:24px 0 0;border:2px solid var(--ink);background:var(--card);padding:18px;max-width:none}
#comments .comment-form label{display:block;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
#comments .comment-form input,#comments .comment-form textarea{display:block;width:100%;margin-top:6px;padding:10px 12px;border:1px solid var(--line-strong);background:var(--surface);font:15px/1.5 var(--font-body);color:var(--ink);border-radius:0}
#comments .comment-form input:focus,#comments .comment-form textarea:focus{outline:none;border-color:var(--brand)}
#comments .comment-form textarea{resize:vertical;min-height:110px}
#comments .comment-form [data-sg-reply-to]{margin:0;color:var(--brand);font-size:13px;font-weight:600}
#comments .comment-form [data-sg-comment-msg]{margin:0;font-size:13px;color:var(--muted)}

/* v80 — ⑤ parent-page mode navigation: true links, full page reload */
.stage-nav{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin:0}
.stage-nav a{display:inline-flex;align-items:center;min-height:32px;padding:5px 12px;border:2px solid #000;border-radius:0;background:var(--card);color:var(--ink);font-family:var(--font-body);font-size:13px;font-weight:600;line-height:1.2;text-decoration:none;white-space:nowrap}
.stage-nav a:hover{border-color:var(--brand);color:var(--brand)}
.stage-nav a[aria-current="page"]{background:var(--brand);border-color:#000;color:#fff}
@media (min-width:641px){
  .stage-line .stage-nav{margin:0}
}
@media (max-width:640px){.stage-nav{justify-content:flex-start;margin:8px 0 12px}}

/* archive heading — shares the homepage stage-head row so the board stays put. */
.stage-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.archive-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:0}
.date-stepper{display:inline-flex;align-items:stretch;border:2px solid #000;background:var(--card)}
.date-stepper a,.date-stepper span{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:5px 12px;font:600 13px/1.2 var(--font-body);color:var(--ink);text-decoration:none;white-space:nowrap}
.date-stepper a + a,.date-stepper a + span,.date-stepper span + a,.date-stepper span + span{border-left:2px solid #000}
.date-stepper a:hover{background:var(--brand);color:#fff}
.date-stepper [aria-current="date"]{background:#000;color:#fff;font-weight:700}
.date-stepper [aria-disabled="true"]{color:var(--muted);cursor:default}
.date-stepper [aria-disabled="true"]:hover{background:var(--card);color:var(--muted)}
.archive-stamp{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;min-width:80px;min-height:32px;padding:2px 8px;border:2px solid #000;background:#000;color:#fff;font:700 9px/1.1 var(--font-body);letter-spacing:.06em;text-transform:uppercase;transform:rotate(-2deg)}
.archive-stamp b{font-size:12px;line-height:1.15}
.archive-stamp > span{font-size:10px;font-weight:600;letter-spacing:.02em}
@media (max-width:640px){
  .stage-actions{justify-content:flex-start;margin:8px 0 12px}
  .archive-controls{justify-content:flex-start;gap:8px}
  .date-stepper a,.date-stepper span{padding:5px 9px;font-size:12px}
  .archive-stamp{min-width:76px;padding:2px 6px}
}

/* v941 — reference slot shifted left; measurement lines have no cream outline.
   Zero point, ppm and ruler are untouched: only the reference slot gap widens. */
.piece[data-role="ref"] { --measure: #2a231e; }
.piece[data-role="tgt"] { --measure: var(--brand); }
.piece[data-dim="tall"]::before,
.piece[data-dim="tall"]::after,
.piece[data-dim="long"]::before,
.piece[data-dim="long"]::after { content:""; position:absolute; z-index:2; pointer-events:none; }
.piece[data-dim="tall"]::after { right:-12px; top:0; bottom:0; width:2px; background:var(--measure); }
.piece[data-dim="tall"]::before { right:-17px; top:0; bottom:0; width:12px; border-top:2px solid var(--measure); border-bottom:2px solid var(--measure); }
.piece[data-dim="long"]::after { left:0; right:0; top:-12px; height:2px; background:var(--measure); }
.piece[data-dim="long"]::before { left:0; right:0; top:-17px; height:12px; border-left:2px solid var(--measure); border-right:2px solid var(--measure); }
.sg-shot-canvas .piece::before, .sg-shot-canvas .piece::after { display:none !important; }

/* two-line info chip: ref on top, target below; stays two lines on every viewport. */
#sg-pair > .chip { gap:3px; }
.chip-row { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.chip-name { display:flex; align-items:center; gap:5px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chip-dot { display:block; width:9px; height:9px; flex:none; background:#2a231e; }
.chip-row-tgt .chip-dot { background:var(--brand); }
.chip-val { flex:none; white-space:nowrap; color:var(--muted); }
.chip-row-tgt .chip-val { color:var(--ink); }
#sg-pair > .callout { display:none !important; }
@media (max-width:640px) {
  #sg-pair > .chip { max-width:calc(100% - 16px); }
  .chip-row { gap:5px; }
  .chip-name, .chip-val { font-size:11px; }
}

/* v106 - unit toggle fixed square + black chrome, red object name, black Lock with padlock, hint row removed.
   Colour/layout only; ppm, ruler and safe-area geometry untouched. Delete this block to revert. */
/* the unit toggle keeps one 28x28 box whatever its label is (m / ft / in) */
.sg-tool:not(#sg-share){width:28px;min-width:28px;height:28px;padding:0;line-height:24px;text-align:center}
#sg-unit,#sg-unit:hover,#sg-unit:focus-visible{background:#000;color:#fffaf2;border-color:#000}
/* question strip: object names always render in brand red */
.ask-obj{color:var(--brand)}
/* Lock this size: black, bolder, one size up, padlock in front */
#sg-lock{display:inline-flex;align-items:center;justify-content:center;gap:9px;background:#000;color:#fffaf2;border-color:#000;font-weight:800;font-size:18px;line-height:1.2}
#sg-lock:hover{background:#000;color:#fffaf2;border-color:#000}
#sg-lock .lock-ico{flex:none;display:block;width:16px;height:16px}
/* drag-hint element removed from board.html: collapse the footer grid back to a single row */
@media (max-width:640px){
  .sg-foot{row-gap:0}
  .sg-foot .actions{grid-column:1;grid-row:1;width:100%;padding:0;margin:0}
}


/* v108 - result pop-up close button (desktop + phone) + true-size outline is restored in share.js.
   Colour/layout only; board geometry untouched. Delete this block to revert. */
.sg-scorecard{position:relative}
.sg-score-close{
  position:absolute;top:8px;right:10px;z-index:2;
  width:28px;height:28px;padding:0;margin:0;
  display:flex;align-items:center;justify-content:center;
  background:transparent;color:var(--muted);
  border:1px solid var(--line-strong);border-radius:0;
  font-family:var(--font-body);font-size:20px;line-height:1;cursor:pointer;
}
.sg-score-close:hover,.sg-score-close:focus-visible{background:var(--black);color:var(--on-brand);border-color:var(--black);outline:none}
/* the final sheet is the whole page - no exit to close, or the player would be stranded */
#sg.is-done .sg-score-close{display:none!important}
@media (max-width:640px){
  #sg.is-done .sg-scorecard{padding-top:16px}
  .sg-score-close{top:6px;right:8px}
}

/* v109 — font scheme 1 (benchmark match): condensed display / neutral body / mono numerals.
   Self-hosted fonts; no board geometry changes. Delete this block to revert. */
.stage-title .page-h1,
.ask,
.sg-score-points,
.sg-score-invite,
.total,
.score-scale span,
.sg-inline-head b,
.ratio-num,
.sg-shot-poster-score {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .01em;
}
.stage-title .page-h1,
.ask,
.sg-score-invite,
.sg-shot-poster-score {
  text-transform: uppercase;
}
/* numbers that should never jitter as values change */
.ruler-ticks .tick b,
.ruler-unit,
.ruler-mark span,
.sg-score-of,
.sg-shot-poster-score span,
.archive-stamp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* v110 — real silhouettes in the explanation cards. Layout only; no game-board geometry. Delete this block to revert. */
.ill-stage{position:relative}
.play-pic .ill{position:absolute;object-fit:contain}
.play-pic .ill-a{left:10%;top:47%;width:36%;height:74%;transform:translateY(-50%)}
.play-pic .ill-b{right:10%;top:47%;width:36%;height:74%;transform:translateY(-50%)}
.ill-drag .ill-b{width:48%;height:96%;top:42%}
.ill-tag{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);font-family:var(--font-mono);font-size:14px;font-weight:700;color:var(--muted)}
.ill-ruler{position:absolute;left:10%;right:10%;bottom:12px;height:10px;background:var(--ink);display:flex;justify-content:space-around;align-items:stretch}
.ill-ruler i{width:2px;background:var(--card)}
.ill-arrow{position:absolute;left:56%;top:6%;width:3px;height:52%;background:var(--brand);z-index:3}
.ill-arrow::after{content:"";position:absolute;left:-6px;top:-9px;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:10px solid var(--brand)}
.ill-lock .ill-target,.ill-lock .ill-a{left:24%;top:50%;transform:translate(-50%,-50%)}
.ill-lock .ill-target{width:44%;height:96%;z-index:1}
.ill-lock .ill-a{width:32%;height:70%;z-index:2}
.ill-score{position:absolute;right:12%;top:50%;transform:translateY(-50%);background:var(--brand);color:var(--on-brand);font-family:var(--font-display);font-weight:800;font-size:22px;line-height:1;padding:8px 14px}
#figures .fig-ico{display:block;width:100%;height:100%;object-fit:contain}
#figures .door-ico{position:absolute;left:16%;top:50%;transform:translateY(-50%);height:88px;width:auto;max-width:52%;object-fit:contain}
.door-dim{position:absolute;left:62%;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:13px;color:var(--brand)}
.door-dim i{position:relative;width:2px;height:88px;background:var(--brand)}
.door-dim i::before,.door-dim i::after{content:"";position:absolute;left:-4px;width:10px;height:2px;background:var(--brand)}
.door-dim i::before{top:0}
.door-dim i::after{bottom:0}
#why .why-ico{position:absolute;object-fit:contain;top:44%}
#why .why-big{left:18%;width:36%;height:64%;transform:translateY(-50%)}
#why .why-small{right:16%;width:20%;height:36%;transform:translateY(-50%)}
.why-arrow{position:absolute;left:56%;top:44%;width:14%;height:2px;background:var(--muted)}
.why-arrow::before,.why-arrow::after{content:"";position:absolute;top:-3px;border-top:4px solid transparent;border-bottom:4px solid transparent}
.why-arrow::before{left:0;border-right:6px solid var(--muted)}
.why-arrow::after{right:0;border-left:6px solid var(--muted)}
.why-label{position:absolute;top:82%;font-family:var(--font-body);font-size:12px;color:var(--ink)}
.why-label-a{left:18%}
.why-label-b{right:16%;color:var(--brand)}
#surprise .ratio-ico{position:absolute;top:50%;object-fit:contain;transform:translateY(-50%)}
#surprise .r-left{left:15%}
#surprise .r-right{right:15%}
#surprise .ratio-ico.ball{width:36%;height:72%}
#surprise .ratio-ico.coin{width:16%;height:56%}
#surprise .ratio-ico.sheet{width:34%;height:86%}
#surprise .ratio-ico.upright{width:24%;height:86%}
@media (max-width:640px){
  #figures .door-ico{height:70px}
  .door-dim i{height:70px}
  #why .why-pic{height:200px}
  #surprise .ratio-pic{height:130px}
}

/* v111 — phone round result: bottom sheet with a two-column body (poster + actions).
   Only the in-round pop-up changes; the five-round total sheet keeps its own layout. */
@keyframes sg-sheet-up{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media (max-width:720px){
  #sg:not(.is-done) .sg-scorebox{
    align-items:flex-end;
    padding:0;
  }
  #sg:not(.is-done) .sg-scorecard{
    width:100%;
    max-width:none;
    max-height:min(92svh,720px);
    margin:0;
    padding:14px 16px calc(14px + env(safe-area-inset-bottom,0px));
    border:0;
    border-radius:14px 14px 0 0;
    box-shadow:0 -8px 28px rgba(38,34,30,.28);
    overflow-y:auto;
    animation:sg-sheet-up .26s cubic-bezier(.2,.8,.2,1) both;
  }
  #sg:not(.is-done) .sg-score-close{top:10px;right:12px}
  #sg:not(.is-done) .sg-score-kicker{margin-right:44px}
  #sg:not(.is-done) .sg-score-points{font-size:clamp(56px,16vw,76px);line-height:.95}
  #sg:not(.is-done) .sg-score-of{font-size:18px}
  #sg:not(.is-done) .sg-score-line{margin:6px 0 12px;font-size:14px;line-height:1.4}
  #sg:not(.is-done) .sg-score-split{
    grid-template-columns:minmax(0,.92fr) minmax(0,1fr) !important;
    gap:10px;
    align-items:stretch;
  }
  #sg:not(.is-done) .sg-score-shot{
    height:auto;
    min-height:0;
    aspect-ratio:4/5;
  }
  #sg:not(.is-done) .sg-score-side{justify-content:center;min-width:0}
  #sg:not(.is-done) .sg-score-invite{
    margin:0 0 10px;
    font-size:clamp(21px,5.6vw,27px);
    line-height:1.06;
  }
  #sg:not(.is-done) .sg-score-actions{gap:8px}
  #sg:not(.is-done) .sg-scorecard .btn{
    min-height:44px;
    padding:8px 6px;
    font-size:15px;
    line-height:1.15;
  }
  #sg:not(.is-done) #sg-next{
    margin-top:12px;
    padding:14px 12px;
    background:var(--black);
    color:var(--on-brand);
  }
}

/* v112 — phone Lock button fills the whole game footer, with larger/bolder text. */
@media (max-width:640px){
  #sg .sg-foot #sg-lock{
    width:100%;
    min-height:56px;
    padding:12px 16px;
    font-size:24px;
    font-weight:900;
    letter-spacing:.01em;
  }
  #sg .sg-foot #sg-lock .lock-ico{width:20px;height:20px}
}
