/* Vibe 3D — a workspace and contextual inspector, with content before chrome. */
.director-overlay {
  --vd-surface: var(--bg-secondary);
  --vd-inset: var(--bg-tertiary);
  --vd-line: var(--separator);
  --vd-accent: var(--brand);
  --vd-success: #23865b;
  --vd-muted: #746f80;
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--label);
  font: 400 13px/1.5 var(--font);
  isolation: isolate;
}
.director-overlay button {
  cursor: pointer;
  font-family: inherit;
}
.director-overlay button:disabled {
  cursor: default;
  opacity: 0.45;
}
.director-overlay button:focus-visible,
.director-overlay [role="tabpanel"]:focus-visible {
  outline: 2px solid var(--vd-accent);
  outline-offset: 3px;
}
.director-workspace-bar {
  flex: 0 0 60px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: var(--vd-surface);
  border-bottom: 1px solid var(--vd-line);
}
.director-close,
.director-assistant-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--label-2);
  font-size: 12px;
  white-space: nowrap;
}
.director-close:hover,
.director-assistant-toggle:hover {
  background: var(--hover);
  color: var(--label);
}
.director-workspace-divider {
  height: 20px;
  width: 1px;
  background: var(--vd-line);
}
.director-workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.director-workspace-brand strong {
  font:
    560 17px/1 "Vibe Brand",
    var(--font);
  letter-spacing: -0.025em;
}
.director-workspace-title {
  padding-left: 8px;
  color: var(--vd-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}
.director-assistant-toggle {
  margin-left: auto;
  flex: none;
}
.director-assistant-toggle[aria-expanded="true"] {
  background: var(--brand-soft);
  color: var(--vd-accent);
}
.director-workspace {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 12px;
}
.director-stage {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #111114;
  border: 1px solid var(--vd-line);
}
.director-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
.vd-assistant {
  width: 360px;
  flex: 0 0 360px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--vd-line);
  background: var(--vd-surface);
  box-shadow: 0 4px 20px rgb(30 20 50 / 3%);
  overflow: hidden;
}
.vd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 14px;
  gap: 12px;
}
.vd-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vd-brand-glyph {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--vd-line);
  border-radius: 12px;
  background: var(--bg);
}
.vd-identity h2 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.vd-identity div > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--vd-muted);
  font-size: 11px;
}
.vd-identity i {
  font-style: normal;
  font-size: 9px;
  padding: 0 4px;
  border: 1px solid var(--vd-line);
  border-radius: 4px;
  line-height: 14px;
}
.vd-icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--vd-muted);
  background: transparent;
}
.vd-icon-button:hover {
  background: var(--hover);
  color: var(--label);
}
.vd-context {
  margin: 0 20px;
  padding: 10px 0 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--vd-muted);
}
.vd-connection {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--vd-muted);
}
.vd-connection.is-ready {
  background: var(--vd-success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vd-success) 9%, transparent);
}
.vd-scene-count {
  margin-left: auto;
}
.vd-tabs {
  margin: 0 20px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  gap: 3px;
  border-radius: 10px;
  background: var(--fill-4);
  flex: none;
}
.vd-tabs button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--label-2);
  font-size: 12px;
  font-weight: 500;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.vd-tabs button[aria-selected="true"] {
  background: var(--vd-surface);
  color: var(--label);
  box-shadow: 0 1px 4px rgb(20 10 40 / 9%);
}
.vd-count {
  font-size: 10px;
  line-height: 16px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--fill-4);
  color: var(--vd-muted);
}
.vd-scroll {
  flex: 1;
  min-height: 80px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--fill-2) transparent;
  overscroll-behavior: contain;
}
.vd-scroll[hidden] {
  display: none;
}
.vd-welcome {
  padding: 28px 20px 24px;
}
.vd-viewfinder {
  position: relative;
  width: 68px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 0 22px;
  background:
    radial-gradient(ellipse at 25% 80%, rgb(255 179 64 / 14%), transparent 65%),
    radial-gradient(ellipse at 75% 30%, rgb(157 107 255 / 14%), transparent 65%);
}
.vd-viewfinder > .icon {
  width: 28px;
  height: 28px;
  color: var(--vd-accent);
  stroke-width: 1.3;
}
.vd-viewfinder i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1.3px solid var(--label-4);
}
.vd-viewfinder i:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 1.3px 0 0 1.3px;
  border-top-left-radius: 4px;
}
.vd-viewfinder i:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 1.3px 1.3px 0 0;
  border-top-right-radius: 4px;
}
.vd-viewfinder i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 1.3px 1.3px 0;
  border-bottom-right-radius: 4px;
}
.vd-viewfinder i:nth-child(4) {
  left: 0;
  bottom: 0;
  border-width: 0 0 1.3px 1.3px;
  border-bottom-left-radius: 4px;
}
.vd-eyebrow {
  margin: 0 0 8px;
  font: 500 9px/1.5 var(--font);
  letter-spacing: 2px;
  color: var(--vd-muted);
}
.vd-welcome h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.vd-intro {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--label-2);
}
.vd-intents {
  display: flex;
  gap: 5px;
  margin-top: 26px;
  margin-bottom: 10px;
}
.vd-intents button {
  flex: 1;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--vd-muted);
  background: transparent;
  min-height: 30px;
}
.vd-intents button[aria-pressed="true"] {
  color: var(--vd-accent);
  background: var(--brand-soft);
}
.vd-intents button:hover {
  background: var(--hover);
}
.vd-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vd-suggestions > button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--vd-line);
  border-radius: 11px;
  background: transparent;
  padding: 12px;
  color: var(--label);
  transition:
    background 0.15s,
    border-color 0.15s;
}
.vd-suggestions > button:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}
.vd-suggestion-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 32px;
  color: var(--label-2);
}
.vd-suggestions > button > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.vd-suggestions strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.vd-suggestions small {
  display: block;
  font-size: 10.5px;
  margin-top: 3px;
  color: var(--vd-muted);
}
.vd-suggestions > button > .icon {
  color: var(--vd-muted);
}
.vd-example-note {
  margin: 14px 0 0;
  text-align: center;
  font-size: 10px;
  color: var(--vd-muted);
}
.vd-history {
  padding: 18px 20px 8px;
}
.vd-section-label {
  font-size: 10px;
  color: var(--vd-muted);
  letter-spacing: 0.1em;
  padding-bottom: 18px;
}
.vd-entry {
  position: relative;
  padding: 0 0 22px 22px;
  border-left: 1px solid var(--vd-line);
  margin-left: 6px;
}
.vd-entry-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  color: var(--vd-muted);
  margin-bottom: 8px;
}
.vd-entry-label > .icon {
  position: absolute;
  left: -7px;
  top: 0;
  background: var(--vd-surface);
  color: var(--vd-success);
}
.vd-entry--user .vd-entry-label > .icon {
  color: var(--vd-muted);
}
.vd-entry p {
  margin: 0;
  color: var(--label-2);
  line-height: 1.8;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.vd-entry--user p {
  color: var(--label);
  font-size: 13px;
  font-weight: 500;
}
.vd-entry.is-error .vd-entry-label,
.vd-entry.is-error .vd-entry-label > .icon {
  color: var(--red);
}
.vd-entry:last-child {
  border-color: transparent;
}
.vd-change-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.vd-change-tags span {
  background: var(--fill-4);
  border-radius: 5px;
  color: var(--label-2);
  padding: 3px 6px;
  font-size: 10px;
}
.vd-text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  padding: 5px 0;
  min-height: 28px;
  color: var(--label-2);
  font-size: 11px;
  background: transparent;
}
.vd-text-button:hover {
  color: var(--vd-accent);
}
.vd-entry .vd-text-button {
  margin-top: 6px;
}
.vd-progress {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 20px 22px;
  padding: 12px;
  border-radius: 10px;
  background: var(--brand-soft);
}
.vd-progress strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.vd-progress div span {
  display: block;
  color: var(--vd-muted);
  font-size: 10px;
  margin-top: 3px;
}
.vd-spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--brand-line);
  border-top-color: var(--vd-accent);
  border-radius: 50%;
  animation: vd-spin 1s linear infinite;
}
@keyframes vd-spin {
  to {
    transform: rotate(360deg);
  }
}
.vd-compose-area {
  flex: none;
  padding: 12px 16px 10px;
  border-top: 1px solid var(--vd-line);
  background: var(--vd-surface);
}
.vd-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 10px;
  color: var(--vd-muted);
  font-size: 10px;
}
.vd-scope > span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.vd-scope .icon {
  flex: none;
}
.vd-composer {
  border: 1px solid var(--separator-strong);
  border-radius: 13px;
  background: var(--bg);
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
  overflow: hidden;
}
.vd-composer:focus-within {
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.vd-composer textarea {
  display: block;
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  padding: 13px 13px 4px;
  font: 400 12px/1.8 var(--font);
  min-height: 82px;
  max-height: 180px;
  color: var(--label);
  background: transparent;
  box-shadow: none;
}
.vd-composer textarea::placeholder {
  color: var(--vd-muted);
}
.vd-composer textarea:disabled {
  opacity: 0.6;
}
.vd-compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
}
.vd-compose-toolbar > span {
  font-size: 9px;
  color: var(--vd-muted);
  padding-left: 4px;
}
.vd-primary,
.vd-secondary {
  border: 0;
  border-radius: 8px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
}
.vd-primary {
  background: var(--brand-strong);
  color: var(--on-brand);
}
.vd-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}
.vd-secondary {
  background: var(--fill-4);
  color: var(--label-2);
  border: 1px solid var(--vd-line);
}
.vd-secondary:hover:not(:disabled) {
  background: var(--hover);
  color: var(--label);
}
.vd-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 0 2px;
}
.vd-compose-foot > span {
  color: var(--vd-muted);
  font-size: 9px;
}
.vd-proposal {
  flex: none;
  margin: 0 16px 12px;
  border-radius: 12px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  padding: 12px;
}
.vd-proposal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.vd-proposal-title > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.vd-proposal-title small {
  color: var(--vd-accent);
  font-size: 10px;
}
.vd-proposal p {
  color: var(--label-2);
  font-size: 11px;
  margin: 8px 0 12px;
}
.vd-proposal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.vd-discard {
  display: flex;
  margin: 8px auto -4px;
  font-size: 10px;
}
.vd-shot-panel {
  padding: 20px;
}
.vd-shot-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--vd-muted);
  margin: 0 0 22px;
}
.vd-shot-heading h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--label);
  margin: 0 0 4px;
}
.vd-shot-heading p {
  margin: 0;
  font-size: 11px;
}
.vd-shots {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.vd-shots button {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 14px 12px;
  text-align: left;
  color: var(--label-2);
  background: transparent;
  border: 1px solid var(--vd-line);
  border-radius: 10px;
}
.vd-shots button:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.vd-shot-number {
  color: var(--vd-accent);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.vd-shot-copy {
  flex: 1;
  min-width: 0;
}
.vd-shot-copy strong {
  display: block;
  font-size: 12px;
  color: var(--label);
  font-weight: 500;
}
.vd-shot-copy > span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.vd-shot-copy small {
  display: block;
  color: var(--vd-muted);
  font-size: 10px;
  margin-top: 8px;
}
.vd-shots button > .icon {
  margin-top: 2px;
}
.vd-export {
  width: 100%;
  margin-top: 16px;
}
.vd-shot-empty {
  padding: 26px 0;
  text-align: center;
  color: var(--vd-muted);
}
.vd-shot-empty > .icon {
  margin: auto auto 18px;
}
.vd-shot-empty h4 {
  color: var(--label);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
}
.vd-shot-empty p {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.8;
}
.vd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:root[data-theme="dark"] .director-overlay {
  --vd-success: #6aca98;
  --vd-muted: #aaa4b8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .director-overlay {
    --vd-success: #6aca98;
    --vd-muted: #aaa4b8;
  }
}
@media (max-width: 1180px) {
  .vd-assistant {
    width: 332px;
    flex-basis: 332px;
  }
  .director-workspace {
    gap: 8px;
    padding: 8px;
  }
  .vd-head {
    padding: 16px 16px 10px;
  }
  .vd-context,
  .vd-tabs {
    margin-left: 16px;
    margin-right: 16px;
  }
}
@media (max-height: 800px) and (min-width: 981px) {
  .vd-welcome {
    padding-top: 14px;
  }
  .vd-viewfinder {
    display: none;
  }
  .vd-welcome h3 {
    font-size: 22px;
  }
  .vd-intents {
    margin-top: 18px;
  }
}
@media (max-width: 980px) {
  .director-workspace {
    flex-direction: column;
  }
  .director-stage {
    flex: 1 1 42%;
    min-height: 160px;
  }
  .vd-assistant {
    flex: 1 1 58%;
    width: 100%;
    border-radius: 14px;
  }
  .vd-head {
    padding: 10px 14px 6px;
  }
  .vd-identity h2 {
    font-size: 13px;
  }
  .vd-identity > div > span,
  .vd-context {
    display: none;
  }
  .vd-brand-glyph {
    height: 30px;
    width: 30px;
    border: 0;
    background: none;
  }
  .vd-tabs {
    margin: 0 14px 6px;
  }
  .vd-compose-area {
    padding: 8px 12px;
  }
  .vd-compose-foot {
    display: none;
  }
  .vd-composer textarea {
    min-height: 58px;
    height: 58px;
    padding-top: 9px;
  }
  .vd-scope {
    padding-bottom: 6px;
  }
  .vd-welcome {
    padding: 14px;
  }
  .vd-viewfinder,
  .vd-eyebrow {
    display: none;
  }
  .vd-welcome h3 {
    font-size: 18px;
  }
  .vd-intro br {
    display: none;
  }
  .vd-intents {
    margin-top: 14px;
  }
  .vd-suggestions {
    flex-direction: row;
  }
  .vd-suggestions > button {
    flex: 1;
    min-width: 0;
    padding: 8px;
  }
  .vd-suggestions small,
  .vd-suggestions > button > .icon,
  .vd-example-note {
    display: none;
  }
  .vd-proposal {
    padding: 9px 12px;
    margin-bottom: 8px;
  }
  .vd-proposal p {
    margin: 5px 0 8px;
  }
  .is-chat-collapsed .director-stage {
    flex: 1;
  }
}
@media (max-width: 560px) {
  .director-workspace-bar {
    flex-basis: 50px;
    padding: 0 8px;
    gap: 8px;
  }
  .director-workspace-title,
  .director-workspace-divider {
    display: none;
  }
  .director-workspace-brand strong {
    font-size: 15px;
  }
  .director-workspace-brand > svg {
    display: none;
  }
  .director-close,
  .director-assistant-toggle {
    min-height: 36px;
    padding: 6px;
    font-size: 11px;
  }
  .vd-compose-toolbar > span {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .vd-spinner {
    animation: none;
  }
}
:root[data-motion="reduced"] .vd-spinner {
  animation: none;
}
/* A proposal replaces the disabled composer on a compact screen. */
@media (max-width: 980px) {
  .vd-assistant:has(.vd-proposal) .vd-compose-area {
    display: none;
  }
  .vd-compose-foot {
    display: flex;
  }
  .vd-compose-foot .vd-text-button {
    min-height: 32px;
  }
  .vd-tabs button,
  .vd-intents button,
  .vd-primary,
  .vd-secondary {
    min-height: 36px;
  }
  .vd-suggestions > button {
    min-height: 44px;
  }
}
@media (max-height: 620px) and (max-width: 980px) {
  .director-stage {
    min-height: 100px;
    flex-basis: 30%;
  }
  .vd-head,
  .vd-scope {
    display: none;
  }
  .vd-tabs {
    margin-top: 8px;
  }
  .vd-scroll {
    min-height: 48px;
  }
  .vd-compose-foot {
    display: none;
  }
}
