/* 导演工作台 — dark studio theme. Class names are the app's; only the look lives here. */
:root {
  color-scheme: dark;
  --bg: #0a0c12; --bg2: #11141d; --bg3: #171b27;
  --panel: rgba(21, 25, 37, .72); --panel-solid: #151926; --raise: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .075); --line-strong: rgba(255, 255, 255, .14);
  --text: #e9ebf3; --muted: #9aa1b6; --faint: #646b82;
  --brand: #8f7dff; --brand-2: #3cd4ff; --brand-soft: rgba(143, 125, 255, .14); --brand-glow: rgba(143, 125, 255, .45);
  --grad: linear-gradient(135deg, #8f7dff 0%, #6a8bff 45%, #3cd4ff 100%);
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12);
  --warn: #f6b94e; --warn-soft: rgba(246, 185, 78, .12);
  --err: #ff5f76; --err-soft: rgba(255, 95, 118, .12);
  --radius: 14px; --agent-w: 380px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .03) inset;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font-size: 14px; min-height: 100vh; background:
  radial-gradient(1200px 600px at 8% -10%, rgba(143, 125, 255, .16), transparent 60%),
  radial-gradient(900px 500px at 100% 0%, rgba(60, 212, 255, .10), transparent 55%),
  radial-gradient(800px 600px at 50% 120%, rgba(143, 125, 255, .08), transparent 60%), var(--bg);
  background-attachment: fixed; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); }
main, header { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(143, 125, 255, .35); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.22); }
h1, h2, h3, h4 { letter-spacing: -.01em; }

/* icons */
.ic { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; line-height: 0; }
.ic svg { width: 100%; height: 100%; }
.ic.sm { width: 14px; height: 14px; }
.ic.xs { width: 12px; height: 12px; margin-left: 3px; opacity: .8; }

/* top bar */
.topbar { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 22px; position: sticky; top: 0; z-index: 20;
  background: rgba(10, 12, 18, .65); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; opacity: .5;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent); }
.brand { font-weight: 700; display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: .02em; }
/* brand + assistant marks: dark glass tile, gradient glyph, a slowly turning light rim */
.brand-mark { width: 28px; height: 28px; border-radius: 6px; overflow: hidden; flex: none; display: block;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.45); transition: box-shadow .25s, transform .25s var(--ease); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand:hover .brand-mark { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 8px 22px rgba(0,0,0,.55); }
.agent-avatar .tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; position: relative; flex: none;
  isolation: isolate; overflow: hidden; background: #12151f; box-shadow: 0 6px 22px rgba(106, 139, 255, .28); }
.agent-avatar .tile::before { content: ""; position: absolute; inset: -40%; z-index: -2;
  background: conic-gradient(from 0deg, transparent 0 55%, #8f7dff 70%, #3cd4ff 85%, transparent 100%); animation: spin 5s linear infinite; }
.agent-avatar .tile::after { content: ""; position: absolute; inset: 1.5px; border-radius: 8.5px; z-index: -1;
  background: radial-gradient(circle at 30% 20%, #232a40, #12151f 70%); }
.agent-avatar svg { width: 24px; height: 24px; filter: drop-shadow(0 0 6px rgba(143, 157, 255, .55)); }
.agent-avatar .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.8s ease-in-out infinite; }
.agent-avatar .spark2 { animation: twinkle 2.8s ease-in-out 1.4s infinite; transform-box: fill-box; transform-origin: center; }
.agent-avatar .star { transform-box: fill-box; transform-origin: center; animation: breathe 3.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.agent-avatar { position: relative; flex: none; }
.agent-avatar .online { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); border: 2px solid #12151f; box-shadow: 0 0 8px rgba(61, 220, 151, .7); animation: ping-ok 2s ease-out infinite; }
@keyframes ping-ok { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.55); } 100% { box-shadow: 0 0 0 7px rgba(61,220,151,0); } }
.brand-name { background: linear-gradient(90deg, #fff, #c9c3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes hue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); flex: 1; min-width: 0; font-size: 13px; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--faint); }
.topbar-right { display: flex; gap: 10px; align-items: center; }
.job-tray { font-size: 12px; color: #d9d3ff; background: var(--brand-soft); border: 1px solid rgba(143,125,255,.3); padding: 5px 12px 5px 22px;
  border-radius: 99px; position: relative; }
.job-tray::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--brand-2); box-shadow: 0 0 0 0 rgba(60,212,255,.6); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(60,212,255,.6); } 100% { box-shadow: 0 0 0 8px rgba(60,212,255,0); } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 15px; border-radius: 10px; position: relative; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--raise); cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 500;
  transition: border-color .2s, background .2s, transform .15s var(--ease), box-shadow .25s, color .2s; }
