:root{color-scheme:dark;font-family:Segoe UI,Hiragino Sans,Yu Gothic UI,Meiryo,system-ui,sans-serif;color:#f3f3f5;background:#101217;font-synthesis:none;--panel: #191c24;--border: #303542;--muted: #acb2c1;--accent: #facc15}*{box-sizing:border-box}body{margin:0;min-width:300px}button,input{font:inherit}button{color:inherit;background:#222630;border:1px solid var(--border);border-radius:7px;min-height:38px;padding:7px 12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;line-height:1.3;font-size:.84rem;font-weight:600}button:hover:not(:disabled){background:#303644;border-color:#575f71}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button[aria-pressed=true]{color:#ffe470;border-color:#8d741b;background:#352e19}button.primary{background:var(--accent);border-color:var(--accent);color:#1d1a0e;font-weight:750}button.primary:hover:not(:disabled){background:#ffe477;border-color:#ffe477}button.wide{width:100%}.app{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}.topbar,footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-inline:clamp(12px,2.4vw,34px)}.topbar{min-height:74px;padding-block:9px;border-bottom:1px solid #252936;background:#15171e}.brand,.header-actions{display:flex;align-items:center;gap:10px}.brand{min-width:0;gap:12px}.brand-icon{flex-shrink:0;width:43px;height:43px;display:grid;place-items:center;color:var(--accent);background:#30291a;border:1px solid #615326;border-radius:12px}.eyebrow{color:#d4b84b;font-size:.64rem;font-weight:800;letter-spacing:.16em}h1,h2,h3,p{margin:0}h1{font-size:clamp(.92rem,2.2vw,1.34rem);line-height:1.3;margin-top:4px}.icon-button{min-width:38px;padding-inline:7px}.settings-button{border-color:#4a4431}.settings-button svg{color:var(--accent)}.workspace{display:grid;grid-template-columns:minmax(0,1fr);flex:1;gap:16px;padding:16px clamp(12px,2.4vw,34px);height:calc(100vh - 116px);height:calc(100dvh - 116px);min-height:480px}.workspace.panel-open{grid-template-columns:minmax(0,1fr) 320px}.stage{min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:12px;overflow:hidden}.stage-bar,.stage-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#1a1d25;padding:8px 13px}.stage-bar{min-height:52px;border-bottom:1px solid var(--border)}.stage-title,.stage-tools{display:flex;align-items:center;gap:8px}.stage-title{min-width:0}.stage-title b,.stage-tools{flex-shrink:0}.status-dot{width:8px;height:8px;flex:0 0 8px;background:#788090;border-radius:50%}.status-dot[data-ready=true]{background:#90dfac}.filename{min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--muted);font-size:.74rem}.mode-badge{font-size:.72rem;padding:5px 8px;color:#f1d76e;background:#30291a;border-radius:5px;white-space:nowrap}.stage-tools button{width:36px;min-height:34px;padding:0;font-size:1.25rem}.stage-content{flex:1;min-height:0;position:relative;display:grid;place-items:center;background:#12151c;background-image:radial-gradient(circle,#343a49 1px,transparent 1.1px),radial-gradient(ellipse at 50% 55%,#1c202b,#11131a 80%);background-size:21px 21px,100% 100%}.stage-content canvas{display:block;position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}.stage-content canvas[data-mode=pan]{cursor:grab}.stage-content canvas[data-mode=pan]:active{cursor:grabbing}.stage-foot{min-height:40px;border-top:1px solid var(--border);color:var(--muted);font-size:.72rem}.stage-foot span:last-child{white-space:nowrap}.zoom-readout{position:absolute;right:9px;bottom:9px;background:#12141eea;border:1px solid #424857;border-radius:5px;padding:3px 7px;font-size:.7rem;pointer-events:none}.empty{width:min(500px,calc(100% - 32px));display:flex;flex-direction:column;align-items:center;text-align:center;gap:13px;padding:clamp(20px,5vh,42px) 10px;background:#171a23eb;border:1px dashed #505669;border-radius:15px}.drop-icon{color:var(--accent);display:grid;place-items:center;width:64px;height:64px;border:1px solid #635423;border-radius:16px;background:#302a1b;margin-bottom:3px}.empty h2{font-size:clamp(1.13rem,2.5vw,1.56rem)}.empty p,dialog p,dialog li{color:var(--muted);font-size:.86rem;line-height:1.75}.empty .primary{margin-top:3px;min-height:43px}.formats{display:flex;justify-content:center;flex-wrap:wrap;gap:5px}.formats span{font-size:.65rem;padding:4px 6px;color:var(--muted);background:#222631;border:1px solid #303645;border-radius:4px}.busy,.drop-feedback{position:absolute;inset:0;background:#11141ae8;display:grid;place-content:center;justify-items:center;gap:10px}.drop-feedback{color:var(--accent);border:2px dashed var(--accent);pointer-events:none}.settings{min-height:0;min-width:0;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:12px;background:var(--panel);overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 14px 12px;border-bottom:1px solid var(--border)}.panel-head h2{font-size:1rem;margin-top:3px}.panel-body{overflow:auto;scrollbar-color:#535a6a transparent}.section{padding:14px;border-bottom:1px solid var(--border)}.section-title{display:flex;align-items:center;gap:8px;margin-bottom:11px}.section-title>span{font:700 .65rem ui-monospace,monospace;color:#d6bf62;background:#312d20;border-radius:4px;padding:4px}.section-title h3{font-size:.86rem}.mode-grid,.wall-grid,.char-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.mode-grid button{flex-direction:column;min-height:55px;gap:5px;padding:4px;font-size:.72rem}.wall-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:8px}.wall-grid button,.char-grid button{padding-inline:3px;font-size:.72rem}.char-grid{margin-block:6px;grid-template-columns:repeat(2,minmax(0,1fr))}.muted{color:var(--muted);font-size:.73rem;line-height:1.6;margin-top:8px}.recognition-summary{background:#151820;border:1px solid #303542;border-radius:7px;display:flex;gap:16px;padding:8px;font-size:.77rem;color:var(--muted)}.recognition-summary b{color:#e6ebf3;margin-left:4px}.nudge,.text-actions,.reset-actions{display:flex;align-items:center;justify-content:space-between;gap:5px}.nudge{color:var(--muted);font-size:.74rem;margin-block:7px}.nudge button{min-width:32px;padding-inline:4px;margin-left:3px}.text-actions{margin-block:6px}.text-actions button{background:transparent;border-color:transparent;font-size:.74rem;padding-inline:5px;color:#cfd6e7}.range-row,.color-row,.toggle-row{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:6px;font-size:.8rem}.range-row output{color:#ffe16c;font-weight:700}input[type=range]{width:100%;accent-color:var(--accent);cursor:pointer}.range-ends{display:flex;justify-content:space-between;color:var(--muted);font-size:.67rem;margin-bottom:7px}.color-row{margin:10px 0;padding-block:8px;border-block:1px solid #292f3b}.color-row code{margin-left:auto;color:var(--muted)}input[type=color]{width:30px;height:26px;padding:2px;background:#262a33;border:1px solid #515565;border-radius:4px;cursor:pointer}.toggle-row{margin-top:9px}input[role=switch]{appearance:none;display:grid;align-items:center;width:40px;height:23px;padding:3px;background:#3b4150;border-radius:20px;cursor:pointer}input[role=switch]:before{content:"";width:17px;height:17px;border-radius:50%;background:#f2f3f6}input[role=switch]:checked{background:var(--accent)}input[role=switch]:checked:before{margin-left:auto;background:#21212a}.reset-actions{padding:12px}.reset-actions button{flex:1;padding-inline:3px;font-size:.75rem}footer{min-height:42px;color:var(--muted);font-size:.71rem}footer span{display:flex;align-items:center;gap:6px}footer i{background:#778194;width:4px;height:4px;border-radius:50%}.error{margin:10px 16px 0;padding:6px 10px;color:#ffd0ca;border:1px solid #a45352;border-radius:7px;background:#3a2229;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.85rem}.error button{flex-shrink:0;min-height:30px;padding:4px;background:transparent;border:0}dialog{width:min(440px,calc(100% - 28px));background:#1d212b;color:inherit;border:1px solid #555d70;border-radius:12px;padding:20px}dialog::backdrop{background:#090a10b8}dialog h2{font-size:1.12rem;margin-bottom:10px}dialog ol{padding-left:1.5em}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.stage-tools .stage-settings{display:none}@media(max-width:760px){.topbar{min-height:65px}.brand{gap:7px}.brand-icon{width:34px;height:34px}.header-actions{gap:4px}.header-actions button{padding-inline:7px;min-width:33px}.workspace,.workspace.panel-open{grid-template-columns:minmax(0,1fr);height:auto;min-height:0;gap:10px;padding-block:10px}.stage{height:max(435px,calc(100dvh - 125px))}.panel-open .stage{height:clamp(345px,55dvh,570px)}.stage-bar,.stage-foot{padding-inline:8px}.stage-tools{gap:4px}.stage-tools button{width:31px}.stage-title b{font-size:.82rem}.stage-foot{font-size:.64rem}.empty{padding-block:16px;gap:9px}.drop-icon{width:48px;height:48px}.section,.panel-head{padding-inline:12px}.app.stage-focus{height:100dvh}.stage-focus>.topbar,.stage-focus>footer,.stage-focus .stage-foot{display:none}.stage-focus .workspace{padding:0}.stage-focus .stage{height:auto;border:0;border-radius:0}.stage-focus .stage-bar{min-height:44px;padding-block:4px}.stage-focus .stage-tools .stage-settings{display:inline-flex}.stage-focus canvas{--image-inset: 8px}}@media(max-width:760px)and (orientation:portrait){.workspace,.workspace.panel-open{padding:6px 8px}.stage{height:max(435px,calc(100dvh - 111px))}.panel-open .stage{height:max(345px,80dvh)}.stage-bar{min-height:46px}.stage-foot{min-height:34px}footer{min-height:34px}}@media(max-width:400px){.filename{display:none}.brand .eyebrow{font-size:.55rem}}
