/* Pure front-end workbench demo. No services, media, or company environment required. */

.director-demo-entry {
  --entry-host: #ed7b69;
  --entry-cohost: #7c73e6;
  --entry-bgm: #42a1c9;
  --entry-sfx: #e7a444;
  position: relative;
  display: grid;
  width: min(100% - clamp(36px, 8vw, 120px), 1120px);
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: clamp(36px, 6vw, 84px);
  margin: clamp(48px, 6vw, 82px) auto 0;
  padding: clamp(34px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  background: #152e27;
  box-shadow: 0 26px 76px rgba(21, 46, 39, .22);
  color: #fff;
}

.director-demo-entry::after {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(94, 218, 168, .2);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(94, 218, 168, .035), 0 0 0 88px rgba(94, 218, 168, .025);
  content: "";
  pointer-events: none;
}

.director-demo-entry + .report-section { border-top: 0; }
.director-demo-entry__copy { position: relative; z-index: 1; }

.director-demo-entry__copy > p:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: #6dd5ae;
  font: 750 10px/1 var(--mono);
  letter-spacing: .16em;
}

.director-demo-entry__copy > p:first-child::before { width: 26px; height: 1px; background: currentColor; content: ""; }
.director-demo-entry__copy > p:first-child span { padding: 6px 8px; border: 1px solid rgba(109, 213, 174, .35); border-radius: 99px; letter-spacing: .04em; }
.director-demo-entry__copy h2 { max-width: 520px; margin: 0; color: #fff; font: 720 clamp(28px, 3.6vw, 46px)/1.08 var(--display); letter-spacing: -.045em; }
.director-demo-entry__copy > p:nth-of-type(2) { max-width: 610px; margin: 22px 0 28px; color: rgba(255, 255, 255, .66); font-size: 13px; line-height: 1.75; }
.director-demo-entry__copy > a { display: inline-flex; align-items: center; gap: 44px; padding: 13px 17px; border: 1px solid #fff; border-radius: 8px; background: #fff; color: #18352d; font-size: 13px; font-weight: 750; transition: gap .2s ease, background .2s ease, color .2s ease; }
.director-demo-entry__copy > a:hover { gap: 52px; background: transparent; color: #fff; }

.director-demo-entry__score { position: relative; z-index: 1; display: grid; align-content: center; gap: 13px; min-width: 0; }
.director-demo-entry__score::before { margin: 0 0 8px; color: rgba(255, 255, 255, .42); content: "MULTITRACK SCORE / 00:58"; font: 700 9px/1 var(--mono); letter-spacing: .14em; }
.director-demo-entry .entry-track { position: relative; display: block; height: 42px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; background: linear-gradient(90deg, transparent 24.8%, rgba(255, 255, 255, .06) 25%, transparent 25.2%, transparent 49.8%, rgba(255, 255, 255, .06) 50%, transparent 50.2%, transparent 74.8%, rgba(255, 255, 255, .06) 75%, transparent 75.2%), rgba(255, 255, 255, .035); }
.director-demo-entry .entry-track::before { position: absolute; top: 5px; left: 7px; z-index: 1; color: rgba(255, 255, 255, .68); font: 700 8px/1 var(--mono); letter-spacing: .08em; }
.director-demo-entry .entry-track i { position: absolute; bottom: 6px; height: 18px; border-radius: 3px; opacity: .92; }
.director-demo-entry .entry-host::before { content: "HOST"; }
.director-demo-entry .entry-cohost::before { content: "CO-HOST"; }
.director-demo-entry .entry-bgm::before { content: "BGM"; }
.director-demo-entry .entry-sfx::before { content: "SFX"; }
.director-demo-entry .entry-host i { background: var(--entry-host); }
.director-demo-entry .entry-host i:nth-child(1) { left: 14%; width: 18%; }
.director-demo-entry .entry-host i:nth-child(2) { left: 38%; width: 23%; }
.director-demo-entry .entry-host i:nth-child(3) { left: 68%; width: 24%; }
.director-demo-entry .entry-cohost i { background: var(--entry-cohost); }
.director-demo-entry .entry-cohost i:nth-child(1) { left: 32%; width: 13%; }
.director-demo-entry .entry-cohost i:nth-child(2) { left: 72%; width: 15%; }
.director-demo-entry .entry-bgm i { left: 7%; width: 88%; background: var(--entry-bgm); opacity: .58; }
.director-demo-entry .entry-sfx i { width: 4%; background: var(--entry-sfx); }
.director-demo-entry .entry-sfx i:nth-child(1) { left: 24%; }
.director-demo-entry .entry-sfx i:nth-child(2) { left: 82%; }

body[data-route="director-demo"] { background: #f3f7f5; }
body[data-route="director-demo"] .site-shell { display: block; }
body[data-route="director-demo"] .site-rail { display: none; }
body[data-route="director-demo"] #main-content { width: 100%; max-width: none; }

.director-demo-view {
  --demo-fog: #f3f7f5;
  --demo-paper: #fff;
  --demo-ink: #18352d;
  --demo-muted: #718079;
  --demo-line: #dbe5e1;
  --demo-line-strong: #c6d4cf;
  --demo-mint: #2d9c72;
  --demo-mint-pale: #e9f6f1;
  --demo-host: #ed7b69;
  --demo-host-pale: #fde5e0;
  --demo-cohost: #7c73e6;
  --demo-cohost-pale: #e9e7fb;
  --demo-bgm: #42a1c9;
  --demo-bgm-pale: #dff2f9;
  --demo-sfx: #e7a444;
  --demo-sfx-pale: #fcedd3;
  width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  background: linear-gradient(90deg, rgba(24, 53, 45, .025) 1px, transparent 1px) 0 0 / 76px 76px, var(--demo-fog);
  color: var(--demo-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

.director-demo-view [hidden] { display: none !important; }
.director-demo-view *, .director-demo-view *::before, .director-demo-view *::after { box-sizing: border-box; }
.director-demo-view button, .director-demo-view textarea, .director-demo-view select, .director-demo-view input { color: inherit; font: inherit; }
.director-demo-view button { cursor: pointer; }
.director-demo-view button:disabled { cursor: not-allowed; opacity: .42; }
.director-demo-view button:focus-visible, .director-demo-view a:focus-visible, .director-demo-view textarea:focus-visible, .director-demo-view select:focus-visible, .director-demo-view input:focus-visible { outline: 3px solid rgba(45, 156, 114, .3); outline-offset: 2px; }

.demo-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--demo-line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}

.demo-topbar a { color: var(--demo-ink); font-size: 12px; font-weight: 700; }
.demo-topbar > div { display: flex; gap: 8px; }
.demo-topbar > div span { padding: 4px 8px; border: 1px solid var(--demo-line); border-radius: 4px; color: var(--demo-muted); font: 700 9px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; }
.demo-topbar > div span:first-child { border-color: rgba(45, 156, 114, .35); background: var(--demo-mint-pale); color: var(--demo-mint); }

.demo-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 1560px;
  margin: 18px auto 0;
  padding: 11px 15px;
  border: 1px solid #d8e1de;
  border-left: 3px solid var(--demo-mint);
  border-radius: 7px;
  background: rgba(255, 255, 255, .76);
  color: var(--demo-muted);
  font-size: 12px;
}

.demo-disclaimer b { flex: 0 0 auto; color: var(--demo-ink); }
.demo-workbench { width: min(100% - clamp(24px, 4vw, 68px), 1560px); margin: 14px auto 56px; }

.demo-commandbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--demo-line);
  border-radius: 9px;
  background: var(--demo-paper);
  box-shadow: 0 5px 16px rgba(24, 53, 45, .035);
}

.demo-commandbar__title > span, .demo-panel__head > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--demo-muted);
  font: 750 9px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .14em;
}