.btn:hover { border-color: rgba(143,125,255,.55); background: rgba(143,125,255,.10); color: #fff; }
.btn:active { transform: scale(.97); }
.btn.primary { border-color: transparent; color: #fff; background: var(--grad); background-size: 160% 160%;
  box-shadow: 0 6px 18px rgba(106, 139, 255, .32), 0 1px 0 rgba(255,255,255,.25) inset; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: left .6s var(--ease); }
.btn.primary:hover { color: #fff; box-shadow: 0 10px 28px rgba(106, 139, 255, .5), 0 1px 0 rgba(255,255,255,.3) inset; background-position: 100% 0; }
.btn.primary:hover::after { left: 130%; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raise); }
.btn.danger:hover { border-color: var(--err); color: var(--err); background: var(--err-soft); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 5px; border-radius: 8px; display: inline-grid; place-items: center;
  transition: background .2s, color .2s, transform .15s; }
.icon-btn:hover { background: var(--raise); color: var(--text); }
.icon-btn:active { transform: scale(.9); }
.icon-btn[title*="删除"]:hover { color: var(--err); background: var(--err-soft); }

/* form controls */
input[type=text], input[type=number], input[type=password], input:not([type]), textarea, select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 11px; background: rgba(0,0,0,.25); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, textarea:hover, select:hover { border-color: rgba(255,255,255,.22); }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), 0 0 22px rgba(143,125,255,.18); background: rgba(0,0,0,.35); }
select option { background: var(--panel-solid); color: var(--text); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
input[type=range] { accent-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
textarea.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; letter-spacing: .02em; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.small { font-size: 12px; }
audio { filter: invert(.88) hue-rotate(200deg) saturate(.6); border-radius: 99px; }

/* badges & chips */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 99px;
  background: var(--raise); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(61,220,151,.25); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(246,185,78,.25); }
.badge.err { background: var(--err-soft); color: var(--err); border-color: rgba(255,95,118,.25); }
.badge.brand { background: var(--brand-soft); color: #c3baff; border-color: rgba(143,125,255,.3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--raise);
  font-size: 12px; border: 1px solid var(--line); transition: border-color .2s, background .2s, transform .15s; }
.chip:hover { border-color: var(--line-strong); }
.chip img, .chip .dot { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--bg3); box-shadow: 0 0 0 1px var(--line-strong); }
.chip.selectable { cursor: pointer; }
.chip.selectable:active { transform: scale(.96); }
.chip.selected { border-color: var(--brand); background: var(--brand-soft); color: #d6d0ff; box-shadow: 0 0 14px rgba(143,125,255,.25); }

/* entrance motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.anim .page, .anim .work-body > * { animation: rise .45s var(--ease) both; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list, .style-grid) > * { animation: rise .5s var(--ease) both; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(2) { animation-delay: .04s; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(3) { animation-delay: .08s; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(4) { animation-delay: .12s; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(5) { animation-delay: .16s; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(6) { animation-delay: .20s; }
.anim :is(.project-grid, .folder-grid, .slot-grid, .seg-list) > :nth-child(n+7) { animation-delay: .24s; }

/* layout */
.page { max-width: 1280px; margin: 0 auto; padding: 30px 24px 70px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; margin: 0; font-weight: 700;
  background: linear-gradient(90deg, #fff 30%, #b9b0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.empty { text-align: center; color: var(--muted); padding: 70px 24px; line-height: 1.7; }
.empty .big { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 12px 36px var(--brand-glow); animation: float 4s ease-in-out infinite; }
.empty .big .ic { width: 30px; height: 30px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.project-card { overflow: hidden; cursor: pointer; position: relative; transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; }
.project-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 40px rgba(143,125,255,.15); }
.project-card:hover::before { opacity: 1; }
.project-cover { height: 158px; display: grid; place-items: center; font-size: 44px; font-weight: 700; color: rgba(255,255,255,.9); overflow: hidden; position: relative;
  background: radial-gradient(circle at 30% 20%, rgba(143,125,255,.55), transparent 60%), radial-gradient(circle at 80% 80%, rgba(60,212,255,.4), transparent 55%), var(--bg3); }
.project-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(10,12,18,.75)); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project-card:hover .project-cover img { transform: scale(1.06); }
.project-body { padding: 14px 16px 16px; }
.project-body h3 { margin: 0 0 6px; font-size: 16px; }
.steps-mini { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* project workspace */
.workspace { display: grid; grid-template-columns: 1fr; height: calc(100vh - 56px); }
.work-main { overflow: auto; min-width: 0; }
.stepbar { display: flex; align-items: center; gap: 4px; padding: 10px 22px; position: sticky; top: 0; z-index: 5;
  background: rgba(12, 14, 21, .7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 10px; color: var(--muted); cursor: pointer; position: relative;
  transition: color .2s, background .2s; white-space: nowrap; }
.step:hover { background: var(--raise); color: var(--text); }
.step.active { color: #fff; font-weight: 600; background: var(--brand-soft); }
.step.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -11px; height: 2px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 12px var(--brand-glow); }
.step .num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 11px; transition: all .25s; }
.step.active .num { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 0 14px var(--brand-glow); }
.step.done .num { background: var(--ok); border-color: var(--ok); color: #0a0c12; }
.step .num .ic { width: 12px; height: 12px; }
.step-arrow { color: var(--faint); }
.work-body { padding: 22px; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h2 { margin: 0 8px 0 0; font-size: 19px; }

/* agent panel */
.agent { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0;
  background: linear-gradient(180deg, rgba(20,23,35,.85), rgba(14,16,25,.9)); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.agent-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.agent-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.anim .msg { animation: rise .35s var(--ease) both; }
.msg.assistant { background: var(--raise); border: 1px solid var(--line); align-self: flex-start; border-top-left-radius: 4px; }
.msg.user { background: var(--grad); color: #fff; align-self: flex-end; border-top-right-radius: 4px; box-shadow: 0 6px 18px rgba(106,139,255,.25); }
.msg .stage-tag { font-size: 10px; opacity: .6; display: block; margin-bottom: 2px; }
.msg.thinking { color: var(--muted); font-style: italic; background: linear-gradient(90deg, var(--raise) 0%, rgba(143,125,255,.14) 50%, var(--raise) 100%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.agent-input { border-top: 1px solid var(--line); padding: 12px; }
.agent-input textarea { min-height: 62px; max-height: 180px; border-radius: 12px; }
.agent-bible { border-bottom: 1px solid var(--line); padding: 9px 16px; font-size: 12px; color: var(--muted); max-height: 140px; overflow: auto; }
.agent-bible summary { cursor: pointer; color: var(--text); }
.agent-bible ul { margin: 4px 0; padding-left: 16px; }

/* script */
.issues { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; background: var(--warn-soft); border: 1px solid rgba(246,185,78,.25); color: #f3d9a6; }
.issues.clean { background: var(--ok-soft); border-color: rgba(61,220,151,.25); color: var(--ok); }
.issues li { margin: 3px 0; }
.issues .err { color: var(--err); }
.script-layout { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
.ep-list { padding: 6px; max-height: calc(100vh - 260px); overflow: auto; position: sticky; top: 66px; }
.ep-item { padding: 9px 11px; border-radius: 10px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; transition: background .2s; position: relative; }
.ep-item:hover { background: var(--raise); }
.ep-item.active { background: var(--brand-soft); }
.ep-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.ep-item .n { font-weight: 700; color: #b5abff; min-width: 44px; font-variant-numeric: tabular-nums; }
.ep-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-detail { padding: 18px; }
.scene { border-left: 2px solid rgba(143,125,255,.35); padding: 4px 0 4px 14px; margin: 16px 0; }
.scene h4 { margin: 0 0 6px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.beat { padding: 3px 0; line-height: 1.7; }
.beat.action { color: var(--muted); }
.beat.action::before { content: "△ "; color: var(--faint); }
.beat .who { font-weight: 600; color: #b5abff; }
.beat .note { color: var(--faint); font-size: 12px; }
.beat.narration { color: #c4a8ff; font-style: italic; }
.upload-zone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 36px; text-align: center; background: var(--raise); transition: all .25s; }
.upload-zone:hover { border-color: rgba(143,125,255,.5); }
.upload-zone.drag { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 40px rgba(143,125,255,.2) inset; transform: scale(1.005); }
.raw-view { white-space: pre-wrap; font-size: 13px; line-height: 1.75; padding: 18px; max-height: 70vh; overflow: auto; }

/* assets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 15px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.tab:hover { color: var(--text); }
.tab.active { color: #fff; font-weight: 600; border-image: var(--grad) 1; border-bottom-width: 2px; border-bottom-style: solid; }
.checklist table { width: 100%; border-collapse: collapse; }
.checklist th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 9px; border-bottom: 1px solid var(--line); }
.checklist td { padding: 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.checklist tr { transition: background .2s; }
.checklist tr:hover td { background: rgba(255,255,255,.02); }
.checklist td textarea { min-height: 54px; font-size: 12px; }
.type-head { font-weight: 600; margin: 22px 0 10px; display: flex; gap: 8px; align-items: center; font-size: 15px; }
.type-head > .ic { color: var(--brand-2); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.slot { overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; }
.slot:hover { transform: translateY(-3px); border-color: rgba(143,125,255,.35); box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 30px rgba(143,125,255,.12); }
.slot-img { aspect-ratio: 3 / 4; display: grid; place-items: center; position: relative; cursor: pointer; overflow: hidden;
  background: linear-gradient(110deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%); background-size: 220% 100%; animation: shimmer 2.4s linear infinite; }
.slot-img:has(img) { animation: none; background: var(--bg2); }
.slot.scene .slot-img { aspect-ratio: 16 / 10; }
.slot.prop .slot-img { aspect-ratio: 1; }
.slot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; }
.anim .slot-img img { animation: fade .6s ease both; }
.slot:hover .slot-img img { transform: scale(1.05); }
.slot-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(10,12,18,.55)); }
.slot-img .placeholder { color: var(--faint); text-align: center; font-size: 12px; line-height: 1.7; }
.slot-img .ph-icon { width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 14px; display: grid; place-items: center; color: #b5abff;
  background: var(--brand-soft); border: 1px solid rgba(143,125,255,.25); }
.slot-img .ph-icon .ic { width: 24px; height: 24px; }
.slot-img .flag { position: absolute; top: 9px; left: 9px; display: flex; gap: 4px; z-index: 1; }
.slot-img .flag .badge { backdrop-filter: blur(8px); background: rgba(10,12,18,.6); }
.slot-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.slot-title { display: flex; align-items: center; gap: 6px; }
.slot-title b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.voice-row { background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 7px; }
.voice-row .row.small > .grow { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.voice-row audio { width: 100%; height: 30px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; animation: spin .9s linear infinite;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--brand) 60%, var(--brand-2)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); }
.spinner.sm { width: 14px; height: 14px; display: inline-block; vertical-align: middle;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.err-text { color: var(--err); font-size: 12px; }
.version-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.version-strip .v { width: 86px; flex: none; cursor: pointer; border: 2px solid transparent; border-radius: 10px; overflow: hidden; position: relative; transition: border-color .2s, transform .2s; }
.version-strip .v:hover { transform: translateY(-2px); }
.version-strip .v.current { border-color: var(--brand); box-shadow: 0 0 16px var(--brand-glow); }
.version-strip .v img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.version-strip .v span { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; background: rgba(0,0,0,.6); color: #fff; text-align: center; }

/* content */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.folder { padding: 16px; cursor: pointer; position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, border-color .3s; }
.folder::after { content: ""; position: absolute; width: 160px; height: 160px; right: -60px; top: -60px; border-radius: 50%; opacity: .0; transition: opacity .4s;
  background: radial-gradient(circle, rgba(143,125,255,.35), transparent 70%); }
.folder:hover { transform: translateY(-3px); border-color: rgba(143,125,255,.35); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.folder:hover::after { opacity: 1; }
.folder .ficon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #b5abff; background: var(--brand-soft); border: 1px solid rgba(143,125,255,.25); }
.folder .ficon.done { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px var(--brand-glow); }
.folder .ficon .ic { width: 20px; height: 20px; }
.folder h3 { margin: 12px 0 4px; font-size: 15px; }
.progress { height: 6px; background: rgba(255,255,255,.06); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; border-radius: 99px; position: relative; overflow: hidden; background: var(--grad);
  box-shadow: 0 0 12px var(--brand-glow); transition: width .8s var(--ease); }
.progress > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  background-size: 50% 100%; background-repeat: no-repeat; animation: shimmer 2s linear infinite; }
.seg-list { display: flex; flex-direction: column; gap: 14px; }
.seg { display: grid; grid-template-columns: 210px 1fr; gap: 16px; padding: 14px; transition: border-color .3s, box-shadow .3s; }
.seg:hover { border-color: var(--line-strong); }
.seg.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), 0 18px 40px rgba(0,0,0,.4); }
.seg-media { border-radius: 12px; overflow: hidden; background: #05060a; aspect-ratio: 9/16; max-height: 300px; display: grid; place-items: center;
  color: var(--faint); font-size: 12px; position: relative; box-shadow: 0 0 0 1px var(--line) inset; }
.seg-media.landscape { aspect-ratio: 16/9; }
.seg-media video, .seg-media img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.seg-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.seg-head b { font-size: 15px; }
.shots { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.shots td, .shots th { border-bottom: 1px solid var(--line); padding: 6px 7px; text-align: left; vertical-align: top; }
.shots th { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: .03em; }
.shots tr:hover td { background: rgba(255,255,255,.02); }
.frame-thumb { width: 120px; border-radius: 6px; cursor: zoom-in; display: block; margin-bottom: 4px; transition: transform .25s var(--ease); }
.frame-thumb:hover { transform: scale(1.04); }
.prompt-box { background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 12px; line-height: 1.65;
  white-space: pre-wrap; max-height: 120px; overflow: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: #c7cbe0; }
.preview-dock { position: sticky; bottom: 0; padding: 14px 22px; margin: 22px -22px -22px; z-index: 4; border-top: 1px solid var(--line);
  background: rgba(10, 12, 18, .82); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 -20px 40px rgba(0,0,0,.35); }
.preview-dock::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; opacity: .6;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent); }
.dock-head { margin-bottom: 10px; }
.preview-dock.min { padding-top: 9px; padding-bottom: 9px; }
.preview-dock.min .dock-grid { display: none; }
.preview-dock.min .dock-head { margin-bottom: 0; }
.dock-grid { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.dock-player { width: clamp(170px, 13vw, 250px); }
.dock-player.landscape { width: clamp(300px, 30vw, 560px); }
.dock-player video { display: block; width: 100%; border-radius: 12px; background: #000; max-height: 44vh; object-fit: contain;
  box-shadow: 0 0 0 1px var(--line-strong), 0 14px 36px rgba(0,0,0,.5); }

.timeline { display: flex; gap: 4px; height: clamp(60px, 9vh, 104px); margin-bottom: 10px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.timeline .clip { flex: 1; border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; background: var(--bg3); color: #ccd; font-size: 11px;
  border: 2px solid transparent; min-width: 40px; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.timeline .clip:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.timeline .clip { background-color: #000; background-repeat: repeat-x; background-size: auto 100%; background-position: left center; }
.timeline .clip::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); transition: background .2s; }
.timeline .clip span { z-index: 1; }
/* vertical films: a taller strip so each whole frame shows, not a crop of its middle */
.timeline.portrait { height: clamp(96px, 14vh, 150px); }
.timeline .clip:hover::after, .timeline .clip.active::after { background: transparent; }
.timeline .clip span { position: absolute; left: 4px; bottom: 3px; background: rgba(0,0,0,.6); padding: 0 6px; border-radius: 5px; color: #fff; font-variant-numeric: tabular-nums; }
.timeline .clip.active { border-color: var(--brand); box-shadow: 0 0 18px var(--brand-glow); }
.timeline .clip.stale { box-shadow: inset 0 -3px 0 var(--warn); }
.timeline .clip .flag { position: absolute; right: 4px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--err); box-shadow: 0 0 8px var(--err); }
.timeline .clip .flag.pending { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.timeline .clip.missing { background: linear-gradient(110deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%); background-size: 220% 100%; animation: shimmer 2.4s linear infinite; }
.clip-info { font-size: 12px; }

/* settings */
.provider { padding: 13px 15px; display: flex; gap: 12px; align-items: center; margin-bottom: 9px; transition: border-color .25s, transform .25s var(--ease); }
.provider:hover { border-color: var(--line-strong); transform: translateX(2px); }
.provider .meta { flex: 1; min-width: 0; }
.provider .meta div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* modal / toast */
.modal-mask { position: fixed; inset: 0; background: rgba(4, 5, 10, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .2s ease both; }
.modal { background: linear-gradient(180deg, #1a1e2c, #141824); border: 1px solid var(--line-strong); border-radius: 18px; width: min(640px, 100%);
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(143,125,255,.12);
  animation: pop .32s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal.wide { width: min(920px, 100%); }
.modal-head { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; flex: 1; }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: rgba(28, 32, 46, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; padding: 10px 18px 10px 16px;
  border-radius: 12px; font-size: 13px; max-width: 560px; border: 1px solid var(--line-strong); border-left: 3px solid var(--brand);
  box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: drop .4s var(--ease) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
.upload-card { min-width: 320px; max-width: 520px; border-left-color: var(--brand); }
.upload-card .row { gap: 10px; align-items: center; }
.upload-card .up-spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: upspin .8s linear infinite; flex: none; }
.upload-bar { height: 4px; margin-top: 8px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.upload-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }
@keyframes upspin { to { transform: rotate(360deg); } }
.toast.err { border-left-color: var(--err); background: rgba(52, 22, 30, .92); }
.toast.ok { border-left-color: var(--ok); background: rgba(18, 44, 36, .92); }

@media (max-width: 1000px) {
  .workspace { grid-template-columns: 1fr; height: auto; }
  .agent { height: 520px; border-left: 0; border-top: 1px solid var(--line); }
  .script-layout, .seg { grid-template-columns: 1fr; }
}

/* character looks */
.outfit-strip { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.outfit { width: 64px; flex: none; text-align: center; font-size: 11px; position: relative; }
.outfit .icon-btn { position: absolute; top: 2px; right: 2px; background: rgba(10,12,18,.7); padding: 3px; backdrop-filter: blur(6px); }
.outfit-img { width: 64px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--bg3); display: grid; place-items: center; flex: none;
  position: relative; box-shadow: 0 0 0 1px var(--line) inset; transition: transform .25s var(--ease); }
.outfit-img:hover { transform: translateY(-2px); }
.outfit-img img { width: 100%; height: 100%; object-fit: cover; }
.outfit-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.style-hint { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* character sheets */
.sheet-thumb { position: relative; width: 50%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--bg3); }
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.sheet-thumb:hover img { transform: scale(1.06); }
.sheet-thumb span { position: absolute; left: 4px; bottom: 3px; font-size: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 0 5px; border-radius: 4px; }
.sheet-badge { position: absolute; left: 2px; bottom: 2px; font-size: 9px; background: var(--grad); color: #fff; padding: 0 5px; border-radius: 4px; cursor: zoom-in; }

/* style picker */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.style-card { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; cursor: pointer; background: var(--raise); transition: all .25s var(--ease); }
.style-card:hover { border-color: rgba(143,125,255,.45); transform: translateY(-2px); }
.style-card.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft), 0 0 24px rgba(143,125,255,.2); }
.style-card .faint { margin-top: 4px; line-height: 1.5; }

/* references sent with a segment */
.ref-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 9px; }
.ref-strip .ref-title { margin-right: 2px; }
.ref-strip figure { margin: 0; width: 74px; cursor: zoom-in; }
.ref-strip img { width: 74px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-strong); display: block;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.ref-strip figure:hover img { transform: translateY(-2px) scale(1.04); border-color: var(--brand); box-shadow: 0 8px 20px rgba(0,0,0,.4), 0 0 14px var(--brand-glow); }
.ref-strip figcaption { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }

.warn-text { color: var(--warn); }

/* staging pictures in the segment editor */
.guide-box { margin: -4px 0 16px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(0,0,0,.2); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.guide { position: relative; display: flex; flex-direction: column; gap: 6px; }
.guide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line-strong);
  transition: transform .25s var(--ease), border-color .25s; }
.guide img:hover { transform: translateY(-2px); border-color: var(--brand); }
.guide .icon-btn { position: absolute; top: 5px; right: 5px; background: rgba(10,12,18,.7); backdrop-filter: blur(6px); }
.guide input { font-size: 12px; padding: 6px 9px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* @ mentions in the director's notes */
.mention-wrap { position: relative; }
.mention { position: absolute; left: 12px; top: 96px; z-index: 5; min-width: 280px; max-width: 420px; max-height: 340px; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: rgba(24, 28, 42, .97); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 30px rgba(143,125,255,.12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: pop .18s var(--ease) both; }
.mention-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.mention-item img, .mention-dot { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center;
  background: var(--bg3); color: var(--muted); }
.mention-item > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-item.active { background: var(--brand-soft); color: #fff; }
.mention-item:hover { background: var(--raise); }
.mention-group { font-size: 11px; color: var(--faint); padding: 8px 8px 4px; letter-spacing: .05em; position: sticky; top: -6px;
  background: rgba(24, 28, 42, .97); z-index: 1; }

/* what this segment sends */
.send-box { margin: -4px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.2); }
.send-box .ref-strip figure { position: relative; }
.ref-x { position: absolute; top: 2px; right: 2px; padding: 2px; background: rgba(10,12,18,.75); opacity: 0; transition: opacity .2s; }
.send-box figure:hover .ref-x { opacity: 1; }

/* sign in */
.login-page { position: relative; min-height: calc(100vh - 56px); overflow: hidden; display: grid; place-items: center; padding: 40px 24px;
  background: #0b0d14 var(--login-still, url("login-bg.jpg")) center / cover; }
/* the still (page background) shows at once; the film fades in over it once it can play through */
.login-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity .8s ease; }
.login-video.ready { opacity: 1; }
.login-wrap { position: relative; z-index: 1; width: min(1080px, 100%); display: grid; grid-template-columns: 1.15fr 400px; gap: 56px; align-items: center;
  animation: pop .5s var(--ease) both; }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.88); letter-spacing: .5px; }
.login-brand { font-size: 17px; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.login-brand img { height: 30px; width: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,.45)); }
.brand-sep { width: 1px; height: 16px; background: rgba(255,255,255,.35); margin: 0 2px; }
.brand-wordmark { height: 22px; width: auto; display: block; }
.login-intro h1 { margin: 22px 0 28px; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.25; font-weight: 700; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,.45), 0 6px 30px rgba(0,0,0,.55); }
.login-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login-steps li { display: flex; gap: 14px; align-items: center; color: rgba(255,255,255,.9); text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 4px 18px rgba(0,0,0,.5); }
.login-steps b { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: rgba(10,12,20,.58); border: 1px solid rgba(255,255,255,.22); }  /* no live blur over the moving film */
.login-steps strong { display: block; font-size: 15px; color: #fff; }
.login-steps span { font-size: 13px; color: rgba(255,255,255,.82); }
.login-card { padding: 32px 30px 26px; border-radius: 18px; background: rgba(16,18,28,.66); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 24px 70px rgba(0,0,0,.45); }  /* lighter blur: it is redone every frame of the film */
.login-card h2 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.login-sub { font-size: 13px; color: rgba(255,255,255,.62); margin-bottom: 22px; }
.login-field > span { display: block; font-size: 12px; color: rgba(255,255,255,.7); margin-bottom: 6px; }
.login-field { display: block; }
.login-field + .login-field { margin-top: 14px; }  /* login name, then password */
.login-input { position: relative; }
.login-input input { width: 100%; height: 44px; padding: 0 44px 0 14px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.16); color: #fff; }
.login-input input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow); outline: none; }
.login-eye { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
  color: rgba(255,255,255,.55); cursor: pointer; display: grid; place-items: center; }
.login-eye:hover, .login-eye.on { color: #fff; background: rgba(255,255,255,.08); }
.login-error { margin-top: 10px; font-size: 13px; color: #ff8a8a; }
.login-go { width: 100%; height: 44px; justify-content: center; margin-top: 16px; font-size: 15px; }
.login-help { margin-top: 16px; text-align: center; font-size: 13px; color: rgba(255,255,255,.6); }
.login-help a { color: #a9b8ff; margin-left: 4px; }
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; }
  .login-intro h1 { margin: 16px 0 18px; font-size: min(7vw, 30px); white-space: nowrap; }
  .login-steps { display: none; }
}

.my-provider { padding: 16px 18px; margin-bottom: 12px; max-width: 760px; }

.beat .who.editable { cursor: pointer; border-bottom: 1px dashed rgba(181,171,255,.5); }
.beat .who.editable:hover { color: #fff; border-bottom-color: #fff; }

/* where a project stands (project cards, and under the step bar inside a project) */
.progress-track { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.track-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.track-step { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--raise);
  border: 1px solid var(--line); color: var(--muted, #9aa0b8); }
.track-step b { font-weight: 600; color: #c9cde0; }
.track-step.done { border-color: rgba(52, 211, 153, .35); color: #8fe3c1; }
.track-step.done b { color: #b8f0d8; }
.track-step.now { border-color: var(--brand); background: var(--brand-soft); color: #d6d0ff; box-shadow: 0 0 12px rgba(143,125,255,.2); }
.track-step.now b { color: #fff; }
.track-arrow { color: var(--faint, #6b7088); }
.track-note { font-size: 12px; color: var(--faint, #8a8fa6); display: flex; align-items: center; gap: 6px; }
.track-note.running { color: #cfc8ff; }
.progress-track.compact { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; padding: 8px 12px;
  border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }

/* first-visit guide on the project list */
.guide-card { margin-bottom: 18px; padding: 18px 20px; background: linear-gradient(135deg, rgba(143,125,255,.12), rgba(60,212,255,.06)); }
.guide-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; }
.guide-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--brand-soft); color: #d6d0ff; border: 1px solid rgba(143,125,255,.4); }

/* Shot table: click-to-edit cells (the same storyboard as 编辑) */
.inline-edit { cursor: text; border-radius: 4px; padding: 0 2px; margin: 0 -2px; }
.inline-edit:hover { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.inline-edit.empty { color: var(--faint, #6b7280); font-style: italic; }
.inline-input { width: 100%; min-width: 80px; font: inherit; color: inherit; background: var(--bg2, #111827);
  border: 1px solid var(--brand, #8b7cf6); border-radius: 4px; padding: 2px 4px; box-sizing: border-box; }
textarea.inline-input { resize: vertical; }
.inline-edit.saving { opacity: .55; cursor: progress; }
/* a clicked button whose action is still running */
.btn.busy { pointer-events: none; cursor: progress; opacity: .8; }
.btn.busy::before { content: ''; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; display: inline-block;
  vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; animation: spin .9s linear infinite; }
/* the project bar: each step's counts, and what runs now or comes next */
.step .step-sub { font-size: 11px; color: var(--faint); margin-left: 2px; white-space: nowrap; }
.step.active .step-sub { color: inherit; opacity: .75; }
.step-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); max-width: 420px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.step-note.running { color: var(--brand); }
/* the scenes offered under a segment that has none */
.chip.scene-pick { cursor: pointer; border: 1px solid var(--line-strong); background: var(--bg2); }
.chip.scene-pick:hover { border-color: var(--brand); color: var(--text); }
.regen-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
/* the first screen while the data comes */
.skeleton .sk { background: linear-gradient(110deg, var(--bg2) 30%, var(--bg3) 50%, var(--bg2) 70%); background-size: 220% 100%;
  animation: shimmer 1.6s linear infinite; border-radius: 12px; }
.skeleton .sk-title { width: 220px; height: 26px; margin: 6px 0 20px; }
.skeleton .sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.skeleton .sk-card { height: 160px; }

#tourButton { position: fixed; left: 20px; bottom: 24px; z-index: 900; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 10px; border-radius: 999px; border: 1px solid rgba(169,184,255,.45); background: rgba(22,25,40,.92);
  color: #fff; font-size: 14px; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
#tourButton:hover { border-color: #a9b8ff; background: rgba(34,38,60,.96); }
#tourButton .tour-q { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, #7b6cff, #5aa9ff); }
#tourLayer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
#tourLayer .tour-dim { position: absolute; inset: 0; background: rgba(0,0,0,.62); pointer-events: auto; }
#tourLayer .tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.62), 0 0 0 3px #8f9bff, 0 0 24px 6px rgba(143,155,255,.55);
  transition: all .25s ease; }
#tourLayer .tour-card { position: fixed; width: 320px; padding: 16px 18px 14px; border-radius: 14px; pointer-events: auto;
  background: #1b1e2e; border: 1px solid rgba(169,184,255,.35); box-shadow: 0 18px 50px rgba(0,0,0,.55); color: #fff; }
#tourLayer .tour-card.center { left: 50%; top: 40%; transform: translate(-50%, -50%); }
#tourLayer .tour-count { font-size: 12px; color: #a9b8ff; margin-bottom: 6px; }
#tourLayer .tour-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
#tourLayer .tour-tip { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.82); }
#tourLayer .tour-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* 返回 EQUAI: the arrow alone on a narrow screen */
.back-equai { gap: 6px; }
@media (max-width: 640px) { .back-equai .back-label { display: none; } }
