/* Golf with your AI: a pixel course for you, a terminal for your AI. */

@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+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: "VT323"; src: url("../fonts/vt323.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #17231b;
  --ink-2: #0d1510;
  --night: #07110b;
  --paper: #fffaf0;
  --sage: #e7ede4;
  --muted: #c9d4c6;
  --dim: #8fa294;
  --phosphor: #8dff96;
  --red: #c63b27;
  --yellow: #ffd23f;
  --turf: #3c9a58;
  --ui: "Pixelify Sans", system-ui, sans-serif;
  --mono: "VT323", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); color: var(--paper); font-family: var(--ui); font-size: 18px; line-height: 1.45; }
a { color: var(--yellow); }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.vt { font-family: var(--mono); font-size: 1.15em; line-height: 1.2; }
.muted { color: var(--dim); }
.ok { color: var(--phosphor); }
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 0.95; margin: 0; font-weight: 700; }
h2 { font-size: 30px; margin: 0 0 12px; }

.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 18px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--paper); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand-ball { width: 22px; height: 22px; background: #fff; box-shadow: 0 0 0 3px var(--ink-2), 3px 3px 0 3px var(--ink-2); clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--paper); }
.foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px var(--gutter) 24px; color: var(--dim); }
.foot a { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px; border: 4px solid var(--ink-2); box-shadow: 5px 5px 0 var(--ink-2); background: var(--paper); color: var(--ink); font: 700 20px var(--ui); text-decoration: none; cursor: pointer; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink-2); color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-go { background: var(--red); color: #fff; }
.btn-go:hover { color: #fff; }
.btn-small { min-height: 40px; font-size: 16px; padding: 6px 14px; }
.panel { background: var(--paper); color: var(--ink); border: 4px solid var(--ink-2); box-shadow: 8px 8px 0 var(--ink-2); padding: 20px 24px; }
.panel a { color: var(--red); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 0 10px; background: var(--ink-2); color: var(--yellow); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--paper); color: var(--ink); border: 4px solid var(--ink-2); box-shadow: 4px 4px 0 var(--ink-2); font-weight: 700; font-size: 17px; white-space: nowrap; }
.chip-name { background: var(--yellow); }
.chip b { font-size: 26px; font-weight: 400; }
.score-ai { background: var(--night); color: var(--phosphor); }
.face { display: inline-flex; }
canvas.avatar { image-rendering: pixelated; display: block; }

/* ------------------------------------------------------------ screens */
.app { flex: 1; display: flex; flex-direction: column; }
.screen { flex: 1; min-width: 0; padding: 8px var(--gutter) 24px; }
.loading { display: grid; place-items: center; color: var(--muted); }
.intro, .connect, .results { width: min(980px, 100%); margin: 0 auto; padding: 24px 0 48px; display: flex; flex-direction: column; gap: 22px; }
.kicker { margin: 0; color: var(--yellow); }
.lead { margin: 0; font-size: 22px; max-width: 46ch; color: var(--muted); }
.feats { margin: 0; color: var(--muted); }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.pick { display: flex; gap: 18px; align-items: center; text-align: left; padding: 16px; border: 4px solid var(--ink-2); box-shadow: 6px 6px 0 var(--ink-2); background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.pick[aria-checked="true"] { background: var(--yellow); outline: 4px solid var(--paper); outline-offset: 0; }
.pick canvas.avatar { border: 4px solid var(--ink-2); flex: none; }
.pick-blank { flex: none; width: 80px; height: 80px; display: grid; place-items: center; background: var(--night); color: var(--phosphor); border: 4px solid var(--ink-2); font-size: 34px; }
.pick-text { display: flex; flex-direction: column; gap: 4px; }
.pick-text b { font-size: 24px; }
.pick-text i { font-style: normal; color: #5a4632; }
.intro > .btn-go { align-self: flex-start; font-size: 24px; padding: 14px 40px; }
.stats-line { color: var(--dim); margin: 0; }
.term-inline { margin: 0; padding: 18px 20px; background: var(--night); color: var(--phosphor); border: 4px solid #2c4a33; white-space: pre-wrap; font-size: 22px; }
.connect-face canvas { border: 4px solid var(--ink-2); }
.status { margin: 0; color: var(--phosphor); }

/* ------------------------------------------------------------ the game */
.game { width: min(1400px, 100%); margin: 0 auto; padding: 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.hud { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.hud-left, .hud-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper); border: 4px solid var(--ink-2); box-shadow: 4px 4px 0 var(--ink-2); cursor: pointer; }
.speaker { width: 18px; height: 16px; 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: 16px; align-items: stretch; justify-content: center; }
.stage { position: relative; flex: 0 1 auto; align-self: flex-start; width: min(100%, calc((100svh - 250px) * 5 / 3)); min-width: 0; aspect-ratio: 5 / 3; border: 6px solid var(--ink-2); box-shadow: 10px 10px 0 var(--ink-2); touch-action: none; cursor: crosshair; background: var(--night); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas.course { image-rendering: pixelated; }
.stage canvas.fx { pointer-events: none; }
.stage.is-ascii { border-color: var(--phosphor); box-shadow: 0 0 40px rgba(141, 255, 150, 0.3); }
.stage.is-ascii::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0.18) 3px); }
.banner { position: absolute; left: 50%; top: 14%; transform: translate(-50%, -8px); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 28px; background: var(--paper); color: var(--ink); border: 4px solid var(--ink-2); box-shadow: 6px 6px 0 var(--ink-2); opacity: 0; transition: opacity 180ms, transform 180ms; pointer-events: none; text-align: center; z-index: 3; }
.banner.is-on { opacity: 1; transform: translate(-50%, 0); }
.banner b { font-size: clamp(22px, 3vw, 36px); }
.banner-ascii { background: var(--night); color: var(--phosphor); border-color: var(--phosphor); box-shadow: 0 0 24px rgba(141, 255, 150, 0.4); }
.term { position: relative; flex: 0 0 0; width: 0; overflow: hidden; background: #0b1810; border: 0 solid #2c4a33; transition: flex-basis 500ms, width 500ms; }
.term.is-open { flex-basis: min(420px, 34%); width: min(420px, 34%); border-width: 4px; }
.term-in { position: absolute; inset: 0; display: flex; flex-direction: column; }
.term-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 4px solid #2c4a33; color: var(--dim); font-family: var(--mono); font-size: 20px; white-space: nowrap; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; background: #ff6b57; }
.dots i:nth-child(2) { background: var(--yellow); }
.dots i:nth-child(3) { background: var(--phosphor); }
.term-body { flex: 1; min-height: 0; margin: 0; padding: 12px 14px; overflow: auto; color: var(--phosphor); font-size: 19px; white-space: pre-wrap; word-break: break-word; }
.term-body .prompt { color: #ff8a6a; }
.term-body .cmd { color: #fff; }
.term-body .dim, .term-body .wait { color: #5f8f6a; }
.term-body .ok { color: var(--yellow); }
.term-body .say { color: #fff3a0; }
.foot-bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.power { display: flex; align-items: center; gap: 12px; font-weight: 700; flex: 0 1 auto; min-width: 0; }
.segs { display: flex; gap: 5px; min-width: 0; }
.seg { flex: 0 1 22px; min-width: 8px; height: 20px; border: 3px solid var(--ink-2); background: #2c3a30; }
.seg.on { background: var(--yellow); }
.seg.hot { background: var(--red); }
.power-num { min-width: 2.5ch; color: var(--yellow); font-size: 30px; }
.hint { margin: 0; color: var(--muted); }
.foot-right { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; align-items: center; margin-left: auto; }
.parts { margin: 0; padding-left: 20px; color: var(--dim); font-size: 18px; }
.game.is-ascii .hud .chip:not(.score-ai) { background: var(--night); color: var(--phosphor); border-color: var(--phosphor); box-shadow: none; }

/* ------------------------------------------------------------ results */
.card-rows { display: flex; flex-direction: column; gap: 14px; }
.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: 10px; font-weight: 700; font-size: 22px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who canvas { border: 3px solid var(--ink-2); flex: none; }
.you-dot { width: 32px; height: 32px; flex: none; background: #fff; border: 3px solid var(--ink-2); }
.card-row > b { font-size: 26px; font-weight: 400; }
.marks { display: flex; gap: 6px; justify-content: flex-end; }
.marks i { width: 40px; height: 40px; display: grid; place-items: center; border: 3px solid var(--ink-2); color: var(--ink); font: 24px var(--mono); font-style: normal; }
.share-preview { margin: 0; padding: 14px 18px; background: var(--ink-2); color: var(--muted); white-space: pre-wrap; font-size: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0; }
.stats div { padding: 10px 14px; border: 4px solid var(--ink-2); background: #22332a; }
.stats dt { color: var(--dim); font-size: 15px; }
.stats dd { margin: 0; font-size: 36px; color: var(--yellow); }
.next { display: flex; flex-direction: column; gap: 12px; }
.next p { margin: 0; }
.countdown { font-size: 32px; color: var(--red); }
.email-form { display: flex; flex-wrap: wrap; gap: 12px; }
.email-form input { flex: 1 1 240px; min-height: 48px; padding: 8px 14px; border: 4px solid var(--ink-2); font: 22px var(--mono); background: #fff; color: var(--ink); }

.sponsor { margin: 0; color: var(--dim); }
.sponsor a { color: var(--muted); }
.pitch { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 14px 18px; border: 4px dashed var(--yellow); color: var(--muted); }
.pitch p { margin: 0; }
.pitch b { color: var(--yellow); }
.star { color: var(--yellow); font-weight: 400; }
.archive a { color: var(--red); }

/* ------------------------------------------------------------ text pages */
.page { width: min(980px, 100%); margin: 0 auto; padding: 24px var(--gutter) 48px; display: flex; flex-direction: column; gap: 18px; }
.narrow { width: min(860px, 100%); }
.steps { display: flex; flex-direction: column; gap: 10px; padding-left: 24px; color: var(--muted); }
.steps b { color: var(--paper); }
.term { font-family: var(--mono); }
pre.term { margin: 0; padding: 16px 18px; background: var(--night); color: var(--phosphor); border: 4px solid #2c4a33; white-space: pre-wrap; font-size: 20px; 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; }
.board li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 2px dashed #c9d4c6; }

@media (max-width: 860px) {
  .stage-wrap { flex-direction: column; }
  .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%; }
}
@media (prefers-reduced-motion: reduce) {
  .term, .banner { transition: none; }
}

/* ------------------------------------------------------------ admin replay */
.replay .stage { cursor: default; }
.replay-bar { align-items: flex-start; }
.replay-log { margin: 0; padding-left: 28px; display: flex; flex-direction: column; gap: 4px; font-size: 18px; }
.replay-item { width: 100%; text-align: left; background: none; border: 0; padding: 4px 8px; color: var(--muted); font: inherit; cursor: pointer; }
.replay-item:hover, .replay-item.is-on { background: var(--ink-2); color: var(--yellow); }

/* ------------------------------------------------------------ juice */
.pop { position: absolute; z-index: 4; transform: translate(-50%, -100%); pointer-events: none; padding: 2px 8px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink-2); font: 700 clamp(14px, 1.6vw, 20px) var(--ui); white-space: nowrap; animation: pop-up 1.25s ease-out forwards; }
.pop-big { background: var(--yellow); font-size: clamp(20px, 3vw, 34px); padding: 4px 14px; }
.pop-bad { background: #59b6ff; color: #07110b; }
.pop-ascii { background: var(--night); color: var(--phosphor); border-color: var(--phosphor); }
@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); } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; opacity: 1; } }

/* ------------------------------------------------------------ landing (light, like the mockup) */
.page-landing { --l-ground: #e7ede4; --l-ink: #17231b; --l-muted: #4b5a50; background: var(--l-ground); color: var(--l-ink); }
html:has(.page-landing) { background: var(--l-ground); }
.page-landing .top .brand, .page-landing .nav a { color: var(--l-ink); }
.page-landing .nav a:hover { color: var(--red); }
.page-landing .brand-ball { box-shadow: 0 0 0 3px var(--l-ink), 3px 3px 0 3px var(--l-ink); }
.page-landing .foot { background: var(--paper); border-top: 4px solid var(--l-ink); color: var(--l-muted); }
.page-landing .foot a { color: var(--l-ink); }
.landing { display: flex; flex-direction: column; }
.landing h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1; margin: 0; }
.landing .btn { border-color: var(--l-ink); box-shadow: 6px 6px 0 var(--l-ink); }
.l-wrap { width: min(1280px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.l-hero { width: min(1280px, 100%); margin: 0 auto; padding: 32px 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: 26px; }
.l-kicker, .l-sub { margin: 0; font-size: 24px; color: var(--l-muted); }
.l-hero h1 { font-size: clamp(56px, 8vw, 96px); line-height: 0.92; letter-spacing: -1px; color: var(--l-ink); }
.l-lead { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.3; max-width: 30ch; }
.l-cta { gap: 22px; padding-top: 6px; }
.l-figure { position: relative; margin: 0; width: 100%; max-width: 720px; aspect-ratio: 5 / 3; justify-self: end; border: 4px solid var(--l-ink); box-shadow: 10px 10px 0 var(--l-ink); overflow: hidden; background: var(--night); }
.l-ascii { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(18, minmax(0, 1fr)); font: min(26px, 2.2vw) / 1 var(--mono); }
.l-arow { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: center; justify-items: center; }
.a-wall { color: #5f8f6a; } .a-turf { color: #2f6a3d; } .a-cup { color: #ff6b57; } .a-water { color: #59b6ff; } .a-sand { color: #e9cf8a; }
.a-slope { color: #9be3a6; } .a-bump { color: #ff8a6a; } .a-ring { color: var(--yellow); } .a-part { color: #c9d1d9; }
.a-me { color: var(--phosphor); text-shadow: 0 0 10px var(--phosphor); }
.l-pixels { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; clip-path: polygon(0 0, 62% 0, 54% 100%, 0 100%); }
.l-seam { position: absolute; top: -4%; left: 58%; width: 4px; height: 108%; background: var(--phosphor); box-shadow: 0 0 18px var(--phosphor); transform: rotate(4.6deg); transform-origin: center; }
.l-figure figcaption { position: absolute; right: 14px; bottom: 10px; font-size: 22px; color: var(--phosphor); }
.l-band { background: var(--l-ink); color: var(--paper); }
.l-band .l-wrap { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 44px; }
.l-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px; }
.l-steps li { display: flex; flex-direction: column; gap: 14px; }
.l-steps h3 { margin: 0; font-size: 28px; }
.l-steps p { margin: 0; font-size: 20px; line-height: 1.45; color: #d9e3d6; }
.l-n { display: inline-grid; place-items: center; width: 44px; height: 44px; background: var(--paper); color: var(--l-ink); font-weight: 700; font-size: 24px; }
.l-line { padding: 14px 16px; font-size: 22px !important; line-height: 1.2 !important; background: var(--night); color: var(--phosphor) !important; border: 3px solid var(--phosphor); }
.l-sees { padding-top: 96px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.l-sees-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.l-sees-text p { margin: 0; font-size: 22px; line-height: 1.45; max-width: 34ch; }
.l-muted { color: var(--l-muted); font-size: 24px; }
.l-term { flex: 999 1 640px; min-width: 0; margin: 0; padding: 24px 28px; font-size: 17px; line-height: 1.12; overflow-x: auto; white-space: pre; background: var(--night); color: var(--phosphor); border: 4px solid var(--l-ink); box-shadow: 8px 8px 0 var(--l-ink); }
.l-term .t-p { color: #ff8a6a; } .l-term .t-cmd { color: #fff; }
#board { padding-bottom: 96px; display: flex; flex-direction: column; gap: 28px; }
.l-table { border: 4px solid var(--l-ink); box-shadow: 8px 8px 0 var(--l-ink); background: var(--paper); overflow-x: auto; }
.l-table table { width: 100%; border-collapse: collapse; font-size: 22px; min-width: 520px; }
.l-table thead tr { background: var(--l-ink); color: var(--yellow); text-align: left; }
.l-table th, .l-table td { padding: 12px 22px; }
.l-table td { text-align: right; }
.l-table thead th:not(:first-child) { text-align: right; }
.l-table tbody { font-size: 26px; }
.l-table tbody th { text-align: left; font-weight: 400; }
.l-table tbody tr { border-bottom: 3px solid #d7ddd4; }
.l-table a { color: var(--red); }
.l-house { color: var(--l-muted); }
.l-price { padding-bottom: 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px; }
.l-panel { padding: 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; background: var(--paper); border: 4px solid var(--l-ink); box-shadow: 8px 8px 0 var(--l-ink); }
.l-panel h3 { margin: 0; font-size: 30px; }
.l-panel p { margin: 0; font-size: 19px; line-height: 1.45; }
.l-panel .l-big { font-size: 40px; font-weight: 700; }
.l-panel-gold { background: var(--yellow); }
.l-sponsor { padding-bottom: 40px; font-size: 22px; color: var(--l-muted); }
.l-sponsor a { color: var(--l-ink); }
@media (max-width: 860px) {
  .l-figure { justify-self: stretch; max-width: none; }
  .l-hero { padding-bottom: 56px; gap: 36px; }
}
.tilde { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82em; }
@media (max-width: 860px) {
  .l-table table { min-width: 0; font-size: 17px; }
  .l-table tbody { font-size: 19px; }
  .l-table th, .l-table td { padding: 10px 12px; }
}

/* ------------------------------------------------------------ hole result (light, like the mockup) */
.hole-result { position: fixed; inset: 0; z-index: 30; overflow: auto; background: #e7ede4; color: #17231b; display: flex; align-items: center; animation: hr-in 260ms ease-out; }
@keyframes hr-in { from { opacity: 0; } to { opacity: 1; } }
.hr-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 40px var(--gutter); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hr-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hr-kicker { margin: 0; font-size: 26px; color: #4b5a50; }
.hole-result h1 { font-size: clamp(44px, 6vw, 84px); line-height: 0.95; color: #17231b; }
.hr-story { margin: 0; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; max-width: 34ch; }
.hr-scroll { overflow-x: auto; padding: 0 10px 10px 0; }
.hr-card { border-collapse: collapse; font-size: 28px; background: var(--paper); box-shadow: 8px 8px 0 #17231b; }
.hr-card th, .hr-card td { padding: 8px 0; width: 54px; text-align: center; border: 3px solid #17231b; }
.hr-card th[scope="row"] { width: auto; min-width: 120px; padding: 8px 14px; text-align: left; font-weight: 400; }
.hr-card thead tr { background: #17231b; color: var(--yellow); }
.hr-card thead th:first-child { text-align: left; padding-left: 14px; }
.hr-card .is-now { background: #fff3c4; color: #17231b; }
.hr-card thead .is-now { background: var(--yellow); }
.hole-result .btn { border-color: #17231b; box-shadow: 6px 6px 0 #17231b; }
.hr-share { flex: 1 1 400px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.hr-share-card { aspect-ratio: 1200 / 630; background: var(--night); border: 4px solid #17231b; box-shadow: 10px 10px 0 #17231b; padding: 22px 26px; display: flex; flex-direction: column; justify-content: space-between; color: var(--paper); }
.hr-share-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 22px; }
.hr-share-top canvas { border: 3px solid var(--phosphor); }
.hr-share-score { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.hr-share-score b { font-size: clamp(44px, 6vw, 72px); }
.hr-share-score span { font-size: clamp(18px, 2vw, 28px); color: var(--yellow); text-align: center; }
.hr-share-who { display: flex; justify-content: space-between; font-size: 22px; }
.hr-ai { color: var(--phosphor); }
.hr-share figcaption { font-size: 20px; color: #4b5a50; }
@media (prefers-reduced-motion: reduce) { .hole-result { animation: none; } }

/* ------------------------------------------------------------ an AI says hello */
.connect-face:empty { display: none; }
.entered { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; animation: hr-in 300ms ease-out; }
.entered-card { flex: 1 1 520px; min-width: 0; background: var(--paper); color: var(--ink); border: 6px solid var(--ink-2); box-shadow: 14px 14px 0 var(--ink-2); display: flex; flex-direction: column; }
.entered-strip { padding: 10px 22px; background: var(--ink); color: var(--yellow); font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.entered-body { padding: 28px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.entered-body canvas { border: 6px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); max-width: 100%; height: auto; }
.entered-id { flex: 1 1 220px; display: flex; flex-direction: column; gap: 12px; }
.entered-id b { font-size: clamp(40px, 5vw, 64px); line-height: 0.9; }
.entered-model { align-self: flex-start; padding: 2px 10px; background: var(--night); color: var(--phosphor); font-size: 24px; }
.entered-id p { margin: 0; font-size: 26px; line-height: 1.1; color: #3d4a41; white-space: pre-line; }
.entered-quote { margin: 0 28px 28px; padding: 16px 20px; background: var(--yellow); border: 4px solid var(--ink); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; }
.entered-term { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; border: 4px solid #2c4a33; background: var(--night); }
.entered-term pre { margin: 0; padding: 18px 20px; font-size: 20px; line-height: 1.15; white-space: pre-wrap; color: var(--phosphor); overflow-x: auto; }
.entered-term .cmd { color: #fff; } .entered-term .ok { color: var(--yellow); } .entered-term .dim { color: #5f8f6a; }

/* ------------------------------------------------------------ phones: the round takes the whole screen */
@property --term-h { syntax: "<length>"; inherits: true; initial-value: 0px; }
.hud-short, .hr-lead { display: none; }
.stage { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (pointer: coarse) {
  .l-cta .cta-golf { order: -1; background: var(--red); color: #fff; }
  .l-cta .cta-agent { background: var(--paper); color: var(--ink); }
}
@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; }
  .is-playing .screen { display: flex; min-height: 0; padding: 0; }
  .is-playing .game { flex: 1; min-height: 0; gap: 10px; padding: max(8px, 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; }
  .is-playing .game .hud-left, .is-playing .game .hud-right { flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .is-playing .game .chip { padding: 3px 8px; gap: 5px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink-2); font-size: 14px; }
  .is-playing .game .chip b { font-size: 21px; }
  .is-playing .game .chip-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .is-playing .game .face canvas { width: 22px !important; height: 22px !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: 34px; height: 34px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink-2); }
  /* 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)); border-width: 4px; box-shadow: none; }
  .is-playing .is-turned .stage { width: min(var(--avail), 100cqw * 5 / 3); }
  .is-playing .is-turned .banner { top: 50%; max-width: 58%; padding: 10px 18px; transform-origin: 0 0; transform: translate(-50%, -50%); rotate: calc(-1 * var(--turn)); }
  .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.is-open { border-width: 3px; }
  .is-playing .term-head { padding: 3px 10px; font-size: 16px; border-bottom-width: 3px; }
  .is-playing .term-body { padding: 6px 10px; font-size: 16px; }
  .is-playing .foot-bar { flex-wrap: wrap; gap: 6px 10px; }
  .is-playing .power { flex: 1 1 auto; gap: 8px; font-size: 15px; }
  .is-playing .segs { flex: 1; gap: 3px; }
  .is-playing .seg { flex: 1 1 0; min-width: 0; height: 16px; border-width: 2px; }
  .is-playing .power-num { font-size: 24px; }
  .is-playing .foot-right { gap: 8px; }
  .is-playing .foot-right .btn-small { min-height: 36px; padding: 4px 10px; font-size: 14px; }
  .is-playing .hint { order: 3; flex-basis: 100%; font-size: 15px; 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: 20px; padding: max(24px, 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: 20px; }
  .is-playing .hole-result h1 { font-size: 40px; }
  .is-playing .hr-story { font-size: 18px; }
  .is-playing .hr-lead { display: block; margin: 0; font-size: 24px; color: var(--red); }
  .is-playing .hr-card { font-size: 22px; }
  .is-playing .hr-card th, .is-playing .hr-card td { width: 40px; padding: 6px 0; }
  .is-playing .hr-card th[scope="row"] { min-width: 0; padding: 6px 10px; }
  .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; }
}
