@font-face{font-family:GomgomKkalkkeum;src:url('/fonts/gomgom-kkalkkeum/GomgomKkalkkeum-Regular.woff2') format('woff2');font-display:swap}
:root{--paper:#fffaf0;--ink:#233d31;--muted:#586b60;--edge:#c6d1c4;--green:#315c43;--entry-radius:16px;font-family:GomgomKkalkkeum,system-ui,sans-serif}
body[data-golf-screen=home]{overflow:auto;background:#e8efe0}
#scene{position:fixed;inset:0}
body[data-golf-screen=home]::before{content:'';position:fixed;z-index:1;inset:0;pointer-events:none;background:linear-gradient(90deg,#f7f4e8 0%,#f7f4e8ed 29%,#f7f4e865 50%,transparent 68%)}
.golf-header{z-index:4;gap:8px;align-items:center;inset:max(18px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) auto max(24px,env(safe-area-inset-left))}
.golf-header .golf-home{order:-1;display:inline-flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;min-height:48px;padding:10px 12px;border-radius:8px;background:#fffaf0ee;font-size:16px}
.golf-header b{border:0;background:transparent;padding:8px 0;font-size:20px;margin-right:auto;white-space:nowrap}
.golf-header #status:empty{display:none}
body[data-golf-screen=home] .golf-header #overview,body[data-golf-screen=home] .golf-header #myball,body[data-golf-screen=home] .golf-header #leave{display:none}
button,input,select{min-height:48px;font:inherit}
button{border-radius:10px;transition:background-color .12s,border-color .12s;touch-action:manipulation}
button:active:not(:disabled){filter:brightness(.9);box-shadow:inset 0 2px 4px #152a3028}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #996613;outline-offset:3px}
button:disabled{opacity:.55;cursor:progress}
#lobby{z-index:2;left:max(32px,calc((100vw - 1280px)/2));width:370px;bottom:max(24px,env(safe-area-inset-bottom));padding:24px;border-radius:var(--entry-radius);border:1px solid var(--edge);border-top:3px solid var(--green);box-shadow:0 12px 32px #21362b16}
body[data-golf-screen=home] #lobby{top:112px;bottom:28px;width:min(450px,calc(100vw - 60px));max-height:none;overflow:auto;padding:0 24px 20px 0;background:transparent;border:0;box-shadow:none}
.golf-identity{margin-bottom:24px}
.golf-identity h1{font-size:clamp(40px,5vw,66px);letter-spacing:-.06em;line-height:1.12;margin:0 0 10px;color:var(--ink)}
.golf-identity p{margin:0;color:var(--muted);font-size:16px;line-height:1.5}
.entry-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.entry-fields label{font-size:15px;color:var(--muted);margin-bottom:8px}
.entry-fields input,.entry-fields select{border-radius:10px;padding:12px;background:#fffdf7;color:var(--ink);font-size:16px;min-width:0}
#create{width:100%;min-height:56px;background:var(--green);border-color:var(--green);color:#fffaf0;font-size:20px;margin:12px 0 0}
.join{padding-top:18px;margin-top:22px;gap:10px;align-items:stretch}
.join input{flex:1;width:auto;min-height:52px;border-radius:10px;background:#fffdf7;font-size:18px;letter-spacing:.12em;padding:10px 14px}
.join button{min-width:96px}
#room{overflow-wrap:anywhere;line-height:1.5;margin:0 0 16px;outline-offset:4px}
#players{display:grid;gap:8px;margin:12px 0 20px;line-height:1.5;font-size:16px}
#players>div{padding:10px 12px;border:1px solid var(--edge);border-radius:8px;background:#fffdf7;overflow-wrap:anywhere}
body[data-golf-screen=home] #room,body[data-golf-screen=home] #players{display:none}
body[data-golf-screen=room] .golf-identity h1{font-size:32px;margin-bottom:16px}
body[data-golf-screen=room] .golf-identity p,body[data-golf-screen=room] .entry-name,body[data-golf-screen=room] .join{display:none}
body[data-golf-screen=room] .entry-fields{grid-template-columns:1fr}
body[data-golf-screen=home] #room-directory{position:fixed;right:max(32px,calc((100vw - 1280px)/2));bottom:28px;width:340px;max-height:min(45dvh,400px);overflow:auto;background:#fffaf0f5;border-radius:16px;box-shadow:0 12px 32px #21362b20}
body[data-golf-screen=home] #room-directory .room-directory{margin:0;border:1px solid var(--edge);background:transparent;border-radius:16px;padding:20px}
#controls{z-index:3;border-radius:12px;bottom:max(16px,env(safe-area-inset-bottom));box-shadow:0 10px 28px #17271c20}
.info{align-items:center;font-size:16px}.info strong{font-size:22px}#controls .actions{flex-wrap:wrap}
#result{z-index:5;border-radius:16px}#scores .score{overflow-wrap:anywhere;line-height:1.5}
#error{z-index:10;top:84px;max-width:min(520px,calc(100vw - 24px));line-height:1.5;overflow-wrap:anywhere}
@media(max-width:700px){
  .golf-header{inset:8px 12px auto;gap:6px}.golf-header .golf-home{font-size:14px;padding:8px;min-height:44px}.golf-header b{font-size:18px}
  .golf-header button{font-size:13px;min-height:44px;padding:8px 10px}.golf-header #status{padding:8px;font-size:13px;order:6}
  body[data-golf-screen=home]::before{background:linear-gradient(180deg,#f7f4e800 0,#f7f4e83b 155px,#f7f4e8ef 260px,#f7f4e8 390px)}
  body[data-golf-screen=home] #lobby{position:relative;top:auto;left:auto;bottom:auto;margin:220px 16px 24px;padding:22px;width:auto;max-height:none;overflow:visible;background:#fffaf0f5;border:1px solid var(--edge);border-radius:18px;box-shadow:0 8px 28px #243c2814}
  .golf-identity{margin-bottom:22px}.golf-identity h1{font-size:42px}.golf-identity p{font-size:15px}
  .entry-fields{gap:12px}#lobby input,#lobby select{padding:10px;font-size:16px}.join button{min-width:76px}
  body[data-golf-screen=home] #room-directory{position:static;width:100%;max-height:none;margin-top:24px;border:0;box-shadow:none;background:transparent;overflow:visible}
  body[data-golf-screen=home] #room-directory .room-directory{padding:18px 0 0;border:0;border-top:1px solid var(--edge);border-radius:0}
  #lobby{left:12px;bottom:12px;width:calc(100vw - 24px);max-height:calc(100dvh - 118px);padding:20px}
  body[data-golf-screen=room] #lobby{width:calc(100vw - 24px);max-width:370px}
  #controls{bottom:12px;padding:12px;max-height:calc(100dvh - 110px);overflow:auto}.info{gap:12px}
}
@media(max-height:520px) and (min-width:701px){
  body[data-golf-screen=home] #lobby{top:76px;bottom:12px;width:390px;padding-right:20px}.golf-identity{margin-bottom:14px}.golf-identity h1{font-size:40px}
  body[data-golf-screen=home] #room-directory{bottom:12px;right:20px;width:300px;max-height:calc(100dvh - 88px)}
  #lobby{max-height:calc(100dvh - 88px);bottom:12px;width:300px;padding:18px}.golf-header{inset:8px 16px auto}
  #controls{bottom:8px;padding:8px 12px;width:min(510px,calc(100vw - 24px))}
}
@media(prefers-reduced-motion:reduce){button{transition:none}}
#minimap{position:fixed;z-index:3;right:max(16px,env(safe-area-inset-right));top:94px;width:176px;padding:8px;background:#14242eee;border:1px solid #48606c;border-radius:3px;color:#edf5f7;pointer-events:none}
#course-mini{display:block;width:100%;height:auto}
#hole-distance{display:block;text-align:right;padding:4px 4px 0;font:600 14px system-ui,sans-serif;font-variant-numeric:tabular-nums}
@media(max-width:700px){#minimap{top:120px;right:12px;width:128px;padding:5px}#hole-distance{font-size:12px}}
@media(max-height:520px){#minimap{top:74px;width:124px;padding:5px}}

/* Entry decisions share one plane. */
body[data-golf-screen=home]{--paper:#14242e;--ink:#edf5f7;--muted:#b1c2cc;--edge:#48606c;--green:#a9dbe7;font-family:system-ui,sans-serif;background:#14242e}
body[data-golf-screen=home]::before{background:linear-gradient(90deg,#14242e 0%,#14242ef5 34%,#14242e55 57%,transparent 78%)}
body[data-golf-screen=home] .golf-header b{display:none}
body[data-golf-screen=home] .golf-header .golf-home{background:#14242e;color:#edf5f7;border:1px solid #48606c;border-radius:3px}
body[data-golf-screen=home] #lobby{top:92px;bottom:20px;width:480px;padding:0 24px 16px 0}
body[data-golf-screen=home] .golf-identity{margin-bottom:22px}
body[data-golf-screen=home] .golf-identity h1{font-family:system-ui,sans-serif;font-size:54px;letter-spacing:-3px;font-weight:900;line-height:1.12}
body[data-golf-screen=home] .golf-identity p{font-size:14px;color:#b1c2cc}
body[data-golf-screen=home] .entry-fields{grid-template-columns:1fr}
body[data-golf-screen=home] .entry-fields label:has(#map){display:none}
body[data-golf-screen=home] #name,body[data-golf-screen=home] .join input{background:#203540;color:#edf5f7;border:1px solid #48606c;border-radius:3px}
body[data-golf-screen=home] #name{font-family:system-ui,sans-serif;font-size:16px}
.map-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 18px}
.map-choices button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:48px;text-align:left;font:600 15px system-ui,sans-serif;padding:10px 14px;background:#203540;border:1px solid #48606c;border-radius:3px;color:#d5e2e8}
.map-choices button[aria-pressed=true]{background:#294a59;border-color:#a9dbe7;color:#fff}
.map-choices button[aria-pressed=true]::after{content:'✓';color:#a9dbe7;font-size:18px}
.map-choices button:hover:not(:disabled){background:#365263;border-color:#a9dbe7}
body[data-golf-screen=home] button:focus-visible,body[data-golf-screen=home] input:focus-visible,body[data-golf-screen=home] a:focus-visible{outline-color:#ffc273}
body[data-golf-screen=home] #create{background:#a9dbe7;border-color:#a9dbe7;color:#14242e;border-radius:3px;font:800 20px system-ui,sans-serif;margin:0;min-height:56px}
body[data-golf-screen=home] #create:hover:not(:disabled){background:#c3edf5}
body[data-golf-screen=home] .join{margin-top:18px;padding-top:18px}
body[data-golf-screen=home] .join button{color:#edf5f7;background:#203540;border:1px solid #48606c;border-radius:3px;font-family:system-ui,sans-serif}
body[data-golf-screen=home] #room-directory{position:static;width:auto;max-height:none;overflow:visible;background:transparent;box-shadow:none;border-radius:0;margin-top:20px}
body[data-golf-screen=home] #room-directory .room-directory{padding:16px 0 0;border:0;border-top:1px solid #48606c;border-radius:0;color:#edf5f7}
body[data-golf-screen=home] #room-directory button{color:#edf5f7;background:#203540;border-color:#48606c;border-radius:3px;font-family:system-ui,sans-serif}
body[data-golf-screen=home] #room-directory :is(h2,p,span){color:inherit;font-family:system-ui,sans-serif}
body[data-golf-screen=home] #room-directory.gg-room-directory{padding:16px 0 0;border:0;border-top:1px solid #48606c;color:#edf5f7;font-family:system-ui,sans-serif}
body[data-golf-screen=home] #room-directory .gg-room-directory__head{margin-bottom:8px}
body[data-golf-screen=home] #room-directory .gg-room-directory__head h2{font-size:18px}
body[data-golf-screen=home] #room-directory .gg-room-directory__empty{font-size:14px;line-height:1.4;color:#b1c2cc}
body[data-golf-screen=home] #room-directory .gg-room-directory__room :is(small,b){color:#b1c2cc}
body[data-golf-screen=home] #lobby{scrollbar-width:thin;scrollbar-color:#48606c transparent}
body[data-golf-screen=home] #scene{left:540px;width:calc(100vw - 540px);height:100dvh}
@media(max-width:700px){body[data-golf-screen=home] #scene{left:0;width:100vw;height:190px}body[data-golf-screen=home]::before{background:none}}
@media(min-width:701px) and (min-height:521px){
  body[data-golf-screen=home] #lobby{top:84px;bottom:12px;padding-bottom:8px}
  body[data-golf-screen=home] .golf-identity{margin-bottom:12px}
  body[data-golf-screen=home] .golf-identity h1{font-size:46px;margin-bottom:8px}
  body[data-golf-screen=home] .map-choices{gap:6px;margin:8px 0 12px}
  body[data-golf-screen=home] .join{margin-top:12px;padding-top:12px}
  body[data-golf-screen=home] #room-directory{margin-top:12px;padding-top:12px}
}
@media(max-width:700px){
  body[data-golf-screen=home]::before{background:linear-gradient(180deg,transparent 0,#14242e33 130px,#14242e 230px)}
  body[data-golf-screen=home] #lobby{margin:190px 0 0;padding:24px 20px 32px;width:100%;background:#14242e;border:0;border-radius:0;box-shadow:none;top:auto;bottom:auto}
  body[data-golf-screen=home] .golf-identity h1{font-size:44px}
  body[data-golf-screen=home] #room-directory .room-directory{padding:16px 0 0}
}
@media(max-height:520px) and (min-width:701px){
  body[data-golf-screen=home] #lobby{top:70px;bottom:12px;width:420px}
  body[data-golf-screen=home] .golf-identity h1{font-size:40px}
  body[data-golf-screen=home] .golf-identity{margin-bottom:14px}
}

body:not([data-golf-screen=home]){--paper:#14242e;--ink:#edf5f7;--muted:#b1c2cc;--edge:#48606c;--green:#a9dbe7;--gold:#ffc273;color:var(--ink);font-family:system-ui,sans-serif}
body:not([data-golf-screen=home]) :is(button,dialog,#lobby,#result,#players>div){border-radius:3px}
body:not([data-golf-screen=home]) .golf-header .golf-home{background:#14242eee;color:var(--ink);border:1px solid var(--edge);border-radius:3px}
body:not([data-golf-screen=home]) .golf-header b{color:var(--ink);background:#14242eee;padding:10px 12px;font:700 16px system-ui,sans-serif}
body:not([data-golf-screen=home]) .golf-header :is(button,#status){background:#14242eee;color:var(--ink);border-radius:3px}
body:not([data-golf-screen=home]) :is(button:hover:not(:disabled),#players>div){background:#203540;color:var(--ink)}
body:not([data-golf-screen=home]) .panel>button{color:#14242e}
#controls{width:min(380px,calc(100vw - 24px));padding:10px 12px;background:#14242eee;border:1px solid #48606c;border-radius:3px;box-shadow:none;color:#edf5f7}
#controls .info{gap:12px;margin:0;padding:0 0 8px;border:0;font:600 14px system-ui,sans-serif}
#controls .info strong{font-size:22px}
#controls .power{height:6px;margin:0 0 8px;background:#48606c;border-radius:0}
#controls .actions button{min-height:44px;padding:8px 12px;font:600 13px system-ui,sans-serif}
#controls .actions:has(#shot[hidden]):has(#cancel[hidden]){justify-content:flex-end}
#power-label{border:1px solid #a9dbe7;border-radius:2px;background:#14242eee;font-family:system-ui,sans-serif}
@media(max-width:700px){body:not([data-golf-screen=home]) .golf-header b{display:none}#controls{bottom:max(12px,env(safe-area-inset-bottom));width:min(340px,calc(100vw - 24px))}#minimap{top:74px}}
