:root{color-scheme:light;--ink:#173e35;--muted:#668378;--paper:#f4f8ef;--orange:#ffb16b;--line:#cddfd3}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:radial-gradient(ellipse at 50% 0,#f6faf3,#deeee6);font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;color:var(--ink);background:#f9fcf5;border:1px solid var(--line);border-radius:13px;padding:11px 15px;min-height:44px;font-weight:650}button:hover{background:#fff}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #e39a43;outline-offset:3px}a{color:inherit;text-decoration:none}main{max-width:1180px;margin:auto;padding:18px 24px}header{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:.12em}header button{font-size:12px;padding:9px 12px}.intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:25px 0 20px}.eyebrow{font-size:10px;letter-spacing:.2em;color:var(--muted);margin:0 0 7px}h1{font-size:clamp(23px,4vw,36px);letter-spacing:-.04em;margin:0;font-weight:850}.course-label{display:grid;gap:5px;font-size:9px;letter-spacing:.15em;min-width:0;max-width:45%}select{background:#f8fbf4;border:1px solid var(--line);border-radius:12px;padding:10px;color:var(--ink);width:100%;min-width:0;font-size:12px}.layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:24px;align-items:start}.stage{height:600px;min-width:0;border-radius:28px;background:linear-gradient(#e8f4ee,#d6e9dc);position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px #ffffff80,0 20px 50px #3b715514}.stage canvas{display:block;width:100%;height:100%;touch-action:none}.stage-top{pointer-events:none;position:absolute;top:18px;left:18px;right:18px;display:flex;justify-content:space-between;gap:10px;font-size:11px;font-weight:700}.stage-top span{background:#fafff0d9;border:1px solid #fff;padding:9px 12px;border-radius:20px}.gesture{pointer-events:none;position:absolute;bottom:30px;width:100%;text-align:center;font-size:15px;font-weight:750;letter-spacing:.04em;color:#426d55}.render-mode{position:absolute;bottom:5px;left:5px;right:5px;font-size:9px;color:#668273;text-align:center;pointer-events:none}.controls{padding:6px 0}.stats{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:10px 0 18px;gap:10px}.stats div{display:grid;gap:6px}.stats span{font-size:9px;letter-spacing:.15em;color:var(--muted)}.stats strong{font-size:26px;font-variant-numeric:tabular-nums}#message{min-height:55px;font-size:13px;line-height:1.8;margin:18px 0}.aim-row{display:flex;align-items:end;gap:12px}.aim-row label{flex:1;min-width:0}.aim-row button{font-size:11px;white-space:nowrap;padding:10px;min-height:40px}.power-label,.aim-row label{display:block;font-size:12px;font-weight:700}.power-label{margin-top:18px}output{float:right;font-variant-numeric:tabular-nums;color:#447b63}input[type=range]{display:block;width:100%;accent-color:#43856a;height:26px;margin-top:8px}input[type=checkbox]{accent-color:#43856a}.primary{background:var(--ink);color:#f8fff2;border-color:var(--ink)}.primary:hover{background:#285a48}.shot{width:100%;display:flex;align-items:center;justify-content:space-between;padding:17px 22px;margin-top:20px;font-size:19px;box-shadow:0 8px 20px #1a493722}.shot span{font-size:9px;letter-spacing:.18em;color:#afcfbb}.tools{display:flex;gap:8px;margin:15px 0}.tools button{font-size:11px;flex:1;padding:10px 6px}.result{background:#fff8e7;border:1px solid #e9d8ad;border-radius:20px;padding:20px;margin:20px 0}.result h2{font-size:24px;margin:6px 0 10px}.result p{font-size:13px;line-height:1.7}.result button{margin:4px 4px 0 0}.water{background:#e4f4f7;border-color:#afd2d9}.overlay{position:absolute;inset:0;background:#edf7efec;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:25px}.overlay h2{font-size:26px}.overlay p{font-size:13px;line-height:1.8}details{font-size:12px;line-height:1.9;margin-top:20px;color:var(--muted);border-top:1px solid var(--line);padding-top:15px}summary{cursor:pointer;color:var(--ink);font-weight:700}.toggle{display:flex;gap:7px;align-items:center}footer{text-align:center;letter-spacing:.09em;font-size:9px;color:var(--muted);padding:25px 0 10px}[hidden]{display:none!important}@media(max-width:780px){main{padding:14px}.intro{margin:20px 0 15px;gap:10px}.layout{grid-template-columns:1fr;gap:10px}.stage{height:clamp(330px,53svh,530px);border-radius:22px}.stage-top{top:12px;left:10px;right:10px;font-size:10px}.stage-top span{padding:7px 9px}.gesture{font-size:12px;bottom:23px}.controls{padding:0 5px}.stats{padding:8px 0 12px}.stats strong{font-size:24px}#message{min-height:40px;margin:14px 0}.shot{margin-top:14px}.course-label{max-width:39%}h1{font-size:24px}}@media(max-width:360px){main{padding:10px}h1{font-size:21px}.eyebrow{font-size:8px;letter-spacing:.11em}.course-label{max-width:43%}select{font-size:10px;padding:9px 6px}.stage{height:350px}.stage-top{font-size:9px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Primary actions stay with the course, including short phone viewports. */
.stage .result{position:absolute;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);width:min(90%,340px);margin:0;padding:18px;text-align:center;box-shadow:0 10px 40px #173e3530;background:#fff9eeed;backdrop-filter:blur(8px)}
.stage .result h2{font-size:23px;margin:4px 0}.stage .result p{margin:7px 0}.stage .result .primary{display:block;width:100%;margin:12px 0 0}.stage .result #again{font-size:11px;margin:8px 0 0;padding:5px 10px}
.overlay{z-index:3}.fine-controls{margin:0;padding:12px 0;border-bottom:1px solid var(--line)}.fine-controls summary{display:flex;justify-content:space-between;gap:8px}.fine-controls summary span{font-size:10px;font-weight:400}.fine-controls .aim-row{margin-top:14px}.fine-controls .power-label{margin-bottom:8px}.controls>.shot{margin-top:0;margin-bottom:12px}
@media(max-width:780px){.controls>.shot{margin:0 0 8px;padding:12px 18px;min-height:46px}.layout{gap:8px}.intro{margin:12px 0}.stats{padding:6px 0}.stats div{gap:2px}.stats strong{font-size:20px}#message{min-height:0;margin:10px 0;font-size:12px}.fine-controls{padding:10px 0}.tools{margin:10px 0}.stage .result{padding:14px}.stage .result h2{font-size:22px}}
@media(max-width:780px) and (max-height:650px){main{padding:8px 10px}header{height:38px}header button{min-height:34px;padding:6px 10px}.intro{margin:7px 0;height:46px;gap:8px}.intro .eyebrow{display:none}h1{font-size:20px}.course-label{font-size:8px;gap:2px}select{padding:6px;font-size:10px}.stage{height:clamp(230px,calc(100svh - 164px),480px);border-radius:18px}.stage-top{top:7px;left:7px;right:7px}.stage-top span{padding:5px 8px}.gesture{font-size:11px;bottom:17px;margin:0}.render-mode{bottom:2px;font-size:8px;margin:0}.controls>.shot{min-height:44px;padding:10px 16px;margin-bottom:6px}.stats{padding-top:4px}.stage .result p{font-size:12px}.stage .result #again{min-height:36px}.stage .result .eyebrow{display:none}}
