:root{--demo-bg:#ead9a6;--demo-fg:#1f2a24;--demo-muted:#5b665f;--demo-accent:#2f5e3b;--demo-accent-pressed:#244a2e;--demo-card:#fffdf6;--demo-alert:#b3261e;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}html,body{height:100%;margin:0}body{background:var(--demo-bg);color:var(--demo-fg);font-family:system-ui,-apple-system,Segoe UI,Noto Sans,Noto Sans TC,sans-serif;line-height:1.6}#app{height:100%}.demo-screen{box-sizing:border-box;text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:1rem;max-width:40rem;min-height:100%;margin:0 auto;padding:2rem 1rem;display:flex}.demo-game{color:var(--demo-muted);margin:0}.demo-title{margin:0;font-size:clamp(1.5rem,5vw,2.25rem)}.demo-detail{margin:0;font-size:1.25rem}.demo-button{background:var(--demo-accent);color:#fff;font:inherit;cursor:pointer;touch-action:manipulation;border:none;border-radius:.75rem;padding:.75rem 3rem;font-size:clamp(1.5rem,4vw,2rem);font-weight:700}.demo-button:hover,.demo-button:active{background:var(--demo-accent-pressed)}.demo-button:focus-visible{outline:3px solid var(--demo-fg);outline-offset:3px}.demo-license{text-align:left;width:100%}.demo-license summary{cursor:pointer;text-align:center}.demo-license pre{background:var(--demo-card);white-space:pre-wrap;border-radius:.5rem;padding:.75rem;font-size:.8rem;overflow-x:auto}.demo-note{color:var(--demo-muted);margin:0;font-size:.9rem}.demo-note a{color:inherit}.demo-errors{text-align:left}.demo-play{flex-direction:column;height:100dvh;display:flex}.demo-game-area{flex:1;min-height:0}.demo-debug{box-sizing:border-box;border-top:1px solid var(--demo-accent);background:var(--demo-card);flex:none;max-height:30vh;padding:6px 10px;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-y:auto}.demo-debug p,.demo-debug ul{margin:4px 0}.demo-debug ul{padding-left:1.2em}.demo-debug summary{cursor:pointer;font-weight:700}.demo-debug-alert{color:var(--demo-alert);font-weight:700}.demo-debug-muted{color:var(--demo-muted)}@font-face{font-family:KQ Andika;font-style:normal;font-weight:400;font-display:swap;src:url(./Andika-Regular-B-0TUju0.woff2)format("woff2")}@font-face{font-family:KQ Andika;font-style:normal;font-weight:700;font-display:swap;src:url(./Andika-Bold-DU9TL9lB.woff2)format("woff2")}.kq-maze{--kq-muted:#5b665f;--kq-on-hedge:#fff;--kq-hedge-pressed:#244a2e;--kq-tint:#f5edd6;--kq-backdrop:#ead9a6d9;--kq-shadow:#1f2a242e;--kq-message:#ffffffeb;box-sizing:border-box;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;width:100%;height:100%;min-height:20rem;color:var(--kq-ink);background:var(--kq-path);font-family:var(--kq-font-ui);text-align:left;line-height:1.5;position:relative;overflow:hidden;container-type:size}.kq-maze *,.kq-maze :before,.kq-maze :after{box-sizing:border-box}.kq-maze [hidden]{display:none!important}.kq-maze .kq-maze-game{touch-action:none;grid-template-rows:auto minmax(0,1fr) auto;display:grid;position:absolute;inset:0}.kq-maze .kq-maze-status{justify-content:space-between;align-items:center;gap:12px;min-height:52px;padding:8px 16px;font-size:1.1rem;display:flex}.kq-maze .kq-maze-status-right{align-items:center;gap:16px;display:flex}.kq-maze .kq-maze-clock{text-align:right;font-variant-numeric:tabular-nums;min-width:3.2em;font-weight:700}.kq-maze .kq-maze-lives{color:var(--kq-wrong);gap:.2em;font-size:1.4rem;line-height:1;display:flex}.kq-maze .kq-maze-heart-lost{color:var(--kq-muted);opacity:.6}.kq-maze .kq-maze-icon-btn{border:2px solid var(--kq-hedge);background:var(--kq-card);width:44px;height:44px;color:var(--kq-hedge);font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:8px;flex:none;place-items:center;margin:0;padding:0;display:grid}.kq-maze .kq-maze-icon-btn svg{fill:currentColor;width:22px;height:22px}.kq-maze .kq-maze-icon-btn:disabled{opacity:.4;cursor:default}.kq-maze .kq-maze-icon-btn:focus-visible{outline:3px solid var(--kq-keeper);outline-offset:3px}.kq-maze .kq-maze-stage{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;place-items:center;min-height:0;padding:0 16px 16px;display:grid;position:relative;overflow:hidden}.kq-maze .kq-maze-canvas{display:block}.kq-maze .kq-maze-stage-message{background:var(--kq-message);box-shadow:0 2px 12px var(--kq-shadow);pointer-events:none;border-radius:999px;padding:.3em 1.2em;font-size:clamp(1.5rem,5vmin,2.5rem);font-weight:700;position:absolute;top:50%;left:50%;transform:translate(-50%,calc(-50% - 1.6em))}.kq-maze .kq-maze-prompt{align-items:center;gap:12px;min-height:4.5rem;padding:8px 16px 16px;display:flex}.kq-maze .kq-maze-prompt-image{object-fit:contain;background:var(--kq-card);border-radius:6px;flex:none;width:auto;max-width:6rem;height:3.5rem}.kq-maze .kq-maze-prompt-text{min-width:0;font-family:var(--kq-font-quiz);text-align:left;overflow-wrap:anywhere;flex:1;margin:0;padding-block:.1em;line-height:1.45}.kq-maze .kq-maze-dpad{--kq-dpad-cell:clamp(44px, 7vmin, 60px);grid-template-columns:repeat(3, var(--kq-dpad-cell));grid-template-rows:repeat(3, var(--kq-dpad-cell));touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;flex:none;gap:2px;display:grid}.kq-maze[data-dpad=left] .kq-maze-dpad{order:-1}.kq-maze .kq-maze-dpad-btn{background:var(--kq-card);border:2px solid var(--kq-hedge);color:var(--kq-hedge);border-radius:10px;place-items:center;display:grid}.kq-maze .kq-maze-dpad-btn svg{fill:currentColor;width:55%;height:55%}.kq-maze .kq-maze-dpad-up{grid-area:1/2}.kq-maze .kq-maze-dpad-left{grid-area:2/1}.kq-maze .kq-maze-dpad-left svg{transform:rotate(-90deg)}.kq-maze .kq-maze-dpad-right{grid-area:2/3}.kq-maze .kq-maze-dpad-right svg{transform:rotate(90deg)}.kq-maze .kq-maze-dpad-down{grid-area:3/2}.kq-maze .kq-maze-dpad-down svg{transform:rotate(180deg)}.kq-maze .kq-maze-dpad[data-active=up] .kq-maze-dpad-up,.kq-maze .kq-maze-dpad[data-active=left] .kq-maze-dpad-left,.kq-maze .kq-maze-dpad[data-active=right] .kq-maze-dpad-right,.kq-maze .kq-maze-dpad[data-active=down] .kq-maze-dpad-down{background:var(--kq-hedge);color:var(--kq-on-hedge)}.kq-maze .kq-maze-ripple{border:3px solid var(--kq-keeper);pointer-events:none;border-radius:50%;width:56px;height:56px;margin:-28px 0 0 -28px;animation:.45s ease-out forwards kq-maze-ripple;position:absolute}@keyframes kq-maze-ripple{0%{opacity:.8;transform:scale(.3)}to{opacity:0;transform:scale(1)}}@container (width<480px){.kq-maze .kq-maze-status{min-height:48px;padding:6px 12px}.kq-maze .kq-maze-stage{padding:0 8px 8px}.kq-maze .kq-maze-prompt{gap:8px;padding:8px 8px 12px}}@container (height<480px) and (orientation:landscape){.kq-maze .kq-maze-game{grid-template:"status status""stage prompt"minmax(0,1fr)/minmax(0,1fr) auto}.kq-maze[data-dpad=left] .kq-maze-game{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"status status""prompt stage"}.kq-maze .kq-maze-status{grid-area:status;min-height:44px;padding:4px 12px}.kq-maze .kq-maze-stage{grid-area:stage;padding:0 12px 8px}.kq-maze .kq-maze-prompt{flex-direction:column;grid-area:prompt;justify-content:flex-end;align-items:center;gap:8px;width:clamp(9rem,26cqw,14rem);min-height:0;padding:0 12px 8px 0}.kq-maze[data-dpad=left] .kq-maze-prompt{padding:0 0 8px 12px}.kq-maze[data-dpad=off] .kq-maze-prompt{justify-content:center}.kq-maze .kq-maze-prompt-text{text-align:center;flex:0 auto;width:100%}.kq-maze .kq-maze-prompt-image{height:3rem}.kq-maze[data-dpad=left] .kq-maze-dpad{order:0}}.kq-maze .kq-maze-overlay{z-index:1;padding:16px;display:grid;position:absolute;inset:0;overflow-y:auto}.kq-maze .kq-maze-overlay>*{margin:auto}.kq-maze .kq-maze-overlay-backdrop{background:var(--kq-backdrop)}.kq-maze .kq-maze-card{background:var(--kq-card);width:min(100%,32rem);box-shadow:0 2px 12px var(--kq-shadow);text-align:center;border-radius:12px;padding:2rem}.kq-maze .kq-maze-card-title{margin:0;font-size:1.5rem;line-height:1.4}.kq-maze .kq-maze-actions{flex-direction:column;align-items:center;gap:.75rem;margin-top:1.5rem;display:flex}.kq-maze .kq-maze-btn{border:2px solid var(--kq-hedge);width:min(100%,14rem);min-width:44px;min-height:44px;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:8px;margin:0;padding:.6rem 1.5rem;font-size:1.05rem}.kq-maze .kq-maze-btn-primary{background:var(--kq-hedge);color:var(--kq-on-hedge);font-weight:700}.kq-maze .kq-maze-btn-secondary{background:var(--kq-card);color:var(--kq-hedge)}@media (hover:hover){.kq-maze .kq-maze-btn-primary:hover{background:var(--kq-hedge-pressed);border-color:var(--kq-hedge-pressed)}.kq-maze .kq-maze-btn-secondary:hover,.kq-maze .kq-maze-icon-btn:enabled:hover,.kq-maze .kq-maze-segmented label:hover input:not(:checked)+span{background:var(--kq-tint)}}.kq-maze .kq-maze-btn-primary:active{background:var(--kq-hedge-pressed);border-color:var(--kq-hedge-pressed)}.kq-maze .kq-maze-btn-secondary:active,.kq-maze .kq-maze-icon-btn:enabled:active{background:var(--kq-tint)}.kq-maze .kq-maze-btn:focus-visible{outline:3px solid var(--kq-keeper);outline-offset:3px}.kq-maze .kq-maze-setting{flex-direction:column;align-items:center;gap:6px;margin-top:1.5rem;display:flex}.kq-maze .kq-maze-setting-label{color:var(--kq-muted)}.kq-maze .kq-maze-segmented{display:flex}.kq-maze .kq-maze-segmented label{cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative}.kq-maze .kq-maze-segmented span{border:2px solid var(--kq-hedge);min-width:4.5rem;min-height:44px;color:var(--kq-hedge);place-items:center;padding:0 .75rem;display:grid}.kq-maze .kq-maze-segmented label+label span{border-left-width:0}.kq-maze .kq-maze-segmented label:first-child span{border-radius:8px 0 0 8px}.kq-maze .kq-maze-segmented label:last-child span{border-radius:0 8px 8px 0}.kq-maze .kq-maze-segmented input{opacity:0;pointer-events:none;position:absolute}.kq-maze .kq-maze-segmented input:checked+span{background:var(--kq-hedge);color:var(--kq-on-hedge);font-weight:700}.kq-maze .kq-maze-segmented input:focus-visible+span{outline:3px solid var(--kq-keeper);outline-offset:2px}
