:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#152528;background:#f1f4f5;font-size:16px;--accent:#126f60;--line:#dce4e5;--muted:#5e7074}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:#fff;padding:.7rem 1rem;border-radius:8px;color:inherit}button:hover{border-color:#6faaa0}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--accent)}input,textarea,select{border:1px solid #bccdce;background:white;border-radius:7px;padding:.7rem;width:100%;color:inherit}textarea{resize:vertical;line-height:1.6;min-height:105px}label{display:block;font-size:.9rem;font-weight:600;margin:.8rem 0 .4rem}small,.muted{color:var(--muted);font-size:.875rem;line-height:1.6}h1,h2,h3,p{margin-top:0}h1{font-size:1.65rem;margin-bottom:0;line-height:1.45}h2{font-size:1.3rem}h3{font-size:1.05rem}p{line-height:1.7}.sidebar{width:235px;position:fixed;inset:0 auto 0 0;background:#152528;color:#e9f5f3;padding:30px 20px;display:flex;flex-direction:column;gap:20px}.brand{color:#fff;text-decoration:none;font-weight:800;font-size:1.9rem}.brand span{display:block;font-size:.875rem;font-weight:400;letter-spacing:.1rem;margin-top:8px;color:#a4c3c0}.primary{background:#126f60;color:white;border-color:#126f60}.sidebar .primary{background:#99edce;color:#123c32;border:0}.section-label{margin:8px 0 -8px;color:#9cb7b4;font-size:.875rem}.sidebar-bottom{margin-top:auto;display:grid;gap:12px}.sidebar-bottom a,.sidebar-bottom small{color:#adc8c3}.template-button{display:block;width:100%;text-align:left;background:transparent;color:#cee2df;border:1px solid transparent;margin:6px 0;white-space:normal}.template-button.active{background:#254440;border-color:#4f7c71;color:white}#templates{overflow:auto}main{margin-left:235px;padding:32px 40px;max-width:1640px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.eyebrow{font-size:.75rem;letter-spacing:.18em;color:#48786d;font-weight:700;margin-bottom:7px}.badge{display:inline-flex;background:#e0eee9;color:#235448;border-radius:99px;padding:7px 12px;font-size:.875rem;white-space:nowrap}.steps{display:flex;border-bottom:1px solid var(--line);gap:6px;margin-bottom:24px}.steps button{flex:1;background:transparent;border:0;border-radius:0;border-bottom:3px solid transparent;padding:14px 6px;color:#738187;font-size:.875rem}.steps span{margin-left:7px}.steps .active{border-bottom-color:#126f60;color:#126f60;font-weight:700}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px;margin-bottom:20px}.grid{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(340px,1.1fr);gap:24px}.form-row,.toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.form-row>*{flex:1}.toolbar{margin-top:16px}.identity{display:flex;align-items:center;gap:16px;padding:12px 16px;border:1px solid var(--line);background:#e6efed;border-radius:8px;margin-bottom:20px}.identity img{width:42px;height:56px;object-fit:contain;background:#263332}.identity strong{display:block}.media{display:block;max-width:100%;max-height:590px;margin:auto;border-radius:8px;background:#162327;object-fit:contain}.media-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px}.media-pair .media{max-height:400px}.empty{padding:40px 20px;text-align:center;color:var(--muted);background:#f4f7f7;border:1px dashed #b7ceca;border-radius:8px}.notice,#notice{padding:14px 18px;background:#fff0d9;color:#754a17;border-radius:8px;margin-bottom:20px;line-height:1.6}.success{background:#e1f4e9!important;color:#25593f!important}.hotspot-stage{position:relative;max-width:390px;margin:auto;background:#142528;touch-action:none}.hotspot-stage video{width:100%;display:block}.hotspot-stage svg{position:absolute;inset:0;width:100%;height:100%;cursor:crosshair}.hotspot-stage ellipse{stroke:#a1ffd5;stroke-width:3;fill:#0b67444d;vector-effect:non-scaling-stroke}.hotspot-stage .selected{stroke:#ffcd66;fill:#ffca6633}.hotspot-stage text{fill:white;paint-order:stroke;stroke:#142528;stroke-width:3;font-size:25px;pointer-events:none}.list-item{padding:12px;border:1px solid var(--line);border-radius:8px;margin:10px 0;display:flex;align-items:center;justify-content:space-between;gap:12px}.list-item.active{border-color:#126f60;background:#f1f9f5}.action-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:22px}.hotspot-tab{display:block;width:100%;text-align:left;margin-bottom:8px}.hotspot-tab.active{background:#e5f2ed;border-color:#126f60}.prompt-card{border:1px solid var(--line);border-radius:10px;margin:16px 0;padding:18px}.prompt-card header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.prompt-card video{max-height:300px;width:170px;object-fit:contain;background:#162327;border-radius:6px}.result-row{display:flex;gap:18px;align-items:flex-start;margin-top:14px}.status{font-size:.875rem;color:#5d7074}.error{color:#9b342d!important}.danger{color:#a34038}.prompt-preview{white-space:pre-wrap;word-break:break-word;background:#f1f5f5;border-radius:8px;padding:14px;font-size:.875rem;line-height:1.6;max-height:300px;overflow:auto}.player-wrap{width:min(100%,420px);position:relative;margin:auto}.player-wrap canvas{display:block;width:100%;background:#142528;border-radius:8px}.recording{background:#a33e35!important;color:#fff!important}.run-card{display:grid;grid-template-columns:60px 1fr auto;gap:15px;align-items:center;border-top:1px solid var(--line);padding:16px 0}.run-card img{width:60px;height:80px;object-fit:contain;background:#152528}dialog{width:min(740px,92vw);border:0;border-radius:14px;padding:30px;max-height:90vh;overflow:auto}dialog::backdrop{background:#10252888}.close{float:right}.draft-item{margin:12px 0}.subtle{background:transparent}details{margin:14px 0}summary{cursor:pointer;color:#47645f;line-height:1.8}input[type=checkbox]{width:auto}#player-downloads a{display:inline-block;margin:12px}.required{color:#a44626}.progress-line{height:4px;background:#e2ebea;margin-top:10px}.progress-line i{height:100%;display:block;background:#126f60}@media(max-width:1050px){main{padding:24px;margin-left:190px}.sidebar{width:190px;padding:24px 14px}.grid{grid-template-columns:1fr}.steps span{display:block;margin:5px 0 0}.action-layout{grid-template-columns:150px minmax(0,1fr)}}@media(max-width:700px){.sidebar{position:static;width:auto;padding:18px;gap:12px}.brand{font-size:1.4rem}.brand span{display:inline;margin-left:14px}.sidebar-bottom,.section-label{display:none}#templates{display:flex;gap:8px;overflow:auto}.template-button{width:auto;white-space:nowrap}.sidebar #new-template{align-self:flex-start}main{margin:0;padding:18px}.topbar{align-items:flex-start}.badge{white-space:normal}h1{font-size:1.35rem}.panel{padding:17px}.steps{gap:0}.steps button{font-size:.8rem}.action-layout{grid-template-columns:1fr}.hotspot-tabs{display:flex;gap:8px;overflow:auto}.hotspot-tab{white-space:nowrap;width:auto}.result-row{flex-wrap:wrap}.media-pair{gap:8px}}
/* Direct manipulation controls; the region itself remains the hit target. */
.hotspot-stage svg{touch-action:none;user-select:none;overflow:visible;cursor:default}
.hotspot-stage svg[data-mode="ellipse"],.hotspot-stage svg[data-mode="rect"]{cursor:crosshair}
.hotspot-stage .spot-region{stroke:#a1ffd5;stroke-width:2;fill:#0b674430;vector-effect:non-scaling-stroke;cursor:move}
.hotspot-stage .spot-region.selected{stroke:#ffcd66;fill:#ffca6626}
.hotspot-stage svg:not([data-mode="select"]) .spot-region{cursor:crosshair}
.hotspot-stage .spot-bounds{fill:none;stroke:#ffcd66;stroke-width:1;stroke-dasharray:5 4;vector-effect:non-scaling-stroke;pointer-events:none}
.hotspot-stage .spot-controls line{stroke:#ffcd66;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}
.hotspot-stage .handle-hit{fill:transparent;stroke:none}
.hotspot-stage .handle-dot{fill:#ffcd66;stroke:#263e37;stroke-width:1.5;vector-effect:non-scaling-stroke;pointer-events:none}
.hotspot-stage .spot-handle{cursor:nwse-resize}
.hotspot-stage .rotation-handle{cursor:grab}
.hotspot-stage svg:not([data-mode="select"]) .spot-controls{display:none}
.hotspot-stage svg:focus-visible{outline:2px solid #126f60;outline-offset:4px}
.drawing-tools{margin-bottom:28px}.drawing-tools button{flex:1;white-space:nowrap}
