/* AIOS Video Studio: scene editor. Light chrome around dark 3D stages (the stage colours feed the greybox the AI frame is made
   from, so they stay); Inter, one indigo→violet accent. Old dark theme: editor.css_artifact_20261129. */
.se {
  --bg: #eef0f6; --panel: #ffffff; --raise: #f2f3f9; --line: rgba(15, 23, 42, 0.09); --text: #0b1020; --muted: #5d6579;
  --accent: #5b4cf0; --accent-soft: rgba(91, 76, 240, 0.1); --bad: #e11d48;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%); --glass: rgba(255, 255, 255, 0.9);
  display: grid; grid-template: "top top top" 48px "left views right" minmax(0, 1fr) "bottom bottom bottom" auto / 0 minmax(0, 1fr) 320px;
  height: 100%; min-height: 520px; background: var(--bg); color: var(--text); overflow: hidden; position: relative;
  font: 13px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased;
}
.se *, .se *::before, .se *::after { box-sizing: border-box; }
.se button, .se input, .se select, .se textarea { font: inherit; color: inherit; }
.se h2 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.se h3 { margin: 16px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.se [hidden] { display: none !important; }
.se .muted { color: var(--muted); }
.se .grow { flex: 1; }
.se :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* buttons */
.se .btn { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--raise); cursor: pointer; white-space: nowrap; }
.se .btn:hover:not(:disabled) { border-color: rgba(15, 23, 42, 0.22); background: #e9ebf3; }
.se .btn:disabled { opacity: 0.4; cursor: default; }
.se .btn.ghost { background: transparent; border-color: transparent; }
.se .btn.ghost:hover:not(:disabled) { background: var(--raise); border-color: transparent; }
.se .btn.primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 18px -6px rgba(91, 76, 240, 0.55); }
.se .btn.primary:hover:not(:disabled) { background: #6d5cf5; border-color: #6d5cf5; }
.se .btn.on { border-color: var(--accent); background: var(--accent-soft); }
.se .btn.small { height: 28px; padding: 0 8px; }
.se .btn.danger:hover:not(:disabled) { border-color: var(--bad); color: #e11d48; }
.se .link { background: none; border: 0; padding: 0; color: #4338ca; cursor: pointer; text-decoration: none; }
.se .link:hover { text-decoration: underline; }
.se .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fb950; flex: none; }
.se .dot.bad { background: var(--bad); }

.se .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.se .seg.wrap { display: flex; flex-wrap: wrap; }
.se .seg button { height: 28px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: 1 0 auto; }
.se .seg button:hover { color: var(--text); }
.se .seg button.on { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); border-radius: 5px; }

/* top */
.se-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.se-left-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.se-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28ch; }
.se-demo { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; white-space: nowrap; }
.se-demo:hover { color: var(--text); }
.se-history { display: flex; margin-left: 8px; }
.se-rev { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-checks { display: inline-flex; align-items: center; gap: 8px; }
.se-small { display: none; }
.se-backend { max-width: 160px; }
.se-pop { position: absolute; top: 52px; right: 16px; width: 320px; max-height: 60%; overflow: auto; z-index: 30; padding: 16px; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(30, 27, 75, 0.18); }
.se .check { display: block; padding: 8px 0; border-top: 1px solid var(--line); cursor: default; }
.se .check:first-of-type { border-top: 0; padding-top: 0; }
.se .check-msg { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0 0 4px 12px; cursor: pointer; position: relative; }
.se .check-msg::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); }
.se .check.warn .check-msg::before { background: #d29922; }
.se .check.off .check-msg { color: var(--muted); }
.se .check.off .check-msg::before { background: var(--muted); }
.se .check .link, .se .check .muted { margin-left: 12px; font-size: 12px; }
.se .check-form { display: flex; gap: 8px; margin: 8px 0 0 12px; }
.se .check-form input { flex: 1; min-width: 0; }

/* left */
.se-left { grid-area: left; display: none; flex-direction: column; padding: 16px 8px 8px; background: var(--panel); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.se[data-step="scene"] { grid-template-columns: 216px minmax(0, 1fr) 320px; }
.se[data-step="scene"] .se-left { display: flex; }
.se-left h2 { padding: 0 8px; }
.se-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 16px; }
.se .tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: grab; font-size: 12px; }
.se .tile:hover { background: var(--raise); color: var(--text); }
.se .tile:active { cursor: grabbing; }
.se .ico svg { display: block; width: 24px; height: 24px; }
.se-list { flex: 1; min-height: 0; overflow: auto; }
.se-list .muted { padding: 0 8px; }
.se .row { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; text-align: left; }
.se .row:hover { background: var(--raise); }
.se .row.on { background: var(--accent-soft); }
.se .row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se .swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }

