:root{font-family:system-ui,-apple-system,"PingFang TC","Noto Sans TC",sans-serif;color:#292423;background:#faf8f2;color-scheme:light}*{box-sizing:border-box}body{margin:0;min-height:100svh;background:#faf8f2}body[data-background=red]{background:#f00}body[data-background=green]{background:#0f0}body[data-background=blue]{background:#00f}body[data-background=black]{background:#000}body[data-background=white]{background:#fff}header{height:72px;padding:20px 28px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#756b65;letter-spacing:.06em}header a{font-size:25px;font-weight:850;text-decoration:none;color:#292423}header a span{color:#b4232e}body[data-background=blue] header,body[data-background=black] header,body[data-background=blue] header a,body[data-background=black] header a{color:white}.workspace{min-height:calc(100svh - 72px);display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,420px);align-items:center;gap:24px;padding:0 28px 24px}.stage{display:grid;place-items:center;min-width:0;min-height:420px}.stage>svg{display:block;width:min(520px,100%);height:auto;aspect-ratio:104/100;pointer-events:none}.controls{background:#faf8f2;border:1px solid #ded8ce;border-radius:12px;padding:18px;font-size:13px;box-shadow:0 6px 24px #2924230c}.controls h1{font-size:18px;margin:0 0 5px}.controls h2{font-size:13px;margin:0 0 10px}.intro,.helper{font-size:12px;line-height:1.7;color:#756b65}.intro{margin:0 0 15px}.section{border-top:1px solid #ded8ce;padding-top:14px;margin-top:14px}.control-row,.phases,.palette{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.control-row+.control-row{margin-top:9px}button,select,input{font:inherit;color:#292423}button,select,input[type=number]{border:1px solid #d0c6bc;border-radius:6px;background:#fffdf8;padding:8px 10px}button{cursor:pointer}button:hover{background:#f2e9dd}button.primary{background:#b4232e;border-color:#b4232e;color:white}button[aria-pressed=true]{border-color:#b4232e;box-shadow:0 0 0 1px #b4232e}select{padding:7px 6px}label.inline{display:flex;gap:6px;align-items:center;font-size:12px}.time-row{display:flex;gap:8px;align-items:center;margin:12px 0}.time-row input{width:92px;font-variant-numeric:tabular-nums}.timeline{display:block;width:100%;accent-color:#b4232e;margin:10px 0}.readout{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#756b65;font-size:12px;font-variant-numeric:tabular-nums}.phases button{background:transparent;border:0;padding:6px;font-size:11px;text-decoration:underline;text-underline-offset:4px}.palette button{display:flex;align-items:center;gap:5px;padding:7px 8px;font-size:12px}.palette i{width:12px;height:12px;border:1px solid #b7aea5;border-radius:50%;background:#faf8f2}.palette [data-bg=red] i{background:#f00}.palette [data-bg=green] i{background:#0f0}.palette [data-bg=blue] i{background:#00f}.palette [data-bg=black] i{background:#000}.palette [data-bg=white] i{background:#fff}.footer-links{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:14px}.controls a{color:#b14f4a;text-underline-offset:4px}.controls a:hover,.controls a:focus-visible{color:#ff2418}:focus-visible{outline:3px solid #31779e;outline-offset:3px}.recording header,.recording .controls{display:none}.recording .workspace{display:grid;grid-template-columns:1fr;min-height:100svh;padding:0}.recording .stage{height:100svh;min-height:0}.recording .stage>svg{width:min(520px,86vw,calc(100svh * 1.04))}.recording{overflow:hidden}@media(max-width:800px){header{height:60px;padding:15px 20px;font-size:10px}.workspace{display:block;padding:0 16px 20px;min-height:calc(100svh - 60px)}.stage{height:50svh;min-height:260px}.stage>svg{width:min(420px,86vw,calc(50svh * 1.04))}.controls{max-width:520px;margin:0 auto;padding:15px}.controls h1{font-size:17px}.recording .stage{height:100svh}.recording .stage>svg{width:min(520px,86vw,calc(100svh * 1.04))}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

body.recording:focus{outline:none}

body[data-preview=fold] .stage>svg{aspect-ratio:377.29412/352}body[data-preview=fold].recording .stage>svg{width:min(520px,86vw,calc(100svh * 1.0718583))}@media(max-width:800px){body[data-preview=fold] .stage>svg{width:min(420px,86vw,calc(50svh * 1.0718583))}body[data-preview=fold].recording .stage>svg{width:min(520px,86vw,calc(100svh * 1.0718583))}}
