:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, sans-serif; background: #10241d; color: #f4efd5; }
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
#app { position: fixed; inset: 0 auto auto 0; width: 100%; height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; border-bottom: 1px solid #58745a; }
.eyebrow { color: #d6b77b; font-size: 10px; letter-spacing: .14em; font-weight: 700; }
h1 { margin: 0; font-size: clamp(15px, 1.7vw, 22px); line-height: 1.25; font-weight: 600; }
h1 span { font-weight: 400; color: #b2c3a8; }
.hud { display: flex; gap: clamp(12px, 3vw, 44px); font-size: 11px; color: #bccbb5; }
.hud b { display: block; margin-top: 3px; font-size: 15px; color: #f4efd5; }
button, input, select { font: inherit; min-height: 44px; border: 1px solid #728669; border-radius: 6px; }
button { padding: 0 15px; background: #dbc48f; color: #193024; font-weight: 650; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
button.secondary { background: #233e2d; color: #e0e9d3; margin-top: 8px; }
input, select { background: #142b21; color: #f4efd5; padding: 0 10px; min-width: 0; }
:focus-visible { outline: 3px solid #ade5ef; outline-offset: 3px; }
#playfield { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.preview-badge { position: absolute; left: 12px; top: 8px; pointer-events: none; color: #d6e2c4; opacity: .65; font-size: 9px; letter-spacing: .12em; }
#build-marker { position: absolute; right: 12px; top: 8px; z-index: 2; pointer-events: none; padding: 4px 7px; border: 1px solid #d6b77b88; border-radius: 4px; background: #10241dcc; color: #efd28f; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .04em; }
#play-message { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0; max-width: min(92%, 660px); padding: 7px 12px; border: 1px solid #81957477; border-radius: 999px; background: #10241dd9; color: #f4efd5; font-size: 12px; text-align: center; pointer-events: none; }
.round-interstitial { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 12px; overflow: auto; background: #07140fd9; }
.round-interstitial[hidden] { display: none; }
.scorecard-panel { width: min(760px, 100%); max-height: 100%; overflow: auto; padding: clamp(14px, 3vw, 28px); border: 1px solid #819574; border-radius: 12px; background: #142c23f7; box-shadow: 0 16px 60px #0008; }
.scorecard-panel h2 { font-size: clamp(22px, 4vw, 34px); }
.hole-result { margin: 8px 0 2px; color: #efd28f; font-size: clamp(18px, 3vw, 26px); font-weight: 750; }
.scorecard-scroll { overflow-x: auto; margin: 16px 0; }
#scorecard { width: 100%; min-width: 610px; border-collapse: collapse; text-align: center; font-size: 12px; }
#scorecard th, #scorecard td { padding: 7px 6px; border: 1px solid #617758; }
#scorecard th:first-child, #scorecard td:first-child { position: sticky; left: 0; background: #142c23; text-align: left; }
#scorecard .upcoming { color: #879b84; }
.round-totals { display: flex; flex-wrap: wrap; gap: 10px 24px; color: #dce8d2; font-weight: 650; }
#play-again { margin-left: 8px; }
.dock { display: grid; grid-template-columns: minmax(130px, 170px) minmax(180px, 1fr) auto; align-items: end; gap: 12px; padding: 8px 18px; border-top: 1px solid #58745a; background: #10241d; }
.club-control { display: grid; gap: 4px; color: #bccbb5; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.club-control select { width: 100%; max-width: none; }
.meter-control { display: grid; gap: 5px; align-self: center; justify-self: center; width: min(100%, 640px); }
.meter-copy { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: #c5d2bc; letter-spacing: .05em; }
#swing-state { color: #efd28f; font-weight: 750; }
.meter { position: relative; height: 22px; overflow: hidden; border: 1px solid #7b8f72; border-radius: 5px; background: linear-gradient(90deg,#8e422b,#d9b05d 48%,#75a56c 50%,#d9b05d 52%,#8e422b); }
body:has(#swing-state:not(:empty)) .meter-control { max-width: 640px; }
.meter-sweet { position: absolute; left: 47%; width: 6%; inset-block: 0; background: #dff1b644; }
#putting-reference { position: absolute; z-index: 1; inset-block: 0; width: 3px; transform: translateX(-1px); background: #92e6ef; box-shadow: 0 0 7px #75dce8; }
.meter-control.putting .meter { background: linear-gradient(90deg,#315c4b,#5f8b63 55%,#b49355); border-color: #7ba89a; }
.meter-control.putting .meter-sweet { display: none; }
.meter-control.putting #swing-state { color: #92e6ef; }
#meter-marker { position: absolute; top: -2px; bottom: -2px; left: 0; width: 4px; transform: translateX(-2px); background: #fffceb; box-shadow: 0 0 8px #fff; }
.swing-button { min-width: 132px; min-height: 58px; font-size: 16px; }
nav { display: flex; gap: 6px; flex-shrink: 0; }
nav button { width: 44px; padding: 0; font-size: 20px; background: #263e2d; color: #f4efd5; }
select { width: 122px; max-width: 122px; }
#hole-info { grid-column: 1 / 3; font-size: 11px; margin: -5px 0 0; color: #b1c2a3; }
#camera-info { grid-column: 3; margin: -5px 0 0; font: 10px ui-monospace, monospace; color: #b1c2a3; text-align: right; }
.hole-navigation { margin: 12px 0; }
#wind-arrow { display: inline-block; font-style: normal; margin-right: 4px; }
dialog { margin: 0; transform: translate(-50%, -50%); width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 20px; overflow: auto; border: 1px solid #819574; border-radius: 12px; background: #142c23; color: #f4efd5; }
dialog::backdrop { background: #020c09ad; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { font-size: 21px; margin: 0; }
.muted { font-size: 12px; color: #bfceb5; line-height: 1.5; }
.seed-row { display: flex; gap: 8px; margin-top: 7px; }
.seed-row input { flex: 1; width: 0; }
#generation-info { font-size: 12px; overflow-wrap: anywhere; }
fieldset { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid #617758; border-radius: 6px; }
fieldset label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; accent-color: #c7db91; }
.gir { color: #9beafa; } .birdie { color: #ff9fcf; }
.shot-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.shot-fields select { width: 100%; max-width: none; }
.shot-fields label { font-size: 12px; }
#shot-scrub { width: 100%; }
summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
pre { font: 11px/1.5 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
a { display: inline-block; color: #dfc790; padding: 12px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 650px) { .topbar { padding: 6px 9px; gap: 7px; } h1 span { display: none; } .brand .eyebrow { display: none; } .hud { gap: 8px; font-size: 9px; } .hud b { font-size: 11px; } .hud span:nth-child(4) { display: none; } .dock { grid-template-columns: minmax(105px, 1fr) minmax(140px, 1.7fr) auto; padding: 6px 8px; gap: 7px; } .swing-button { min-width: 88px; min-height: 54px; padding: 0 9px; } #hole-info { grid-column: 1 / -1; } #camera-info { display: none; } #play-message { bottom: 5px; font-size: 10px; } }
@media (max-width: 380px) { .eyebrow { font-size: 8px; letter-spacing: .04em; } h1 { font-size: 13px; } .hud { gap: 7px; } #open-inspector { padding: 0 8px; font-size: 12px; } }
@media (max-height: 480px) { .topbar { padding: 3px 10px; } .eyebrow { display: none; } .dock { padding: 3px 8px; } h1 span { display: none; } #hole-info { display: block; } .swing-button { min-height: 46px; } #play-message { display: none; } .scorecard-panel { max-height: calc(100dvh - 16px); padding: 10px 14px; } .scorecard-scroll { margin: 8px 0; } #scorecard th, #scorecard td { padding: 4px; } }