/* views */
.se-views { grid-area: views; position: relative; min-height: 0; background: var(--bg); overflow: hidden; }
.se-views .gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.se .pane { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.se .pane { position: absolute; inset: 0; }
.se .pane.off { display: none; }
.se .pane.mini { inset: auto; z-index: 3; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(30, 27, 75, 0.16); }
.se .pane.mini .pane-head { top: 4px; left: 4px; right: 4px; }
.se .pane.mini .pane-head .seg { display: none; }
.se .pane.mini .pane-title { pointer-events: auto; cursor: pointer; }
.se .pane.mini .pane-title:hover { color: var(--text); }
.se .pane.mini .frame { display: none; }
.se .pane.mini[data-corner="top"] { top: 12px; right: 12px; width: 26%; aspect-ratio: 16 / 9; }
.se .pane.mini[data-corner="bottom"] { bottom: 12px; right: 12px; width: 26%; height: 40%; }
.se .pane.mini[data-corner="bottom-left"] { left: 12px; bottom: 124px; width: 184px; height: 150px; }
.se .pane-3d .pane-head { justify-content: flex-start; }
.se-views[data-step="shot"] .pane-camera.big { bottom: 112px; }
.se .pane-3d { cursor: default; }
.se .pane.picking { cursor: crosshair; }
.se .pane-camera.big { cursor: grab; }
.se-views:not([data-step="shot"]) .pane-camera.big { cursor: default; }
.se .pane-camera.big.dragging { cursor: grabbing; }
.se .pane.dragging { cursor: grabbing; }
.se .pane-head { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 2; }
.se .pane-head > * { pointer-events: auto; }
.se .pane-title { padding: 2px 8px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.9); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.se .pane-head .seg { background: rgba(255, 255, 255, 0.92); }
.se .pane-head .seg button { height: 24px; padding: 0 8px; font-size: 12px; }
.se .frame { position: absolute; border: 1px solid rgba(15, 23, 42, 0.3); pointer-events: none; }
.se .hint { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; color: var(--muted); pointer-events: none; }

/* right */
.se-right { grid-area: right; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); min-height: 0; }
.se-tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
.se-tabs button { flex: 1; height: 40px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.se-tabs button:hover { color: var(--text); }
.se-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.se-panel { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.se-panel > h2:first-child { margin-top: 0; }
.se .empty { color: var(--muted); padding: 24px 0; text-align: center; }
.se .field { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 12px; }
.se .field .lab { color: var(--muted); }
.se .field .ctl { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.se .field .ctl > input[type="text"], .se .field .ctl > select, .se .field .ctl > textarea, .se .field .ctl > .seg { flex: 1; min-width: 0; }
.se input[type="text"], .se input[type="number"], .se select, .se textarea { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); min-width: 0; }
.se input[type="number"] { flex: 1 1 0; width: 0; -moz-appearance: textfield; }
.se textarea { height: auto; padding: 8px; resize: vertical; line-height: 1.4; }
.se input:focus, .se select:focus, .se textarea:focus { outline: none; border-color: var(--accent); }
.se .unit, .se .val { color: var(--muted); font-size: 12px; white-space: nowrap; }
.se .val { width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.se input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 16px; background: transparent; cursor: pointer; --fill: 0%; }
.se input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--fill), var(--line) var(--fill)); }
.se input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.se input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.se input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--accent); border: 0; }
.se input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 0; }
.se .swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.se .swatches .swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--panel); cursor: pointer; padding: 0; }
.se .swatches .swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.se .assets { display: flex; gap: 8px; flex-wrap: wrap; }
.se .asset { width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--muted); cursor: pointer; overflow: hidden; font-size: 11px; }
.se .asset img { display: block; width: 100%; height: 100%; object-fit: cover; }
.se .asset.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.se .note { margin: -4px 0 12px 72px; color: var(--muted); font-size: 12px; }
.se .actions { display: flex; gap: 8px; margin: 16px 0 12px; }
.se .actions .btn { flex: 1; }
.se .presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.se .presets .btn:last-child { grid-column: 1 / -1; }
.se .prompt { margin: 0; padding: 12px; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.se .legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.se .legend:empty { display: none; }
.se .legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.se .legend-item img { width: 32px; height: 32px; border-radius: 4px; object-fit: cover; }

/* bottom */
.se-bottom { grid-area: bottom; background: var(--panel); border-top: 1px solid var(--line); min-width: 0; }
.se-strip { display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto; }
.se .shot { flex: none; width: 176px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--raise); cursor: pointer; text-align: left; }
.se .shot:hover { border-color: rgba(15, 23, 42, 0.22); }
.se .shot.on { border-color: var(--accent); background: var(--accent-soft); }
.se .shot.add { width: 40px; display: grid; place-items: center; color: var(--muted); font-size: 20px; background: transparent; border-style: dashed; }
.se .shot.add:hover { color: var(--text); }
.se .shot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 20px; margin-bottom: 8px; }
.se .shot-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se .shot-rename { height: 24px; width: 100%; padding: 0 4px; }
.se .shot-meta { display: flex; gap: 4px; height: 24px; }
.se .chip { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; white-space: nowrap; }
.se .chip:hover { color: var(--text); border-color: rgba(15, 23, 42, 0.22); }
.se .chip.play { color: #4338ca; }
.se .chip.x { border-color: transparent; padding: 0 4px; margin-left: auto; }
.se-time { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px 8px; }
.se-play { width: 64px; }
.se-clock { width: 80px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* messages and windows */
.se-toasts { position: absolute; left: 50%; bottom: 136px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.se .toast { max-width: 480px; padding: 8px 16px; border-radius: 8px; background: #2a2f37; border: 1px solid rgba(15, 23, 42, 0.22); box-shadow: 0 8px 24px rgba(30, 27, 75, 0.14); transition: opacity 0.3s; }
.se .toast.error { border-color: var(--bad); }
.se .toast.warn { border-color: #d29922; }
.se .toast.out { opacity: 0; }
.se-modal { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(255, 255, 255, 0.86); }
.se-modal-box { width: min(880px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.se-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.se-modal-head h2 { margin: 0; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--text); }
.se-modal-body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.se-modal-body video { width: 100%; max-height: 60vh; background: #000; border-radius: 6px; }
.se-modal-body .note { margin: 0; }
.se .bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.se .bar-fill { width: 0; height: 100%; background: var(--accent); }
.se .downloads { display: flex; gap: 16px; }

@media (max-width: 1100px) {
  .se { grid-template-columns: 64px minmax(0, 1fr) 264px; }
  .se-palette { grid-template-columns: 1fr; }
  .se .tile span:last-child, .se-left h2, .se-list { display: none; }
  .se-left { padding-top: 8px; }
  .se-palette { margin: 0; gap: 0; }
  .se .tile { padding: 6px 0; }
  .se-rev { display: none; }
}
@media (max-width: 760px) {
  .se { grid-template: "top" 48px "views" minmax(320px, 1fr) "bottom" auto "left" auto "right" auto / minmax(0, 1fr); height: auto; overflow: visible; }
  .se-views { grid-template-columns: 1fr 1fr; grid-template-rows: 280px 180px; height: 461px; }
  .se .pane-3d { grid-row: 1; grid-column: 1 / span 2; }
  .se-palette { grid-template-columns: repeat(6, 1fr); margin: 0; }
  .se-left { border-right: 0; border-top: 1px solid var(--line); padding: 8px; }
  .se-right { border-left: 0; border-top: 1px solid var(--line); }
  .se-history, .se-demo, .se .pane-camera .pane-title { display: none; }
  .se .pane-camera .pane-head { justify-content: flex-end; }
  /* The top bar becomes rows: where you are and where you can go, then the actions, then the note. */
  .se { grid-template-rows: auto minmax(320px, 1fr) auto auto auto; }
  .se-top { flex-wrap: wrap; row-gap: 8px; padding: 8px; }
  .se-left-top { order: 0; flex: 1 1 0; }
  .se-top .se-go { order: 1; }
  .se-top .grow { order: 2; flex: 0 0 100%; height: 0; }
  .se-top .se-checks, .se-top > .btn:not(.se-go), .se-top .se-backend { order: 3; }
  .se-top .se-backend { flex: 1 1 80px; }
  .se-top .btn.primary { flex: 1 0 auto; }
  .se-top .se-small { order: 4; display: flex; flex: 0 0 100%; gap: 8px; color: var(--muted); font-size: 12px; }
  .se-name { max-width: none; flex: 1 1 0; min-width: 0; }
  .se-pop { top: 100px; right: 8px; left: 8px; width: auto; }
}
.se a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.se .se-rev { padding: 0 8px; font-size: 12px; color: var(--muted); }
.se-pop.se-pop-rev { right: auto; width: 336px; }
.se .rev { padding: 8px 0; border-top: 1px solid var(--line); }
.se .rev:first-of-type { border-top: 0; padding-top: 0; }
.se .rev-line { display: flex; align-items: baseline; gap: 8px; }
.se .rev-n { width: 28px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.se .rev-what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se .rev.on .rev-what { color: var(--text); font-weight: 600; }
.se .rev-meta { margin-left: 36px; font-size: 12px; }

/* ---------------------------------------------------------------- beginner editor (docs/BEGINNER_DESIGN.md) */
/* steps in the top bar */
.se-steps { display: flex; gap: 4px; margin-left: 16px; }
.se-step { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border: 1px solid transparent; border-radius: 16px; background: transparent; color: var(--muted); cursor: pointer; }
.se-step:hover { color: var(--text); background: var(--raise); }
.se-step.on { color: var(--text); background: var(--accent-soft); border-color: var(--accent); }
.se-step-n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--raise); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.se-step.on .se-step-n { background: var(--grad); color: #fff; }
.se-step-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; display: none; }
.se-step-dot.new { display: block; background: #b6bccb; }
.se-step-dot.bad { display: block; background: var(--bad); }
.se .se-hints-btn.on { color: var(--text); background: var(--accent-soft); }

/* left: things */
.se-left > h2 { padding: 0 8px; }
.se-search { margin: 0 4px 12px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.se-search:focus { outline: none; border-color: var(--accent); }
.se-catalog { flex: none; }
.se-catalog h3 { margin: 4px 8px 4px; padding: 0; border: 0; font-size: 11px; }
.se-group { margin-bottom: 8px; }
.se-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-bottom: 4px; }
.se .tile { padding: 6px 0; min-width: 0; }
.se .tile span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; font-size: 11px; }
.se-more { margin: 4px 0 12px; }
.se-more > summary, .se-fold > summary { cursor: pointer; color: var(--muted); padding: 6px 8px; border-radius: 6px; list-style: none; user-select: none; }
.se-more > summary::-webkit-details-marker, .se-fold > summary::-webkit-details-marker { display: none; }
.se-more > summary::before, .se-fold > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform 0.15s; }
.se-more[open] > summary::before, .se-fold[open] > summary::before { transform: rotate(90deg); }
.se-more > summary:hover, .se-fold > summary:hover { color: var(--text); background: var(--raise); }
.se-none { padding: 8px; }
.se-in-scene { margin-top: 8px; }
.se-list { flex: 1 0 auto; }

/* right: fields shared by the steps */
.se .field { grid-template-columns: 72px minmax(0, 1fr); }
.se .note { margin-left: 80px; }
.se-fold { margin: 12px 0 0; border-top: 1px solid var(--line); padding-top: 8px; }
.se-fold > summary { margin: 0 -8px; font-weight: 600; font-size: 12px; }
.se-fold-body { padding-top: 12px; }
.se-fold .se-fold { margin-top: 4px; border-top: 0; }
.se .poses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; width: 100%; }
.se .pose { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--muted); cursor: pointer; font-size: 11px; }
.se .pose:hover { color: var(--text); }
.se .pose.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.se .fig svg { display: block; width: 28px; height: 28px; }
.se .dial { flex: none; width: 56px; height: 56px; color: var(--muted); cursor: grab; touch-action: none; border-radius: 50%; }
.se .dial:active { cursor: grabbing; }
.se .picker { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.se .pick { display: inline-flex; align-items: center; gap: 6px; height: 28px; max-width: 100%; padding: 0 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--muted); cursor: pointer; font-size: 12px; overflow: hidden; }
.se .pick span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se .pick:hover { color: var(--text); }
.se .pick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.se .seg button.on { color: var(--text); }

/* Camera: suggestion cards */
.se-sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.se .sug { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--raise); cursor: pointer; text-align: left; min-width: 0; }
.se .sug:hover:not(:disabled) { border-color: rgba(15, 23, 42, 0.22); }
.se .sug.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.se .sug.off { cursor: default; opacity: 0.55; }
.se .sug-pic { display: block; width: 100%; max-height: 160px; border-radius: 4px; background: #f2f3f9; overflow: hidden; }
.se .sug-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.se .sug-pic img[src=""] { visibility: hidden; }
.se .sug-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.se .sug-why { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* Camera: the start and end pictures under the big picture */
.se-pics { position: absolute; left: 0; right: 0; bottom: 0; height: 112px; z-index: 4; display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); }
.se-thumb { position: relative; flex: none; height: 96px; padding: 0; border: 2px solid var(--line); border-radius: 6px; background: #f2f3f9; cursor: pointer; overflow: hidden; }
.se-thumb:hover { border-color: rgba(15, 23, 42, 0.22); }
.se-thumb.on { border-color: var(--accent); }
.se-thumb img { display: block; height: 92px; width: auto; }
.se-thumb-label { position: absolute; left: 6px; top: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); font-size: 11px; font-weight: 600; }
.se-pic-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.se-pic-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.se-pic-state { font-size: 12px; color: var(--muted); text-align: center; }
.se-cam-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.9); color: var(--muted); font-size: 12px; pointer-events: none; white-space: nowrap; display: none; }
.se-views[data-step="shot"] .pane-camera.big .se-cam-hint { display: block; }
.se-views[data-step="shot"] .pane-camera.big.dragging .se-cam-hint { display: none; }

/* what to fix, over the picture */
.se-alert { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 6px 6px 6px 12px; border: 1px solid var(--bad); border-radius: 8px; background: rgba(22, 24, 28, 0.94); box-shadow: 0 8px 24px rgba(30, 27, 75, 0.14); }
.se-alert-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* an empty stage */
.se-stage-empty { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 32px; border-radius: 12px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); }
.se-stage-text { font-size: 15px; font-weight: 600; }
.se-stage-actions { display: flex; gap: 8px; }

/* Make: checks, buttons, takes, the player in the big pane */
.se-panel h2.se-checks { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.se .check-msg { color: var(--text); }
.se .check-do { display: flex; align-items: center; gap: 12px; margin: 4px 0 0 12px; }
.se .check-do .link { margin-left: 0; }
.se-all-good { margin-bottom: 8px; }
.se-make-actions { display: flex; flex-direction: column; gap: 8px; margin: 20px 0 8px; }
.se-make-actions .btn { height: 40px; font-size: 14px; }
.se-gen-row { display: flex; gap: 8px; }
.se-gen-row .btn { flex: 1; }
.se .se-make-note { margin: 0 0 8px; }
.se .se-frame { display: grid; gap: 6px; margin: 4px 0 10px; }
.se .se-frame h3 { margin: 0; }
.se .se-frame-img { width: 100%; border-radius: 8px; display: block; }
.se .se-frame .actions { display: flex; gap: 10px; align-items: center; }
.se-takes { display: flex; flex-direction: column; gap: 2px; }
.se-package { display: inline-block; margin-top: 8px; }
.se-make { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.se-make[hidden] { display: none; }
.se-make.empty { background: transparent; pointer-events: none; }
.se-make-empty { padding: 16px 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.se-player { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1100px; max-height: 100%; min-height: 0; }
.se-player video { width: 100%; min-height: 0; max-height: calc(100vh - 360px); background: #000; border-radius: 8px; object-fit: contain; }
.se-player .seg { align-self: flex-start; }
.se-dl { display: flex; align-items: center; gap: 16px; }

/* templates */
.se-templates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.se-template { display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--raise); cursor: pointer; text-align: left; }
.se-template:hover { border-color: var(--accent); }
.se-template-pic { display: block; aspect-ratio: 16 / 9; border-radius: 4px; background: #f2f3f9; overflow: hidden; }
.se-template-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.se-template-name { font-weight: 600; padding: 4px 2px 0; }
.se-template-text { color: var(--muted); font-size: 12px; padding: 0 2px; }

/* first-run hints */
.se-coach { position: absolute; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 8px; background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(30, 27, 75, 0.16); font-weight: 600; }
.se-coach .btn { background: rgba(15, 23, 42, 0.1); border-color: transparent; color: #fff; }
.se-coach .btn:hover:not(:disabled) { background: rgba(15, 23, 42, 0.22); border-color: transparent; }
.se-coach .btn.ghost { background: transparent; }
.se-coach-n { font-size: 11px; opacity: 0.8; font-variant-numeric: tabular-nums; }
.se-coach::before { content: ""; position: absolute; width: 10px; height: 10px; background: var(--accent); transform: rotate(45deg); }
.se-coach[data-side="right"]::before { left: -5px; top: calc(50% - 5px); }
.se-coach[data-side="below"]::before { top: -5px; left: 20px; }
.se-coach[data-side="inside"]::before { display: none; }

@media (max-width: 1280px) {
  .se-step { padding-right: 10px; }
  .se-steps { margin-left: 8px; }
  .se-templates { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .se[data-step="scene"] { grid-template-columns: 168px minmax(0, 1fr) 288px; }
  .se { grid-template-columns: 0 minmax(0, 1fr) 288px; }
  /* keep the words: step names stay, things keep their names in two columns */
  .se-step { gap: 6px; padding: 0 8px 0 4px; }
  .se-steps { gap: 2px; }
  .se .tile span:last-child { display: block; }
  .se-palette { grid-template-columns: repeat(2, 1fr); gap: 2px; margin-bottom: 4px; }
}
/* phone: one column (the editor says it is made for a computer screen); the steps stay, the hints do not */
@media (max-width: 760px) {
  .se, .se[data-step] { grid-template-columns: minmax(0, 1fr); }
  .se-coach, .se-top .se-hints-btn { display: none !important; }
  .se-top .se-steps { order: 3; margin-left: 0; }
  .se .pane.mini[data-corner] { width: 38%; height: auto; aspect-ratio: 4 / 3; }
  .se .pane.mini[data-corner="top"] { aspect-ratio: 16 / 9; }
  .se-alert-text { white-space: normal; }
}
.se[data-step="shot"] .se-toasts { bottom: 252px; }

/* Play mode (docs/PLAY_AND_TIME_DESIGN.md A): the HUD on the picture, one line of keys */
.se .pane-camera.playing, .se .pane-camera.playing.big { cursor: crosshair; }
.se .pane-camera.playing .se-cam-hint { display: none !important; }
.se-play-mode { position: absolute; left: 8px; top: 8px; z-index: 2; pointer-events: auto; background: rgba(255, 255, 255, 0.9); }
.se .pane.mini .se-play-mode { display: none; }
.se-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.se-hud-who { position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); font-weight: 600; }
.se-hud.rec .se-hud-who { color: #e11d48; }
.se-hud-keys { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); max-width: calc(100% - 16px); padding: 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.9); color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-hud-count { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 96px; font-weight: 700; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6); }

/* the timeline (B): ruler, playhead, one strip per layer, Record · Play · ½ Slow */
.se-tl { padding: 0 16px 8px; }
.se-tl-tracks { position: relative; user-select: none; -webkit-user-select: none; touch-action: none; cursor: pointer; }
.se-tl-ruler { position: relative; height: 18px; border-bottom: 1px solid var(--line); margin-left: 0; }
.se-tl-tick { position: absolute; top: 2px; transform: translateX(-1px); padding-left: 3px; border-left: 1px solid var(--line); font-size: 10px; line-height: 14px; color: var(--muted); }
.se-tl-rows { max-height: 116px; overflow-y: auto; overflow-x: hidden; }
.se-tl-row { position: relative; height: 22px; border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.se-tl-row.on .se-tl-name { color: var(--text); }
.se-tl-name { position: absolute; left: 0; top: 2px; width: 80px; height: 18px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.se-tl-strip { position: absolute; top: 8px; height: 6px; border-radius: 3px; background: var(--accent); cursor: grab; }
.se-tl-strip.fixed { background: rgba(15, 23, 42, 0.22); cursor: pointer; }
.se-tl-row[data-layer="camera"] .se-tl-strip { cursor: pointer; }
.se-tl-row.dragging .se-tl-strip { background: #4b8ef5; }
.se-tl-grip { position: absolute; top: 5px; width: 6px; height: 12px; border-radius: 2px; background: rgba(15, 23, 42, 0.22); cursor: ew-resize; }
.se-tl-grip:hover { background: var(--text); }
.se-tl-pt { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); cursor: ew-resize; }
.se-tl-pt:hover { background: var(--accent); }
.se-tl-words { position: absolute; top: 2px; padding: 0 6px; border-radius: 4px; background: var(--panel); font-size: 11px; line-height: 16px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.se-tl-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e11d48; pointer-events: none; }
.se-tl-head::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #e11d48; }
.se-tl-bar { display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.se-rec { display: inline-flex; align-items: center; gap: 6px; }
.se-rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.se-tl-play { width: 64px; }

/* ---------------------------------------------------------------- scenes, Media and the AI chat (docs/MEDIA_AND_SCENES_DESIGN.md) */
/* 1 Scene with the chat: the right 35 % is the chat; the selected thing's card docks above it */
.se[data-step="scene"][data-chat="1"] { grid-template-columns: 216px minmax(0, 1fr) 35%; }
.se[data-step="shot"][data-chat="1"] { grid-template-columns: 0 minmax(0, 1fr) 35%; }
.se-right .se-panel.docked { flex: 0 1 auto; max-height: 58%; border-bottom: 1px solid var(--line); }
.se-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 8px; }
.se-card-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-panel:not(.docked) .se-card-head { display: none; }
.se .btn.small { height: 28px; padding: 0 10px; font-size: 12px; }

/* the chat */
.se-chat { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 16px; }
.se-chat-head { flex: none; }
.se-chat-list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.se-chat-empty { margin: auto 0; text-align: center; }
.se-chat-line { max-width: 88%; padding: 8px 12px; border-radius: 12px; background: var(--raise); white-space: pre-wrap; overflow-wrap: anywhere; }
.se-chat-line.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid rgba(91, 76, 240, 0.4); }
.se-chat-line.ai { align-self: flex-start; }
.se-chat-line.system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; padding: 0; }
.se-chat-line.wait { color: var(--muted); letter-spacing: 0.2em; }
.se-chat-error { color: #e11d48; }
.se-chat-undo { margin-top: 8px; }
.se-chat-undone { margin-top: 4px; font-size: 12px; }
.se-chat-pics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.se-chat-pics img { height: 56px; border-radius: 4px; }
.se-chat-form { flex: none; display: flex; gap: 8px; align-items: flex-end; }
.se-chat-input { flex: 1; min-height: 40px; max-height: 160px; }
.se-chat-send { height: 40px; }

/* scenes before the shots in the bottom strip */
.se-scenes { flex: none; display: flex; align-items: stretch; gap: 4px; padding-right: 8px; margin-right: 4px; border-right: 1px solid var(--line); }
.se-scene { display: flex; align-items: center; gap: 4px; height: 100%; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.se-scene:hover { color: var(--text); }
.se-scene.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.se-scene.add { border-style: dashed; }
.se-scene .shot-rename { width: 110px; }
.se-bring-row { color: var(--muted); }
.se-bring-plus { width: 12px; text-align: center; }

/* 2 Media: left half = the scene picture and the list (stacked for 16:9 and 1:1, side by side for 9:16); right half = chat */
.se-media-pane { grid-area: media; display: none; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border-left: 1px solid var(--line); }
.se[data-step="media"] .se-media-pane { display: flex; }
.se[data-step="media"] { grid-template: "top top" 48px "views right" minmax(0, 1.1fr) "media right" minmax(0, 1fr) "bottom bottom" auto / minmax(0, 1fr) minmax(0, 1fr); }
.se[data-step="media"] .se-media-pane { border-left: 0; border-top: 1px solid var(--line); }
.se[data-step="media"][data-media-list="side"][data-chat="1"] { grid-template: "top top top" 48px "views media right" minmax(0, 1fr) "bottom bottom bottom" auto / minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.se[data-step="media"][data-media-list="side"][data-chat="1"] .se-media-pane { border-top: 0; border-left: 1px solid var(--line); }
.se[data-step="media"][data-chat="0"] { grid-template: "top top" 48px "views media" minmax(0, 1fr) "bottom bottom" auto / minmax(0, 1fr) minmax(0, 1fr); }
.se[data-step="media"][data-chat="0"] .se-right { display: none; }
.se[data-step="media"][data-chat="0"] .se-media-pane { border-top: 0; border-left: 1px solid var(--line); }
.se .pane-camera.drop { outline: 2px dashed var(--accent); outline-offset: -6px; }
.se-media-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 0; }
.se-media-head h2 { margin: 0; }
.se-media-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.se-media-count.bad { color: #e11d48; }
.se-media-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; }
.se-media-body h3:first-child { margin-top: 8px; border-top: 0; padding-top: 0; }
.se-media-none { padding: 0 0 8px; }
.se-media-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.se-media-row:hover { background: var(--raise); }
.se-media-row.on { border-color: var(--accent); background: var(--accent-soft); }
.se-media-thumb { flex: none; width: 32px; height: 32px; border-radius: 6px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.se-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.se-media-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-media-state { font-size: 12px; white-space: nowrap; }
.se-card { padding: 12px 8px 4px; }
.se-cast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin-bottom: 12px; }
.se-views-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-content: start; }
.se-views-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
.se-views-strip.place { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.se-views-strip.place .se-slot { aspect-ratio: 16 / 9; }
.se-views-strip.place .se-slot.big { grid-column: 1 / -1; }
.se-slot { position: relative; aspect-ratio: 3 / 4; border: 1px dashed rgba(15, 23, 42, 0.22); border-radius: 6px; background: var(--bg); overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.se-slot.has { border-style: solid; border-color: var(--line); }
.se-slot.big { aspect-ratio: auto; min-height: 100%; }
.se-slot:hover, .se-slot.drop { border-color: var(--accent); }
.se-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.se-slot-plus { color: var(--muted); font-size: 20px; }
.se-slot-label { position: absolute; left: 4px; bottom: 4px; padding: 0 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); font-size: 11px; line-height: 18px; }
.se-slot-ai { position: absolute; left: 4px; top: 4px; padding: 0 5px; border-radius: 4px; background: rgba(91, 76, 240, 0.85); color: #fff; font-size: 10px; line-height: 16px; }
.se-slot-send { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); cursor: pointer; }
.se-slot-send input { margin: 0; accent-color: var(--accent); cursor: pointer; }
.se-check { display: flex; align-items: center; gap: 8px; }
.se-real-size { max-width: 96px; }
.se-card-note { font-size: 12px; margin: 0 0 8px; }
.se-bring { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.se-variant-add { min-width: 32px; }
@media (max-width: 1100px) {
  .se[data-step="scene"][data-chat="1"] { grid-template-columns: 168px minmax(0, 1fr) 35%; }
}
@media (max-width: 760px) {
  .se[data-step], .se[data-step="media"], .se[data-step="media"][data-media-list], .se[data-step="media"][data-chat="0"] {
    grid-template: "top" auto "views" minmax(320px, 1fr) "media" auto "bottom" auto "left" auto "right" auto / minmax(0, 1fr); }
  .se-chat { min-height: 320px; }
}
.se-media { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.se-card { max-width: 480px; }
.se-media-pane { overflow: hidden; }
.se-slot.big .se-slot-plus { font-size: 13px; padding: 0 8px; text-align: center; }
.se-media-body { position: relative; }
/* "Aim at ▾" under the camera picture */
.se-aim-wrap { position: relative; }
.se-aim-pop { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; min-width: 180px; max-height: 260px; overflow-y: auto; padding: 4px; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(30, 27, 75, 0.18); }
.se-aim { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
/* the AI at work: plan and action cards, folded to "N steps ✓" when done */
.se-chat-steps { display: flex; flex-direction: column; gap: 4px; }
.se-chat-step { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-size: 12px; }
.se-chat-step.plan { flex-wrap: wrap; border: 0; background: transparent; padding: 0 0 2px; color: var(--muted); }
.se-chat-step.text { border: 0; background: transparent; padding: 0; color: var(--muted); }
.se-chat-step-title { flex: 1; min-width: 0; }
.se-chat-step-detail { flex: 0 0 100%; padding-left: 22px; font-size: 11px; }
.se-step-mark { flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-size: 10px; line-height: 1; }
.se-step-mark.done { background: rgba(5, 150, 105, 0.12); color: #059669; }
.se-step-mark.failed { background: rgba(229, 72, 77, 0.25); color: #e11d48; }
.se-step-mark.running { border: 2px solid var(--line); border-top-color: var(--accent); animation: se-spin 0.8s linear infinite; }
@keyframes se-spin { to { transform: rotate(360deg); } }
.se-chat-line.wait { letter-spacing: normal; min-width: 60%; }
.se-chat-fold { margin-bottom: 6px; }
.se-chat-fold > summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; }
.se-chat-fold > summary::-webkit-details-marker { display: none; }
.se-chat-fold[open] > summary { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .se-step-mark.running { animation: none; border-top-color: var(--line); } }

/* Custom things: the Parts fold of the card */
.se .se-parts { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.se .se-part { display: flex; align-items: center; border-radius: 6px; }
.se .se-part.on { background: var(--accent-soft); }
.se .se-part-pick { display: flex; align-items: center; gap: 8px; flex: 1; height: 28px; padding: 0 8px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.se .se-part:not(.on):hover { background: var(--raise); }
.se .swatches .swatch.same { outline: 1px dashed currentColor; outline-offset: 1px; }

/* AI at work: what it is doing and for how long (docs/THREE_METHODS_DESIGN.md section 2) */
.se-chat-now { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.se-chat-clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.se-chat-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: se-pulse 1s ease-in-out infinite; flex: none; }
@keyframes se-pulse { 50% { opacity: 0.35; transform: scale(0.75); } }
details.se-chat-step { display: block; }
details.se-chat-step > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
details.se-chat-step > summary::-webkit-details-marker { display: none; }
details.se-chat-step > summary::after { content: "›"; color: var(--muted); margin-left: auto; }
details.se-chat-step[open] > summary::after { content: "⌄"; }
details.se-chat-step > .se-chat-step-detail { display: block; padding: 4px 0 0 22px; color: var(--muted); white-space: pre-wrap; }
@media (prefers-reduced-motion: reduce) { .se-chat-pulse { animation: none; } }
.se-chat-step { flex-wrap: wrap; }
.se-chat-step > .se-chat-step-title { flex: 1 1 0; min-width: 0; }
.se .se-frame-busy { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.se .se-frame-busy .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: se-spin 0.8s linear infinite; flex: none; }
.se .se-frame-busy small { margin-left: auto; }
