:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#202020;background:#fff;font-synthesis:none;-webkit-text-size-adjust:100%;--muted:#888;--line:#dedede}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}button,[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:default;color:#d4d4d4}button:focus-visible,[tabindex]:focus-visible{outline:2px solid #5684b2;outline-offset:5px}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.game{height:100dvh;max-width:1000px;margin:auto;padding:max(24px,env(safe-area-inset-top)) 40px max(20px,env(safe-area-inset-bottom));display:grid;grid-template-rows:48px 1fr 48px}.topbar,.bottom-bar{display:flex;align-items:center;justify-content:space-between}.page-counter{display:flex;gap:11px;align-items:baseline;font-size:19px;font-variant-numeric:tabular-nums;letter-spacing:.03em}.page-counter>span:last-child,.counter-slash{color:#aaa;font-size:14px}.icon-button{width:44px;height:44px;border:0;background:transparent;padding:10px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px}.icon-button:hover:not(:disabled){background:#f4f4f4}.settings-toggle svg{width:25px;height:25px}.play-area{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:0;padding-bottom:24px}.instruction{font-size:16px;color:#747474;line-height:1.9;text-align:center;max-width:100%;margin-bottom:55px;word-break:keep-all;overflow-wrap:anywhere}.question-wrap{min-height:88px;display:flex;align-items:center;justify-content:center;width:100%;margin-bottom:38px}.question{font-size:clamp(23px,3vw,32px);font-weight:600;letter-spacing:.045em;line-height:1.8;text-align:center;margin:0;word-break:keep-all;overflow-wrap:anywhere}.glyph{display:inline;touch-action:none;cursor:grab;position:relative}.glyph.drag-origin{opacity:.16}.glyph.keyboard-picked{background:#e9edf2;border-radius:2px}.answer-row{display:flex;align-items:center;justify-content:center;gap:14px;width:100%;max-width:460px}.answer{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:72px;flex:1;border:1.5px solid #c8c8c8;border-radius:5px;padding:9px 12px;transition:background .15s,border-color .15s}.answer.drop-active{border-color:#252525;background:#f5f5f5}.answer.bad{animation:shake .25s}.answer-token{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:44px;font-size:27px;line-height:1;cursor:grab;touch-action:none}.answer-placeholder{width:28px;height:1px;background:#d2d2d2;margin:0 3px}.confirm{display:inline-flex;align-items:center;justify-content:center;width:66px;height:72px;flex-shrink:0;background:#222;color:#fff;border:1px solid #222;border-radius:5px}.confirm:hover{background:#3b3b3b}.confirm svg{width:28px;height:28px;stroke-width:2}.confirm:disabled{background:#e7e7e7;border-color:#e7e7e7;color:#fff}.feedback{height:36px;line-height:36px;color:#777;font-size:13px}.bank{height:70px;display:flex;align-items:center;justify-content:center;gap:14px;margin-top:10px}.bank-tile{display:inline-flex;align-items:center;justify-content:center;border:1px solid #c9c9c9;border-bottom:3px solid #c9c9c9;border-radius:5px;width:54px;height:57px;font-size:26px;background:#fff;touch-action:none;cursor:grab}.bank.empty{visibility:hidden}.stage-dots{display:flex;align-items:center;gap:16px}.stage-button{width:32px;height:32px;padding:0;border:0;background:transparent;position:relative;font-size:13px;color:#aaa}.stage-button.active{color:#222;font-weight:700}.stage-button.active:after{content:"";height:2px;width:16px;background:#222;position:absolute;bottom:0;left:8px}.stage-button.solved:before{content:"";position:absolute;width:4px;height:4px;border-radius:50%;background:#aaa;top:0;right:3px}.stage-button.secret:before{background:#ac8b43;width:5px;height:5px}.stage-button:disabled{color:#ddd}
.outside{position:fixed;inset:0;z-index:10;background:transparent}.settings-panel{position:fixed;z-index:20;width:290px;right:max(20px,calc((100vw - 920px)/2));top:max(78px,calc(env(safe-area-inset-top) + 58px));background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px 18px 18px;box-shadow:0 8px 26px #0000000c}.panel-top{height:32px;display:flex;justify-content:flex-end;margin-right:-10px}.small{width:32px;height:32px;font-size:23px;font-weight:300}.menu-row{display:flex;align-items:center;gap:16px;min-height:58px;font-size:16px;cursor:pointer;line-height:1.8}.menu-row+.menu-row{border-top:1px solid #eee}.row-symbol{display:inline-flex;width:20px;align-items:center;justify-content:center;font-size:17px;color:#888}.reset-symbol{font-size:25px}.drag-ghost{position:fixed;z-index:1000;pointer-events:none;min-width:52px;height:58px;display:flex;align-items:center;justify-content:center;background:white;border:1.5px solid #333;border-radius:5px;box-shadow:0 5px 13px #00000012;font-size:28px;transform:translate(-50%,-60%)}body.dragging,body.dragging *{cursor:grabbing!important}
dialog{color:#222;background:#fff;border:1px solid #ddd;border-radius:9px;padding:48px 32px 32px;width:min(380px,calc(100vw - 40px));text-align:center;box-shadow:0 15px 60px #00000012}dialog::backdrop{background:#ffffffcc}dialog h2{font-size:21px;font-weight:600;margin:8px 0 18px}dialog p{font-size:14px;line-height:1.8;color:#777;margin:12px 0 24px}.dialog-close{position:absolute;right:8px;top:6px;font-size:27px;font-weight:300}.success-mark{font-size:42px;font-weight:300;margin-bottom:18px}.dialog-action{width:66px;height:52px;margin-top:8px;font-size:26px}.help-demo{display:flex;align-items:center;justify-content:center;gap:18px;margin:10px 0 30px}.demo-tile,.demo-answer{font-size:25px;border:1px solid #bbb;border-radius:4px;padding:7px 12px}.demo-answer{padding:8px 17px}.demo-arrow{color:#888}.demo-check{font-size:22px}.help-dialog p{margin-bottom:0}.secret-message{color:#ac8b43}
[hidden]{display:none!important}@keyframes shake{0%,100%{transform:translateX(0)}30%{transform:translateX(-5px)}70%{transform:translateX(5px)}}
@media(max-width:600px){.game{padding:max(15px,env(safe-area-inset-top)) 22px max(16px,env(safe-area-inset-bottom));grid-template-rows:44px 1fr 44px}.instruction{font-size:13px;max-width:300px;margin-bottom:44px;line-height:2.1}.question{font-size:23px;line-height:1.9;letter-spacing:.025em;max-width:330px}.question-wrap{min-height:98px;margin-bottom:24px}.answer-row{gap:10px;max-width:350px}.answer{min-height:64px;padding:8px;gap:2px}.confirm{width:56px;height:64px}.answer-token{font-size:25px;min-width:30px;height:42px}.bank{margin-top:8px}.bank-tile{width:49px;height:52px;font-size:25px}.settings-panel{right:18px;top:max(66px,calc(env(safe-area-inset-top) + 51px));width:275px}.play-area{padding-bottom:8px}.page-counter{font-size:17px}.answer-placeholder{width:24px}}
@media(max-height:660px){.instruction{margin-bottom:22px}.question-wrap{margin-bottom:14px;min-height:70px}.play-area{padding-bottom:0}.bank{height:54px;margin-top:0}.feedback{height:28px;line-height:28px}.bank-tile{height:47px;width:46px}.game{padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(10px,env(safe-area-inset-bottom))}}
@media(max-height:440px){.game{grid-template-rows:36px 1fr 36px}.play-area{display:grid;grid-template-columns:1fr 160px;column-gap:20px;align-content:center}.instruction{grid-column:1/-1;margin-bottom:8px;font-size:12px}.question-wrap{grid-column:1/-1;min-height:40px;margin-bottom:10px}.question{font-size:21px;max-width:none}.answer-row{grid-column:1;margin:auto;max-width:340px}.bank{grid-column:2;grid-row:3;height:50px;gap:7px}.bank-tile{height:42px;width:40px;font-size:23px}.feedback{grid-column:1/-1;height:20px;line-height:20px;text-align:center}.answer{min-height:50px}.confirm{height:50px}.settings-panel{top:50px}}
body{touch-action:manipulation}
.topbar{display:grid;grid-template-columns:1fr auto 1fr}.brand{font-size:16px;letter-spacing:.18em;font-weight:600;margin:0}.top-actions{justify-self:end;display:flex;align-items:center;gap:2px}.top-actions>#recordWarning{color:#9c793b;font-size:16px;margin-right:3px}.top-actions>#completionOpen{font-size:23px;width:36px;padding:6px}.settings-panel{width:310px;max-height:calc(100dvh - 94px);overflow-y:auto;overscroll-behavior:contain}.panel-top{justify-content:space-between;align-items:center;height:38px}.panel-top h2{margin:0;font-size:14px;font-weight:600;color:#777}.audio-settings{padding:14px 0;border-bottom:1px solid #eee}.volume-heading{display:flex;justify-content:space-between;font-size:13px;color:#777;margin-bottom:12px}.audio-settings input{width:100%;height:26px;accent-color:#333;touch-action:pan-x}.mute-button{margin-top:8px;font-size:13px;padding:6px 16px;min-height:36px;border:1px solid #ccc;background:#fff;border-radius:4px}.mute-button.is-muted{background:#222;color:#fff;border-color:#222}.setting-links{padding:13px 0 6px;font-size:14px;line-height:1.8}.setting-links a{color:#333;display:block;text-decoration:none;padding:5px 0}.setting-links a:hover{text-decoration:underline}.hint-note{display:block;font-size:11px;line-height:1.7;color:#929292;margin:0 0 10px}.menu-row{min-height:50px;font-size:14px}.menu-row:first-of-type{border-top:1px solid #eee}.share-link{display:block;text-decoration:none;background:#222;color:#fff;border-radius:5px;padding:15px 20px;margin-top:20px;font-size:15px}.share-link:hover{background:#3b3b3b}.record-grid{display:grid;grid-template-columns:1fr auto;gap:16px;margin:25px 0;font-size:14px;text-align:left}.record-grid dt{color:#777}.record-grid dd{margin:0;font-variant-numeric:tabular-nums}.records-dialog #previewNote{font-size:12px;line-height:1.8;margin-bottom:0}.connection{position:fixed;inset:0;z-index:2000;background:#fffffff2;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px;text-align:center;font-size:14px;color:#777}.reconnect-button{border:1px solid #bbb;border-radius:4px;background:#fff;padding:10px 20px;min-height:44px}.busy [data-token],.busy .menu-row,.busy #stageDots,.busy #confirm,.busy #next,.busy #previous{pointer-events:none}.busy #game{cursor:progress}
@media(max-width:600px){.settings-panel{width:min(310px,calc(100vw - 36px))}.brand{font-size:14px}.page-counter{gap:7px}.top-actions .icon-button{width:36px;padding:7px}.top-actions>#completionOpen{width:30px}.menu-row{min-height:48px}}
.bottom-bar{display:grid;grid-template-columns:1fr auto 1fr}.bottom-bar>#previous{justify-self:start}.next-control{justify-self:end;display:flex;align-items:center;gap:2px}.next-label{font-size:13px;color:#777;white-space:nowrap}.question .glyph{cursor:default}.question-main{display:block}.question-condition{display:block;font-size:14px;line-height:1.8;font-weight:400;letter-spacing:.02em;color:#777;margin-top:8px}.question-wrap:has(.question-condition){min-height:100px}
.panel-top{position:sticky;top:-6px;z-index:1;background:#fff}.audio-settings{border-top:1px solid #eee;margin-top:5px}
dialog{max-height:calc(100dvh - 32px);overflow:auto}.records-disclaimer{font-size:11px;margin-bottom:0;color:#999}
.page-tools{display:flex;align-items:center;gap:10px}.restart-open{font-size:22px;width:32px;height:36px;padding:4px;color:#888}.return-control{justify-self:start;display:flex;align-items:center;gap:2px}.return-control .icon-button{font-size:24px}.bank{width:100%;max-width:338px;gap:10px}.bank .bank-tile{flex:0 1 48px;width:48px;min-width:0}.question-condition{font-size:inherit;font-weight:inherit;letter-spacing:inherit;color:inherit;line-height:inherit}.settings-disclaimer{font-size:11px;line-height:1.8;margin:12px 0 0;color:#999}.busy #returnAnswer,.busy #restartOpen{pointer-events:none}
@media(max-width:600px){.page-tools{gap:5px}.bank .bank-tile{font-size:23px}}
@media(max-height:440px){.bank{display:grid;grid-template-columns:repeat(3,40px);width:160px;height:92px;gap:6px}.bank .bank-tile{width:40px;height:40px}.question-wrap:has(.question-condition){min-height:90px}}
.play-area{min-width:0;width:100%}
.topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:8px}
.page-tools{gap:1px}.page-tools .next-label{font-size:12px}
.help-toggle{border:0;background:transparent;padding:8px 6px;font-size:12px;white-space:nowrap;min-height:36px}
.help-toggle:hover{background:#f4f4f4;border-radius:5px}
.help-panel{position:fixed;z-index:20;top:max(78px,calc(env(safe-area-inset-top) + 58px));right:max(20px,calc((100vw - 920px)/2));width:310px;max-height:calc(100dvh - 94px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px 18px 18px;box-shadow:0 8px 26px #0000000c}
.help-panel .instruction{font-size:15px;line-height:2.2;color:#555;margin:16px 0 5px;text-align:left;word-break:normal;max-width:none}
.full-reset{width:100%;min-height:42px;margin-top:10px;border:1px solid #ccc;border-radius:4px;background:#fff;font-size:13px}
.full-reset:hover{background:#f4f4f4}
.bottom-bar>#stageDots{grid-column:2}.bottom-bar>.next-control{grid-column:3}
.busy #retryStage{pointer-events:none}
@media(max-width:600px){.help-panel{top:max(66px,calc(env(safe-area-inset-top) + 51px));right:18px;width:min(310px,calc(100vw - 36px))}.help-toggle{font-size:11px;padding:8px 4px}.page-tools .next-label{font-size:11px}.page-tools .restart-open{width:28px}}
@media(max-height:440px){.help-panel{top:50px}.play-area{grid-template-rows:auto auto auto}.question-wrap{grid-row:1}.answer-row{grid-row:2}.bank{grid-row:2}.feedback{grid-row:3}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