.demo-commandbar__title h1 { margin: 0; font: 750 clamp(23px, 2.4vw, 32px)/1.15 "Avenir Next", "PingFang SC", sans-serif; letter-spacing: -.035em; }
.demo-commandbar__title p { margin: 7px 0 0; color: var(--demo-muted); font-size: 12px; }
.demo-commandbar__title p b { color: var(--demo-mint); font-weight: 700; }
.demo-commandbar__actions { display: flex; align-items: stretch; gap: 10px; }

.demo-save-state, .demo-button {
  min-height: 50px;
  padding: 9px 14px;
  border: 1px solid var(--demo-line-strong);
  border-radius: 8px;
  background: #fff;
}

.demo-save-state { display: grid; min-width: 134px; align-content: center; }
.demo-save-state b { font-size: 12px; }
.demo-save-state span { color: var(--demo-muted); font: 11px/1.4 "SFMono-Regular", Consolas, monospace; }
.demo-button { font-size: 12px; font-weight: 720; }
.demo-button--quiet:hover, .demo-button--quiet[aria-expanded="true"] { border-color: var(--demo-mint); background: var(--demo-mint-pale); }
.demo-button--accent { display: inline-flex; align-items: center; gap: 9px; border-color: #207d5c; background: var(--demo-mint); color: #fff; }

.demo-project-menu-wrap { position: relative; }
.demo-project-menu-wrap > .demo-button { min-width: 98px; height: 100%; }
.demo-project-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  padding: 7px;
  border: 1px solid var(--demo-line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(24, 53, 45, .14);
}

.demo-project-menu button { display: flex; width: 100%; gap: 10px; padding: 12px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: 12px; }
.demo-project-menu button:hover { background: var(--demo-fog); }
.demo-project-menu button span { color: var(--demo-muted); }

.demo-stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 14px; margin-top: 14px; align-items: stretch; }
.demo-panel { min-width: 0; border: 1px solid var(--demo-line); border-radius: 9px; background: var(--demo-paper); }
.demo-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 18px 14px; border-bottom: 1px solid var(--demo-line); }
.demo-panel__head h2 { margin: 0; font: 740 19px/1.2 "Avenir Next", "PingFang SC", sans-serif; letter-spacing: -.02em; }
.demo-panel__head em { color: var(--demo-muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .11em; }

.demo-switch { display: grid; grid-template-columns: 36px auto; gap: 0 9px; align-items: center; cursor: pointer; }
.demo-switch input { position: absolute; opacity: 0; pointer-events: none; }
.demo-switch > span { position: relative; grid-row: 1 / 3; width: 36px; height: 20px; border-radius: 99px; background: var(--demo-line-strong); transition: background .2s ease; }
.demo-switch > span::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; content: ""; transition: transform .2s ease; }
.demo-switch input:checked + span { background: var(--demo-cohost); }
.demo-switch input:checked + span::after { transform: translateX(16px); }
.demo-switch b { font-size: 11px; }
.demo-switch small { color: var(--demo-muted); font-size: 9px; }

