:root{--bg: #f4f6f9;--surface: #ffffff;--surface-2: #eef1f5;--text: #1b2330;--muted: #5e6a7b;--border: #dbe1e8;--accent: #1f6feb;--accent-ink: #ffffff;--accent-soft: #e3edfd;--ok: #1a7f37;--warn: #b35900;--radius: 14px;--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);color-scheme:light}@media(prefers-color-scheme:dark){:root{--bg: #0f141b;--surface: #171d26;--surface-2: #202835;--text: #e6ebf2;--muted: #96a2b4;--border: #2c3644;--accent: #4c8dff;--accent-soft: #1c2b44;--ok: #3fb950;--warn: #e3a03c;--shadow: none;color-scheme:dark}}*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0}body{font-family:system-ui,-apple-system,PingFang TC,Noto Sans TC,Microsoft JhengHei,sans-serif;background:var(--bg);color:var(--text);line-height:1.55;min-height:100vh;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent}main{flex:1;width:100%;max-width:1180px;margin:0 auto;padding:16px}h2{font-size:1.1rem;margin:0 0 12px}h3{font-size:.9rem;margin:18px 0 8px;color:var(--muted);font-weight:600}button,input,select{font:inherit;color:inherit}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:1.05rem}.steps{display:flex;gap:4px}.step{display:flex;align-items:center;gap:6px;border:0;background:none;padding:6px 10px;border-radius:999px;cursor:pointer;color:var(--muted)}.step b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--surface-2);font-size:.8rem}.step[aria-current=step]{color:var(--accent);background:var(--accent-soft)}.step[aria-current=step] b{background:var(--accent);color:var(--accent-ink)}.step:disabled{opacity:.45;cursor:default}@media(max-width:560px){.step span{display:none}.brand span{font-size:.95rem}}.view{display:none}.view.active{display:block}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:0 18px;border-radius:10px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-weight:600;white-space:nowrap;user-select:none}.btn:hover{border-color:var(--accent)}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.btn.primary:hover{filter:brightness(1.08)}.btn.ghost{background:transparent}.btn.small{min-height:34px;padding:0 12px;font-size:.9rem}.btn.block{width:100%}.btn.icon{padding:0;width:42px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn:focus-visible,.tab:focus-visible,.seg-btn:focus-visible,.step:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.toggle{display:inline-flex;align-items:center;gap:6px;font-size:.9rem;color:var(--muted);cursor:pointer}.capture-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}@media(max-width:860px){.capture-layout{grid-template-columns:1fr}}.camera{position:relative;aspect-ratio:3 / 4;max-height:72vh;margin:0 auto;width:100%;background:#0b0f14;border-radius:var(--radius);overflow:hidden}.camera video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}.camera video.rear{transform:none}.camera .guide{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;display:none}.camera.live .guide{display:block}.camera-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;color:#aab4c3;padding:24px}.camera.live .camera-empty{display:none}.countdown{position:absolute;inset:0;display:grid;place-items:center;font-size:6rem;font-weight:800;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.5)}.camera-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:12px}.shutter{width:68px;height:68px;border-radius:50%;padding:0}.shutter span{width:52px;height:52px;border-radius:50%;border:3px solid var(--accent-ink)}.tips ol{padding-left:1.2em;margin:0;display:grid;gap:8px}.privacy{display:flex;gap:6px;align-items:flex-start;margin:16px 0 0;padding:10px 12px;border-radius:10px;background:var(--accent-soft);font-size:.88rem}.privacy svg{flex:none;margin-top:3px;color:var(--accent)}.edit-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}@media(max-width:860px){.edit-layout{grid-template-columns:1fr}}.stage-wrap{position:sticky;top:72px}@media(max-width:860px){.stage-wrap{position:static}}.stage{position:relative;display:grid;place-items:center;padding:24px;background-color:var(--surface-2);background-image:radial-gradient(var(--border) 1px,transparent 1px);background-size:16px 16px;border-radius:var(--radius);border:1px solid var(--border);min-height:360px;touch-action:none}.stage canvas{display:block;max-width:100%;height:auto;box-shadow:0 4px 20px #0000002e;cursor:grab}.stage canvas.brush{cursor:crosshair}.stage canvas:active{cursor:grabbing}.busy{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:12px;background:color-mix(in srgb,var(--surface) 85%,transparent);border-radius:var(--radius);text-align:center;padding:16px}.spinner{width:36px;height:36px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--accent);animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.stage-bar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.measure{font-size:.9rem;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--surface-2)}.measure.ok{color:var(--ok)}.measure.bad{color:var(--warn)}.hint{margin:6px 0 0;font-size:.85rem;color:var(--muted)}.tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;background:var(--surface-2);border-radius:10px;margin-bottom:14px}.tab{border:0;background:none;padding:8px 4px;border-radius:8px;cursor:pointer;font-weight:600;color:var(--muted)}.tab[aria-selected=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.tabpanel h3:first-child{margin-top:0}.spec-list{display:grid;gap:8px}.spec-item{display:grid;grid-template-columns:40px 1fr;gap:12px;align-items:center;text-align:left;padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:var(--surface);cursor:pointer}.spec-item[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}.spec-item .ratio{display:grid;place-items:center;height:44px}.spec-item .ratio i{display:block;border:2px solid var(--accent);border-radius:3px;background:var(--surface)}.spec-item strong{display:block}.spec-item small{color:var(--muted)}.spec-rules{margin-top:14px;font-size:.88rem;color:var(--muted)}.spec-rules ul{margin:6px 0 0;padding-left:1.2em}.swatches{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.swatch{width:36px;height:36px;border-radius:50%;border:2px solid var(--border);cursor:pointer;padding:0;position:relative}.swatch[aria-pressed=true]{outline:3px solid var(--accent);outline-offset:2px}.swatch.custom{background:conic-gradient(#f44,#fd4,#4f8,#4cf,#84f,#f4c,#f44);overflow:hidden}.swatch.custom input{position:absolute;inset:0;opacity:0;cursor:pointer}.swatch.transparent{background:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%) 50% / 12px 12px}.field{margin-top:12px}.field label{display:flex;justify-content:space-between;font-size:.9rem;margin-bottom:4px}.field output{color:var(--muted);font-variant-numeric:tabular-nums}input[type=range]{width:100%;accent-color:var(--accent);height:28px}select{width:100%;min-height:40px;border-radius:10px;border:1px solid var(--border);background:var(--surface);padding:0 10px}.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;background:var(--surface-2);border-radius:10px}.seg-btn{border:0;background:none;padding:8px 4px;border-radius:8px;cursor:pointer;font-size:.88rem}.seg-btn[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}.nudge{display:grid;justify-items:center;gap:6px;margin-top:16px}.nudge div{display:flex;gap:48px}.note{font-size:.84rem;color:var(--muted);margin:12px 0 0}.panel-foot{display:flex;justify-content:space-between;gap:8px;margin-top:20px;padding-top:14px;border-top:1px solid var(--border)}.export-layout{display:grid;grid-template-columns:1fr 1.4fr;gap:16px;align-items:start}@media(max-width:860px){.export-layout{grid-template-columns:1fr}}.single-preview,.sheet-preview{display:grid;place-items:center;padding:16px;background:var(--surface-2);border-radius:10px;margin-top:12px}.single-preview canvas{width:180px;height:auto;box-shadow:0 2px 10px #00000026}.sheet-preview canvas{max-width:100%;max-height:60vh;width:auto;height:auto;box-shadow:0 2px 10px #00000026;background:#fff}.meta{font-size:.88rem;color:var(--muted);margin:10px 0 0}.export-foot{margin-top:16px}.footer{text-align:center;font-size:.8rem;color:var(--muted);padding:16px}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--text);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:.9rem;transition:opacity .2s,transform .2s;max-width:calc(100vw - 32px);z-index:50}.toast.show{opacity:1;transform:translate(-50%)}.mix-list{display:grid;gap:6px}.mix-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.mix-item.on{border-color:var(--accent);background:var(--accent-soft)}.mix-item input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent)}.mix-item .name{font-size:.92rem}.mix-item .name small{display:block;color:var(--muted);font-size:.8rem}.stepper{display:inline-flex;align-items:center;gap:4px}.stepper button{width:30px;height:30px;border-radius:8px;border:1px solid var(--border);background:var(--surface);cursor:pointer;font-weight:700;line-height:1}.stepper button:disabled{opacity:.35;cursor:not-allowed}.stepper output{min-width:2ch;text-align:center;font-variant-numeric:tabular-nums;font-weight:600}.mix-actions{align-items:center;justify-content:space-between}.mix-toggles{display:inline-flex;gap:14px;flex-wrap:wrap}.brand-text{display:flex;flex-direction:column;line-height:1.15}.brand-text strong{font-size:1.15rem;letter-spacing:.08em}.brand-text small{font-size:.72rem;color:var(--muted);font-weight:500;letter-spacing:.04em}@media(max-width:560px){.brand-text small{display:none}}
