:root{font-family:system-ui,-apple-system,"Hiragino Sans","Yu Gothic",sans-serif;color:#273e37;background:#f5f1e8;line-height:1.55;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{min-height:44px;border:1px solid #bbc9bc;border-radius:12px;color:inherit;background:#fffefa;padding:10px 16px;font-weight:700;cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #315b94;outline-offset:3px}button:disabled{cursor:default;background:#e7e8e1;color:#707c74;border-color:#d4d8cd;opacity:1}button[hidden],[hidden]{display:none!important}button:active:not(:disabled){background:#e8f0e3}header,main{max-width:660px;margin:auto;padding:16px}header{padding-bottom:6px}.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:#617266}h1{font-size:clamp(22px,5.7vw,31px);margin:5px 0}header p{font-size:13px;margin:0}main{padding-top:8px}.course-buttons{display:flex;gap:8px;align-items:center}.chip{font-size:13px;flex:1}.chip[aria-pressed=true]{background:#355c4d;color:#fff;border-color:#355c4d}.quiet-button{background:transparent;font-size:12px}.intro p{font-size:11px;color:#617266;margin:7px 2px 12px}.game{border-radius:22px;background:#fffefa;box-shadow:0 7px 24px #495e4010;border:1px solid #d9dfd1;overflow:hidden}.scorebar{display:flex;justify-content:space-between;align-items:center;padding:11px 16px;border-bottom:1px solid #e4e6dc;gap:10px}.turn{background:#e7eee2;border-radius:8px;padding:4px 9px;font-size:14px;font-weight:800}.scorebar strong{font-size:20px}.co-op{font-size:11px}.board-wrap{height:clamp(245px,44vh,350px);position:relative;background:linear-gradient(#f3f5ed,#f9f8f0);overflow:hidden}#board{width:100%;height:100%;display:block;touch-action:pan-y;user-select:none}.notice{position:absolute;left:14px;right:14px;top:30%;border:1px solid #799480;border-radius:18px;background:#fffef8f0;text-align:center;padding:18px;box-shadow:0 5px 25px #36513c15;pointer-events:none}.notice strong{display:block;font-size:30px;margin:2px}.notice span,.notice small{font-size:12px}.status{font-size:12px;min-height:35px;margin:0;padding:8px 15px;background:#f1f3e9;color:#40584b}#play-controls{padding:12px 16px 16px}.choice-label,.position-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:8px}.choice-label span,.position-label span{color:#617266;font-size:11px}.choices{display:flex;gap:10px;margin:7px 0 12px}.choice{flex:1;padding:3px 8px 5px;display:flex;gap:5px;align-items:center;justify-content:center;min-width:0;min-height:61px}.choice svg{width:75px;height:47px}.choice span{font-size:12px}.choice[aria-pressed=true]{background:#e9efdf;border:2px solid #567754;padding:2px 7px 4px}.position{display:flex;gap:12px;align-items:center;margin:6px 0 10px}.position button{width:48px;font-size:22px;padding:2px}.position input{width:100%;min-width:50px;min-height:44px;accent-color:#436a4e;touch-action:pan-y}.primary{width:100%;background:#365e4d;color:#fff;border-color:#365e4d;min-height:49px;font-size:15px}.primary:active:not(:disabled){background:#294936}.notes{font-size:12px;color:#54695a;padding:4px 3px}details{border-top:1px solid #ccd5c8;padding-top:8px}summary{cursor:pointer;min-height:44px;padding:8px 0;font-weight:700}details p{margin:8px 0}footer{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#69786b;padding:10px 0}#outcome{padding:14px 16px;text-align:center}#outcome h2{margin:0 0 8px;font-size:22px}#outcome p{font-size:13px}#outcome button{margin-top:8px}dialog{border:1px solid #aebbab;border-radius:22px;padding:24px;max-width:calc(100% - 32px);width:360px;color:#273e37;background:#fffdf5}dialog::backdrop{background:#263b3475}dialog h2{font-size:23px;margin:0 0 8px}dialog p{font-size:14px}dialog .quiet-button{width:100%;margin-top:8px}@media(max-width:380px){header,main{padding-left:10px;padding-right:10px}.co-op{display:none}.course-buttons{gap:5px}.course-buttons button{padding:8px}.choice-label span{font-size:10px}.choice svg{width:62px}.board-wrap{height:245px}#play-controls{padding:10px 12px}}@media(max-height:740px){header{padding-top:10px}header p{font-size:11px}.board-wrap{height:230px}.choices{margin-bottom:7px}.choice{min-height:51px}.choice svg{height:39px}.status{padding-top:5px;padding-bottom:5px;min-height:30px}#play-controls{padding-top:8px;padding-bottom:10px}.intro p{margin-bottom:8px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.zoom{position:absolute;z-index:2;right:8px;top:8px;padding:6px 10px;font-size:11px;background:#fffdf4e8;min-height:44px}.zoom[aria-pressed=true]{background:#dae7d5}
@media(min-width:540px){header{padding-top:12px}.game{max-width:620px}.board-wrap{height:clamp(190px,29vh,280px)}.choices{margin:5px 0 8px}.choice{min-height:49px}.choice svg{height:37px}.position{margin:4px 0 7px}.notes{max-width:620px}}
@media(max-height:740px){.board-wrap{height:185px}header .eyebrow{font-size:9px}header h1{font-size:23px;line-height:1.3;margin:4px 0}.intro p{margin-top:5px;font-size:10px}.scorebar{padding-top:8px;padding-bottom:8px}.choice-label,.position-label{font-size:11px}}
/* Only the persistent SVG root receives touches; animated polygon replacement cannot steal a gesture. */
#scene{pointer-events:none}

.test-note{font-size:10px;line-height:1.4;color:#69776a;margin:6px 15px 0}.camera-note{position:absolute;bottom:3px;left:8px;right:8px;margin:0;padding:4px;background:#fffef4ee;font-size:10px;text-align:center;pointer-events:none}.back-link{display:inline-flex;align-items:center;min-height:44px;color:#355c4d;font-size:12px;font-weight:700;text-underline-offset:3px}

.finish-record{width:100%;margin-top:7px}#restore-progress{display:block;width:100%;height:20px;margin:12px 0}#record-meta{font-variant-numeric:tabular-nums}#course40{line-height:1.2}@media(max-width:380px){#course40{font-size:11px}.course-buttons .chip{padding:8px 6px}}

/* Keep the board readable on phones; supersede the prototype's 185px layout. */
header,main{max-width:720px}header{padding-top:12px}header h1{font-size:clamp(22px,5.7vw,30px)}
.game{max-width:none}.board-wrap{height:clamp(340px,48vh,540px);height:clamp(340px,48svh,540px)}
.focus-board{position:absolute;z-index:3;left:8px;top:8px;padding:6px 10px;font-size:12px;background:#fffdf4ed;min-height:44px}
.zoom{font-size:12px;min-height:44px}.camera-note{font-size:11px}.choices{margin:6px 0 9px}.choice{min-height:58px}.choice svg{height:44px}
.intro p{font-size:12px}.status{font-size:13px}.test-note{font-size:11px}footer{gap:12px;flex-wrap:wrap}
@media(max-width:540px){header,main{padding-left:10px;padding-right:10px}.board-wrap{height:clamp(300px,46vh,440px);height:clamp(300px,46svh,440px)}.scorebar{padding:10px 12px}#play-controls{padding:10px 12px 14px}.position{margin:6px 0 10px}.choice{padding-left:3px;padding-right:3px}.choice svg{width:70px}.co-op{display:inline}.intro p{margin:7px 0 10px}}
@media(max-height:620px) and (max-width:540px){.board-wrap{height:280px}}
body.board-focus{height:100vh;height:100svh;overflow:hidden}
body.board-focus header,body.board-focus .intro,body.board-focus .notes,body.board-focus footer,body.board-focus .test-note{display:none}
body.board-focus main{max-width:1000px;height:100%;padding:8px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
body.board-focus .game{height:100%;display:flex;flex-direction:column;border-radius:16px}
body.board-focus .board-wrap{height:auto;flex:1;min-height:140px}
body.board-focus .scorebar,body.board-focus .status,body.board-focus #play-controls,body.board-focus #outcome{flex:none}
.focus-pause{display:none;font-size:12px;padding:4px 9px}body.board-focus .focus-pause{display:inline-flex;align-items:center}body.board-focus .co-op{display:none}
body.board-focus #outcome{max-height:44%;overflow:auto}
@media(orientation:landscape) and (max-height:600px){body.board-focus .game{display:grid;grid-template-columns:minmax(0,1fr) 260px;grid-template-rows:auto auto minmax(0,1fr)}body.board-focus .scorebar{grid-column:1/-1}body.board-focus .board-wrap{grid-column:1;grid-row:2/4;min-height:0}body.board-focus .status{grid-column:2;grid-row:2}body.board-focus #play-controls,body.board-focus #outcome{grid-column:2;grid-row:3;overflow:auto;max-height:none}body.board-focus .choice{min-height:46px}body.board-focus .choice svg{height:35px}body.board-focus .choice span{font-size:10px}body.board-focus .choice-label span,body.board-focus .position-label span{display:none}body.board-focus .finish-record{font-size:11px}body.board-focus #play-controls{padding:6px}}
