/* Golf with your AI, lab skin: an AI test chamber. White panels with a heavy bottom edge, hazard tape,
   orange calls to action, and a terminal for your AI. Same markup as the paper skin. */

@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-600.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/chakra-petch-700.woff2") format("woff2"); font-weight: 700 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/pixelify-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pixelify Sans"; src: url("../fonts/pixelify-sans-cyr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-cyr.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --floor: #e6eaee;
  --grout: #dbe1e7;
  --panel: #fbfcfd;
  --panel-2: #eef1f4;
  --steel: #c7d0da;
  --edge: #aeb8c4;
  --ink: #12161b;
  --ink-2: #2b3440;
  --muted: #4a5562;
  --hazard: #f5c02e;
  --hazard-2: #fde7a3;
  --go: #c84500;
  --go-lo: #8f3200;
  --orange: #ff6b1a;
  --blue: #2e9be0;
  --night: #0d1317;
  --night-2: #1b262d;
  --phosphor: #3be36a;
  --dim: #8aa597;
  --ui: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --display: "Pixelify Sans", "Chakra Petch", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --lift: 0 6px 0 var(--edge);
  --lift-sm: 0 3px 0 var(--edge);
  --hazard-bg: repeating-linear-gradient(-45deg, var(--hazard) 0 12px, var(--ink) 12px 24px);
  --tiles: linear-gradient(var(--grout) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--grout) 1px, transparent 1px) 0 0 / 40px 40px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--floor); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--tiles), var(--floor); color: var(--ink); font-family: var(--ui); font-size: 18px; line-height: 1.45; overflow-x: hidden; }
