/* ============================================================
   LANDING TOUR (js/landing-tour.js) — scripted mockups of the app.
   Every scene is a fixed 860×540 stage scaled to its box; the hero
   adds the app rail (912×540) and a chapter bar. Colors, type and
   layout follow the real screens (css/slate.css, Onest): Generate's
   Clips view, Movie Planner, a ThreeJS video page and the PatchWork
   Editor. `.pwt-*` only. Nothing here animates by itself: one clock
   in JS sets every moving part.
   ============================================================ */

.pwt {
    --a: oklch(0.165 0.004 250);   /* app background */
    --p: oklch(0.19 0.005 250);    /* panels */
    --c: oklch(0.2 0.006 250);     /* cards */
    --r: oklch(0.235 0.005 250);   /* raised: prompt bars, menus */
    --ctl: oklch(0.29 0.006 250);  /* buttons */
    --q: oklch(0.22 0.007 250);    /* quiet chips */
    --seg: oklch(0.3 0.01 250);    /* segment on */
    --hl: oklch(1 0 0 / 0.06);
    --bd: oklch(1 0 0 / 0.09);
    --bd2: oklch(1 0 0 / 0.16);
    --t1: oklch(0.95 0.002 250);
    --t2: oklch(0.72 0.005 250);
    --t3: oklch(0.6 0.005 250);
    --ac: oklch(0.72 0.13 230);
    --onac: oklch(0.15 0.02 240);
    --act: oklch(0.72 0.13 230 / 0.14);
    --acl: oklch(0.72 0.13 230 / 0.45);
    --ok: oklch(0.8 0.13 155);
    --warn: oklch(0.83 0.12 85);
    --bad: oklch(0.68 0.17 25);
    --claude: #d97757;
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    position: relative; width: 100%; color: var(--t1);
    font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.pwt *, .pwt *::before, .pwt *::after { box-sizing: border-box; }
.pwt svg { display: block; }
.pwt-stage { position: relative; width: 100%; overflow: hidden; background: var(--a); border-radius: inherit; }
.pwt-inner {
    position: absolute; left: 0; top: 0; transform: scale(var(--s, 1)); transform-origin: 0 0;
    font-size: 12px; line-height: 1.35; background: var(--a); overflow: hidden;
}
.pwt-inner > *, .pwt-scene > * { position: absolute; }

/* ── shared controls ── */
.pwt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; background: var(--q); border: 1px solid var(--bd); color: var(--t1); font-weight: 600; font-size: 11.5px; white-space: nowrap; transition: background-color .15s, color .15s, transform .12s, box-shadow .25s; }
.pwt-btn svg { width: 13px; height: 13px; flex: none; }
.pwt-btn.ac { background: var(--ac); color: var(--onac); border-color: transparent; }
.pwt-btn.ok { background: oklch(0.8 0.13 155 / 0.14); color: var(--ok); border-color: oklch(0.8 0.13 155 / 0.35); }
.pwt-btn.is-press { transform: scale(0.95); }
.pwt-btn.is-glow { box-shadow: 0 0 0 4px var(--act); border-color: var(--acl); }
.pwt-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--p); border: 1px solid var(--bd); }
.pwt-seg i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; color: var(--t2); font-weight: 600; font-size: 11.5px; }
.pwt-seg i svg { width: 12px; height: 12px; }
.pwt-seg i.on { background: var(--seg); color: var(--t1); }
.pwt-lbl { font: 500 9.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--t3); }
.pwt-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font: 600 9.5px var(--mono); color: var(--t2); background: var(--q); white-space: nowrap; }
.pwt-ib { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--q); border: 1px solid var(--bd); color: var(--t2); flex: none; }
.pwt-ib svg { width: 12px; height: 12px; }
.pwt-ic { width: 14px; height: 14px; color: var(--t2); flex: none; }
.pwt-pi { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--act); color: var(--ac); flex: none; }
.pwt-pi svg { width: 14px; height: 14px; }
.pwt-hd { left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--hl); }
.pwt-hd > b { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.pwt-sp { flex: 1; }
.pwt-st-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--t2); white-space: nowrap; }
.pwt-st-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pwt-st-dot.ac { color: var(--ac); }
.pwt-st-dot.ok { color: var(--ok); }
.pwt-st-dot.warn { color: var(--warn); }
.pwt-field { display: flex; align-items: center; justify-content: space-between; gap: 6px; height: 26px; padding: 0 8px; border-radius: 7px; background: var(--p); border: 1px solid var(--bd); font-size: 11.5px; color: var(--t1); white-space: nowrap; overflow: hidden; }
.pwt-field svg { width: 11px; height: 11px; color: var(--t3); flex: none; }
.pwt-field > span, .pwt-field > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* the cursor */
.pwt-cur { left: 0; top: 0; width: 18px; height: 18px; z-index: 30; pointer-events: none; will-change: transform; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.pwt-cur svg { width: 18px; height: 18px; }
.pwt-cur::after { content: ''; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ac); opacity: 0; transform: scale(0.4); }
.pwt-cur.is-click::after { animation: pwtClick .4s ease-out; }
@keyframes pwtClick { 0% { opacity: 1; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }

.pwt-caret { display: inline-block; width: 1.5px; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: var(--ac); animation: pwtBlink 1s steps(1) infinite; }
@keyframes pwtBlink { 50% { opacity: 0; } }
.pwt-toast { left: 50%; bottom: 210px; transform: translate(-50%, 8px); display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--r); border: 1px solid var(--bd2); font-weight: 600; font-size: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity .25s, transform .25s; z-index: 20; white-space: nowrap; }
.pwt-toast svg { width: 14px; height: 14px; color: var(--ok); }
.pwt-toast.on { opacity: 1; transform: translate(-50%, 0); }
.pwt-shim { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, oklch(1 0 0 / 0.07) 50%, transparent 70%); background-size: 200% 100%; animation: pwtShim 1.4s linear infinite; }
@keyframes pwtShim { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ── "generated" pictures: painted with gradients and shapes ── */
.pwt-art { position: absolute; inset: 0; overflow: hidden; background: var(--sky); }
.pwt-art > i { position: absolute; display: block; }
.pwt-art .sun { width: 22%; aspect-ratio: 1; border-radius: 50%; left: var(--sx); top: var(--sy); transform: translate(-50%, -50%); background: radial-gradient(circle, var(--sun) 0 34%, color-mix(in oklab, var(--sun) 40%, transparent) 36%, transparent 70%); }
.pwt-art .far { inset: auto 0 22% 0; height: 46%; background: var(--far); }
.pwt-art .near { inset: auto 0 0 0; height: 58%; background: var(--near); }
.pwt-art .sea { inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, var(--sea1), var(--sea2)); }
.pwt-art .sea::after { content: ''; position: absolute; left: calc(var(--sx) - 9%); width: 18%; top: 4%; height: 70%; background: repeating-linear-gradient(180deg, color-mix(in oklab, var(--sun) 70%, transparent) 0 2px, transparent 2px 7px); opacity: .55; }
.pwt-art .cliff { inset: auto 0 0 0; height: 62%; background: var(--near); }
.pwt-art .tower { width: 4.2%; height: 22%; bottom: var(--tb); left: var(--tx); background: linear-gradient(90deg, #f3eee6 0 60%, #cfc8bd 60%); border-radius: 2px 2px 0 0; }
.pwt-art .tower::before { content: ''; position: absolute; left: -10%; right: -10%; top: 30%; height: 18%; background: #c94a3a; }
.pwt-art .tower::after { content: ''; position: absolute; left: 10%; right: 10%; top: -24%; height: 26%; border-radius: 40% 40% 0 0; background: #fff6c9; box-shadow: 0 0 12px 4px #ffe9a3; }
.pwt-art .beam { width: 60%; height: 20%; bottom: calc(var(--tb) + 17%); left: calc(var(--tx) + 2%); transform-origin: 0 50%; background: linear-gradient(90deg, rgba(255, 240, 190, 0.5), transparent); clip-path: polygon(0 45%, 100% 0, 100% 100%, 0 55%); transform: rotate(var(--br, -8deg)); }

/* a volcano scene (ThreeJS renders) */
.pwt-vol { position: absolute; inset: 0; overflow: hidden; background: var(--vsky, linear-gradient(180deg, #1c2440 0%, #3b2f4a 48%, #6b3b3a 70%, #2a1d1d 100%)); }
.pwt-vol i { position: absolute; display: block; }
.pwt-vol .stars { inset: 0 0 50% 0; background-image: radial-gradient(1px 1px at 12% 20%, #fff 50%, transparent), radial-gradient(1px 1px at 30% 8%, #fff 50%, transparent), radial-gradient(1px 1px at 72% 16%, #fff 50%, transparent), radial-gradient(1px 1px at 88% 30%, #fff 50%, transparent), radial-gradient(1px 1px at 52% 26%, #fff 50%, transparent); opacity: .7; }
.pwt-vol .m1 { left: 14%; right: 14%; bottom: 18%; height: 58%; background: var(--vm1, #4a3434); clip-path: polygon(0 100%, 38% 10%, 46% 4%, 54% 4%, 62% 10%, 100% 100%); }
.pwt-vol .m2 { left: 14%; right: 50%; bottom: 18%; height: 58%; background: var(--vm2, #5d4040); clip-path: polygon(0 100%, 76% 10%, 92% 4%, 100% 4%, 100% 100%); }
.pwt-vol .lava { left: 47%; width: 6%; bottom: 18%; height: calc(56% * var(--lv, 0.2)); background: linear-gradient(0deg, #ff7a2f, #ffcc4d); border-radius: 40% 40% 0 0; box-shadow: 0 0 14px 4px rgba(255, 140, 50, 0.5); }
.pwt-vol .glow { left: 34%; right: 34%; top: 10%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 150, 60, calc(var(--lv, 0.2) * 0.9)), transparent); }
.pwt-vol .ground { left: 0; right: 0; bottom: 0; height: 19%; background: var(--vg, #231818); }
.pwt-vol .lbl { position: absolute; left: 8%; top: 8%; font: 800 11px 'Onest', sans-serif; letter-spacing: 0.05em; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

/* ── the hero frame: rail + scenes ── */
.pwt-rail { left: 0; top: 0; bottom: 0; width: 52px; background: var(--a); border-right: 1px solid var(--hl); display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; }
.pwt-rail > b { width: 22px; height: 22px; margin-bottom: 6px; color: var(--t1); }
.pwt-rail > b svg { width: 22px; height: 22px; }
.pwt-rail i { display: grid; place-items: center; width: 34px; height: 30px; border-radius: 8px; color: var(--t2); transition: background-color .25s, color .25s; }
.pwt-rail i svg { width: 15px; height: 15px; }
.pwt-rail i.new { background: var(--ac); color: var(--onac); margin-bottom: 8px; }
.pwt-rail i.on { background: var(--act); color: var(--ac); }
.pwt-rail hr { width: 22px; border: 0; border-top: 1px solid var(--hl); margin: 4px 0; }
.pwt-scene { left: 0; top: 0; width: 860px; height: 540px; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.pwt-scene.on { opacity: 1; visibility: visible; transition: opacity .35s; }
.pwt-tour .pwt-scene { left: 52px; }

/* the chapter bar under the hero frame */
.pwt-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid oklch(1 0 0 / 0.07); background: oklch(0.15 0.004 250); }
.pwt-play { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ac); color: var(--onac); cursor: pointer; }
.pwt-play svg { width: 14px; height: 14px; }
.pwt-play .i-play { display: none; }
.pwt.is-paused .pwt-play .i-play { display: block; }
.pwt.is-paused .pwt-play .i-pause { display: none; }
.pwt-chaps { display: flex; gap: 6px; flex-wrap: wrap; }
.pwt-chap { position: relative; overflow: hidden; border: 1px solid var(--bd); background: var(--q); color: var(--t2); font: 600 12.5px 'Onest', sans-serif; height: 32px; padding: 0 14px; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pwt-chap svg { width: 13px; height: 13px; }
.pwt-chap:hover { color: var(--t1); border-color: var(--bd2); }
.pwt-chap.is-on { color: var(--t1); border-color: var(--acl); background: var(--act); }
.pwt-chap .pwt-fill { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--ac); }
.pwt-say { margin: 0 0 0 auto; font-size: 13.5px; color: var(--t2); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwt-say b { color: var(--t1); font-weight: 600; }
@media (max-width: 760px) {
    .pwt-bar { flex-wrap: wrap; gap: 10px; padding: 10px; }
    .pwt-say { order: 3; width: 100%; margin: 0; text-align: left; white-space: normal; font-size: 13px; }
    .pwt-chap { height: 30px; padding: 0 11px; font-size: 12px; }
    .pwt-chap svg { display: none; }
}

/* ══ Generate: the Clips view ══ */
.pwt-g-info { left: 16px; top: 54px; width: 168px; display: flex; flex-direction: column; gap: 4px; }
.pwt-g-info .crumb { font-size: 11px; color: var(--t3); }
.pwt-g-info h4 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.pwt-g-info .lk { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--t2); margin-bottom: 6px; }
.pwt-g-info .lk svg { width: 11px; height: 11px; }
.pwt-mini { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 9px; background: var(--c); border: 1px solid var(--hl); }
.pwt-mini .th { position: relative; height: 34px; border-radius: 5px; overflow: hidden; }
.pwt-mini small { display: block; font: 600 8.5px var(--mono); letter-spacing: .06em; color: var(--t3); text-transform: uppercase; }
.pwt-mini b { display: block; font-size: 11px; margin: 0 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwt-mini .pwt-st-dot { font-size: 10px; }
.pwt-g-view { left: 198px; top: 56px; width: 400px; height: 225px; border-radius: 10px; overflow: hidden; background: var(--p); border: 1px solid var(--hl); }
.pwt-g-view .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--t3); font-size: 12px; border: 1.5px dashed var(--bd2); border-radius: 10px; }
.pwt-g-view .pic { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.pwt-g-view .pic.on { opacity: 1; }
.pwt-g-view .pic .pwt-art { transform: scale(var(--z, 1)); transform-origin: 70% 55%; }
.pwt-g-view .pill { position: absolute; top: 8px; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 99px; background: rgba(10, 12, 15, 0.75); font-size: 10.5px; font-weight: 600; opacity: 0; transition: opacity .25s; }
.pwt-g-view .pill.on { opacity: 1; }
.pwt-g-view .pill.l { left: 8px; color: var(--ac); }
.pwt-g-view .pill.l::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pwt-g-view .pill.r { right: 8px; color: var(--t1); }
.pwt-g-takes { left: 612px; top: 56px; width: 232px; padding: 10px; border-radius: 12px; background: var(--c); border: 1px solid var(--hl); }
.pwt-g-takes .pwt-lbl { display: block; margin-bottom: 8px; }
.pwt-g-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pwt-tk { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--q); border: 2px solid transparent; transition: border-color .2s, box-shadow .2s; }
.pwt-tk .pwt-art { opacity: 0; transition: opacity .4s; }
.pwt-tk.is-done .pwt-art { opacity: 1; }
.pwt-tk.is-done .pwt-shim { display: none; }
.pwt-tk .n { position: absolute; left: 4px; top: 3px; z-index: 1; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 4px; background: rgba(10, 12, 15, 0.7); font: 600 9px var(--mono); color: #fff; }
.pwt-tk .pct { position: absolute; right: 6px; bottom: 4px; font: 600 9.5px var(--mono); color: var(--t2); }
.pwt-tk.is-done .pct { display: none; }
.pwt-tk.is-sel { border-color: var(--ac); box-shadow: 0 0 0 2px var(--act); }
.pwt-g-takes .pwt-btn { width: 100%; margin-top: 10px; height: 30px; }
.pwt-g-bar { left: 198px; top: 294px; width: 646px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 6px; border-radius: 12px; background: var(--r); border: 1px solid var(--bd); }
.pwt-g-bar .t { flex: 1; min-width: 0; font-size: 12px; color: var(--t1); white-space: nowrap; overflow: hidden; }
.pwt-g-bar .t .ph { color: var(--t3); }
.pwt-g-bar kbd { font: 600 9px var(--mono); padding: 1px 5px; border-radius: 4px; background: oklch(0.15 0.02 240 / 0.18); }
.pwt-g-tl { left: 0; right: 0; top: 346px; bottom: 0; border-top: 1px solid var(--hl); background: oklch(0.155 0.004 250); }
.pwt-g-tl > * { position: absolute; }
.pwt-g-tl .tr { left: 14px; right: 14px; top: 10px; display: flex; align-items: center; gap: 10px; }
.pwt-g-tl .pl { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--t1); color: var(--a); }
.pwt-g-tl .pl svg { width: 11px; height: 11px; }
.pwt-g-tl .tc { font: 600 12px var(--mono); }
.pwt-g-tl .tc span { color: var(--t3); }
.pwt-g-tl .sum { left: 14px; top: 62px; width: 100px; }
.pwt-g-tl .sum b { display: block; font: 600 17px var(--mono); }
.pwt-g-tl .sum small { display: block; font-size: 10.5px; color: var(--t3); margin: 2px 0 8px; }
.pwt-g-tl .ruler { left: 128px; right: 14px; top: 56px; height: 14px; display: flex; justify-content: space-between; font: 500 8.5px var(--mono); color: var(--t3); border-bottom: 1px solid var(--hl); }
.pwt-g-tl .strip { left: 128px; right: 14px; top: 76px; height: 72px; display: flex; gap: 3px; }
.pwt-gc { position: relative; flex: 1; border-radius: 7px; overflow: hidden; border: 1.5px solid transparent; background: var(--q); }
.pwt-gc .pwt-art { opacity: .55; }
.pwt-gc.is-cur { border-color: var(--ac); }
.pwt-gc .cap { position: absolute; left: 8px; right: 8px; top: 6px; z-index: 1; display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.pwt-gc .st { position: absolute; left: 8px; bottom: 6px; z-index: 1; font-size: 10px; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.pwt-gc .du { position: absolute; right: 8px; bottom: 6px; z-index: 1; font: 600 9.5px var(--mono); text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.pwt-gc .pwt-shim { display: none; }
.pwt-gc.is-gen .pwt-shim { display: block; }
.pwt-g-tl .ph { top: 70px; height: 84px; width: 2px; margin-left: -1px; background: #ff5d6c; }
.pwt-g-tl .ph::before { content: ''; position: absolute; top: -3px; left: -4px; width: 10px; height: 8px; border-radius: 2px; background: #ff5d6c; }

/* ══ Movie Planner ══ */
.pwt-mp-vp { left: 0; top: 44px; width: 630px; height: 274px; overflow: hidden; background: #9a9ea3; }
.pwt-world { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 1s cubic-bezier(.3, .6, .2, 1); }
.pwt-world .wall { position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(180deg, #b8bbbf, #c4c7ca); }
.pwt-world svg.floor { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.pwt-fig { position: absolute; width: 0; height: 0; transition: opacity .35s; opacity: 0; }
.pwt-fig.on { opacity: 1; }
.pwt-fig > b { position: absolute; left: 50%; bottom: 0; transform-origin: 50% 100%; transform: translateX(-50%) scale(var(--k, 1)); width: 28px; height: 74px; }
.pwt-fig > b::before { content: ''; position: absolute; left: 50%; top: 0; width: 17px; height: 20px; margin-left: -8.5px; border-radius: 50%; background: var(--fc); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.16); }
.pwt-fig > b::after { content: ''; position: absolute; left: 0; right: 0; top: 21px; bottom: 0; border-radius: 12px 12px 5px 5px; background: var(--fc); box-shadow: inset -5px -4px 0 rgba(0, 0, 0, 0.14); }
.pwt-fig > b > s { position: absolute; left: 50%; top: 7px; width: 3.5px; height: 3.5px; margin-left: -4.5px; z-index: 1; border-radius: 50%; background: #23262c; box-shadow: 5.5px 0 0 #23262c; }
.pwt-fig > em { position: absolute; left: 50%; bottom: -4px; width: 36px; height: 8px; margin-left: -18px; border-radius: 50%; background: rgba(0, 0, 0, 0.16); transform: scale(var(--k, 1)); }
.pwt-mp-tag { left: 10px; top: 54px; z-index: 2; padding: 2px 7px; border-radius: 5px; background: rgba(20, 22, 26, 0.75); font: 600 10px var(--mono); color: #fff; }
.pwt-pad { left: 50%; top: 280px; transform: translateX(-50%); margin-left: -115px; z-index: 2; display: flex; gap: 10px; padding: 5px 9px; border-radius: 9px; background: rgba(28, 30, 34, 0.9); border: 1px solid var(--bd); }
.pwt-pad > span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pwt-pad small { font: 600 7.5px var(--mono); letter-spacing: .08em; color: var(--t3); }
.pwt-pad > span > span { display: flex; gap: 3px; }
.pwt-pad i { display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 3px; background: var(--q); border: 1px solid var(--bd); font: 700 8px 'Onest', sans-serif; font-style: normal; color: var(--t1); }
.pwt-ask { left: 10px; top: 326px; width: 610px; height: 30px; border-radius: 9px; background: var(--p); border: 1px solid var(--bd); display: flex; align-items: center; gap: 8px; padding: 0 5px 0 10px; font-size: 11.5px; }
.pwt-ask .t { flex: 1; color: var(--t1); white-space: nowrap; overflow: hidden; }
.pwt-ask .t .ph { color: var(--t3); }
.pwt-ask .go { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ctl); color: var(--t1); }
.pwt-ask .go svg { width: 11px; height: 11px; }
.pwt-reply { left: 18px; top: 288px; display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 9px; background: var(--r); border: 1px solid var(--bd2); font-size: 11.5px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; z-index: 3; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.pwt-reply.on { opacity: 1; transform: none; }
.pwt-reply svg { width: 13px; height: 13px; color: var(--claude); }
.pwt-mp-tl { left: 0; top: 364px; width: 630px; bottom: 0; border-top: 1px solid var(--hl); }
.pwt-mp-tl > * { position: absolute; }
.pwt-mp-tl .tr { left: 10px; right: 10px; top: 8px; display: flex; align-items: center; gap: 10px; }
.pwt-mp-tl .pl { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--t1); color: var(--a); }
.pwt-mp-tl .pl svg { width: 10px; height: 10px; }
.pwt-mp-tl .tc { font: 600 12px var(--mono); }
.pwt-mp-tl .tc small { display: block; font: 500 9px var(--mono); color: var(--t3); }
.pwt-mp-tl .ruler { left: 76px; right: 70px; top: 44px; display: flex; justify-content: space-between; font: 500 8.5px var(--mono); color: var(--t3); }
.pwt-mp-tl .lab { left: 10px; font-size: 11px; font-weight: 600; }
.pwt-mp-tl .lab small { display: block; font-size: 9px; font-weight: 400; color: var(--t3); }
.pwt-mp-tl .shots { left: 76px; right: 70px; top: 60px; height: 50px; }
.pwt-sh { position: absolute; top: 0; bottom: 0; border-radius: 6px; overflow: hidden; background: linear-gradient(180deg, #b8bbbf 0 42%, #9a9ea3 42%); border: 1.5px solid transparent; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s, border-color .2s; }
.pwt-sh.on { opacity: 1; transform: none; }
.pwt-sh.is-cur { border-color: var(--warn); }
.pwt-sh > i { position: absolute; bottom: 2px; width: var(--w); height: var(--h); border-radius: 40% 40% 3px 3px; background: var(--fc); }
.pwt-sh > b { position: absolute; left: 4px; top: 3px; right: 4px; display: flex; gap: 4px; align-items: center; font-size: 9.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); white-space: nowrap; overflow: hidden; }
.pwt-sh > b span { display: grid; place-items: center; min-width: 13px; height: 13px; border-radius: 3px; background: rgba(10, 12, 15, 0.8); font: 600 8px var(--mono); }
.pwt-sh > b em { margin-left: auto; font: 600 8.5px var(--mono); font-style: normal; }
.pwt-mp-tl .add { right: 10px; top: 60px; width: 54px; height: 50px; border-radius: 7px; border: 1.5px dashed var(--acl); display: grid; place-items: center; text-align: center; font-size: 9.5px; color: var(--ac); }
.pwt-mp-tl .cam { left: 76px; right: 70px; top: 120px; height: 16px; border-radius: 4px; background: repeating-linear-gradient(135deg, oklch(1 0 0 / 0.04) 0 5px, transparent 5px 10px); }
.pwt-mp-tl .cam i { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; background: oklch(0.72 0.13 230 / 0.35); border: 1px solid var(--acl); opacity: 0; transition: opacity .3s; }
.pwt-mp-tl .cam i.on { opacity: 1; }
.pwt-mp-tl .ph { top: 40px; height: 100px; width: 2px; margin-left: -1px; background: var(--ac); z-index: 2; }
.pwt-mp-tl .ph::before { content: attr(data-t); position: absolute; top: -2px; left: 50%; transform: translateX(-50%); padding: 0 4px; border-radius: 3px; background: var(--ac); color: var(--onac); font: 600 8px var(--mono); white-space: nowrap; }
.pwt-mp-right { left: 630px; top: 44px; right: 0; bottom: 0; border-left: 1px solid var(--hl); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; }
.pwt-mp-right .hrow { display: flex; align-items: center; justify-content: space-between; }
.pwt-mp-right .rw { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 6px; font: 600 8.5px var(--mono); letter-spacing: .06em; color: var(--t3); }
.pwt-mp-right .asp { display: flex; gap: 2px; font: 600 9px var(--mono); color: var(--t3); }
.pwt-mp-right .asp b { padding: 2px 4px; border-radius: 4px; background: var(--seg); color: var(--t1); }
.pwt-mp-right .bld { padding: 8px; border-radius: 10px; border: 1px solid var(--hl); background: var(--c); display: grid; gap: 5px; }
.pwt-mp-right .bld .rw .pwt-field { height: 22px; font-size: 10.5px; }
.pwt-mp-right .send { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: auto; }
.pwt-mp-right .send .pwt-btn { height: 30px; }
.pwt-fl { position: absolute; left: 12px; right: 12px; top: 44px; transition: opacity .25s; }

/* ══ ThreeJS: a video page ══ */
.pwt-tj-top { left: 16px; right: 16px; top: 8px; height: 66px; }
.pwt-tj-top > * { position: absolute; }
.pwt-tj-top .crumb { left: 0; top: 0; font-size: 11px; color: var(--t2); display: flex; align-items: center; gap: 4px; }
.pwt-tj-top .crumb svg { width: 11px; height: 11px; }
.pwt-tj-top .num { left: 0; top: 22px; width: 38px; height: 38px; border-radius: 10px; background: var(--c); border: 1px solid var(--bd); display: grid; place-items: center; font: 700 14px 'Onest', sans-serif; }
.pwt-tj-top h4 { left: 50px; top: 20px; margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.pwt-tj-top .meta { left: 50px; top: 48px; font: 500 10px var(--mono); color: var(--t2); white-space: nowrap; }
.pwt-tj-top .act { right: 0; top: 24px; display: flex; gap: 6px; align-items: center; }
.pwt-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 99px; background: var(--q); border: 1px solid var(--bd); font-size: 11px; font-weight: 600; color: var(--t2); white-space: nowrap; }
.pwt-pill.warn { color: var(--warn); border-color: oklch(0.83 0.12 85 / 0.35); }
.pwt-pill.warn::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pwt-tj-tabs { left: 16px; top: 80px; display: flex; gap: 18px; }
.pwt-tab { display: inline-flex; align-items: center; gap: 5px; height: 26px; font-size: 12px; font-weight: 600; color: var(--t2); border-bottom: 2px solid transparent; transition: color .25s, border-color .25s; }
.pwt-tab svg { width: 11px; height: 11px; color: var(--t3); }
.pwt-tab .ck { display: none; color: var(--ok); }
.pwt-tab .op { display: block; }
.pwt-tab.is-done .ck { display: block; }
.pwt-tab.is-done .op { display: none; }
.pwt-tab.is-cur { color: var(--t1); border-color: var(--ac); }
.pwt-tj-line { left: 0; right: 0; top: 108px; height: 1px; background: var(--hl); }
.pwt-tj-main { left: 16px; top: 118px; width: 576px; bottom: 0; overflow: hidden; }
.pwt-tj-main > * { position: absolute; }
.pwt-tj-main .sb { left: 0; top: 4px; right: 0; display: flex; align-items: center; gap: 8px; }
.pwt-tj-main .sb h5 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.pwt-tj-main .sb .pwt-tag { height: 20px; }
.pwt-tj-main .mt { left: 0; top: 30px; font: 500 10px var(--mono); color: var(--t2); }
.pwt-look { left: 0; top: 54px; right: 0; }
.pwt-look .pwt-lbl { display: block; margin-bottom: 6px; }
.pwt-lookc { padding: 9px 11px; border-radius: 10px; background: oklch(0.83 0.12 85 / 0.08); border: 1px solid oklch(0.83 0.12 85 / 0.35); font-size: 11.5px; transition: background-color .4s, border-color .4s; }
.pwt-lookc b { display: block; font-weight: 700; }
.pwt-lookc span { display: block; margin-top: 3px; color: var(--t2); font-size: 11px; }
.pwt-lookc.is-ok { background: oklch(0.8 0.13 155 / 0.08); border-color: oklch(0.8 0.13 155 / 0.35); }
.pwt-scn-h { left: 0; top: 150px; display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 700; }
.pwt-scn-h span { font: 500 10px var(--mono); color: var(--t3); }
.pwt-scns { left: 0; right: 0; top: 174px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pwt-scn { position: relative; border-radius: 10px; background: var(--c); border: 1px solid var(--hl); overflow: hidden; transition: border-color .3s; }
.pwt-scn .pic { position: relative; height: 78px; background: var(--q); overflow: hidden; }
.pwt-scn .pic .pwt-vol { opacity: 0; transition: opacity .4s; }
.pwt-scn.is-done .pic .pwt-vol { opacity: 1; }
.pwt-scn.is-done .pwt-shim { display: none; }
.pwt-scn .ty { position: absolute; left: 6px; top: 6px; z-index: 1; padding: 1px 5px; border-radius: 4px; background: rgba(10, 12, 15, 0.75); font-size: 9px; font-weight: 700; }
.pwt-scn p { margin: 0; padding: 7px 8px 2px; font-size: 10px; line-height: 1.4; color: var(--t2); height: 44px; overflow: hidden; }
.pwt-scn .du { display: block; padding: 0 8px 7px; text-align: right; font: 600 9.5px var(--mono); color: var(--t1); }
.pwt-scn.is-flag { border-color: oklch(0.83 0.12 85 / 0.6); }
.pwt-tj-side { left: 604px; right: 0; top: 109px; bottom: 0; border-left: 1px solid var(--hl); padding: 12px 14px; }
.pwt-tj-side > * { position: relative; }
.pwt-tj-side .ch { display: flex; align-items: center; gap: 5px; font: 600 9.5px var(--mono); letter-spacing: .08em; color: var(--t2); }
.pwt-tj-side .ch em { font-style: normal; color: var(--warn); transition: color .3s; }
.pwt-tj-side .ch em.ok { color: var(--ok); }
.pwt-tj-side .sum { margin: 8px 0 10px; font-size: 10.5px; line-height: 1.5; color: var(--t3); }
.pwt-chk { display: grid; grid-template-columns: 15px 1fr; gap: 7px; margin-bottom: 8px; font-size: 10.5px; line-height: 1.45; color: var(--t1); }
.pwt-chk i { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: 800 9px 'Onest', sans-serif; font-style: normal; margin-top: 1px; }
.pwt-chk i.bad { background: oklch(0.68 0.17 25 / 0.2); color: var(--bad); }
.pwt-chk i.ok { background: oklch(0.8 0.13 155 / 0.18); color: var(--ok); }
.pwt-chk i svg { width: 8px; height: 8px; }
.pwt-tj-chat { left: 614px; right: 12px; bottom: 12px; height: 104px; border-radius: 12px; background: var(--r); border: 1px solid var(--bd); padding: 8px 10px; }
.pwt-tj-chat > * { position: absolute; }
.pwt-tj-chat .who { left: 10px; top: 8px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--t2); }
.pwt-tj-chat .who svg { width: 11px; height: 11px; color: var(--claude); }
.pwt-tj-chat .mdl { right: 10px; top: 6px; }
.pwt-tj-chat .t { left: 10px; right: 10px; top: 30px; font-size: 11.5px; color: var(--t1); line-height: 1.4; }
.pwt-tj-chat .t .ph { color: var(--t3); }
.pwt-tj-chat .pwt-btn { right: 8px; bottom: 8px; height: 24px; }
.pwt-tj-chat .pwt-tag { height: 18px; }

/* ══ Edit: the PatchWork Editor ══ */
.pwt-e-top { left: 0; right: 0; top: 0; height: 36px; border-bottom: 1px solid var(--hl); display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.pwt-e-top .mk { width: 16px; height: 16px; color: var(--t1); }
.pwt-e-top .mk svg { width: 16px; height: 16px; }
.pwt-e-top .nm { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; }
.pwt-e-top .ibs { margin-left: auto; display: flex; align-items: center; gap: 4px; color: var(--t2); }
.pwt-e-top .ibs > span { display: grid; place-items: center; width: 22px; height: 22px; }
.pwt-e-top .ibs svg { width: 13px; height: 13px; }
.pwt-e-top .pwt-btn { height: 24px; position: relative; overflow: hidden; min-width: 62px; }
.pwt-e-top .av { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #f472b6, #fb923c); }
.pwt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.pwt-prog i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--onac); }
.pwt-e-left { left: 0; top: 36px; width: 240px; height: 264px; border-right: 1px solid var(--hl); }
.pwt-e-left > * { position: absolute; }
.pwt-e-tabs { left: 10px; right: 10px; top: 6px; display: flex; gap: 9px; border-bottom: 1px solid var(--hl); white-space: nowrap; }
.pwt-e-tabs i { font-style: normal; height: 24px; font-size: 10.5px; font-weight: 600; color: var(--t2); border-bottom: 2px solid transparent; display: inline-flex; align-items: center; transition: color .2s, border-color .2s; }
.pwt-e-tabs i.on { color: var(--t1); border-color: var(--ac); }
.pwt-e-media { left: 10px; right: 10px; top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; transition: opacity .25s; }
.pwt-e-media > div { font-size: 9.5px; color: var(--t2); }
.pwt-e-media .th { position: relative; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; margin-bottom: 3px; border: 1px solid var(--hl); }
.pwt-e-caps { left: 10px; right: 10px; top: 40px; opacity: 0; transition: opacity .25s; }
.pwt-e-caps.on { opacity: 1; }
.pwt-e-caps .pwt-btn { width: 100%; height: 28px; }
.pwt-e-caps ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.pwt-e-caps li { display: grid; grid-template-columns: 40px 1fr; gap: 6px; padding: 5px 6px; border-radius: 6px; background: var(--c); font-size: 10.5px; opacity: 0; transform: translateY(3px); transition: opacity .25s, transform .25s, background-color .2s; }
.pwt-e-caps li.on { opacity: 1; transform: none; }
.pwt-e-caps li.is-cur { background: var(--act); }
.pwt-e-caps li span { font: 500 9px var(--mono); color: var(--t3); padding-top: 1px; }
.pwt-e-prev { left: 240px; top: 36px; width: 370px; height: 264px; }
.pwt-e-prev > * { position: absolute; }
.pwt-e-prev .ph { left: 10px; right: 10px; top: 6px; height: 24px; display: flex; align-items: center; gap: 5px; }
.pwt-e-prev .ph b { font-size: 11.5px; margin-right: auto; }
.pwt-e-prev .ph .pwt-tag { height: 18px; font-family: 'Onest', sans-serif; font-weight: 600; font-size: 9.5px; }
.pwt-e-frame { left: 24px; top: 44px; width: 322px; height: 181px; overflow: hidden; background: #000; outline: 1px solid var(--acl); }
.pwt-e-frame .shot { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; }
.pwt-e-frame .shot.on { opacity: 1; }
.pwt-e-frame .cap { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); padding: 2px 8px; border-radius: 5px; background: rgba(0, 0, 0, 0.72); font-weight: 800; font-size: 15px; color: #fff; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.pwt-e-frame .cap.on { opacity: 1; }
.pwt-e-right { left: 610px; top: 36px; right: 0; height: 264px; border-left: 1px solid var(--hl); padding: 8px 12px; }
.pwt-e-right > * { position: relative; }
.pwt-e-right h5 { margin: 0; font-size: 11.5px; }
.pwt-e-right .sub { font-size: 10px; color: var(--t3); }
.pwt-e-right .tb { display: flex; margin: 8px 0 10px; border-bottom: 1px solid var(--hl); }
.pwt-e-right .tb i { flex: 1; text-align: center; font-style: normal; font-size: 10.5px; color: var(--t2); height: 22px; border-bottom: 2px solid transparent; }
.pwt-e-right .tb i.on { color: var(--t1); border-color: var(--ac); font-weight: 600; }
.pwt-e-right .rw { display: grid; grid-template-columns: 54px 1fr 46px; align-items: center; gap: 6px; height: 26px; font-size: 10.5px; color: var(--t2); }
.pwt-e-right .rw .sl { height: 3px; border-radius: 2px; background: var(--q); position: relative; }
.pwt-e-right .rw .sl::after { content: ''; position: absolute; left: var(--v); top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ac); }
.pwt-e-right .rw .sl::before { content: ''; position: absolute; left: 0; width: var(--v); top: 0; bottom: 0; background: var(--ac); border-radius: 2px; }
.pwt-e-right .rw b { height: 20px; border-radius: 5px; background: var(--p); border: 1px solid var(--bd); display: grid; place-items: center; font: 600 9.5px var(--mono); color: var(--t1); }
.pwt-e-seqs { left: 0; right: 0; top: 300px; height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-top: 1px solid var(--hl); }
.pwt-e-seqs .pwt-btn { height: 21px; font-size: 10.5px; padding: 0 8px; }
.pwt-e-seqs .pwt-btn.cur { border-color: var(--acl); background: var(--act); }
.pwt-e-seqs .pwt-btn small { font: 500 9px var(--mono); color: var(--t3); }
.pwt-e-tool { left: 0; right: 0; top: 328px; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-top: 1px solid var(--ac); border-bottom: 1px solid var(--hl); }
.pwt-e-tool .ic { display: grid; place-items: center; width: 22px; height: 22px; color: var(--t2); }
.pwt-e-tool .ic.on { color: var(--ac); }
.pwt-e-tool .ic svg { width: 13px; height: 13px; }
.pwt-e-tool .tc { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font: 600 12px var(--mono); }
.pwt-e-tool .tc svg { width: 11px; height: 11px; }
.pwt-e-tool .cc { margin-left: auto; }
.pwt-e-tool .cc.on { color: var(--ac); border-color: var(--acl); background: var(--act); }
.pwt-e-rule { left: 96px; right: 10px; top: 364px; height: 14px; display: flex; justify-content: space-between; font: 500 8.5px var(--mono); color: var(--t3); }
.pwt-e-trk { left: 0; right: 10px; height: 40px; }
.pwt-e-trk > * { position: absolute; }
.pwt-e-trk .hd { left: 10px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 5px; color: var(--t3); }
.pwt-e-trk .hd b { padding: 1px 4px; border-radius: 3px; font: 700 8.5px var(--mono); color: #fff; }
.pwt-e-trk .hd svg { width: 10px; height: 10px; }
.pwt-e-trk .ln { left: 96px; right: 0; top: 3px; bottom: 3px; }
.pwt-ec { position: absolute; top: 0; bottom: 0; border-radius: 4px; overflow: hidden; background: oklch(0.55 0.12 245); border: 1px solid oklch(0.7 0.12 245); }
.pwt-ec .th { position: absolute; left: 0; top: 0; bottom: 0; width: 48px; overflow: hidden; }
.pwt-ec b { position: absolute; left: 52px; bottom: 3px; font-size: 9.5px; font-weight: 700; color: #fff; white-space: nowrap; }
.pwt-ec em { position: absolute; left: 50%; top: 3px; transform: translateX(-50%); padding: 0 4px; border-radius: 3px; background: rgba(10, 12, 15, 0.75); font: 600 8px var(--mono); font-style: normal; color: #fff; }
.pwt-ea { position: absolute; top: 0; bottom: 0; border-radius: 4px; overflow: hidden; background: oklch(0.6 0.13 150); border: 1px solid oklch(0.72 0.13 150); }
.pwt-ea::before { content: ''; position: absolute; inset: 4px 3px 12px; background: repeating-linear-gradient(90deg, oklch(0.32 0.08 150 / 0.75) 0 1.5px, transparent 1.5px 3.5px); -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 50%, #000 35%, transparent 100%); mask-image: radial-gradient(ellipse 100% 60% at 50% 50%, #000 35%, transparent 100%); }
.pwt-ea b { position: absolute; left: 5px; bottom: 2px; font-size: 9px; font-weight: 700; color: oklch(0.2 0.05 150); }
.pwt-e-ph { top: 362px; height: 152px; width: 2px; margin-left: -1px; background: var(--ac); z-index: 3; }
.pwt-e-ph::before { content: ''; position: absolute; top: 0; left: -5px; width: 12px; height: 9px; background: var(--ac); clip-path: polygon(0 0, 100% 0, 50% 100%); }
