:root {
  color-scheme: light;
  --bg: #f2f6fc;
  --panel: #fff;
  --input: #f6f8fc;
  --border: #cbd7e7;
  --text: #182a48;
  --muted: #4c607c;
  --primary: #2657d5;
  --focus: #285dd5;
  font: 16px/1.55 Inter, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body { margin: 0; min-height: 100dvh; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bar { display: flex; justify-content: space-between; align-items: center; min-height: 72px; padding: 12px clamp(16px, 5vw, 72px); border-bottom: 1px solid var(--border); background: #ffffffd9; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.logo, .media-icon { display: grid; place-items: center; border-radius: 12px; }
.logo { width: 38px; height: 38px; color: white; background: linear-gradient(145deg, #286be1, #3a48bb); }
.card { border: 1px solid var(--border); background: var(--panel); border-radius: 20px; box-shadow: 0 14px 42px #243f6710; min-width: 0; }
body:has(#auth:not([hidden])) .bar { position: absolute; z-index: 1; inset: 0 0 auto; background: transparent; border: 0; }
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); background: linear-gradient(135deg, #dbeafb, #f7fbff 74%); }
.auth-visual { min-height: 100%; background: url("login-visual.jpg") center / cover no-repeat, linear-gradient(155deg, #edf7ff, #b9d8ff); }
.auth-pane { display: grid; place-items: center; min-width: 0; padding: 96px clamp(20px, 4vw, 64px) 48px; }
.auth-card { width: min(100%, 436px); padding: clamp(24px, 3.4vw, 44px); border-color: #fff; background: #ffffffd9; backdrop-filter: blur(18px); }
.segment { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--input); }
.segment button { flex: 1; white-space: nowrap; }
button, input, select { font: inherit; }
button { min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; transition: background 160ms, border-color 160ms; }
button:hover { background: #e8effc; }
button[aria-pressed="true"] { background: #e2ebff; border-color: #adc1ec; color: #174399; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.primary { width: 100%; margin-top: 8px; font-weight: 750; background: var(--primary); color: white; }
.primary:hover:not(:disabled) { background: #1d49b9; }
.primary:disabled { background: var(--primary); }
.quiet { display: inline-flex; align-items: center; gap: 8px; border-color: var(--border); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 4vw, 2.2rem); letter-spacing: -.025em; line-height: 1.2; }
.auth-card h1 { margin-bottom: 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.muted { color: var(--muted); }
.small, .eyebrow { font-size: .875rem; }
form { display: grid; gap: 10px; }
.auth-card form { margin-top: 22px; }
label, legend, summary { font-weight: 600; }
input:not([type="checkbox"], [type="range"], [type="color"]), select {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--input); color: var(--text);
}
select {
  appearance: none; padding-right: 36px;
  background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 16px center / 5px 5px no-repeat,
              linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 11px center / 5px 5px no-repeat var(--input);
}
input::placeholder { color: var(--muted); }
input[type="range"], input[type="checkbox"], progress { accent-color: var(--primary); }
input[type="range"] { min-height: 44px; margin: 0; }
.workspace { max-width: 1380px; margin: auto; padding: clamp(16px, 4vw, 48px); }
.work-head, .card-head, .split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.work-head { flex-wrap: wrap; margin-bottom: 24px; }
.eyebrow { margin-bottom: 4px; color: var(--muted); letter-spacing: .12em; }
.work-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); }
.preview-card, .settings { padding: clamp(16px, 2.5vw, 24px); }
.card-head { margin-bottom: 16px; flex-wrap: wrap; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
.stage { display: grid; place-items: center; min-height: clamp(240px, 45vh, 510px); padding: 16px; border: 1px dashed #90a5c4; border-radius: 14px; background: repeating-conic-gradient(#e7edf7 0% 25%, #f4f7fc 0% 50%) 50% / 28px 28px; }
.stage.dragging { border-color: var(--focus); box-shadow: inset 0 0 0 2px var(--focus); }
.empty { text-align: center; display: grid; justify-items: center; gap: 8px; }
.media-icon { width: 56px; height: 56px; background: #dce8ff; color: #2452ab; margin-bottom: 6px; }
.media-icon svg { width: 28px; height: 28px; }
.stage :is(video, img) { max-width: 100%; max-height: 55vh; }
.asset-info { overflow-wrap: anywhere; margin-top: 14px; }
#queue-panel { margin-top: 20px; }
#queue { list-style: none; padding: 0; margin: 8px 0 0; }
#queue button { width: 100%; display: flex; justify-content: space-between; text-align: left; gap: 10px; }
#queue button span:first-child { overflow-wrap: anywhere; }
#queue button span:last-child { flex: none; color: var(--muted); }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pair label { font-size: .875rem; color: var(--muted); }
.pair input { margin-top: 4px; }
details { border-top: 1px solid var(--border); }
details > :not(summary) { margin-top: 8px; }
summary { cursor: pointer; padding: 10px 0; min-height: 44px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { margin: 0; }
progress { width: 100%; }
#downloads { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
#downloads a { display: block; padding: 10px 12px; overflow-wrap: anywhere; border: 1px solid var(--border); border-radius: 8px; color: #174399; }
@media (max-width: 760px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: clamp(200px, 34svh, 320px) 1fr; }
  .auth-visual { background-position: center 54%; }
  .auth-pane { padding: 16px 16px 36px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
