.studio-page {
  /* Design tokens — see docs/ADMIN_STUDIO_TOKENS.md */
  --studio-radius: 16px;
  --studio-elev: 0 12px 40px rgba(0, 0, 0, 0.28);
  --studio-space-1: 0.25rem;
  --studio-space-2: 0.5rem;
  --studio-space-3: 0.75rem;
  --studio-space-4: 1rem;
  --studio-space-5: 1.25rem;
  --studio-space-6: 1.75rem;
  --studio-status-ok: var(--ok, #3ecf8e);
  --studio-status-warn: #e8a838;
  --studio-status-err: #e85d5d;
  --studio-skel: color-mix(in srgb, var(--muted) 22%, transparent);
  max-width: 1280px;
}

.studio-split-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.studio-split-nav a.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.avatar-list--skeleton .skel-row {
  height: 2.6rem;
  margin: 0.4rem 0;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--studio-skel),
    color-mix(in srgb, var(--studio-skel) 40%, #fff),
    var(--studio-skel)
  );
  background-size: 200% 100%;
  animation: studio-skel 1.2s ease-in-out infinite;
}
@keyframes studio-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.look-tip {
  margin: 0.5rem 0 0.75rem;
}
.consent-fieldset {
  margin: 0.75rem 0 1rem;
}

