:root{--paper:#f2f5f3;--white:#fff;--ink:#1c2d28;--muted:#687770;--line:#e0e7e2;--green:#174c3c;--accent:#d7f18e;--warm:#a66d31;--radius:14px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button,select,input{outline-offset:4px}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #7bab57}button{border:0;background:none;color:inherit}button:disabled{opacity:.42;cursor:not-allowed}button:not(:disabled):hover{filter:brightness(.94)}button,select{transition:background .15s}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.symbol-bank{position:absolute;width:0;height:0}.topbar{height:88px;padding:0 4.5%;display:flex;align-items:center;border-bottom:1px solid var(--line);background:#fff;gap:36px}.brand{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:650;letter-spacing:.03em}.brand small{display:block;font-size:10px;letter-spacing:.17em;line-height:1.8;color:var(--muted)}.brand-mark{width:42px;height:42px;border-radius:12px;background:var(--green);display:grid;place-items:center;color:var(--accent)}.brand-mark svg{width:32px;height:32px;stroke-width:2}.workspace-label{font-size:14px;border-left:1px solid var(--line);padding-left:30px;color:var(--muted)}.topbar>.quiet{margin-left:auto}.quiet{font-size:14px;min-height:44px;padding:8px 12px}.quiet span{margin-left:8px}.primary,.secondary{min-height:44px;padding:11px 18px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:550;line-height:1.5}.primary{background:var(--green);color:#fff}.secondary{background:#fff;border:1px solid #cfdbd4}.wide{width:100%}main{max-width:1640px;margin:auto;padding:36px 4.5% 20px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.eyebrow{color:var(--muted);font-size:11px;letter-spacing:.15em;font-weight:650;margin:0 0 10px}h1{font-size:30px;letter-spacing:-.03em;margin:0;font-weight:600}h1>span{color:#80a66c}.import-actions{display:flex;gap:10px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}.editor{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.editor-heading{height:54px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:14px}#video-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.local-badge{font-size:12px;color:var(--muted);white-space:nowrap}.stage{background:#142820;position:relative;aspect-ratio:16/10;overflow:hidden;isolation:isolate}.stage video{width:100%;height:100%;object-fit:contain;display:block}.stage canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;z-index:2}.empty-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#fff;padding:20px;z-index:3;background:#142820}.empty-state h2{font-weight:500;font-size:23px;letter-spacing:.02em;margin:12px 0}.empty-state p{font-size:14px;color:#adc0b3;text-align:center;line-height:1.9;max-width:360px;margin:0 0 24px}.empty-state .primary{color:#213f2c;background:var(--accent);padding:12px 22px}.empty-footnote{font-size:12px;color:#8fa899;margin-top:18px}.swing-diagram{width:204px;height:142px}.swing-diagram svg{width:100%;height:100%;stroke:#a9c0ae}.swing-diagram .orbit{stroke:#cee897;stroke-dasharray:4 6;stroke-width:1.4}.swing-diagram .guide{stroke:#4b6656;stroke-dasharray:3 5;stroke-width:1}.swing-diagram .body{stroke-width:3.3}.swing-diagram .club{stroke:#eef4e9;stroke-width:2.2}.swing-diagram .ball{fill:#d7f18e;stroke:none}.draw-tools{padding:12px 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:5px;flex-wrap:wrap}.tool{min-width:43px;min-height:43px;border-radius:7px;display:flex;align-items:center;justify-content:center;gap:7px;padding:8px 10px;font-size:13px}.tool.active{color:var(--green);background:#e8efea}.tool-divider{height:24px;border-left:1px solid var(--line);margin:0 5px}.color-label{width:36px;display:flex;align-items:center}.color-label input{width:30px;height:32px;cursor:pointer;border:0;padding:0;background:transparent}.toggle-label{margin-left:auto;display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}input[type=checkbox]{accent-color:var(--green);width:16px;height:16px}.transport{padding:18px 22px 14px}.transport-row,.playback,.transport-bottom{display:flex;align-items:center}.transport-row{justify-content:space-between;gap:12px}.playback{gap:8px}.square{min-width:40px;min-height:40px;font-size:21px}.play{background:var(--green);color:white;width:38px;height:38px;border-radius:50%;font-size:13px;padding-left:8px}.time{font-family:ui-monospace,"SFMono-Regular",monospace;font-size:12px;font-variant-numeric:tabular-nums;margin-left:8px}.time em{font-style:normal;color:var(--muted)}.speed{font-size:12px;color:var(--muted);display:flex;gap:5px;align-items:center}select{background:#fff;border:1px solid var(--line);border-radius:6px;color:var(--ink);padding:8px 6px;min-height:36px;font-size:14px}.speed select,.transport-bottom select{background:var(--paper);border:0}#timeline{display:block;width:100%;accent-color:var(--green);height:24px;margin:14px 0 0;cursor:pointer}.phase-pins{position:relative;height:20px;margin:0 7px}.phase-pin{position:absolute;transform:translateX(-50%);font-size:10px;white-space:nowrap;color:var(--green);padding:1px 3px}.transport-bottom{justify-content:space-between;gap:12px;font-size:11px;color:var(--muted)}.transport-bottom select{font-size:12px}.analysis-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 20px;gap:26px}.panel-tabs button{font-size:14px;min-height:54px;padding:0 0;border-bottom:2px solid transparent;color:var(--muted)}.panel-tabs button[aria-selected=true]{color:var(--green);border-color:var(--green);font-weight:600}.panel-tabs span{font-size:11px;padding:2px 5px;background:var(--paper);border-radius:4px}.panel-section{padding:22px;border-bottom:1px solid var(--line)}.panel-section h2{font-size:15px;font-weight:600;margin:0 0 16px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-heading h2{margin:0}.text-button{font-size:12px;color:var(--green);padding:4px 0;min-height:24px;text-decoration:underline;text-underline-offset:3px}.settings-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:10px}.settings-grid label,.clip-range label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--muted)}.settings-grid select{width:100%;font-size:12px}.helper{font-size:13px;line-height:1.8;color:var(--muted);margin:8px 0 12px}.phase-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.phase-grid button{background:#f4f7f4;border:1px solid transparent;border-radius:7px;padding:10px 2px;text-align:center;font-size:13px}.phase-grid button span{display:block;font-family:ui-monospace,monospace;color:#88978d;font-size:11px;margin-bottom:6px}.phase-grid button small{display:block;font-size:10px;color:var(--muted);margin-top:8px}.phase-grid button.marked{border-color:#aac4ae;background:#f0f6e8}.tempo-readout{display:flex;justify-content:space-between;align-items:center;margin-top:17px}.tempo-readout>span{font-size:12px;color:var(--muted)}.tempo-readout strong{font-family:ui-monospace,monospace;font-size:27px;font-weight:500}.tempo-readout small{font-size:13px;color:var(--muted)}.tag{font-size:10px;background:#f4eedf;color:#82612a;border-radius:4px;padding:3px 7px}.clip-range{display:flex;align-items:center;gap:10px;margin:12px 0 16px}.clip-range label{flex:1;min-width:0}.clip-range>span{color:var(--line);padding-top:20px}.clip-range input{width:100%;border:1px solid var(--line);border-radius:6px;padding:8px;min-height:38px;font-size:14px}.microcopy{font-size:11px;color:var(--muted);line-height:1.7;margin:9px 0 16px}.tracking-controls{display:grid;gap:8px}.panel-footer{padding:20px 22px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#fafcf9}.panel-footer p{font-size:11px;color:var(--muted);margin:0;width:100%;line-height:1.7}.page-footer{display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:12px;margin-top:22px;padding:0 2px}.page-footer i{font-style:normal;margin:0 7px}.canvas-hint{position:absolute;left:16px;top:16px;max-width:calc(100% - 32px);background:#14251feb;color:#fff;border:1px solid #607966;padding:8px 12px;border-radius:6px;font-size:12px;z-index:4;pointer-events:none}.processing{position:absolute;inset:0;z-index:6;background:#10251bdb;color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px;font-size:14px}.processing progress{width:60%;accent-color:var(--accent)}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90vw;background:#203b2f;color:#fff;padding:14px 20px;border-radius:8px;box-shadow:0 6px 28px #18392d24;font-size:14px;z-index:20;line-height:1.6}.insight-empty{padding:30px 6px;text-align:center}.insight-empty>svg{width:32px;height:32px;color:#8fa292}.insight-empty h3{font-size:15px;font-weight:500}.insight-empty p{font-size:13px;color:var(--muted);line-height:1.8}.insight{padding:16px 0;border-top:1px solid var(--line)}.insight .kicker{font-size:11px;color:var(--green)}.insight h3{font-size:16px;font-weight:550;margin:8px 0 10px;line-height:1.7}.insight p{font-size:13px;line-height:1.9;color:var(--muted);margin:8px 0}.insight .evidence{background:var(--paper);padding:10px;border-radius:5px;color:var(--ink);font-size:12px}.analysis-note{font-size:12px;line-height:1.9;color:var(--muted);background:#f2f5f0;border-radius:7px;padding:13px;margin:20px 0 0}.insight button{font-size:12px;color:var(--green);text-decoration:underline;text-underline-offset:3px;padding:6px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{width:min(840px,92vw);max-height:90dvh;border:1px solid var(--line);border-radius:16px;padding:30px;color:var(--ink);box-shadow:0 20px 100px #14382b30}dialog::backdrop{background:#12291ed0;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center}.dialog-heading h2{font-size:24px;font-weight:550}.guide-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:20px}.guide-number{color:var(--green);font-size:12px}.guide-grid h3{font-size:16px;font-weight:550;line-height:1.6}.guide-grid p{font-size:14px;color:var(--muted);line-height:1.9}
@media(min-width:1550px){.workspace{grid-template-columns:minmax(0,1fr) 370px}.stage{aspect-ratio:16/9}.panel-section{padding:24px}}
@media(max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr) 310px;gap:16px}main{padding:28px 24px}.topbar{padding:0 24px}.tool{padding:7px}.tool span{display:none}.toggle-label{font-size:11px}.time{font-size:10px;margin-left:0}.panel-section{padding:18px}.empty-state p{max-width:280px}.stage{aspect-ratio:4/3}.workspace-label{display:none}}
@media(max-width:800px){.topbar{height:72px;padding:0 20px}main{padding:25px 18px}.page-heading{margin-bottom:22px;align-items:flex-end}h1{font-size:25px}.page-heading .eyebrow{font-size:9px}.import-actions .secondary{display:none}.workspace{grid-template-columns:1fr;gap:20px}.stage{aspect-ratio:4/3;max-height:65dvh}.analysis-panel{width:100%}.tool span{display:inline}.panel-section{padding:20px}.settings-grid{grid-template-columns:1.7fr 1fr}.phase-grid button{padding:12px}.phase-grid button small{font-size:12px}.guide-grid{grid-template-columns:1fr;gap:12px}.page-footer{font-size:10px}.guide-grid h3{margin:8px 0}.guide-grid p{margin:4px 0}.dialog-heading h2{font-size:20px}dialog{padding:22px}.panel-footer p{font-size:12px}}
@media(max-width:460px){.topbar{padding:0 16px}.brand{font-size:18px}.brand-mark{width:36px;height:36px}.brand small{font-size:9px}.topbar>.quiet{font-size:12px;padding:8px 0}main{padding:22px 12px}.page-heading{gap:6px;padding:0 3px}h1{font-size:22px}.import-actions .primary{padding:10px 12px;font-size:12px}.import-actions svg{width:16px}.editor-heading{padding:0 14px;font-size:12px}.local-badge{font-size:10px}.draw-tools{gap:1px;padding:8px}.tool{min-width:38px;padding:7px}.tool span{display:none}.toggle-label{margin-left:3px;font-size:10px}.tool-divider{margin:0 2px}.transport{padding:12px}.time{font-size:10px}.playback{gap:2px}.square{min-width:33px}.speed span{display:none}.transport-bottom{font-size:10px}.empty-state h2{font-size:21px}.empty-state p{font-size:12px}.empty-footnote{font-size:10px}.swing-diagram{width:165px;height:110px}.empty-state .primary{font-size:13px}.page-footer span:first-child{max-width:55%}}
@media(max-width:800px){.page-heading{flex-wrap:wrap;align-items:center;gap:18px}.import-actions .secondary{display:inline-flex}.import-actions{margin-left:auto}.import-actions .secondary{font-size:12px;padding:10px 12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.install-steps{padding-left:24px;font-size:16px;line-height:1.9}.install-steps li{padding:8px 0}.page-footer{align-items:center}.page-footer .text-button{font-size:12px;min-height:44px}.topbar{padding-top:env(safe-area-inset-top);height:calc(88px + env(safe-area-inset-top))}main{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
@media(max-width:800px){.topbar{height:calc(72px + env(safe-area-inset-top))}.settings-grid select,.clip-range input,.speed select,.transport-bottom select{font-size:16px}.square,.play{min-height:44px;min-width:44px}.playback{gap:2px}.time{font-size:10px}.transport-row{flex-wrap:wrap;gap:6px}.speed{margin-left:auto}.tool{min-width:40px;min-height:44px}.empty-state .primary{min-height:44px}.page-footer{flex-wrap:wrap;gap:4px 16px}}

/* Playback and drawing have distinct touch targets and modes. Keep pinch zoom available. */
button,a,input,select,summary,.transport,.draw-tools,.editor-actions{touch-action:manipulation}
button,summary{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
:root{--muted:#53645b}
.page-subtitle{font-size:14px;color:var(--muted);margin:8px 0 0;line-height:1.7}
h1{font-size:26px;letter-spacing:-.02em}
.stage canvas{touch-action:manipulation}
.stage[data-drawing=true] canvas{touch-action:none}
.editor-actions{display:flex;gap:10px;padding:14px 18px;border-top:1px solid var(--line)}
.editor-actions>button{flex:1}.editor-actions button[aria-expanded=true]{background:#e8efea;border-color:var(--green)}
.workflow-cue{padding:12px 18px;background:#f2f6f3;font-size:13px;line-height:1.7;color:#385344;min-height:46px}
.draw-tools{border-top:1px solid var(--line);border-bottom:0;gap:6px;padding:12px}.draw-tools .tool span{display:inline}.draw-tools .tool{min-width:52px;min-height:48px;font-size:13px;padding:8px}
.draw-tools .toggle-label{min-height:44px;font-size:12px}.color-label{min-width:44px;min-height:44px}.color-label input{width:40px;height:40px}
.step-button{display:flex;align-items:center;gap:6px;min-height:48px;padding:8px 12px;border-radius:8px;background:#f0f4f1;font-size:12px;touch-action:manipulation}.step-button b{font-size:22px;font-weight:500}.step-button:active,.step-button.holding{background:#dce9df}
.play{min-width:48px;min-height:48px;padding:0;font-size:17px}.playback{gap:12px}.transport-row{flex-wrap:wrap}.transport{padding:14px 18px 10px}.speed select{font-size:16px;min-height:44px}
.time-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;color:var(--muted);font-size:11px}.time{font-size:12px;margin:0}#timeline{margin-top:3px;height:34px;touch-action:pan-y}
.play-options{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.option-button{border:1px solid var(--line);border-radius:7px;min-height:44px;padding:8px 12px;font-size:13px}.option-button[aria-pressed=true]{background:#e8efea;border-color:#89a390}.play-options .microcopy{margin:0;flex-basis:100%}
summary{cursor:pointer;min-height:44px;align-content:center;font-size:14px;font-weight:550;line-height:1.6;padding:9px 0}details[open]>summary{margin-bottom:10px}.play-settings summary{font-size:12px;color:var(--muted);min-height:36px}.panel-section{padding:14px 20px}.panel-section:has(>details){padding-top:5px;padding-bottom:5px}
.clip-actions{display:flex;gap:8px}.clip-actions button{flex:1;font-size:12px;padding:8px;min-height:44px}.clip-range{margin:10px 0}.phase-replace{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:12px}.phase-replace label{font-size:12px;color:var(--muted)}.phase-replace select{font-size:16px}.phase-replace button{font-size:12px;padding:8px}
#delete-annotation{font-size:12px}.canvas-hint{top:auto;bottom:10px;left:10px;max-width:calc(100% - 20px);line-height:1.6;padding:6px 10px}.text-button{min-height:44px}
@media(max-width:800px){.topbar{height:calc(62px + env(safe-area-inset-top))}main{padding-top:16px}.page-heading{margin-bottom:16px;gap:12px}.page-subtitle{font-size:12px}h1{font-size:22px}.stage{aspect-ratio:4/3;max-height:58dvh}.editor-heading{height:42px}.workspace{gap:14px}.editor-actions{padding:12px}.editor-actions>button{font-size:13px;padding:10px}.transport{padding:12px}.transport-row{gap:8px}.playback{gap:8px}.step-button{padding:8px 10px;min-width:78px}.speed{margin-left:auto}.time-row>span:last-child{font-size:10px}.draw-tools .tool{flex:0 0 auto}.panel-section{padding-left:16px;padding-right:16px}.panel-tabs{padding:0 16px}.panel-tabs button{min-height:48px}.workflow-cue{padding:12px;font-size:12px}.page-footer{font-size:11px}}
@media(max-width:360px){.step-button{min-width:65px;padding:8px 6px}.playback{gap:5px}.speed select{max-width:66px}.time-row{flex-wrap:wrap}}

/* Mobile app shell: one task at a time, persistent mode navigation. */
.mode-nav{position:fixed;z-index:10;bottom:0;left:0;right:0;display:flex;justify-content:center;gap:8px;background:#fff;border-top:1px solid var(--line);padding:6px 16px calc(6px + env(safe-area-inset-bottom))}.mode-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;flex:1;max-width:190px;font-size:13px;border-radius:8px;color:var(--muted)}.mode-nav button>span{font-size:25px;line-height:20px}.mode-nav button[aria-pressed=true]{background:#e8efea;color:var(--green);font-weight:600}.mode-nav button:disabled{opacity:.5}
main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}.toast{bottom:calc(82px + env(safe-area-inset-bottom))}
body:not([data-mode=analyze]) .analysis-panel{display:none}body:not([data-mode=analyze]) .workspace{grid-template-columns:minmax(0,1fr);max-width:960px;margin-inline:auto}
body[data-mode=draw] #quick-analysis{display:none}body[data-mode=draw] .play-options,body[data-mode=draw] .play-settings{display:none}body[data-mode=draw] .editor-actions{padding:8px 12px}body[data-mode=draw] .workflow-cue{border-top:1px solid var(--line)}
body[data-ready=true] .page-heading h1,body[data-ready=true] .page-subtitle{display:none}body[data-ready=true] .page-heading{justify-content:flex-end;margin-bottom:10px}
body[data-mode=analyze] .editor-actions{display:none}
@media(min-width:801px){body[data-mode=analyze] .editor{position:sticky;top:16px}body[data-mode=analyze] .stage{max-height:55dvh}.mode-nav{left:50%;right:auto;transform:translateX(-50%);width:440px;bottom:12px;border:1px solid var(--line);border-radius:12px;padding:6px}main{padding-bottom:100px}}
@media(max-width:800px){.topbar{padding-inline:14px}.brand{font-size:18px}.brand small{display:none}.brand-mark{width:32px;height:32px;border-radius:9px}.brand-mark svg{width:26px;height:26px}.topbar>.quiet{font-size:12px}.page-heading{padding:0;margin-bottom:12px}.import-actions{margin-left:0;gap:8px}.import-actions>button{min-height:44px}.workspace{gap:12px}.stage{max-height:43dvh}body[data-ready=true] .page-heading{justify-content:flex-start}body[data-ready=true] .page-heading .import-actions{margin-left:auto}.editor-heading{height:36px;font-size:12px}.local-badge{font-size:11px}.transport{padding:10px 12px}.time-row{margin-top:6px}.play-settings summary{min-height:32px}.phase-pins{height:14px}.mode-nav{padding-inline:12px}body[data-mode=analyze] .play-settings{display:none}body[data-mode=analyze] .workflow-cue{display:none}.page-footer{margin-top:10px}body[data-mode=draw] .page-footer{display:none}}
@media(min-width:801px) and (max-width:1180px){.workspace{grid-template-columns:minmax(0,1fr) 320px;gap:16px}main{padding-inline:20px}.playback{gap:6px}.step-button{padding:8px}.time-row{flex-wrap:wrap}}

body[data-ready=false] .transport,body[data-ready=false] .editor-actions{display:none}