a { color: var(--ink); }
a:hover { color: var(--go); }
:focus-visible { outline: 3px solid var(--go); outline-offset: 3px; }
.vt, .typed, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.ok { color: #1f8a43; }
h1 { font-family: var(--display); font-size: clamp(40px, 6vw, 76px); line-height: 0.98; margin: 0; font-weight: 700; letter-spacing: 0; }
h2 { font-family: var(--display); font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; margin: 0 0 12px; font-weight: 700; }
h3 { font-weight: 700; }
.tilde { font: inherit; }

.card { background: var(--panel); border: 2px solid var(--steel); border-radius: 12px; box-shadow: var(--lift); }
/* the paper skin's tape becomes a strip of hazard tape */
.tape { position: absolute; width: 96px; height: 16px; background: var(--hazard-bg); border-radius: 3px; z-index: 2; pointer-events: none; }
.stamp { position: absolute; padding: 4px 12px; border-radius: 6px; background: var(--ink); color: var(--hazard); font: 700 15px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.pin { position: absolute; left: 50%; top: 14px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); }

/* ------------------------------------------------------------ frame */
.top { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; width: 100%; margin: 0 auto; padding: 16px var(--gutter); background: var(--panel); border-bottom: 2px solid var(--steel); position: relative; }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 10px; background: var(--hazard-bg); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font: 700 22px var(--display); }
.brand:hover { color: var(--ink); }
.brand-ball { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); background: radial-gradient(circle at 38% 38%, var(--edge) 0 1.4px, transparent 1.6px), radial-gradient(circle at 60% 32%, var(--edge) 0 1.4px, transparent 1.6px), radial-gradient(circle at 52% 58%, var(--edge) 0 1.4px, transparent 1.6px), #fff; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 26px; font: 600 17px var(--ui); }
.nav a { text-decoration: none; }
.landing, .app, .page { margin-top: 12px; }
.foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px var(--gutter); background: var(--ink); color: #dfe5ea; font: 15px var(--mono); border-top: 10px solid transparent; border-image: var(--hazard-bg) 10; }
.foot a { color: var(--hazard); }
.foot a:hover { color: #fff; }

/* ------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 28px;
  border: 2px solid var(--ink); border-radius: 10px; background: var(--panel); box-shadow: 0 5px 0 var(--ink);
  color: var(--ink); font: 700 19px var(--ui); text-decoration: none; cursor: pointer; transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.btn:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-go { background: var(--go); border-color: var(--go-lo); box-shadow: 0 5px 0 var(--go-lo), 0 0 22px rgba(255, 122, 40, 0.4); color: #fff; }
.btn-go:hover { color: #fff; background: #b03d00; box-shadow: 0 7px 0 var(--go-lo), 0 0 26px rgba(255, 122, 40, 0.5); }
.btn-blue { background: var(--night); border-color: var(--night); box-shadow: 0 5px 0 var(--night-2); color: var(--phosphor); }
.btn-blue:hover { color: var(--phosphor); }
.btn-small { min-height: 44px; padding: 6px 18px; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: center; }

.panel { position: relative; background: var(--panel); border: 2px solid var(--steel); border-radius: 12px; box-shadow: var(--lift); padding: 22px 26px; }
.panel a { color: var(--go); }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border-radius: 4px; background: var(--ink); color: var(--hazard); font: 700 14px var(--mono); }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 8px; background: var(--panel); box-shadow: 0 4px 0 var(--ink); color: var(--ink); font-weight: 700; font-size: 17px; white-space: nowrap; }
.chip-name { background: var(--go); border-color: var(--go-lo); box-shadow: 0 4px 0 var(--go-lo); color: #fff; }
.chip b { font: 700 22px var(--mono); }
.score-ai { background: var(--night); border-color: var(--night); box-shadow: 0 4px 0 var(--night-2); color: var(--phosphor); font-family: var(--mono); padding: 4px 14px 4px 4px; }
.score-ai b { font-family: var(--mono); }
.face { display: inline-flex; }
.face canvas { border-radius: 6px; }
canvas.avatar { display: block; }
.avatar-paper { border-radius: 8px; }

/* ------------------------------------------------------------ screens */
.app { flex: 1; display: flex; flex-direction: column; }
.screen { flex: 1; min-width: 0; padding: 18px var(--gutter) 32px; }
.loading { display: grid; place-items: center; font-family: var(--mono); color: var(--muted); }
.intro, .results { width: min(1000px, 100%); margin: 0 auto; padding: 18px 0 48px; display: flex; flex-direction: column; gap: 26px; }
.connect { width: min(1220px, 100%); margin: 0 auto; padding: 18px 0 48px; display: flex; flex-direction: column; gap: 26px; }
.kicker { align-self: flex-start; margin: 0; padding: 5px 12px; border-radius: 6px; background: var(--ink); color: var(--hazard); font: 700 14px var(--mono); letter-spacing: 0.04em; }
.lead { margin: 0; font: 21px/1.45 var(--ui); max-width: 46ch; color: var(--ink); }
.feats { margin: 0; font: 16px var(--mono); color: var(--muted); }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.pick { position: relative; display: flex; gap: 18px; align-items: center; text-align: left; padding: 16px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); color: var(--ink); font: inherit; cursor: pointer; transition: transform 120ms; }
.pick:hover { transform: translateY(-2px); }
.pick[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 6px 0 var(--ink); background: var(--hazard-2); }
.pick[aria-checked="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; top: -8px; height: 10px; border-radius: 3px; background: var(--hazard-bg); }
.pick canvas.avatar { flex: none; border-radius: 8px; }
.pick-blank { flex: none; width: 72px; height: 72px; display: grid; place-items: center; background: var(--night); color: var(--phosphor); font: 700 28px var(--mono); border-radius: 8px; }
.pick-text { display: flex; flex-direction: column; gap: 4px; }
.pick-text b { font-size: 23px; font-weight: 700; }
.pick-text span { font: 16px/1.4 var(--ui); color: var(--ink-2); }
.pick-text i { font: italic 15px var(--mono); color: var(--go); }
.intro > .btn-go { align-self: flex-start; font-size: 22px; padding: 16px 40px; }
.stats-line { margin: 0; font: 15px var(--mono); color: var(--muted); }
.term-inline { position: relative; margin: 0; padding: 18px 20px; border-radius: 10px; background: var(--night); color: var(--phosphor); border: 2px solid var(--night-2); white-space: pre-wrap; font: 15px/1.6 var(--mono); }
.status { margin: 0; font: 600 18px var(--ui); color: var(--ink); }

/* ------------------------------------------------------------ an AI says hello */
.connect-face:empty { display: none; }
.entered { display: flex; flex-wrap: wrap; gap: 36px; justify-content: center; align-items: flex-start; padding-top: 12px; animation: drop-in 320ms ease-out; }
.hello-side { flex: 1 1 560px; max-width: 660px; min-width: 0; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.snapshot { position: relative; margin: 0; padding: 14px 14px 50px; border: 2px solid var(--ink); border-radius: 12px; background: var(--panel); box-shadow: 0 6px 0 var(--ink); }
.snapshot .tape { left: 50%; top: -9px; margin-left: -48px; }
.snapshot canvas { max-width: 100%; height: auto; border-radius: 6px; }
.snapshot figcaption { position: absolute; left: 16px; bottom: 14px; font: 15px var(--mono); }
.hello { flex: 1 1 260px; min-width: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 0 6px 0 var(--ink); text-align: center; }
.hello-head { display: flex; flex-direction: column; padding: 12px 20px 10px; background: var(--go); color: #fff; }
.hello-head b { font: 700 38px var(--display); line-height: 1; }
.hello-head span { font: 700 15px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.hello-name { margin: 0; padding: 22px 16px 8px; font: 700 clamp(36px, 4.6vw, 58px)/1 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.hello-model { margin: 0; padding: 0 16px 18px; font: 15px var(--mono); color: var(--muted); }
.hello-about { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); }
.hello-about p { margin: 0; font-size: 18px; line-height: 1.45; }
.hello-quote { font: 600 24px/1.25 var(--ui); color: var(--go); }
.entered-term { position: relative; flex: 0 1 520px; min-width: 0; border-radius: 12px; overflow: hidden; background: var(--night); border: 2px solid var(--night-2); }
.entered-term::before { content: ""; display: block; height: 10px; background: var(--hazard-bg); }
.entered-term pre { margin: 0; padding: 18px 20px 22px; font: 13.5px/1.5 var(--mono); white-space: pre-wrap; color: var(--phosphor); overflow-x: auto; }
.entered-term .cmd { color: #fff; } .entered-term .ok { color: var(--hazard); } .entered-term .dim { color: var(--dim); }

/* ------------------------------------------------------------ the game */
.game { width: min(1400px, 100%); margin: 0 auto; padding: 0 0 28px; display: flex; flex-direction: column; gap: 16px; }
.game > .hud { order: 0; }
.game > .say-card { order: 1; }
.game > .stage-wrap { order: 2; }
.game > .foot-bar { order: 3; }
.game > .parts { order: 4; }
.hud { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 6px; }
.hud-left, .hud-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.icon-btn { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--panel); box-shadow: 0 4px 0 var(--ink); cursor: pointer; }
.speaker { width: 20px; height: 18px; background: var(--ink); clip-path: polygon(0 30%, 35% 30%, 75% 0, 75% 100%, 35% 70%, 0 70%); }
.icon-btn.is-off .speaker { opacity: 0.3; }
.stage-wrap { position: relative; display: flex; gap: 20px; align-items: stretch; justify-content: center; }
.stage { position: relative; flex: 0 1 auto; align-self: flex-start; width: min(100%, calc((100svh - 300px) * 5 / 3)); min-width: 0; aspect-ratio: 5 / 3; touch-action: none; cursor: crosshair; border-radius: 12px; background: var(--night-2); box-shadow: 0 0 0 2px var(--ink), 0 8px 0 var(--ink); overflow: hidden; }
.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage > canvas.fx { pointer-events: none; }
.banner { position: absolute; left: 50%; top: 9%; transform: translate(-50%, -10px); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 26px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: 0 6px 0 var(--ink); opacity: 0; transition: opacity 180ms, transform 220ms; pointer-events: none; text-align: center; z-index: 3; max-width: 92%; }
.banner.is-on { opacity: 1; transform: translate(-50%, 0); }
.banner b { font: 700 clamp(22px, 3vw, 36px) var(--display); }
.banner span { font: 16px var(--mono); }
.banner-row { display: flex; align-items: center; gap: 16px; }
.banner-row canvas { border-radius: 8px; }
.banner-ascii { background: var(--night); border-color: var(--night-2); box-shadow: 0 6px 0 var(--night-2); color: var(--phosphor); }
.banner-ascii b { font-family: var(--mono); font-weight: 700; }
.banner-ascii span { color: #d8f5d8; }
.term { position: relative; flex: 0 0 0; width: 0; overflow: hidden; border-radius: 12px; background: var(--night); transition: flex-basis 500ms, width 500ms; }
.term.is-open { flex-basis: min(440px, 34%); width: min(440px, 34%); }
.term-in { position: absolute; inset: 0; display: flex; flex-direction: column; }
.term-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #24323a; color: var(--dim); font: 13px var(--mono); white-space: nowrap; }
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--orange); }
.dots i:nth-child(2) { background: var(--hazard); }
.dots i:nth-child(3) { background: var(--phosphor); }
.term-body { flex: 1; min-height: 0; margin: 0; padding: 16px 18px; overflow: auto; color: var(--phosphor); font: 14px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
.term-body .prompt { color: #ff9b5e; }
.term-body .cmd { color: #fff; }
.term-body .dim, .term-body .wait { color: var(--dim); }
.term-body .ok { color: var(--hazard); }
.term-body .say { color: #fff3a0; }
/* the AI's last words: its face and a speech bubble, between the scores and the course */
.say-card { align-self: stretch; display: flex; align-items: center; gap: 14px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--night); border: 2px solid var(--night-2); color: var(--ink); font: 600 19px/1.35 var(--ui); animation: drop-in 260ms ease-out; }
.say-card canvas { flex: none; border-radius: 8px; }
.say-card span { flex: 1 1 auto; min-width: 0; padding: 8px 14px; border-radius: 4px 12px 12px 12px; background: var(--panel); }
.foot-bar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.power { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); font-weight: 700; font-size: 18px; min-width: 0; }
.segs { position: relative; display: flex; gap: 4px; width: clamp(160px, 24vw, 300px); height: 30px; padding: 4px; border-radius: 8px; background: var(--night); }
.seg { flex: 1; height: 100%; border-radius: 3px; background: #2a3640; }
.seg.on { background: var(--hazard); box-shadow: 0 0 8px rgba(245, 192, 46, 0.6); }
.seg.hot { background: var(--orange); box-shadow: 0 0 8px rgba(255, 107, 26, 0.7); }
.power-num { min-width: 2.5ch; font: 700 24px var(--mono); }
.hint { margin: 0; font: 15px var(--mono); color: var(--muted); }
.foot-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; align-items: center; margin-left: auto; }
.foot-right .chip { background: var(--hazard); }
.parts { margin: 0; padding-left: 22px; font: 15px/1.55 var(--mono); color: var(--muted); }
.game.is-ascii .hud .chip:not(.score-ai) { background: var(--night); border-color: var(--night); box-shadow: 0 4px 0 var(--night-2); color: var(--phosphor); font-family: var(--mono); }

/* ------------------------------------------------------------ juice */
.pop { position: absolute; z-index: 4; transform: translate(-50%, -100%); pointer-events: none; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 8px; background: var(--panel); color: var(--ink); font: 700 clamp(14px, 1.6vw, 20px) var(--ui); white-space: nowrap; animation: pop-up 1.25s ease-out forwards; }
.pop-big { background: var(--hazard); font-family: var(--display); font-size: clamp(20px, 3vw, 34px); padding: 6px 16px; }
.pop-bad { background: var(--blue); color: #fff; }
.pop-ascii { background: var(--night); border-color: var(--night-2); color: var(--phosphor); font-family: var(--mono); }
@keyframes pop-up { 0% { opacity: 0; transform: translate(-50%, -60%) scale(0.6); } 15% { opacity: 1; transform: translate(-50%, -110%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -160%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -200%) scale(1); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px); } }

/* ------------------------------------------------------------ hole result */
.hole-result { position: fixed; inset: 0; z-index: 30; overflow: auto; background: var(--tiles), var(--floor); color: var(--ink); display: flex; align-items: center; animation: hr-in 260ms ease-out; }
.hole-result::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 10px; background: var(--hazard-bg); }
@keyframes hr-in { from { opacity: 0; } to { opacity: 1; } }
.hr-wrap { width: min(1260px, 100%); margin: 0 auto; padding: 48px var(--gutter); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hr-text { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hr-kicker { align-self: flex-start; margin: 0; padding: 5px 12px; border-radius: 6px; background: var(--ink); color: var(--hazard); font: 700 15px var(--mono); }
.hole-result h1 { font-size: clamp(44px, 6vw, 80px); }
.hr-story { margin: 0; font: clamp(19px, 2vw, 22px)/1.45 var(--ui); max-width: 40ch; }
.hr-scroll { position: relative; overflow-x: auto; padding: 22px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); }
.hr-stamp { position: absolute; right: 16px; top: 12px; padding: 3px 10px; border-radius: 6px; background: var(--ink); color: var(--hazard); font: 700 14px var(--mono); white-space: nowrap; }
.hr-card { margin-top: 30px; border-collapse: collapse; font: 22px var(--mono); }
.hr-card th, .hr-card td { padding: 9px 0; width: 50px; text-align: center; border: 2px solid var(--ink); }
.hr-card th[scope="row"], .hr-card thead th:first-child { width: auto; min-width: 140px; padding: 9px 14px 9px 8px; text-align: left; font: 600 19px var(--ui); border: 0; }
.hr-card .is-now { background: var(--hazard-2); }
.hr-card thead .is-now { background: var(--hazard); }
.hr-share { position: relative; flex: 1 1 420px; min-width: 0; margin: 0; padding: 10px 10px 64px; border-radius: 14px; background: var(--hazard-bg); }
.hr-share-card { aspect-ratio: 1200 / 630; border-radius: 8px; background: var(--night); padding: 20px 24px; display: flex; flex-direction: column; justify-content: space-between; color: #dfe5ea; }
.hr-share-top { display: flex; justify-content: space-between; align-items: center; font: 700 20px var(--display); }
.hr-share-score { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.hr-share-score b { font: 700 clamp(40px, 5vw, 68px) var(--mono); color: #fff; }
.hr-share-score span { font: clamp(14px, 1.6vw, 18px) var(--mono); color: var(--hazard); text-align: center; }
.hr-share-score .hr-ai { font-family: var(--mono); font-weight: 700; }
.hr-share-who { display: flex; justify-content: space-between; gap: 12px; font: 16px var(--ui); }
.hr-share-who .hr-ai { font-family: var(--mono); }
.hr-ai { color: var(--phosphor) !important; }
.hr-share figcaption { position: absolute; left: 14px; right: 14px; bottom: 10px; padding: 6px 10px; border-radius: 6px; background: var(--panel); font: 14px/1.3 var(--ui); color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .hole-result, .entered, .say-card { animation: none; } }

/* ------------------------------------------------------------ results */
.card-rows { display: flex; flex-direction: column; gap: 16px; }
.card-row { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 2fr); gap: 16px; align-items: center; }
.who { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 21px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who canvas { flex: none; border-radius: 6px; }
.you-dot { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.card-row > b { font: 700 22px var(--mono); }
.marks { display: flex; gap: 6px; justify-content: flex-end; }
.marks i { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 6px; color: var(--ink); font: 700 19px var(--mono); font-style: normal; }
.share-preview { margin: 0; padding: 16px 20px; border-radius: 12px; background: var(--night); color: var(--phosphor); white-space: pre-wrap; font: 16px/1.5 var(--mono); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin: 0; }
.stats div { padding: 12px 16px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); }
.stats dt { font: 14px var(--mono); color: var(--muted); }
.stats dd { margin: 0; font: 700 36px var(--display); }
.next { display: flex; flex-direction: column; gap: 14px; }
.next p { margin: 0; }
.countdown { font: 700 28px var(--mono); color: var(--go); }
.email-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.email-form input { flex: 1 1 240px; min-height: 50px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font: 18px var(--ui); }
.sponsor { margin: 0; font: 15px var(--mono); color: var(--muted); }
.pitch { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 16px 20px; border: 2px dashed var(--ink-2); border-radius: 12px; }
.pitch p { margin: 0; }
.star { color: var(--go); font-weight: 400; }
.archive a { color: var(--go); }

/* ------------------------------------------------------------ text pages */
.page { width: min(980px, 100%); margin: 0 auto; padding: 32px var(--gutter) 56px; display: flex; flex-direction: column; gap: 22px; }
.narrow { width: min(880px, 100%); }
.page > h1 { align-self: flex-start; }
.page > h2 { align-self: flex-start; margin: 14px 0 0; }
.page > p { margin: 0; font: 19px/1.55 var(--ui); max-width: 62ch; }
.page > .lead { font-size: 21px; }
.steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 22px 26px 22px 48px; border: 2px solid var(--steel); border-radius: 12px; background: var(--panel); box-shadow: var(--lift); font: 18px/1.5 var(--ui); }
.steps b { font-weight: 700; }
pre.term { position: relative; margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--night); color: var(--phosphor); white-space: pre-wrap; font: 15px/1.55 var(--mono); width: auto; flex: none; overflow: visible; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.board { margin: 0; padding-left: 28px; font: 16px var(--mono); }
.board li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--edge); }
.card-rows.panel div span { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .stage-wrap { flex-direction: column; gap: 14px; }
  .stage { width: 100%; }
  .term.is-open { flex-basis: auto; width: auto; height: 34vh; }
  .card-row { grid-template-columns: 1fr auto; }
  .marks { grid-column: 1 / -1; justify-content: flex-start; }
  .hint { order: 3; flex-basis: 100%; }
  .hr-card { font-size: 18px; }
  .hr-card th, .hr-card td { width: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .term, .banner, .btn, .pick { transition: none; }
  .pop { animation: none; opacity: 1; }
}

/* ------------------------------------------------------------ landing */
.landing { display: flex; flex-direction: column; }
.l-wrap { width: min(1280px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.l-hero { width: min(1280px, 100%); margin: 0 auto; padding: 40px var(--gutter) 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; }
.l-hero-text { display: flex; flex-direction: column; gap: 24px; }
.l-kicker { margin: 0; align-self: flex-start; padding: 5px 12px; border-radius: 6px; background: var(--ink); color: var(--hazard); font: 700 15px var(--mono); }
.l-title { font-size: clamp(56px, 7vw, 92px); line-height: 0.95; }
.l-lead { margin: 0; max-width: 32ch; font: 22px/1.45 var(--ui); }
.l-cta { gap: 18px; padding-top: 6px; }
.l-cta .btn { font-size: 20px; padding: 16px 30px; }
.l-sub { margin: 0; font-size: 15px; color: var(--muted); }
.l-figure { position: relative; margin: 0; padding: 12px; width: 100%; max-width: 760px; justify-self: end; border: 2px solid var(--steel); border-radius: 14px; background: var(--panel); box-shadow: var(--lift); }
.l-window { position: relative; width: 100%; aspect-ratio: 5 / 3; overflow: hidden; border-radius: 8px; border: 2px solid var(--ink); background: var(--night); }
.l-ascii { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(18, minmax(0, 1fr)); font: 700 min(18px, 1.7vw) / 1 var(--mono); }
.l-arow { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: center; justify-items: center; }
.a-wall { color: #5f7a68; } .a-turf { color: #2c5c3a; } .a-cup { color: #ff9b5e; } .a-water { color: #6cc4ff; } .a-sand { color: #ead39a; }
.a-slope { color: #9be3a6; } .a-bump { color: #ff9b5e; } .a-ring { color: var(--hazard); } .a-part { color: #c9d1d9; }
.a-me { color: var(--phosphor); text-shadow: 0 0 10px var(--phosphor); }
/* the course on the left, the ASCII showing through on the right; the seam is a strip of hazard tape */
.l-lab { position: absolute; inset: 0; width: 100%; height: 100%; background: var(--floor); clip-path: inset(0 41% 0 0); }
.l-seam { position: absolute; top: 0; bottom: 0; left: 59%; width: 10px; margin-left: -5px; background: var(--hazard-bg); }
.l-tag { position: absolute; top: 10px; padding: 4px 10px; border-radius: 6px; font: 700 13px var(--mono); }
.l-tag-you { left: 10px; background: var(--panel); border: 2px solid var(--ink); color: var(--ink); }
.l-tag-ai { left: calc(59% + 14px); background: var(--phosphor); color: var(--night); }
.l-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font: 14px var(--mono); color: var(--muted); }
.l-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 28px; }
.l-section-head h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); }
.l-section-head p { margin: 0; font: 15px var(--mono); color: var(--muted); }
.l-how { padding-bottom: 88px; }
.l-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.l-steps li { display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--ink); border-radius: 14px; background: var(--panel); box-shadow: 0 8px 0 var(--ink); }
.l-step-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ink); color: var(--hazard); font: 700 14px var(--mono); letter-spacing: 0.08em; }
.l-step-bar::after { content: ""; width: 72px; height: 12px; border-radius: 3px; background: var(--hazard-bg); }
.l-step-pic { height: 150px; display: flex; align-items: center; justify-content: center; gap: 18px; background: var(--tiles), var(--floor); border-bottom: 2px solid var(--steel); }
.l-step-pic.is-term { justify-content: flex-start; padding: 0 18px; background: var(--night); border-bottom-color: var(--night-2); }
.l-step-pic svg { max-width: 100%; height: auto; }
.l-vs { font: 700 34px var(--display); color: var(--go); }
.l-who { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.l-line { margin: 0; font: 14px/1.6 var(--mono); color: var(--phosphor); }
.l-cursor { display: inline-block; width: 9px; height: 16px; margin-left: 4px; vertical-align: -3px; background: var(--phosphor); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.l-step-text { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.l-step-text h3 { margin: 0; font-size: 24px; }
.l-step-text p { margin: 0; font-size: 17px; line-height: 1.5; }
.l-sees { padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.l-sees-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; }
.l-sees-text h2 { margin: 0; }
.l-sees-text p { margin: 0; font-size: 20px; line-height: 1.5; max-width: 34ch; }
.l-legend { font: 15px/1.6 var(--mono) !important; color: var(--muted); }
.l-term-wrap { position: relative; flex: 999 1 640px; min-width: 0; }
.l-term { margin: 0; padding: 24px 26px; border-radius: 12px; background: var(--night); color: var(--phosphor); font: 14px/1.3 var(--mono); overflow-x: auto; white-space: pre; }
.l-term .t-p { color: #ff9b5e; } .l-term .t-cmd { color: #fff; }
#board { padding-bottom: 88px; }
.l-board { position: relative; padding: 30px 32px 34px; border: 2px solid var(--steel); border-radius: 14px; background: var(--panel); box-shadow: var(--lift); }
.l-board .stamp { right: 28px; top: 30px; }
.l-board h2 { margin: 0 0 20px; padding-right: 180px; }
.l-table { overflow-x: auto; }
.l-table table { width: 100%; min-width: 520px; border-collapse: collapse; font: 18px var(--mono); }
.l-table thead tr { border-bottom: 3px solid var(--ink); text-align: left; }
.l-table th, .l-table td { padding: 12px; }
.l-table thead th { font: 600 16px var(--ui); }
.l-table thead th:not(:first-child), .l-table td { text-align: right; }
.l-table tbody tr { border-bottom: 1px dashed var(--edge); }
.l-table tbody tr:last-child { border-bottom: 0; }
.l-table tbody th { text-align: left; font-weight: 400; }
.l-table a { color: var(--go); }
.l-house { color: var(--muted); }
.l-price { padding-bottom: 88px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.l-panel { position: relative; padding: 42px 28px 30px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border: 2px solid var(--steel); border-radius: 14px; background: var(--panel); box-shadow: var(--lift); }
.l-panel-gold { background: var(--hazard-2); border-color: var(--ink); box-shadow: 0 6px 0 var(--ink); }
.l-panel h3 { margin: 0; font-size: 28px; }
.l-panel p { margin: 0; font-size: 17px; line-height: 1.5; }
.l-panel .typed:first-of-type { color: var(--muted); }
.l-panel .l-big { font: 700 44px var(--display); }
.l-sponsor { padding-bottom: 48px; font-size: 16px; }
@media (min-width: 861px) {
  .l-term { white-space: pre-wrap; }
}
@media (max-width: 860px) {
  .l-figure { justify-self: stretch; max-width: none; }
  .l-hero { padding-bottom: 56px; gap: 36px; }
  .l-board { padding: 24px 18px 26px; }
  .l-board h2 { padding-right: 0; padding-top: 34px; }
  .l-board .stamp { right: 18px; top: 16px; }
  .l-table table { min-width: 0; font-size: 15px; }
  .l-table th, .l-table td { padding: 10px 8px; }
  .l-cta .btn { font-size: 18px; padding: 14px 24px; }
}
@media (prefers-reduced-motion: reduce) { .l-cursor { animation: none; } }

/* ------------------------------------------------------------ phones: the round takes the whole screen */
@property --term-h { syntax: "<length>"; inherits: true; initial-value: 0px; }
.hud-short { display: none; }
.stage { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (pointer: coarse) {
  .l-cta .cta-golf { order: -1; }
}
@media (max-width: 860px), (max-height: 540px) {
  html:has(> body.is-playing) { overflow: hidden; overscroll-behavior: none; }
  body.is-playing { height: 100dvh; min-height: 0; overflow: hidden; overscroll-behavior: none; }
  .is-playing .top, .is-playing .foot { display: none; }
  .is-playing .app { min-height: 0; margin-top: 0; }
  .is-playing .screen { display: flex; min-height: 0; padding: 0; }
  .is-playing .game { flex: 1; min-height: 0; gap: 10px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .is-playing .game .hud { flex-wrap: nowrap; gap: 8px; padding-top: 0; }
  .is-playing .game .hud-left, .is-playing .game .hud-right { flex-wrap: nowrap; gap: 8px; min-width: 0; }
  .is-playing .game .chip { padding: 4px 10px; gap: 6px; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
  .is-playing .game .chip-name, .is-playing .game .score-ai { box-shadow: 0 3px 0 var(--night-2); }
  .is-playing .game .chip b { font-size: 18px; }
  .is-playing .game .score-ai { padding: 3px 10px 3px 3px; }
  .is-playing .game .chip-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .is-playing .game .face canvas { width: 24px !important; height: 24px !important; }
  .is-playing .game .ai-name, .is-playing .hud-long { display: none; }
  .is-playing .hud-short { display: inline; }
  .is-playing .game .icon-btn { flex: none; width: 36px; height: 36px; box-shadow: 0 3px 0 var(--ink); }
  /* the course is sized from the space left, turned a quarter when the phone is upright */
  .is-playing .stage-wrap { flex: 1; min-height: 0; display: block; container-type: size; touch-action: none; --avail: calc(100cqh - var(--term-h)); transition: --term-h 450ms; }
  .is-playing .stage-wrap:has(.term.is-open) { --term-h: clamp(130px, 26dvh, 240px); }
  .is-playing .stage { position: absolute; left: 50%; top: calc(var(--avail) / 2); width: min(100cqw, var(--avail) * 5 / 3); aspect-ratio: 5 / 3; transform: translate(-50%, -50%) rotate(var(--turn, 0deg)); box-shadow: 0 0 0 2px var(--ink); }
  .is-playing .is-turned .stage { width: min(var(--avail), 100cqw * 5 / 3); }
  .is-playing .is-turned .banner, .is-playing .is-turned .banner.is-on { top: 50%; max-width: 58%; padding: 10px 18px 12px; transform-origin: 0 0; transform: translate(-50%, -50%); rotate: calc(-1 * var(--turn)); }
  .is-playing .is-turned .banner b { font-size: 24px; }
  .is-playing .is-turned .banner span { font-size: 14px; }
  .is-playing .is-turned .pop { transform-origin: 0 0; rotate: calc(-1 * var(--turn)); }
  .is-playing .term, .is-playing .term.is-open { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: var(--term-h); flex: none; transition: none; }
  .is-playing .term-head { padding: 5px 12px; font-size: 12px; }
  .is-playing .term-body { padding: 8px 12px; font-size: 13px; }
  .is-playing .say-card { gap: 10px; padding: 4px 8px; font-size: 14px; }
  .is-playing .say-card span { padding: 6px 10px; }
  .is-playing .say-card canvas { width: 30px !important; height: 30px !important; }
  .is-playing .foot-bar { flex-wrap: wrap; gap: 6px 10px; }
  .is-playing .power { flex: 1 1 auto; gap: 10px; padding: 6px 10px; font-size: 15px; box-shadow: var(--lift-sm); }
  .is-playing .segs { flex: 1; width: auto; height: 22px; }
  .is-playing .power-num { font-size: 20px; }
  .is-playing .foot-right { gap: 8px; }
  .is-playing .foot-right .chip { font-size: 14px; }
  .is-playing .foot-right .btn-small { min-height: 38px; padding: 4px 12px; font-size: 14px; }
  .is-playing .hint { order: 3; flex-basis: 100%; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .is-playing .parts { display: none; }
  .is-playing .hole-result { align-items: flex-start; }
  .is-playing .hr-wrap { margin: auto; gap: 24px; padding: max(28px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom)); }
  .is-playing .hr-text { flex-basis: 100%; gap: 16px; }
  .is-playing .hr-kicker { font-size: 14px; }
  .is-playing .hole-result h1 { font-size: 40px; }
  .is-playing .hr-story { font-size: 17px; }
  .is-playing .hr-scroll { padding: 14px; }
  .is-playing .hr-stamp { font-size: 13px; }
  .is-playing .hr-card { margin-top: 34px; font-size: 18px; }
  .is-playing .hr-card th, .is-playing .hr-card td { width: 38px; padding: 6px 0; }
  .is-playing .hr-card th[scope="row"], .is-playing .hr-card thead th:first-child { min-width: 0; padding: 6px 10px 6px 4px; }
  .is-playing .hole-result .row .btn { flex: 1; }
  .is-playing .hr-share { display: none; }
}
/* a phone on its side: scores and power down the left, the course as tall as the screen */
@media (orientation: landscape) and (max-height: 540px) {
  .is-playing .game { display: grid; grid-template-columns: minmax(0, 1fr) min(calc((100dvh - 20px) * 5 / 3), 68vw); grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "hud stage" "say stage" "gap stage" "foot stage"; gap: 10px 16px; }
  .is-playing .game .hud { grid-area: hud; flex-direction: column; align-items: flex-start; }
  .is-playing .game .hud-left, .is-playing .game .hud-right { flex-wrap: wrap; }
  .is-playing .stage-wrap { grid-area: stage; }
  .is-playing .stage-wrap:has(.term.is-open) { --term-h: clamp(90px, 30dvh, 120px); }
  .is-playing .say-card { grid-area: say; }
  .is-playing .foot-bar { grid-area: foot; }
  .is-playing .hint { white-space: normal; text-align: left; }
}