.harvest-panel .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0 0.75rem;
}
.harvest-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.harvest-preview figure {
  margin: 0;
}
.harvest-preview img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0b1220;
}
.harvest-preview figcaption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
@media (max-width: 720px) {
  .harvest-preview {
    grid-template-columns: 1fr;
  }
}
.auditor-out {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel, #111) 80%, transparent);
  font-size: 0.78rem;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

@media (prefers-reduced-motion: reduce) {
  .avatar-list--skeleton .skel-row {
    animation: none;
  }
  .avatar-3d,
  .avatar-3d__card,
  .avatar-3d__face,
  .avatar-3d__cheeks {
    transition: none !important;
    animation: none !important;
  }
}

.status-pill {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.status-pill--draft {
  border-color: color-mix(in srgb, var(--muted) 50%, var(--line));
}

.status-pill--published {
  border-color: var(--ok, #3ecf8e);
  color: var(--ok, #3ecf8e);
  background: color-mix(in srgb, var(--ok, #3ecf8e) 12%, transparent);
}

.status-pill--archived {
  opacity: 0.7;
}

.studio-stepper {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.studio-stepper li button {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.studio-stepper li.active button {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.studio-stepper li.done button {
  border-color: color-mix(in srgb, var(--ok, #3ecf8e) 50%, var(--line));
  color: var(--ok, #3ecf8e);
}

.studio-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .studio-workspace {
    grid-template-columns: 1fr;
  }
}

.sticky-preview {
  position: sticky;
  top: 1rem;
  box-shadow: var(--studio-elev);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.preview-label {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.flow-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  margin: 0.5rem 0 0.25rem;
}

.empty-state {
  margin: 0.35rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel, #fff) 92%, var(--accent, #2a6) 8%);
}

.empty-state .empty-title {
  margin: 0 0 0.35rem;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
}

.empty-state .hint {
  margin: 0;
}

.advanced-details {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
}

.advanced-details summary {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  list-style: none;
}

.advanced-details summary::-webkit-details-marker {
  display: none;
}

.advanced-details summary::before {
  content: "▸";
  color: var(--muted);
  font-size: 0.75rem;
}

.advanced-details[open] summary::before {
  content: "▾";
}

.advanced-details[open] summary {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.adv-summary-title {
  font-weight: 600;
}

.adv-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.adv-chips:empty::after {
  content: "Neutral";
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.adv-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel, #fff) 88%, var(--accent, #2a6) 12%);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.advanced-details .advanced {
  border: none;
  padding: 0;
  margin: 0;
}

.publish-checklist {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
}

.publish-checklist li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #0c1116;
  border: 1px solid var(--line);
}

.publish-checklist li.ok {
  border-color: color-mix(in srgb, var(--ok, #3ecf8e) 40%, var(--line));
}

.publish-checklist li.bad {
  border-color: color-mix(in srgb, var(--err, #ff6b6b) 40%, var(--line));
}

.publish-checklist .mark {
  font-weight: 700;
  width: 1.1rem;
}

.share-panel {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.share-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.copy-row {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.copy-row input,
.copy-row textarea {
  flex: 1;
}

.studio-form.panel {
  border-radius: var(--studio-radius);
}

.crumb {
  color: var(--muted);
  text-decoration: none;
  font-family: system-ui, sans-serif;
}

.crumb:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.token-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}

.token-field input {
  width: 12rem;
  background: #0c1116;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
}

.studio-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

.studio-rail {
  background: color-mix(in srgb, var(--panel) 92%, black);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
}

.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.rail-head h2 {
  margin: 0;
  font-size: 1rem;
  font-family: system-ui, sans-serif;
}

.avatar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.avatar-list button {
  width: 100%;
  text-align: left;
  font-family: system-ui, sans-serif;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
}

.avatar-list button:hover,
.avatar-list button.active {
  border-color: var(--line);
  background: #0c1116;
}

.avatar-list .meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.studio-main {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 1.25rem;
}

.studio-poster {
  aspect-ratio: 4 / 5;
}

.studio-preview .avatar-3d--studio {
  max-width: min(280px, 100%);
}

.studio-form fieldset.look-morph {
  border-color: color-mix(in srgb, var(--accent-2) 35%, var(--line));
}

.studio-form fieldset.voice-workflow {
  border-color: color-mix(in srgb, var(--ok, #3ecf8e) 40%, var(--line));
}

.voice-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.voice-steps li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.voice-steps li.active {
  border-color: var(--accent);
  color: var(--accent);
}

.voice-steps li.done {
  border-color: var(--ok, #3ecf8e);
  color: var(--ok, #3ecf8e);
}

.voice-actions {
  margin: 0.5rem 0 0.85rem;
}

.voice-library {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 180px;
  overflow: auto;
}

.voice-library button {
  width: 100%;
  text-align: left;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0c1116;
  color: var(--ink);
  cursor: pointer;
}

.voice-library button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #0c1116);
}

.voice-library .meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.bg-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.45rem;
  margin: 0.35rem 0 0.85rem;
}

.bg-gallery button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #0c1116;
  cursor: pointer;
  aspect-ratio: 4 / 5;
}

.bg-gallery button img,
.bg-gallery button .bg-swatch {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-gallery button .bg-swatch {
  display: grid;
  place-items: center;
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  color: var(--muted);
  background: #15202a;
}

.bg-gallery button.selected,
.bg-gallery button[aria-selected="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.studio-form fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem 1rem;
}

.studio-form legend {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 0.35rem;
}

.studio-form input[type="text"],
.studio-form input:not([type]),
.studio-form input[type="password"],
.studio-form input[type="file"],
.studio-form select,
.studio-form textarea {
  width: 100%;
  display: block;
  margin: 0.25rem 0 0.75rem;
  background: #0c1116;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
}

.studio-form input[type="range"] {
  width: 100%;
  margin: 0.2rem 0 0.85rem;
}

.val {
  font-family: ui-monospace, monospace;
  color: var(--accent);
  font-size: 0.85rem;
}

.compact {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  min-width: auto;
}

.studio-actions {
  margin-top: 0.25rem;
}

.look-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}

.look-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.look-filters select {
  min-width: 7rem;
  margin: 0;
  padding: 0.35rem 0.45rem;
  font-size: 0.8rem;
}

.look-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  max-height: 280px;
  overflow: auto;
  padding: 0.15rem;
}

.look-card {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  background: #0c1116;
  cursor: pointer;
  overflow: hidden;
  font-family: system-ui, sans-serif;
}

.look-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.look-card span {
  display: block;
  padding: 0.3rem 0.35rem 0.4rem;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.25;
}

.look-card:hover {
  border-color: var(--line);
}

.look-card.selected {
  border-color: var(--accent);
}

.look-card.selected span {
  color: var(--accent);
}

.studio-form fieldset.advanced {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

/* §3B Pro tools / WYSIWYG / transport / ⌘K */
.studio-cmd-hint {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.8rem;
}
.studio-cmd-hint kbd {
  font-size: 0.75rem;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.wysiwyg-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.wysiwyg-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.wysiwyg-chip.active {
  border-color: var(--accent);
  color: var(--accent);
}
.preview-stage-wrap {
  transition: max-width 0.2s ease, margin 0.2s ease;
}
.preview-stage-wrap[data-frame-view="phone"] {
  max-width: 220px;
  margin-inline: auto;
  border: 3px solid #334;
  border-radius: 18px;
  padding: 0.35rem;
}
.preview-stage-wrap[data-frame-view="liveclass"] {
  max-width: 160px;
  margin-left: auto;
  border: 2px solid var(--accent);
  border-radius: 8px;
}
.preview-stage-wrap[data-frame-view="chat"] {
  max-width: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin-inline: auto;
}
.preview-stage-wrap[data-frame-view="embed"] {
  max-width: 240px;
  margin-inline: auto;
  box-shadow: var(--studio-elev);
}
.transport-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.5rem 0;
}
.transport-mod {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.transport-mod select {
  font-size: 0.8rem;
}
#transportScrub {
  flex: 1;
  min-width: 80px;
}
.capture-video {
  width: 100%;
  max-height: 220px;
  border-radius: 10px;
  background: #000;
  margin-bottom: 0.5rem;
}
.cmd-palette {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(420px, 92vw);
  background: var(--panel, #161a22);
  color: inherit;
}
.cmd-palette::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.cmd-palette input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 1rem;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}
.cmd-palette ul {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  max-height: 280px;
  overflow: auto;
}
.cmd-palette li {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.cmd-palette li.active,
.cmd-palette li:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
