:root{color-scheme:light;--bg:#f5f6f0;--paper:#fff;--ink:#253f35;--muted:#728075;--line:#dfe4da;--green:#275b46;--pale:#e8eecf;--yellow:#f5ca61;--red:#a64038;--shadow:0 12px 40px #243c3010;font-family:Inter,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,system-ui,sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);line-height:1.65;font-size:14px}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a,input{outline-offset:4px}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:inherit}button{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #d39828}button{border:0}img{max-width:100%}[hidden]{display:none!important}.wrap{max-width:1380px;margin:0 auto;padding:0 48px}.site-header{height:112px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;line-height:1.05;font-size:16px;letter-spacing:1.4px;font-weight:600}.brand b{font-size:19px;font-weight:850}.header-meta{display:flex;align-items:center;gap:9px;font-size:10px;letter-spacing:1.4px;font-weight:700}.live-dot,.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#7b9b56}.build-label{border-left:1px solid var(--line);padding-left:16px;margin-left:9px;color:var(--muted)}.intro{display:flex;justify-content:space-between;align-items:center;padding:43px 0 36px}.eyebrow{margin:0 0 7px;font-size:10px;letter-spacing:1.7px;font-weight:800;color:var(--green)}h1{margin:0;font-size:clamp(24px,2.5vw,36px);font-weight:750;letter-spacing:-.7px;line-height:1.5}.intro-copy{color:var(--muted);margin:12px 0 0;font-size:13px}.mobile-break{display:none}.intro-stamp{position:relative;padding:0 45px 0 0;transform:rotate(-5deg);color:var(--green)}.intro-stamp span{display:block;font-size:10px;letter-spacing:3px}.intro-stamp strong{font-size:30px;font-family:Georgia,serif;font-style:italic;font-weight:500}.intro-stamp div{position:absolute;right:0;top:8px;font-size:42px;line-height:1}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line)}.tab{background:none;color:var(--muted);padding:14px 26px 16px;border-bottom:3px solid transparent;display:flex;align-items:center;gap:10px;font-weight:700;font-size:14px}.tab-number{font-size:10px;font-weight:600;opacity:.65}.tab small{font-size:10px;font-weight:500;margin-left:3px}.tab.active{color:var(--green);border-bottom-color:var(--green)}.tab:hover{color:var(--green);background:#e8eed744}.tab-panel{padding-top:29px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.section-heading h2{margin:0;font-size:21px;letter-spacing:-.4px}.section-heading .eyebrow{margin-bottom:3px;font-size:9px;letter-spacing:1.7px}.game-status{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:8px}.game-status.error{color:var(--red)}.game-status.error .status-dot{background:var(--red)}.game-stage{aspect-ratio:16/9;border-radius:12px;overflow:hidden;position:relative;background:#1d3129;box-shadow:var(--shadow)}.game-poster{width:100%;height:100%;object-fit:cover;display:block}.game-cover,.game-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#18332875;backdrop-filter:blur(2px);text-align:center}.start-card{background:#fbfcf3f5;padding:29px 45px;border:1px solid #fff9;border-radius:18px;box-shadow:0 15px 50px #0b1d2a35;max-width:90%}.small-caps{font-size:9px;letter-spacing:1.6px;font-weight:700;color:var(--green)}.start-card h3{font-size:21px;margin:9px 0 22px}.start-card p{font-size:11px;line-height:1.8;color:var(--muted);margin:16px 0 0}.button{border-radius:7px;padding:9px 15px;font-size:12px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;transition:background .15s,transform .15s}.button:not(:disabled):active{transform:translateY(1px)}.button.primary{background:var(--green);color:#fff}.button.primary:not(:disabled):hover{background:#163f2d}.button.large{padding:12px 35px;min-height:46px;font-size:14px}.button.subtle{background:#edf0e8;color:var(--ink);border:1px solid #dce2d5}.button.subtle:not(:disabled):hover{background:#e1e8d7}.button-group{display:flex;gap:8px;align-items:center}.full-width{width:100%}.play-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line);font-size:12px}.play-toolbar .muted{font-size:11px;margin-left:8px}.muted{color:var(--muted)}.controls-grid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:22px;padding:26px 0 9px}.control-card{display:flex;gap:12px}.control-icon{height:32px;width:32px;display:flex;align-items:center;justify-content:center;border:1px solid #d5ddca;border-radius:9px;flex-shrink:0;font-size:20px;line-height:1;background:#edf1e2}.control-card h3{margin:0 0 7px;font-size:12px}.control-card p{margin:0;font-size:11px;line-height:2.2;color:#68766c}kbd{background:#fff;border:1px solid #d8dfd2;border-bottom:2px solid #ced7c6;border-radius:3px;padding:1px 4px;font:10px/1.5 inherit;white-space:nowrap;margin:0 2px}.fine-print{font-size:10px;color:var(--muted);margin:15px 0 0;line-height:1.9}.game-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#1d3129}.game-loading{background:#eff3e8;flex-direction:column;backdrop-filter:none}.game-loading p{margin:14px 16px 0;font-size:13px}.game-loading p.muted{margin:3px;font-size:11px}.spinner{width:32px;height:32px;border:3px solid #d4decb;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.notice{padding:14px 18px;margin:12px 0;background:#fff2d0;border-radius:7px;font-size:12px}.save-status{font-size:10px;color:var(--muted)}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 286px;border:1px solid #d9dfd1;border-radius:12px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}.editor-main{min-width:0;border-right:1px solid var(--line)}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid var(--line);gap:10px}.segmented{display:flex;gap:3px;background:#f0f3ea;padding:3px;border-radius:7px}.tool{padding:6px 11px;border-radius:5px;background:none;font-size:12px;color:var(--muted);white-space:nowrap}.tool.active{background:#fff;box-shadow:0 1px 4px #263c3012;color:var(--green);font-weight:700}.icon-button{width:32px;height:32px;border:1px solid #dfe5d7;background:#fff;border-radius:5px;color:var(--ink);font-size:19px;display:inline-flex;align-items:center;justify-content:center}.icon-button:hover{background:#edf2e6}.canvas-wrap{height:490px;position:relative;overflow:hidden;background:#f3f5ed}#course-canvas{width:100%;height:100%;display:block;touch-action:none;cursor:grab}#course-canvas[data-mode="add"]{cursor:crosshair}#course-canvas[data-mode="select"]{cursor:default}.canvas-legend{position:absolute;left:18px;top:16px;display:flex;align-items:center;gap:6px;color:#71806a;font-size:8px;letter-spacing:.7px;pointer-events:none}.legend-start,.legend-point{width:7px;height:7px;border-radius:50%;background:var(--yellow);border:1px solid #c29435}.legend-point{background:#fff;border:1px solid #537c5b;margin-left:10px}.zoom-tools{position:absolute;right:16px;bottom:16px;display:flex;gap:4px;align-items:center;padding:4px;background:#fffffff2;border-radius:7px;box-shadow:0 2px 10px #253f3512}.zoom-tools span{font-size:10px;min-width:40px;text-align:center}.zoom-tools .icon-button{border:0;width:27px;height:27px}.canvas-footer{padding:11px 16px;display:flex;gap:12px;justify-content:space-between;font-size:10px;color:var(--muted);border-top:1px solid var(--line)}#point-count{font-size:9px;white-space:nowrap;letter-spacing:.7px}.editor-tip{padding:16px;display:flex;gap:12px;background:#fbfcf6;min-height:80px}.editor-tip>span{font-size:23px;color:#78935c}.editor-tip p{margin:0;font-size:10px;color:#7a8674;line-height:1.9}.sidebar-section{padding:19px 20px;border-bottom:1px solid var(--line)}.sidebar-section:last-child{border-bottom:0}.field-label{display:block;font-size:11px;font-weight:700;margin-bottom:8px}input[type=text],input[type=number]{width:100%;border:1px solid #d9e0d1;background:#fbfcf8;border-radius:5px;padding:8px 10px;font-size:12px;color:var(--ink);min-width:0}input:disabled{background:#f1f3ec;color:#aab3a1}.course-metrics{display:flex;gap:20px;margin:16px 0 0}.course-metrics>div{flex:1}.course-metrics span{display:block;font-size:9px;color:var(--muted)}.course-metrics strong{font-size:21px;font-weight:650;line-height:1.5;letter-spacing:-.7px}.course-metrics small{font-size:11px;letter-spacing:0;font-weight:400;color:var(--muted)}.sidebar-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sidebar-title h3{font-size:11px;margin:0}.text-button{background:none;font-size:10px;text-decoration:underline;text-underline-offset:3px;color:var(--muted);padding:0}.text-button.danger{color:var(--red)}.coordinate-fields{display:flex;gap:12px}.coordinate-fields label{display:flex;align-items:center;gap:6px;font-size:10px;color:var(--muted);flex:1;min-width:0}.coordinate-fields input{padding:7px}.tiny{font-size:9px;color:var(--muted);line-height:1.8;margin:9px 0}.selected-settings .button{font-size:10px;min-height:33px;padding:6px}.validation{font-size:10px;margin:0 0 15px}.validation strong{font-size:11px;color:#3b714e;display:flex;align-items:center;gap:7px}.validation strong:before{content:'✓';width:19px;height:19px;border-radius:50%;background:#e2efdb;display:flex;align-items:center;justify-content:center;font-size:12px}.validation.invalid strong{color:var(--red)}.validation.invalid strong:before{content:'!';background:#f7e4d8}.validation ul{margin:8px 0 0;padding-left:17px;color:var(--muted);font-size:9px;line-height:1.8}.file-buttons{gap:6px}.file-buttons .button{flex:1;font-size:10px;padding:7px 4px}.reset-course{margin-top:14px}.editor-details{margin:20px 0;font-size:11px;color:var(--muted);max-width:830px}.editor-details summary{font-size:11px;cursor:pointer;color:var(--green)}.editor-details p{margin:9px 0;line-height:1.9}.video-layout{display:grid;grid-template-columns:1.9fr 1fr;gap:38px;align-items:center;background:#fff;border:1px solid var(--line);padding:24px;border-radius:12px}.video-player{overflow:hidden;border-radius:7px;background:#1d3129;line-height:0}.video-player video{width:100%;aspect-ratio:16/9;object-fit:contain}.video-description{padding:10px 20px 10px 0}.pill{display:inline-block;background:#edf1e1;color:#68814b;font-size:9px;padding:5px 9px;border-radius:4px;letter-spacing:.8px}.video-description h3{font-size:26px;line-height:1.6;margin:17px 0}.video-description p{font-size:12px;line-height:1.9}.video-description p.muted{font-size:10px}.text-link{display:inline-block;margin-top:12px;font-size:11px;font-weight:600;text-decoration:none;border-bottom:1px solid #b7c4a4;padding-bottom:3px}.site-footer{margin-top:52px;padding-top:23px;padding-bottom:26px;display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);font-size:8px;letter-spacing:.7px;color:#7d8878}.footer-star{margin:0 12px;color:#7a935e}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:12px 20px;max-width:90%;background:#254b3dee;color:#fff;border-radius:8px;font-size:12px;z-index:10;box-shadow:var(--shadow)}.skip-link{position:fixed;top:-100px;left:16px;background:var(--green);color:#fff;padding:10px;z-index:99}.skip-link:focus{top:10px}@media(min-width:1600px){.game-stage{max-height:720px}}@media(max-width:1050px){.wrap{padding-left:28px;padding-right:28px}.editor-layout{grid-template-columns:minmax(0,1fr) 260px}.canvas-wrap{height:485px}.sidebar-section{padding:17px 16px}.tool{padding:6px 8px}.controls-grid{gap:14px}.control-icon{display:none}.video-layout{gap:25px}.video-description h3{font-size:22px}.intro-stamp{padding-right:38px}.intro-stamp strong{font-size:25px}}@media(max-width:760px){.wrap{padding-left:20px;padding-right:20px}.site-header{height:84px}.header-meta{font-size:8px;letter-spacing:.8px}.build-label{display:none}.brand{font-size:13px;gap:8px}.brand b{font-size:15px}.brand img{width:35px;height:35px}.intro{padding:28px 0}.intro-stamp{display:none}.mobile-break{display:block}h1{font-size:26px;line-height:1.65}.intro-copy{font-size:11px;max-width:290px}.tabs{gap:0;justify-content:space-between}.tab{padding:13px 9px;font-size:12px;gap:7px}.tab small{display:none}.tab-number{font-size:8px}.tab-panel{padding-top:23px}.section-heading h2{font-size:18px}.section-heading{margin-bottom:15px}.game-status{font-size:9px}.game-stage{border-radius:8px;aspect-ratio:16/10}.start-card{padding:18px 22px;border-radius:12px}.start-card h3{font-size:15px;margin:6px 0 13px}.start-card p{font-size:9px;margin-top:10px}.small-caps{font-size:7px}.button.large{min-height:38px;padding:8px 22px;font-size:12px}.play-toolbar{padding:12px 0;font-size:10px}.play-toolbar .muted{display:none}.play-toolbar .button{font-size:10px;padding:6px 9px;min-height:33px}.button-group{gap:5px}.controls-grid{grid-template-columns:1fr;padding-top:20px;gap:17px}.control-icon{display:flex}.control-card h3{font-size:11px;margin-bottom:3px}.control-card p{font-size:10px}.fine-print{font-size:9px;margin-top:16px}.editor-layout{display:flex;flex-direction:column}.editor-main{border-right:0}.canvas-wrap{height:400px}.canvas-toolbar{padding:10px}.tool{font-size:11px}.canvas-footer{padding:10px;font-size:9px}.canvas-footer #canvas-help{max-width:220px}.editor-tip{padding:12px;min-height:0}.editor-sidebar{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}.sidebar-section{padding:16px;border-right:1px solid var(--line)}.sidebar-section:nth-child(even){border-right:0}.sidebar-section:nth-child(3){border-bottom:0}.selected-settings .tiny{min-height:32px}.course-metrics{gap:10px;margin-top:18px}.course-metrics strong{font-size:20px}.save-status{font-size:8px;max-width:100px;text-align:right}.file-buttons{flex-direction:column}.file-buttons .button{width:100%}.video-layout{grid-template-columns:1fr;padding:15px;gap:10px}.video-description{padding:10px 5px}.video-description h3{font-size:23px;margin:12px 0}.site-footer{margin-top:35px;padding-top:20px;flex-direction:column;gap:7px;font-size:7px}.game-loading p{font-size:11px}}@media(max-width:380px){.wrap{padding-left:14px;padding-right:14px}.header-meta{font-size:7px}.tab{padding:12px 6px}.tab-number{display:none}.tool span{font-size:10px}.tool{padding:6px}.canvas-wrap{height:350px}.sidebar-section{padding:12px}.button.primary{font-size:11px}.section-heading h2{font-size:17px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.spinner{animation-duration:2s}}
@media(max-width:760px){#apply-course{white-space:nowrap;font-size:11px;padding-left:8px;padding-right:8px}}

.preset-links{display:flex;flex-wrap:wrap;column-gap:16px;row-gap:0}

/* Real engine progress; no overlay survives the ready event. */
.loading-card{width:min(420px,86%);padding:22px 16px}.loading-card .spinner{margin:0 auto 12px;width:25px;height:25px}.game-loading .loading-card>p{margin:8px 0;font-size:13px}.game-loading .loading-card>p.muted{font-size:11px;line-height:1.7;margin:8px 0 0}.loading-meter{display:flex;justify-content:space-between;align-items:center;margin:18px 0 7px;font-size:11px;color:var(--green)}.loading-meter strong{font-size:19px;font-variant-numeric:tabular-nums;line-height:1}.loading-card progress{display:block;width:100%;height:12px;border:0;border-radius:20px;overflow:hidden;background:#dce5d4;accent-color:var(--green)}.loading-card progress::-webkit-progress-bar{background:#dce5d4;border-radius:20px}.loading-card progress::-webkit-progress-value{background:var(--green);border-radius:20px}.loading-card progress::-moz-progress-bar{background:var(--green);border-radius:20px}.game-loading[data-phase="starting"] .loading-meter{color:#766024}@media(max-width:760px){.loading-card{padding:10px 8px}.loading-card .spinner{width:18px;height:18px;margin-bottom:6px}.game-loading .loading-card>p{font-size:11px;margin:4px 0}.game-loading .loading-card>p.muted{font-size:9px;margin:4px 0 0}.loading-meter{margin:9px 0 5px;font-size:10px}.loading-meter strong{font-size:16px}.loading-card progress{height:9px}}

.start-card:has(.start-error:not([hidden])){max-height:94%;overflow:auto;width:min(540px,94%);padding:22px 28px}.start-card .start-error{font-size:12px;color:var(--red);margin:0 0 14px}.start-card details{text-align:left;margin:10px 0 16px;font-size:11px;color:var(--muted)}.start-card pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:100px;overflow:auto;background:#f1e9e1;padding:9px;border-radius:5px;font:10px/1.5 monospace}.loading-card #retry-loading{margin-top:12px;font-size:11px}@media(max-width:760px){.start-card:has(.start-error:not([hidden])){padding:10px 15px}.start-card .start-error{font-size:10px;margin:0 0 7px}.start-card details{margin:5px 0 7px}.start-card pre{max-height:60px}.start-card:has(.start-error:not([hidden])) h3{margin:4px 0 7px}.loading-card #retry-loading{margin-top:5px;min-height:28px;padding:3px 8px;font-size:10px}}