.demo-pipeline { display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr; align-items: stretch; gap: 7px; padding: 14px 18px; }
.demo-pipeline > span { align-self: center; color: var(--demo-line-strong); text-align: center; }
.demo-pipeline button, .demo-pipeline > div { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 5px; min-height: 60px; align-content: center; padding: 10px 12px; border: 1px solid var(--demo-line); border-radius: 7px; background: #fff; text-align: left; }
.demo-pipeline button:hover, .demo-pipeline button[aria-expanded="true"] { border-color: var(--demo-mint); background: var(--demo-mint-pale); }
.demo-pipeline button span, .demo-pipeline > div span { grid-column: 1 / -1; color: var(--demo-muted); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; }
.demo-pipeline b { font-size: 12px; }
.demo-pipeline i { color: var(--demo-mint); font-style: normal; }
.demo-pipeline small { color: var(--demo-mint); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; }
.demo-stage-output { margin: 0 18px 14px; padding: 11px 13px; border: 1px dashed var(--demo-line-strong); border-radius: 7px; background: var(--demo-fog); }
.demo-stage-output > span { color: var(--demo-mint); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; }
.demo-stage-output p { margin: 6px 0 0; color: var(--demo-muted); font-size: 11px; line-height: 1.7; }
.demo-stage-output p b { color: var(--demo-ink); }

.demo-script-compare { display: grid; grid-template-columns: minmax(260px, .82fr) minmax(340px, 1.18fr); gap: 12px; padding: 0 18px 18px; }
.demo-script-source { display: flex; min-height: 310px; flex-direction: column; gap: 4px; padding: 13px; border: 1px solid var(--demo-line); border-radius: 8px; }
.demo-script-source > span { font-size: 12px; font-weight: 720; }
.demo-script-source > small { color: var(--demo-muted); font-size: 9px; }
.demo-script-source textarea { width: 100%; min-height: 0; flex: 1; margin-top: 8px; resize: none; border: 0; background: transparent; color: #42534d; font-size: 11px; line-height: 1.75; outline: 0; }
.demo-score-preview { min-height: 310px; overflow: hidden; border: 1px solid var(--demo-line); border-radius: 8px; background: var(--demo-fog); }
.demo-score-preview__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--demo-line); background: #fff; }
.demo-score-preview__head span { color: var(--demo-muted); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; }
.demo-score-preview__head h3 { margin: 3px 0 0; font-size: 13px; }
.demo-score-preview__head p { margin: 0; color: var(--demo-muted); font-size: 10px; }
.demo-score-preview__head p b { color: var(--demo-ink); }
.demo-score-list { display: grid; max-height: 260px; gap: 5px; overflow: auto; padding: 8px; }
.demo-beat { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 8px; border: 1px solid transparent; border-radius: 6px; background: #fff; text-align: left; }
.demo-beat:hover, .demo-beat[aria-pressed="true"] { border-color: var(--demo-host); box-shadow: 0 0 0 2px rgba(237, 123, 105, .1); }
.demo-beat--cohost:hover, .demo-beat--cohost[aria-pressed="true"] { border-color: var(--demo-cohost); box-shadow: 0 0 0 2px rgba(124, 115, 230, .1); }
.demo-beat__marker { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 5px; background: var(--demo-host-pale); color: var(--demo-host); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; }
.demo-beat--cohost .demo-beat__marker { background: var(--demo-cohost-pale); color: var(--demo-cohost); }
.demo-beat__body { min-width: 0; }
.demo-beat__meta { display: flex; align-items: center; gap: 6px; }
.demo-beat__meta b { color: var(--demo-host); font-size: 8px; }
.demo-beat--cohost .demo-beat__meta b { color: var(--demo-cohost); }
.demo-beat__meta i { color: var(--demo-muted); font: 700 7px/1 "SFMono-Regular", Consolas, monospace; }
.demo-beat__body > strong { display: block; margin: 2px 0; font-size: 10px; }
.demo-beat__body > small { display: -webkit-box; overflow: hidden; color: var(--demo-muted); font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.demo-casting-panel { padding-bottom: 14px; }
.demo-voice-card { margin: 14px 14px 0; padding: 13px; border: 1px solid var(--demo-line-strong); border-top: 4px solid var(--demo-host); border-radius: 8px; }
.demo-voice-card--cohost { border-top-color: var(--demo-cohost); }
.demo-voice-card__head { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; }
.demo-role-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--demo-host-pale); color: var(--demo-host); font-size: 12px; font-weight: 780; }
.demo-voice-card--cohost .demo-role-mark { background: var(--demo-cohost-pale); color: var(--demo-cohost); }
.demo-voice-card__head h3 { margin: 0; font-size: 12px; }
.demo-voice-card__head p { margin: 2px 0 0; color: var(--demo-muted); font-size: 9px; line-height: 1.4; }
.demo-voice-card__head button { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--demo-line-strong); border-radius: 6px; background: #fff; font-size: 9px; font-weight: 700; }
.demo-voice-card__head button:hover { border-color: var(--demo-mint); }
.demo-voice-select { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; margin-top: 11px; border: 1px solid var(--demo-line); border-radius: 6px; overflow: hidden; }
.demo-voice-select > span { padding: 8px; color: var(--demo-muted); font-size: 9px; font-weight: 700; }
.demo-voice-select select { min-width: 0; padding: 8px 26px 8px 7px; border: 0; background: #fff; font-size: 10px; font-weight: 700; outline: 0; }
.demo-waveform { display: flex; height: 48px; align-items: center; gap: 3px; margin-top: 9px; }
.demo-waveform i { width: 100%; height: 22%; border-radius: 1px; background: var(--demo-host); opacity: .52; }
.demo-waveform i:nth-child(3n + 1) { height: 72%; }
.demo-waveform i:nth-child(4n + 2) { height: 45%; }
.demo-waveform i:nth-child(5n) { height: 88%; }
.demo-voice-card--cohost .demo-waveform i { background: var(--demo-cohost); }
.demo-voice-file { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--demo-muted); }
.demo-voice-file code { overflow: hidden; font: 8px/1.4 "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.demo-voice-file b { flex: 0 0 auto; color: var(--demo-host); font-size: 8px; }
.demo-voice-card--cohost .demo-voice-file b { color: var(--demo-cohost); }
.demo-casting-note { display: flex; gap: 10px; margin: 14px; padding: 11px; border: 1px dashed #aad0c0; border-radius: 7px; background: #fbfefd; }
.demo-casting-note > span { color: var(--demo-mint); }
.demo-casting-note b { font-size: 10px; }
.demo-casting-note p { margin: 3px 0 0; color: var(--demo-muted); font-size: 9px; line-height: 1.5; }
.demo-generation-progress { margin: 0 14px; padding: 11px; border: 1px solid var(--demo-line-strong); border-radius: 7px; }
.demo-generation-progress > div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.demo-generation-progress > div span { color: var(--demo-muted); }
.demo-generation-progress > i { display: block; height: 6px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: var(--demo-line); }
.demo-generation-progress > i > b { display: block; width: 100%; height: 100%; background: var(--demo-mint); }

.demo-score-panel { margin-top: 14px; }
.demo-score-panel__head { padding: 16px 18px; }
.demo-add-track { display: flex; gap: 7px; }
.demo-add-track select, .demo-add-track button { min-height: 34px; padding: 0 10px; border: 1px solid var(--demo-line-strong); border-radius: 6px; background: #fff; font-size: 10px; font-weight: 700; }
.demo-add-track button { border-color: #9ec9b7; background: var(--demo-mint-pale); color: var(--demo-mint); }

.demo-transport { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px; padding: 9px 10px; border: 1px solid var(--demo-line); border-radius: 7px; background: #fbfdfc; }
.demo-transport > div:first-child { display: flex; align-items: center; gap: 7px; }
.demo-transport > div:first-child > button:first-child { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: var(--demo-ink); color: #fff; }
.demo-transport > div:first-child > button:first-child.is-active { background: var(--demo-mint); }
.demo-transport output { min-width: 76px; padding: 7px 9px; border-radius: 4px; background: var(--demo-ink); color: #fff; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; }
.demo-transport > div:first-child > button:last-child { min-height: 32px; padding: 0 9px; border: 1px solid #9ec9b7; border-radius: 5px; background: #fff; color: var(--demo-mint); font-size: 9px; font-weight: 700; }
.demo-transport > div:first-child > button:last-child.is-active { background: var(--demo-mint-pale); }
.demo-score-actions { display: flex; align-items: center; gap: 7px; }
.demo-score-actions > button, .demo-score-actions label { min-height: 32px; border: 1px solid var(--demo-line-strong); border-radius: 5px; background: #fff; }
.demo-score-actions > button { padding: 0 10px; font-size: 9px; font-weight: 700; }
.demo-score-actions label { display: flex; align-items: center; gap: 7px; padding: 0 7px; }
.demo-score-actions label button { width: 24px; height: 24px; border: 1px solid var(--demo-line); border-radius: 4px; background: #fff; }
.demo-score-actions label input { width: 120px; accent-color: var(--demo-mint); }
.demo-score-actions label output { min-width: auto; padding: 0; background: transparent; color: var(--demo-mint); font-size: 8px; }
.demo-score-actions .demo-button--dark { border-color: var(--demo-ink); background: var(--demo-ink); color: #fff; }
.demo-score-actions [data-demo-preview-mix] { border-color: #9ec9b7; color: var(--demo-mint); }

.demo-minimap { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0 12px 10px; padding: 9px 10px; border: 1px solid var(--demo-line); border-radius: 7px; background: var(--demo-fog); }
.demo-minimap > b, .demo-minimap > small { color: var(--demo-muted); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .09em; }
.demo-minimap > div { position: relative; display: grid; height: 36px; gap: 2px; padding: 3px 0; overflow: hidden; }
.demo-mini-lane { position: relative; display: block; min-height: 4px; }
.demo-mini-lane i { position: absolute; left: var(--mini-left); width: max(var(--mini-width), 4px); height: 100%; border-radius: 2px; background: var(--demo-host); }
.demo-mini-lane--cohost i { background: var(--demo-cohost); }
.demo-mini-lane--bgm i { background: var(--demo-bgm); }
.demo-mini-lane--sfx i { background: var(--demo-sfx); }
.demo-mini-window { position: absolute; inset: 1px auto 1px 5%; width: 34%; border: 2px solid var(--demo-mint); border-radius: 4px; pointer-events: none; }

.demo-score-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 600px; border-top: 1px solid var(--demo-line); }
.demo-timeline-scroll { min-width: 0; overflow: auto; background: #fbfdfc; scrollbar-color: #b7c9c2 transparent; }
.demo-timeline-ruler { position: sticky; z-index: 16; top: 0; display: grid; width: max-content; min-width: 100%; grid-template-columns: 264px repeat(5, calc(152px * var(--demo-timeline-scale, 2.5))); height: 42px; border-bottom: 1px solid var(--demo-line); background: #eef4f1; }
.demo-timeline-ruler span { position: sticky; z-index: 3; left: 0; display: flex; align-items: center; padding: 0 14px; border-right: 1px solid var(--demo-line-strong); background: #eef4f1; color: var(--demo-muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .11em; }
.demo-timeline-ruler i { padding: 14px 8px; border-right: 1px solid var(--demo-line); color: var(--demo-muted); font: 8px/1 "SFMono-Regular", Consolas, monospace; }
.demo-timeline { --demo-timeline-scale: 2.5; width: max-content; min-width: 100%; }
.demo-track { display: grid; width: max-content; min-width: 100%; grid-template-columns: 264px calc(760px * var(--demo-timeline-scale)); min-height: 110px; border-bottom: 1px solid var(--demo-line); }
.demo-track__controls { position: sticky; z-index: var(--demo-control-layer, 12); left: 0; padding: 11px 12px; border-right: 1px solid var(--demo-line-strong); background: #fff; }
.demo-track__identity { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; }
.demo-track__identity > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: var(--demo-host-pale); color: var(--demo-host); font-size: 17px; }
.demo-track--cohost .demo-track__identity > span { background: var(--demo-cohost-pale); color: var(--demo-cohost); }
.demo-track--bgm .demo-track__identity > span { background: var(--demo-bgm-pale); color: var(--demo-bgm); }
.demo-track--sfx .demo-track__identity > span { background: var(--demo-sfx-pale); color: var(--demo-sfx); }
.demo-track__identity b { display: block; font-size: 11px; }
.demo-track__identity small { display: block; overflow: hidden; margin-top: 2px; color: var(--demo-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.demo-track__mix { display: grid; grid-template-columns: 26px 26px minmax(70px, 1fr) 34px; gap: 5px; align-items: center; margin-top: 9px; }
.demo-track__mix button { height: 26px; border: 1px solid var(--demo-line); border-radius: 5px; background: #fff; color: var(--demo-muted); font-size: 9px; font-weight: 700; }
.demo-track__mix button.is-active { border-color: currentColor; background: var(--demo-host-pale); color: var(--demo-host); }
.demo-track__mix input { width: 100%; accent-color: var(--demo-host); }
.demo-track--cohost .demo-track__mix input { accent-color: var(--demo-cohost); }
.demo-track--bgm .demo-track__mix input { accent-color: var(--demo-bgm); }
.demo-track--sfx .demo-track__mix input { accent-color: var(--demo-sfx); }
.demo-track__mix output { color: var(--demo-host); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; text-align: right; }
.demo-track--cohost .demo-track__mix output { color: var(--demo-cohost); }
.demo-track--bgm .demo-track__mix output { color: var(--demo-bgm); }
.demo-track--sfx .demo-track__mix output { color: var(--demo-sfx); }
.demo-track__settings { margin-top: 7px; padding: 0; border: 0; background: transparent; color: var(--demo-muted); font-size: 8px; font-weight: 700; }
.demo-track-popover { position: absolute; z-index: 30; top: 87px; left: 12px; width: 238px; padding: 10px; border: 1px solid var(--demo-line-strong); border-radius: 7px; background: #fff; box-shadow: 0 12px 28px rgba(24, 53, 45, .14); }
.demo-track-popover__speed { display: grid; grid-template-columns: 34px 1fr 38px; gap: 7px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--demo-line); color: var(--demo-muted); font-size: 9px; }
.demo-track-popover__speed input { width: 100%; accent-color: var(--demo-host); }
.demo-track-popover__speed output { color: var(--demo-host); font: 700 8px/1 "SFMono-Regular", Consolas, monospace; }
.demo-track-popover > button { margin-top: 9px; padding: 7px 9px; border: 1px solid #efc1bb; border-radius: 5px; background: #fff; color: #b74b3e; font-size: 9px; }

.demo-track__lane { position: relative; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(24, 53, 45, .06) calc(10% - 1px), rgba(24, 53, 45, .06) 10%); }
.demo-clip { position: absolute; top: 17px; left: var(--clip-left); width: max(var(--clip-width), 16px); height: 75px; overflow: hidden; border: 1px solid var(--demo-host); border-radius: 6px; background: var(--demo-host-pale); color: #76372d; text-align: left; }
.demo-track--cohost .demo-clip { border-color: var(--demo-cohost); background: var(--demo-cohost-pale); color: #39317e; }
.demo-track--bgm .demo-clip { border-color: var(--demo-bgm); background: var(--demo-bgm-pale); color: #1f627f; }
.demo-track--sfx .demo-clip { border-color: var(--demo-sfx); background: var(--demo-sfx-pale); color: #875b16; }
.demo-clip.is-selected { box-shadow: inset 0 0 0 2px currentColor, 0 0 0 2px #fff; }
.demo-clip > span { position: relative; z-index: 2; display: block; overflow: hidden; padding: 7px; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.demo-clip > i { position: absolute; right: 5px; bottom: 7px; left: 5px; height: 29px; opacity: .38; background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px); clip-path: polygon(0 65%, 5% 25%, 10% 72%, 15% 15%, 20% 80%, 25% 35%, 30% 65%, 35% 8%, 40% 88%, 45% 28%, 50% 72%, 55% 18%, 60% 83%, 65% 38%, 70% 67%, 75% 12%, 80% 92%, 85% 30%, 90% 68%, 95% 20%, 100% 65%, 100% 100%, 0 100%); }
.demo-playhead { position: absolute; z-index: 9; top: 0; bottom: 0; left: var(--playhead); width: 1px; background: var(--demo-mint); box-shadow: 0 0 0 1px rgba(45, 156, 114, .1); pointer-events: none; }

.demo-clip-inspector { min-width: 0; border-left: 1px solid var(--demo-line); background: #fff; }
.demo-inspector-head { display: grid; grid-template-columns: 22px 1fr auto 30px; gap: 6px; align-items: center; min-height: 54px; padding: 9px 12px; border-bottom: 1px solid var(--demo-line); background: #eef4f1; }
.demo-inspector-head > span { color: var(--demo-ink); }
.demo-inspector-head b { font-size: 12px; }
.demo-inspector-head small { color: var(--demo-muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
.demo-inspector-head button { width: 30px; height: 30px; border: 1px solid var(--demo-line-strong); border-radius: 6px; background: #fff; }
.demo-inspector-body { display: grid; gap: 12px; max-height: 545px; overflow: auto; padding: 13px; }
.demo-inspector-selection { display: grid; gap: 3px; padding: 12px; border-left: 4px solid var(--demo-host); background: var(--demo-host-pale); }
.demo-clip-inspector[data-demo-inspector-kind="cohost"] .demo-inspector-selection { border-left-color: var(--demo-cohost); background: var(--demo-cohost-pale); }
.demo-clip-inspector[data-demo-inspector-kind="bgm"] .demo-inspector-selection { border-left-color: var(--demo-bgm); background: var(--demo-bgm-pale); }
.demo-clip-inspector[data-demo-inspector-kind="sfx"] .demo-inspector-selection { border-left-color: var(--demo-sfx); background: var(--demo-sfx-pale); }
.demo-inspector-selection span { color: var(--demo-host); font-size: 9px; font-weight: 700; }
.demo-clip-inspector[data-demo-inspector-kind="cohost"] .demo-inspector-selection span { color: var(--demo-cohost); }
.demo-clip-inspector[data-demo-inspector-kind="bgm"] .demo-inspector-selection span { color: var(--demo-bgm); }
.demo-clip-inspector[data-demo-inspector-kind="sfx"] .demo-inspector-selection span { color: var(--demo-sfx); }
.demo-inspector-selection b { font-size: 14px; }
.demo-inspector-selection code { color: var(--demo-muted); font: 700 9px/1.4 "SFMono-Regular", Consolas, monospace; }
.demo-inspector-field { display: grid; gap: 6px; }
.demo-inspector-field > span, .demo-asset-pool h4 { font-size: 10px; font-weight: 720; }
.demo-inspector-field input { width: 100%; min-height: 38px; padding: 8px; border: 1px solid var(--demo-line-strong); border-radius: 6px; background: #fff; }
.demo-inspector-field small { color: var(--demo-muted); font-size: 8px; }
.demo-inspector-note { display: flex; gap: 8px; margin: 0; padding: 10px; border: 1px dashed #b5d2c6; border-radius: 6px; background: #f8fcfa; color: var(--demo-muted); font-size: 9px; line-height: 1.55; }
.demo-inspector-note span { color: var(--demo-mint); font-size: 16px; }
.demo-inspector-link { margin: 0; padding-top: 11px; border-top: 1px solid var(--demo-line); color: var(--demo-muted); font-size: 9px; }
.demo-asset-pool { display: grid; gap: 6px; }
.demo-asset-pool h4 { margin: 0 0 2px; }
.demo-asset-pool button { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; border: 1px solid var(--demo-line); border-radius: 6px; background: #fff; font-size: 9px; text-align: left; }
.demo-asset-pool button small { color: var(--demo-muted); font-size: 8px; }
.demo-clip-inspector[data-demo-inspector-kind="bgm"] .demo-asset-pool button.is-selected { border-color: var(--demo-bgm); background: var(--demo-bgm-pale); }
.demo-clip-inspector[data-demo-inspector-kind="sfx"] .demo-asset-pool button.is-selected { border-color: var(--demo-sfx); background: var(--demo-sfx-pale); }
.demo-delete-clip { min-height: 40px; border: 1px solid #efaaa1; border-radius: 6px; background: #fff5f3; color: #b74b3e; font-size: 10px; font-weight: 700; }

.demo-toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 12px 15px; border: 1px solid #a8cdbd; border-radius: 7px; background: var(--demo-ink); box-shadow: 0 14px 38px rgba(24, 53, 45, .25); color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
.demo-toast.is-visible { opacity: 1; transform: translateY(0); }
.director-demo-view.is-demo-playing .demo-playhead { animation: demo-playhead-pulse .7s ease-in-out infinite alternate; }
@keyframes demo-playhead-pulse { to { box-shadow: 0 0 0 4px rgba(45, 156, 114, .14); } }

@media (max-width: 1180px) {
  .demo-commandbar { grid-template-columns: 1fr; }
  .demo-commandbar__actions { flex-wrap: wrap; }
  .demo-stage-grid { grid-template-columns: 1fr; }
  .demo-casting-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
  .demo-casting-panel > .demo-panel__head, .demo-casting-note, .demo-generation-progress { grid-column: 1 / -1; }
  .demo-score-workspace { grid-template-columns: minmax(0, 1fr) 290px; }
  .demo-score-actions label input { width: 80px; }
}

@media (max-width: 860px) {
  .director-demo-entry { grid-template-columns: 1fr; }
  .demo-disclaimer { margin-right: 12px; margin-left: 12px; }
  .demo-workbench { width: calc(100% - 24px); }
  .demo-script-compare { grid-template-columns: 1fr; }
  .demo-script-source { min-height: 250px; }
  .demo-score-workspace { grid-template-columns: 1fr; }
  .demo-clip-inspector { border-top: 1px solid var(--demo-line); border-left: 0; }
  .demo-inspector-body { max-height: 420px; }
  .demo-transport { align-items: flex-start; flex-direction: column; }
  .demo-score-actions { flex-wrap: wrap; }
  .demo-minimap { grid-template-columns: 58px 1fr; }
  .demo-minimap > small { display: none; }
}

@media (max-width: 620px) {
  .director-demo-entry { width: calc(100% - 28px); padding: 28px 22px; }
  .director-demo-entry__score { display: none; }
  .demo-topbar > div { display: none; }
  .demo-commandbar { padding: 16px; }
  .demo-commandbar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .demo-save-state { min-width: 0; }
  .demo-button--accent { grid-column: 1 / -1; justify-content: center; }
  .demo-pipeline { grid-template-columns: 1fr; }
  .demo-pipeline > span { transform: rotate(90deg); }
  .demo-casting-panel { display: block; }
  .demo-casting-panel > .demo-panel__head { display: flex; }
  .demo-voice-card__head { grid-template-columns: 34px 1fr; }
  .demo-voice-card__head button { grid-column: 1 / -1; justify-content: center; }
  .demo-panel__head { align-items: flex-start; flex-direction: column; }
  .demo-score-panel__head { flex-direction: row; }
  .demo-add-track select { display: none; }
  .demo-transport { margin: 8px; }
  .demo-minimap { margin: 0 8px 8px; }
  .demo-track, .demo-timeline-ruler { grid-template-columns: 230px calc(700px * var(--demo-timeline-scale)); }
  .demo-track__controls { width: 230px; }
}

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