:root{color-scheme:light;--ink:#233c34;--green:#244f40;--paper:#f5f3eb;--muted:#758278;--line:#dce1d5;--orange:#dc7e4c}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN",sans-serif;overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible{outline:3px solid #dc7e4c;outline-offset:3px}header{max-width:940px;margin:auto;padding:24px 24px 12px;display:flex;align-items:center;justify-content:space-between}header a{text-decoration:none;color:var(--green);font-size:29px;font-weight:800;display:flex;align-items:center;gap:10px}header span{font-size:11px;letter-spacing:2px}.icon{border:1px solid var(--line);border-radius:50%;width:40px;height:40px;color:var(--green);background:transparent}main{max-width:840px;margin:0 auto;padding:25px 24px 0}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--muted);font-weight:600}.hero h1{font-weight:650;font-size:clamp(30px,5vw,47px);letter-spacing:-1px;line-height:1.35;margin:14px 0}.hero p{color:var(--muted);font-size:14px;line-height:1.8}.cards{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:30px}.card{border:1px solid var(--line);border-radius:24px;padding:24px;background:#fffdf6;position:relative;overflow:hidden}.art{height:145px;display:flex;align-items:center;justify-content:center;margin-bottom:16px;background:#e7ede3;border-radius:16px}.card:nth-child(2) .art{background:#f5e8dc}.card svg{width:145px;height:130px}.tag{font-size:10px;letter-spacing:1.5px;color:var(--muted)}h2{font-size:24px;margin:10px 0}.card p{font-size:13px;color:var(--muted);line-height:1.8;min-height:47px}.primary{background:var(--green);color:white;border-radius:13px;padding:14px 20px;font-weight:650;min-height:48px}.card .primary{width:100%;display:flex;justify-content:space-between}.secondary{background:#e8ede3;color:var(--green);padding:12px 16px;border-radius:12px;min-height:44px}.text-btn{background:none;color:var(--muted);padding:10px;font-size:13px}.game{max-width:520px;margin:auto}.game-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.game-title h1{font-size:25px;margin:8px 0}.level-pill{border:1px solid var(--line);padding:8px 12px;border-radius:20px;font-size:12px}.progress{height:4px;background:var(--line);border-radius:9px;margin-bottom:24px}.progress span{display:block;background:var(--green);height:100%;border-radius:9px}.instruction{font-size:13px;line-height:1.7;min-height:43px;margin:12px 0;color:var(--muted)}.board-wrap{background:#fffdf7;border:1px solid var(--line);border-radius:24px;padding:16px;position:relative;box-shadow:0 12px 35px #233c3406}.board-svg{width:100%;display:block;touch-action:manipulation;user-select:none}.piece{cursor:pointer;transition:opacity .2s;outline:none}.piece:hover .tile{fill:#e3eadc}.piece:focus-visible .tile{stroke:#dc7e4c;stroke-width:3}.blocked{animation:shake .25s}.exit{animation:fadeout .22s forwards}.hinted{animation:pulse 1s 3}.hinted .tile{stroke:#dc7e4c;stroke-width:3}.logic-board{display:grid;gap:3px;user-select:none;touch-action:manipulation}.cell{aspect-ratio:1;background:var(--bg);border-radius:8px;color:#233c34;font-size:clamp(21px,5vw,35px);display:flex;align-items:center;justify-content:center;position:relative;min-width:0;padding:0;transition:transform .12s}.cell:active{transform:scale(.93)}.cell.star:after{content:"";position:absolute;inset:5px;border:1px solid #233c3445;border-radius:5px}.cell.note{color:#233c3465}.cell.conflict{box-shadow:inset 0 0 0 2px #bc4a38}.cell.mark{font-size:25px;color:#233c3445}.cell.hint{box-shadow:inset 0 0 0 3px var(--orange)}.toolbar{display:flex;gap:8px;justify-content:center;margin-top:17px;flex-wrap:wrap}.toolbar button{font-size:12px;flex:1;padding:12px 8px;border-radius:12px;background:#e8ede3;color:var(--green);min-height:44px}.toolbar button:disabled{opacity:.35;cursor:default}.tools-mode{display:flex;gap:4px;background:#e6eade;padding:4px;border-radius:14px;margin:12px 0}.tools-mode button{flex:1;background:transparent;color:var(--muted);padding:10px 6px;border-radius:10px;font-size:12px}.tools-mode .active{background:#fffdf7;color:var(--green);box-shadow:0 2px 5px #233c3410}.status{min-height:41px;margin:14px 0 0;text-align:center;color:var(--muted);font-size:13px;line-height:1.7}.stats{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-top:17px}.complete{position:absolute;inset:0;border-radius:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fffdf7f5;animation:appear .3s;padding:20px;text-align:center}.complete .flower{font-size:55px;color:var(--orange)}.complete h2{font-size:30px}.complete p{font-size:13px;color:var(--muted);line-height:1.7}.complete .primary{margin-top:12px;min-width:200px}.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:20px 0}.level-grid button{height:50px;border-radius:12px;background:#edf0e6;color:var(--green)}.level-grid .done{background:var(--green);color:#fff}footer{max-width:840px;margin:35px auto 22px;padding:0 24px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px}footer button{font-size:11px;background:none;color:var(--muted);text-decoration:underline}dialog{border:1px solid var(--line);border-radius:23px;max-width:420px;width:calc(100% - 32px);padding:26px;color:var(--ink);background:var(--paper)}dialog::backdrop{background:#102b2260;backdrop-filter:blur(4px)}dialog h2{font-size:22px}dialog p{font-size:13px;line-height:1.9;color:var(--muted)}dialog .primary{width:100%}.record-row{display:flex;justify-content:space-between;font-size:13px;border-bottom:1px solid var(--line);padding:12px 0}.small{font-size:11px!important}.chips{display:flex;gap:8px;margin:18px 0}.chips span{font-size:11px;color:var(--muted);padding:6px 9px;border:1px solid var(--line);border-radius:20px}@keyframes fadeout{to{opacity:0;transform:translateY(-12px)}}@keyframes shake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}@keyframes pulse{50%{opacity:.45}}@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media(max-width:600px){header{padding:17px 20px 8px}main{padding:18px 20px 0}.cards{gap:16px;grid-template-columns:1fr;margin-top:23px}.card{padding:19px;display:grid;grid-template-columns:100px 1fr;column-gap:17px}.art{grid-row:1/5;height:130px;margin:0}.card svg{width:95px;height:105px}.card h2{font-size:22px;margin:7px 0}.card p{margin:4px 0 12px;min-height:0;font-size:12px}.card .primary{padding:12px;font-size:13px;grid-column:2}.hero h1{font-size:32px}.board-wrap{padding:12px;border-radius:20px}.game-top{margin-bottom:8px}.progress{margin-bottom:15px}footer{margin-top:26px;padding-bottom:env(safe-area-inset-bottom)}.card .tag{font-size:9px}.game-title h1{font-size:24px}.instruction{font-size:12px}.level-pill{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.chapter-label{font-size:12px;color:var(--green);padding:3px 2px 12px;display:flex;justify-content:space-between;gap:10px}.chapter-label span{color:var(--muted);white-space:nowrap}.trial-bar{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:14px;background:#f1e5d5;border-radius:13px;padding:10px}.trial-bar span{font-size:11px;width:100%;color:#84532e}.trial-bar button{font-size:11px;background:#fffdf6;border-radius:9px;padding:10px;flex:1;min-height:44px;color:var(--ink)}.cell.focus{box-shadow:inset 0 0 0 2px #35644b}.cell.hint{box-shadow:inset 0 0 0 3px #dc7e4c}.status{background:#e9ede2;border-radius:12px;padding:11px 14px;min-height:44px;text-align:left}.status:empty{background:none;padding:0;min-height:12px}.logic-board[data-size="7"]{gap:2px}.logic-board[data-size="7"] .cell{font-size:25px}@media(max-width:400px){main{padding-left:16px;padding-right:16px}.board-wrap{padding:8px}.trial-bar button{font-size:10px}}
.logic-board[data-mark-mode="true"]{touch-action:none}.logic-board[data-mark-mode="true"] .cell{touch-action:none}
.piece.inactive{opacity:.32}.piece.inactive:hover .tile{fill:#eef1e7}.toolbar #wait{flex:1.7}.piece.inactive .tile{stroke:#bcc6b7;stroke-dasharray:3 3}

.gate-guide{border:1px solid var(--line);border-radius:14px;background:#fff7ed;margin:0 0 14px;padding:12px 14px;font-size:12px;line-height:1.75}.gate-guide summary{cursor:pointer;font-weight:650;color:#86502e}.gate-guide p{margin:10px 0}.gate-guide strong{color:var(--ink)}

.lesson-example{padding:14px;border-radius:12px;background:#e9ede2;color:var(--green);font-size:13px;font-weight:650;line-height:1.9;margin:16px 0}

dialog{max-height:85dvh;overflow-y:auto}.level-grid button{min-height:44px}
/* Garden visual system: ink, mint, violet and warm orange. */
:root{--ink:#213344;--green:#087e62;--paper:#f3f6f8;--muted:#687786;--line:#dce4ea;--orange:#f18d4e}
body{background:radial-gradient(ellipse at 10% 0%,#dff4eb 0,transparent 48%),var(--paper);letter-spacing:.01em}
header{padding-top:20px}header a{color:var(--ink);gap:9px}header span{font-size:10px;letter-spacing:2.3px}.icon{background:#ffffffb8;box-shadow:0 3px 0 #dde6e9}
.hero{padding:14px 0 8px}.hero .eyebrow{color:var(--green);font-weight:800;letter-spacing:3px}.hero h1{font-weight:850;line-height:1.16;letter-spacing:-1.8px;font-size:clamp(40px,7vw,60px)}.hero p{font-size:15px;color:#526574}.chips span{background:#fff;border:0;box-shadow:0 2px 0 #e0e9e7;font-weight:600}
.card{background:#fff;border:0;box-shadow:0 7px 0 #dfe8e5,0 18px 36px #1c494b0a;border-radius:25px}.card h2{font-weight:800;letter-spacing:-.8px}.tag{font-weight:800;letter-spacing:1.7px;color:var(--green)}.card:nth-child(2) .tag{color:#8552ca}.art{background:#e0f3e8;position:relative;border-radius:18px}.card:nth-child(2) .art{background:#eee5fa}.art svg{filter:drop-shadow(0 5px 2px #20343b13)}
.primary{background:var(--green);box-shadow:0 4px 0 #05624c;border-radius:15px;font-weight:750;transition:transform .12s,box-shadow .12s}.primary:active{transform:translateY(3px);box-shadow:0 1px 0 #05624c}.card:nth-child(2) .primary{background:#8451ce;box-shadow:0 4px 0 #6536a5}
.game-title h1{font-weight:850;letter-spacing:-1px;font-size:29px}.game-top{align-items:end}.game-title .text-btn{padding:6px 0;font-size:12px}.level-pill{background:#fff;box-shadow:0 3px 0 #dde5e9;color:var(--ink);font-weight:800;padding:11px 15px;border:0;white-space:nowrap}.progress{height:6px;margin-top:18px;background:#dfe8e7}.progress span{background:linear-gradient(90deg,#087e62,#4fbe90)}.instruction{font-size:13px;color:#526574;min-height:0;margin:15px 0;line-height:1.8}
.board-wrap{border:1px solid #dce5e5;background:#fff;border-radius:27px;padding:15px;box-shadow:0 7px 0 #dee8e6,0 18px 36px #203c4410}.board-svg{overflow:hidden;border-radius:14px}.piece{transform-box:fill-box;transform-origin:center;transition:opacity .18s}.piece .tile{fill:#e3f2eb;stroke:#cee6dc;stroke-width:.8px}.piece:not(.inactive):hover .tile{fill:#d2eddf}.piece.inactive{opacity:.55}.piece.inactive .tile{fill:#f0e9f7;stroke:#b6a2cf;stroke-width:1;stroke-dasharray:3 3}.piece.inactive:hover .tile{fill:#f0e9f7}.hinted{animation:none}.hinted .tile{stroke:#f18d4e;stroke-width:3;fill:#fff1dc}.hinted path{stroke:#213344}.piece:focus-visible .tile{stroke:#213344;stroke-width:3}
.stats{align-items:center;font-size:13px;font-weight:650;min-height:32px;margin-top:18px}.turn-badge{display:inline-block;padding:5px 9px;border-radius:9px;font-size:11px;font-weight:800}.green-turn{background:#d9f1e6;color:#086e54}.purple-turn{background:#eee1fc;color:#7240b9}
.toolbar{gap:7px;margin-top:12px}.toolbar button{background:#fff;border:1px solid #dce5e9;box-shadow:0 3px 0 #dce5e9;font-weight:700;color:#31495b;padding:13px 8px;min-height:48px}.toolbar button:active{transform:translateY(2px);box-shadow:0 1px 0 #dce5e9}.toolbar #hint{background:#fff0dc;border-color:#f1d6b4;color:#915523;box-shadow:0 3px 0 #efd6b4}.status{color:#536a78;font-size:13px;min-height:42px;padding:12px 10px;border-radius:13px;background:#e9eef1;margin-top:16px}.status:empty{background:transparent;padding:0}
.gate-guide{background:#fff5e8;border-color:#f0ddc3;padding:10px 13px;border-radius:14px;font-size:12px}.gate-guide summary{color:#8f5428}.complete{background:#ffffffed;backdrop-filter:blur(7px);border-radius:26px}.complete .flower{color:#f18d4e;font-size:64px;background:#fff0db;border-radius:50%;width:104px;height:104px;display:grid;place-items:center;margin-bottom:16px;box-shadow:0 0 0 9px #fff7ea;animation:celebrate .5s ease-out}.complete h2{font-weight:850;font-size:28px;letter-spacing:-1px}.complete .eyebrow{color:var(--green);font-weight:800;letter-spacing:3px}.complete p{font-size:14px}
.tools-mode{background:#e4e9ef;padding:5px}.tools-mode .active{color:#7243b4}.cell{border-radius:9px}.cell.mark{color:#526474}.cell.note{color:#536475}.cell.focus{outline-color:#8451ce}.trial-bar{border-radius:13px}.chapter-label{color:#5f6f81}
dialog{background:#fff;box-shadow:0 18px 90px #172c3c30;border:0;border-radius:25px;padding:25px}dialog::backdrop{background:#1e334966;backdrop-filter:blur(5px)}dialog h2{font-weight:850;letter-spacing:-.6px;line-height:1.35}.lesson-example{background:#e3f4eb;color:#166749;border:1px solid #cfe8dc}.level-grid button{font-weight:750;background:#edf2f5;box-shadow:0 3px 0 #dce6ea;border-radius:12px}.level-grid .done{background:#087e62;box-shadow:0 3px 0 #05624c}
@keyframes celebrate{0%{transform:scale(.5) rotate(-30deg);opacity:0}75%{transform:scale(1.1) rotate(8deg)}100%{transform:scale(1) rotate(0)}}
@media(max-width:600px){main{padding:14px 18px 0}header{padding:17px 18px 8px}.hero{padding-top:6px}.hero h1{font-size:43px}.cards{gap:22px;margin-top:23px}.card{padding:19px;grid-template-columns:102px 1fr;column-gap:17px}.art{height:142px}.card h2{font-size:23px}.card .primary{font-size:13px}.game-title h1{font-size:27px}.board-wrap{padding:12px;border-radius:24px}.level-pill{font-size:12px;padding:10px 12px}.toolbar button{font-size:12px;padding:12px 6px}.instruction{font-size:12px}.progress{margin-bottom:13px}.game{max-width:520px}.complete h2{font-size:26px}footer{padding:0 18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

.piece.obstruction .tile{stroke:#c34747;stroke-width:3;fill:#fff0ed}.blocked-path{opacity:.8}.piece.blocked{animation:shake .25s}.toolbar #undo:not(:disabled){border-color:#91c5b3;background:#e6f5ed;color:#087e62}

.footer-actions{display:flex;gap:12px}.feedback-field{display:block;margin:14px 0;font-size:13px;font-weight:650}.feedback-field select,.feedback-field textarea,#record-text{display:block;width:100%;margin-top:7px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#f7f9fb;color:var(--ink);font:inherit;font-size:16px;box-sizing:border-box}.feedback-field textarea,#record-text{resize:vertical;font-weight:400}#feedback-status{font-size:12px;line-height:1.6}.playtest-summary h3{font-size:15px;margin-top:22px}.playtest-summary .record-row{font-size:12px}

.feedback-field input{display:block;width:100%;box-sizing:border-box;margin-top:7px;padding:11px;border:1px solid var(--line);border-radius:10px;background:#f7f9fb;color:var(--ink);font:inherit;font-size:16px}

.language-switch{margin-left:auto;margin-right:12px;padding:9px 11px;border-radius:12px;background:#fff;color:var(--ink);font-size:12px;font-weight:650;border:1px solid var(--line)}html[lang=en] .hero h1{font-size:clamp(38px,7vw,60px)}html[lang=en] .game-title h1{font-size:25px}html[lang=en] .toolbar button{font-size:11px}html[lang=en] .turn-badge{font-size:10px}html[lang=en] footer{gap:10px;flex-wrap:wrap}

#analytics-banner{max-width:680px;margin:12px auto;padding:12px 18px;border-radius:16px;background:#edf1e8}#analytics-banner button{border:0;background:transparent;color:inherit;text-decoration:underline;padding:8px;cursor:pointer}#analytics-no{width:100%;margin-top:12px}
