:root {
  --bg: #050a0f;
  --panel: rgba(11, 17, 24, .82);
  --panel-2: rgba(18, 27, 38, .88);
  --line: rgba(131, 173, 205, .2);
  --text: #f4f7fb;
  --muted: #8491a2;
  --red: #ff6259;
  --red-dark: #c63831;
  --coral: #ff6259;
  --cyan: #68e9ff;
  --green: #62efba;
  --amber: #e9bd69;
  --violet: #9e8cff;
  --radius: 12px;
}

body.studio-shell {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 48% -10%, rgba(74, 111, 163, .14), transparent 42rem),
    radial-gradient(circle at 96% 44%, rgba(158, 140, 255, .05), transparent 34rem),
    linear-gradient(155deg, #060c12 0%, #04080c 72%);
}

html:has(body.studio-shell),
body.studio-shell,
body.studio-shell .shell,
body.studio-shell .workspace,
body.studio-shell .view {
  max-width: 100%;
  overflow-x: hidden;
}

body.studio-shell::before,
body.studio-shell::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body.studio-shell::before {
  inset: 0;
  opacity: .32;
  background-image:
    linear-gradient(rgba(104, 233, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 233, 255, .018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 25%, #000 75%, transparent 100%);
}

body.studio-shell::after {
  top: 12%;
  left: 50%;
  width: min(58rem, 120vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: .17;
  background: radial-gradient(circle, rgba(104, 233, 255, .13), rgba(158, 140, 255, .04) 38%, transparent 68%);
  filter: blur(26px);
}

body.studio-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  height: 62px;
  gap: 11px;
  padding: 0 clamp(12px, 2vw, 24px);
  border-color: rgba(131, 173, 205, .13);
  background: rgba(5, 10, 15, .79);
  box-shadow: 0 10px 38px rgba(0, 0, 0, .18);
  backdrop-filter: blur(20px);
}

body.studio-shell .studio-menu-toggle {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-color: rgba(131, 173, 205, .18);
  background: rgba(13, 21, 30, .65);
  color: #aab7c7;
}

body.studio-shell.studio-nav-open .studio-menu-toggle {
  border-color: rgba(104, 233, 255, .48);
  color: var(--cyan);
  box-shadow: 0 0 22px rgba(104, 233, 255, .09);
}

body.studio-shell .brand {
  min-width: auto;
  flex: 0 0 auto;
  gap: 9px;
  padding: 0;
}

body.studio-shell .brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 11px;
  background: linear-gradient(145deg, #ff746c, #ff473d);
  box-shadow: 0 0 24px rgba(255, 78, 68, .18), inset 0 1px rgba(255, 255, 255, .23);
}

body.studio-shell .brand-copy sup {
  color: #96a4b5;
  font-size: 7px;
  letter-spacing: .14em;
}

body.studio-shell .brand strong {
  font-size: 15px;
  letter-spacing: -.025em;
}

body.studio-shell .status-strip {
  justify-content: center;
  gap: 9px;
  margin-left: auto;
}

body.studio-shell .activity-status {
  width: min(330px, 35vw);
  gap: 4px;
}

body.studio-shell .activity-copy {
  font-size: 10px;
}

body.studio-shell .activity-progress {
  height: 3px;
  background: rgba(109, 132, 154, .17);
}

body.studio-shell .activity-progress > span {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  box-shadow: 0 0 9px rgba(98, 239, 186, .35);
}

body.studio-shell .status.secondary {
  font-size: 10px;
}

body.studio-shell .top-actions {
  flex: 0 0 auto;
  gap: 6px;
}

body.studio-shell .top-actions .icon-button,
body.studio-shell .queue-toggle {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
}

body.studio-shell .studio-nav-scrim {
  position: fixed;
  z-index: 55;
  inset: 62px 0 0;
  border: 0;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  background: rgba(1, 4, 7, .66);
  backdrop-filter: blur(4px);
  cursor: default;
  transition: opacity .2s ease, visibility .2s ease;
}

body.studio-shell.studio-nav-open .studio-nav-scrim {
  opacity: 1;
  visibility: visible;
}

body.studio-shell .shell {
  display: block;
  min-height: calc(100dvh - 62px);
}

body.studio-shell .rail {
  position: fixed;
  z-index: 60;
  top: 62px;
  bottom: 0;
  left: 0;
  width: min(272px, calc(100vw - 48px));
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 12px max(15px, env(safe-area-inset-bottom));
  overflow: hidden;
  border: 0;
  border-right: 1px solid rgba(131, 173, 205, .18);
  background:
    linear-gradient(150deg, rgba(14, 23, 33, .98), rgba(6, 11, 17, .98)),
    var(--bg);
  box-shadow: 28px 0 80px rgba(0, 0, 0, .42);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-104%);
  transition: none;
}

body.studio-shell .public-nav-worktabs,
body.studio-shell .public-nav-utilities {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.studio-shell .public-branch-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid rgba(131, 173, 205, .15);
  border-radius: 14px;
  background: rgba(1, 5, 9, .45);
}

body.studio-shell .owner-branch-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid rgba(131, 173, 205, .15);
  border-radius: 14px;
  background: rgba(1, 5, 9, .45);
}

body.studio-shell .owner-branch-switcher button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8290a1;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

body.studio-shell .owner-branch-switcher button svg {
  width: 19px;
  height: 19px;
}

body.studio-shell .owner-branch-switcher button.active {
  border-color: rgba(104, 233, 255, .28);
  color: var(--text);
  background: linear-gradient(145deg, rgba(104, 233, 255, .1), rgba(158, 140, 255, .055));
}

body.studio-shell .owner-branch-tools {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

body.studio-shell .owner-branch-tools .owner-branch-utility {
  margin-top: auto;
  border-top: 1px solid rgba(131, 173, 205, .13);
}

body.studio-shell .owner-branch-hidden {
  display: none !important;
}

body.studio-shell .moonshack-create-home {
  max-width: 1120px;
  margin: 0 auto;
}

body.studio-shell .moonshack-branch-hero {
  max-width: 720px;
  margin: clamp(18px, 5vw, 58px) auto clamp(26px, 5vw, 48px);
  text-align: center;
}

body.studio-shell .moonshack-branch-hero h1 {
  margin: 7px 0 14px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -.055em;
}

body.studio-shell .moonshack-branch-hero > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
}

body.studio-shell .moonshack-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.studio-shell .moonshack-create-grid > button {
  min-width: 0;
  min-height: 210px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  text-align: left;
  background:
    radial-gradient(circle at 90% 0, rgba(104, 233, 255, .07), transparent 50%),
    rgba(10, 17, 25, .78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
}

body.studio-shell .moonshack-create-grid > button:hover {
  border-color: rgba(104, 233, 255, .38);
  transform: translateY(-2px);
  background:
    radial-gradient(circle at 90% 0, rgba(104, 233, 255, .12), transparent 55%),
    rgba(13, 22, 32, .92);
}

body.studio-shell .moonshack-create-grid > button > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(104, 233, 255, .2);
  border-radius: 14px;
  color: var(--cyan);
  background: rgba(104, 233, 255, .07);
}

body.studio-shell .moonshack-create-grid > button > strong {
  font-size: 22px;
  letter-spacing: -.025em;
}

body.studio-shell .moonshack-create-grid > button > small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

body.studio-shell .moonshack-create-grid > button > b {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #bceff1;
  font-size: 12px;
}

body.studio-shell .moonshack-create-grid > button > b svg {
  width: 15px;
}

@media (max-width: 640px) {
  body.studio-shell .moonshack-create-grid {
    grid-template-columns: 1fr;
  }
  body.studio-shell .moonshack-create-grid > button {
    min-height: 175px;
  }
}

body.studio-shell .public-branch-switcher button {
  min-width: 0;
  min-height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8290a1;
  background: transparent;
  font-weight: 750;
}

body.studio-shell .public-branch-switcher button svg {
  width: 21px;
  height: 21px;
}

body.studio-shell .public-branch-switcher button.active {
  border-color: rgba(104, 233, 255, .28);
  color: var(--text);
  background: linear-gradient(145deg, rgba(104, 233, 255, .1), rgba(158, 140, 255, .055));
  box-shadow: inset 0 1px rgba(255, 255, 255, .045);
}

body.studio-shell .public-branch-hidden {
  display: none !important;
}

body.studio-shell .public-nav-worktabs {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.studio-shell .public-nav-utilities {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(131, 173, 205, .13);
}

body.studio-shell .public-feedback-nav-button {
  color: #a9bacb;
}

body.studio-shell .public-feedback-nav-button svg {
  color: var(--cyan);
}

body.studio-shell.studio-shell-ready .rail {
  transition: transform .22s ease, opacity .2s ease, visibility .22s ease;
}

body.studio-shell .rail::before {
  display: block;
  margin: 1px 9px 11px;
  color: #65758a;
  content: "MOONSHACK";
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

body.studio-shell .social-studio-header > div > span,
body.studio-shell .social-project-library-heading > div > span,
body.studio-shell .social-project-heading > div > span {
  color: var(--muted);
  line-height: 1.5;
}

body.studio-shell .social-project-library {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: clamp(16px, 2.2vw, 26px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 14, 21, .72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

body.studio-shell .social-project-library-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

body.studio-shell .social-project-library-heading h2 {
  margin: 2px 0 4px;
  font-size: clamp(23px, 3vw, 31px);
}

body.studio-shell .social-project-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(104, 233, 255, .18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(104, 233, 255, .045);
  font-size: 12px;
}

body.studio-shell .social-project-count b {
  color: var(--cyan);
}

body.studio-shell .social-studio-layout {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.studio-shell .social-project-sidebar,
body.studio-shell .social-workspace {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(8, 14, 21, .72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

body.studio-shell .social-project-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100dvh - 100px);
  padding: 14px;
  overflow-y: auto;
}

body.studio-shell .social-upload-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(104, 233, 255, .16);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(104, 233, 255, .055), rgba(158, 140, 255, .025));
}

body.studio-shell .social-upload-card h2 {
  margin: 2px 0 6px;
  font-size: 22px;
}

body.studio-shell .social-upload-card > div > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body.studio-shell .social-source-picker {
  min-height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(104, 233, 255, .38);
  border-radius: 14px;
  text-align: center;
  background: rgba(3, 8, 12, .55);
  cursor: pointer;
}

body.studio-shell .social-source-picker:hover {
  border-color: var(--cyan);
  background: rgba(104, 233, 255, .06);
}

body.studio-shell .social-source-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.studio-shell .social-source-picker svg {
  width: 29px;
  height: 29px;
  color: var(--cyan);
}

body.studio-shell .social-source-picker span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.studio-shell .social-project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.studio-shell .social-project-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: rgba(4, 9, 14, .8);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

body.studio-shell .social-project-card:hover {
  border-color: rgba(104, 233, 255, .42);
  transform: translateY(-2px);
}

body.studio-shell .social-project-card.selected {
  border-color: var(--cyan);
  background: rgba(104, 233, 255, .055);
  box-shadow: 0 0 0 1px rgba(104, 233, 255, .18), 0 18px 42px rgba(0, 0, 0, .2);
}

body.studio-shell .social-project-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #03070b;
}

body.studio-shell .social-project-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

body.studio-shell .social-project-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  background: radial-gradient(circle at 50% 35%, rgba(104, 233, 255, .09), transparent 54%);
}

body.studio-shell .social-project-card-placeholder svg {
  width: 32px;
  height: 32px;
  color: var(--cyan);
}

body.studio-shell .social-project-card-placeholder:has([data-lucide="loader-circle"]) svg {
  animation: studio-spin 1.2s linear infinite;
}

body.studio-shell .social-project-card-status {
  position: absolute;
  top: 9px;
  left: 9px;
  max-width: calc(100% - 18px);
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  color: #f3f7fb;
  background: rgba(3, 7, 11, .78);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

body.studio-shell .social-project-card-status.ready {
  color: var(--green);
}

body.studio-shell .social-project-card-status.failed {
  color: #ff9a94;
}

body.studio-shell .social-project-card-body {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 13px;
}

body.studio-shell .social-project-card-body > strong,
body.studio-shell .social-project-card-body > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.studio-shell .social-project-card-body > strong {
  font-size: 15px;
}

body.studio-shell .social-project-card-body > small {
  color: var(--muted);
  font-size: 11px;
}

body.studio-shell .social-project-card-source {
  min-height: 14px;
}

body.studio-shell .social-project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  margin-top: 3px;
  color: #a9b7c8;
  font-size: 11px;
}

body.studio-shell .social-project-card-meta > span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

body.studio-shell .social-project-card-meta svg {
  width: 13px;
  height: 13px;
  color: var(--cyan);
}

body.studio-shell .social-project-library-empty {
  grid-column: 1 / -1;
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed rgba(104, 233, 255, .22);
  border-radius: 15px;
  color: var(--muted);
  text-align: center;
}

body.studio-shell .social-project-library-empty svg {
  width: 34px;
  height: 34px;
  color: var(--cyan);
}

body.studio-shell .social-project-library-empty strong {
  color: var(--text);
}

@media (max-width: 1320px) {
  body.studio-shell .social-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body.studio-shell .social-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.studio-shell .social-workspace {
  min-height: 640px;
  padding: clamp(16px, 2.4vw, 28px);
}

body.studio-shell .social-empty-state,
body.studio-shell .social-clip-waiting {
  min-height: 560px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
}

body.studio-shell .social-empty-state h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -.04em;
}

body.studio-shell .social-empty-state > p:last-child {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

body.studio-shell .social-empty-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(104, 233, 255, .25);
  border-radius: 22px;
  color: var(--cyan);
  background: rgba(104, 233, 255, .07);
}

body.studio-shell .social-empty-icon svg {
  width: 34px;
  height: 34px;
}

body.studio-shell .social-project-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 20px;
}

body.studio-shell .social-project-heading h2 {
  margin: 2px 0 4px;
  font-size: 28px;
}

body.studio-shell .social-project-actions,
body.studio-shell .social-clip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.studio-shell .social-analysis-progress {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(104, 233, 255, .18);
  border-radius: 13px;
  background: rgba(104, 233, 255, .045);
}

body.studio-shell .social-analysis-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

body.studio-shell .social-analysis-progress progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--cyan);
}

body.studio-shell .social-project-error {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 98, 89, .36);
  border-radius: 13px;
  color: #ffb1ac;
  background: rgba(255, 98, 89, .07);
}

body.studio-shell .social-project-warning {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(245, 191, 92, .32);
  border-radius: 13px;
  color: #f5ce84;
  background: rgba(245, 191, 92, .07);
  font-size: 13px;
  line-height: 1.55;
}

body.studio-shell .social-clip-grid {
  display: grid;
  gap: 18px;
}

body.studio-shell .social-clip-card {
  display: grid;
  grid-template-columns: minmax(230px, 34%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(13, 20, 29, .78);
}

body.studio-shell .social-clip-media {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
  background: #010305;
}

body.studio-shell .social-clip-media video {
  width: 100%;
  height: 100%;
  max-height: 580px;
  object-fit: contain;
}

body.studio-shell .social-preview-unavailable {
  display: grid;
  gap: 9px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

body.studio-shell .social-preview-unavailable svg {
  width: 28px;
  color: var(--cyan);
  animation: studio-spin 1.2s linear infinite;
}

body.studio-shell .social-clip-media > span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgba(1, 3, 5, .78);
  font-size: 11px;
  font-weight: 800;
}

body.studio-shell .social-clip-body {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

body.studio-shell .social-clip-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

body.studio-shell .social-clip-title > div {
  min-width: 0;
  flex: 1;
}

body.studio-shell .social-clip-title input {
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 20px;
  font-weight: 780;
}

body.studio-shell .social-clip-status {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(132, 145, 162, .1);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body.studio-shell .social-clip-status.rendered {
  color: var(--green);
  background: rgba(98, 239, 186, .08);
}

body.studio-shell .social-score {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

body.studio-shell .social-score-ring {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #101821 57%, transparent 59%),
    conic-gradient(var(--cyan) calc(var(--score) * 1%), rgba(132, 145, 162, .16) 0);
}

body.studio-shell .social-score-ring strong {
  font-size: 22px;
}

body.studio-shell .social-score-ring span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

body.studio-shell .social-score-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

body.studio-shell .social-score-details > span {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

body.studio-shell .social-score-details i {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(132, 145, 162, .14);
}

body.studio-shell .social-score-details em {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

body.studio-shell .social-clip-transcript {
  max-height: 7.2em;
  margin: 0;
  overflow: auto;
  color: #bac6d1;
  line-height: 1.6;
}

body.studio-shell .social-source-mode {
  width: 100%;
}

body.studio-shell .social-source-mode button {
  flex: 1;
}

body.studio-shell .social-source-divider {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.studio-shell .social-source-divider::before,
body.studio-shell .social-source-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

body.studio-shell .social-suite-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

body.studio-shell .studio-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(104, 233, 255, .22);
  border-radius: 20px;
  color: var(--text);
  background: #09111a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72);
}

body.studio-shell .studio-dialog::backdrop {
  background: rgba(0, 4, 8, .78);
  backdrop-filter: blur(6px);
}

body.studio-shell .studio-dialog > form {
  max-height: calc(100dvh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.studio-shell .studio-dialog header,
body.studio-shell .studio-dialog footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

body.studio-shell .studio-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

body.studio-shell .studio-dialog h2 {
  margin: 2px 0 0;
}

body.studio-shell .social-dialog-body {
  display: grid;
  gap: 15px;
  padding: 18px;
  overflow-y: auto;
}

body.studio-shell .social-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(70px, 1fr));
  gap: 8px;
}

body.studio-shell .social-color-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

body.studio-shell .social-color-grid input {
  width: 100%;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #050a0f;
}

body.studio-shell .social-logo-preview {
  min-height: 58px;
  display: flex;
  gap: 10px;
  align-items: center;
}

body.studio-shell .social-logo-preview img {
  max-width: 160px;
  max-height: 64px;
  object-fit: contain;
}

body.studio-shell .social-analytics-platform,
body.studio-shell .social-publishing-provider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .02);
}

body.studio-shell .social-analytics-platform > div,
body.studio-shell .social-publishing-provider > div {
  display: grid;
  gap: 4px;
}

body.studio-shell .social-analytics-platform small,
body.studio-shell .social-publishing-provider small {
  color: var(--muted);
}

body.studio-shell .social-coverage {
  min-width: 78px;
  color: var(--cyan);
  font-weight: 800;
  text-align: right;
}

body.studio-shell .social-editor-dialog {
  width: min(1480px, calc(100vw - 20px));
  max-height: calc(100dvh - 20px);
}

body.studio-shell .social-editor-dialog > form {
  max-height: calc(100dvh - 20px);
}

body.studio-shell .social-quick-editor {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0;
  overflow: hidden;
}

body.studio-shell .social-editor-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto minmax(230px, .72fr);
  min-height: 0;
  background: #03070b;
}

body.studio-shell .social-preview-shell {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background: #000;
}

body.studio-shell .social-preview-shell > video {
  width: 100%;
  height: 100%;
  max-height: 48vh;
  object-fit: contain;
  background: black;
}

body.studio-shell .social-preview-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

body.studio-shell .social-preview-overlay > * {
  position: absolute;
  max-height: 90%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

body.studio-shell .social-preview-text {
  max-width: 80%;
  padding: .15em .32em;
  border-radius: .2em;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  white-space: pre-wrap;
}

body.studio-shell .social-transport {
  min-height: 48px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #081019;
}

body.studio-shell .social-play-button {
  width: 38px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #041014;
  background: var(--cyan);
  cursor: pointer;
}

body.studio-shell .social-play-button svg {
  width: 17px;
}

body.studio-shell .social-transport output {
  min-width: 124px;
  margin-left: auto;
  color: #c8d2dc;
  font: 600 12px/1.1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

body.studio-shell .social-timeline-zoom {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

body.studio-shell .social-timeline-zoom input {
  width: 100px;
}

body.studio-shell .social-editor-inspector {
  min-width: 0;
  padding: 16px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #09111a;
}

body.studio-shell .social-editor-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 4px 0 9px;
}

body.studio-shell .mini-button,
body.studio-shell .social-layer-quick-add button {
  min-height: 34px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, .025);
  font-size: 12px;
  cursor: pointer;
}

body.studio-shell .mini-button svg,
body.studio-shell .social-layer-quick-add svg {
  width: 15px;
}

body.studio-shell .social-layer-quick-add {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 18px;
}

body.studio-shell .social-editor-assets > * {
  justify-content: center;
}

body.studio-shell .social-inspector {
  min-height: 190px;
}

body.studio-shell .social-inspector-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .02);
}

body.studio-shell .social-inspector-card > small,
body.studio-shell .social-inspector-duration {
  color: var(--muted);
  line-height: 1.45;
}

body.studio-shell .social-editor-help {
  margin-top: 16px;
}

body.studio-shell .social-timeline-viewport {
  min-width: 0;
  min-height: 230px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #050b11;
  scrollbar-color: rgba(87, 230, 242, .35) #050b11;
}

body.studio-shell .social-timeline {
  min-width: 100%;
  min-height: 100%;
}

body.studio-shell .social-timeline-canvas {
  position: relative;
  min-height: 230px;
  padding-left: 88px;
  user-select: none;
}

body.studio-shell .social-timeline-ruler {
  position: relative;
  height: 34px;
  margin-left: 0;
  border-bottom: 1px solid var(--line);
  background: #071019;
  cursor: crosshair;
}

body.studio-shell .social-timeline-ruler > span {
  position: absolute;
  top: 0;
  height: 100%;
  color: #748290;
  font: 9px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

body.studio-shell .social-timeline-ruler i {
  width: 1px;
  height: 9px;
  display: block;
  background: #526171;
}

body.studio-shell .social-timeline-ruler b {
  display: block;
  margin: 3px 0 0 3px;
  font-weight: 500;
}

body.studio-shell .social-track {
  position: relative;
  height: 64px;
  border-bottom: 1px solid rgba(132, 145, 162, .12);
}

body.studio-shell .social-track-label {
  position: absolute;
  right: 100%;
  top: 0;
  width: 88px;
  height: 100%;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  color: #8fa0af;
  background: #08111a;
  font-size: 10px;
  text-transform: uppercase;
}

body.studio-shell .social-track-label svg {
  width: 14px;
}

body.studio-shell .social-track-lane {
  position: relative;
  height: 100%;
  background-image: linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 100%;
  cursor: crosshair;
}

body.studio-shell .social-timeline-clip {
  position: absolute;
  top: 8px;
  bottom: 8px;
  min-width: 24px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(104, 233, 255, .34);
  border-radius: 7px;
  color: #eafcff;
  background: linear-gradient(135deg, #173846, #10242f);
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  cursor: grab;
  touch-action: none;
}

body.studio-shell .social-timeline-clip.text {
  border-color: rgba(255, 209, 102, .46);
  background: linear-gradient(135deg, #51431c, #302813);
}

body.studio-shell .social-timeline-clip.image,
body.studio-shell .social-timeline-clip.video {
  border-color: rgba(158, 140, 255, .48);
  background: linear-gradient(135deg, #382f64, #211c3f);
}

body.studio-shell .social-timeline-clip.audio {
  border-color: rgba(94, 224, 155, .5);
  background: repeating-linear-gradient(90deg, #123b2c 0 7px, #194936 7px 9px);
}

body.studio-shell .social-timeline-clip.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--cyan), 0 3px 16px rgba(87, 230, 242, .24);
}

body.studio-shell .social-timeline-clip > span {
  min-width: 0;
  display: grid;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.studio-shell .social-timeline-clip small {
  color: rgba(255,255,255,.62);
  font-size: 8px;
  font-weight: 500;
}

body.studio-shell .trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  background: rgba(255,255,255,.16);
  cursor: ew-resize;
}

body.studio-shell .trim-handle.start { left: 0; }
body.studio-shell .trim-handle.end { right: 0; }

body.studio-shell .social-timeline-playhead {
  position: absolute;
  z-index: 7;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: 88px;
  padding: 0;
  border: 0;
  background: #ff625f;
  pointer-events: none;
}

body.studio-shell .social-timeline-playhead i {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 8px;
  border-radius: 2px 2px 6px 6px;
  background: #ff625f;
}

body.studio-shell .social-library-dialog {
  width: min(980px, calc(100vw - 24px));
}

body.studio-shell .social-library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

body.studio-shell .social-library-grid {
  display: grid;
  gap: 18px;
}

body.studio-shell .social-library-group {
  display: grid;
  gap: 8px;
}

body.studio-shell .social-library-group > header {
  padding: 0 2px;
  border: 0;
}

body.studio-shell .social-library-group > header span {
  color: var(--muted);
}

body.studio-shell .social-library-group > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

body.studio-shell .social-library-group button {
  min-width: 0;
  display: grid;
  grid-template-rows: 112px auto;
  gap: 7px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.02);
  text-align: left;
  cursor: pointer;
}

body.studio-shell .social-library-group button:hover {
  border-color: var(--cyan);
}

body.studio-shell .social-library-group img,
body.studio-shell .social-library-group video,
body.studio-shell .social-library-audio {
  width: 100%;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  object-fit: cover;
  background: #03070b;
}

body.studio-shell .social-library-audio svg {
  width: 42px;
  color: var(--cyan);
}

@media (max-width: 980px) {
  body.studio-shell .social-studio-layout {
    grid-template-columns: 1fr;
  }
  body.studio-shell .social-project-sidebar {
    position: static;
    max-height: none;
  }
  body.studio-shell .social-quick-editor {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  body.studio-shell .social-editor-inspector {
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 700px) {
  body.studio-shell .social-project-library-heading {
    align-items: start;
    flex-direction: column;
  }
  body.studio-shell .social-project-heading,
  body.studio-shell .social-clip-title {
    align-items: stretch;
    flex-direction: column;
  }
  body.studio-shell .social-project-actions > *,
  body.studio-shell .social-clip-actions > * {
    flex: 1 1 auto;
  }
  body.studio-shell .social-clip-card {
    grid-template-columns: 1fr;
  }
  body.studio-shell .social-clip-media {
    min-height: 320px;
    max-height: 70dvh;
  }
  body.studio-shell .social-score-details {
    grid-template-columns: 1fr;
  }
  body.studio-shell .social-suite-toolbar > * {
    flex: 1 1 30%;
  }
  body.studio-shell .social-color-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  body.studio-shell .social-editor-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  body.studio-shell .social-editor-dialog > form {
    height: 100dvh;
    max-height: 100dvh;
  }
  body.studio-shell .social-editor-stage {
    min-height: 508px;
    grid-template-rows: minmax(230px, 42dvh) auto 230px;
  }
  body.studio-shell .social-transport {
    overflow-x: auto;
  }
  body.studio-shell .social-transport output {
    margin-left: 4px;
  }
  body.studio-shell .social-timeline-zoom {
    display: none;
  }
  body.studio-shell .social-library-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body.studio-shell .social-project-grid {
    grid-template-columns: 1fr;
  }
}

body.studio-shell .public-roleplay-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

body.studio-shell .public-scene-banner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(158, 140, 255, .32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(158, 140, 255, .11), rgba(104, 233, 255, .045));
}

body.studio-shell .public-scene-banner > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.studio-shell .public-scene-banner > div > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.studio-shell .public-scene-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: min(820px, calc(100dvh - 24px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background: #09121a;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6);
}

body.studio-shell .public-scene-dialog::backdrop {
  background: rgba(1, 4, 7, .76);
  backdrop-filter: blur(8px);
}

body.studio-shell .public-scene-dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

body.studio-shell .public-scene-dialog header,
body.studio-shell .public-scene-dialog footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

body.studio-shell .public-scene-dialog h2 {
  margin: 2px 0 4px;
  font-size: 27px;
}

body.studio-shell .public-scene-dialog header span {
  display: block;
  max-width: 480px;
  color: var(--muted);
  line-height: 1.5;
}

body.studio-shell .public-scene-character-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

body.studio-shell .public-scene-character-field legend {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
}

body.studio-shell #publicSceneCharacterChoices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.studio-shell .public-scene-character-choice {
  min-width: 0;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .015);
}

body.studio-shell .public-scene-character-choice:has(input:checked) {
  border-color: rgba(104, 233, 255, .5);
  background: rgba(104, 233, 255, .07);
}

body.studio-shell .public-scene-character-choice span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.studio-shell .public-scene-character-choice small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  body.studio-shell #publicSceneCharacterChoices {
    grid-template-columns: 1fr;
  }
  body.studio-shell .public-scene-banner {
    align-items: stretch;
    flex-direction: column;
  }
}

body.studio-shell.studio-nav-open .rail {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

body.studio-shell .nav-button {
  min-width: 0;
  min-height: 47px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  border-radius: 11px;
  padding: 7px 10px;
  color: #8492a5;
  font-size: 12px;
  text-align: left;
}

body.studio-shell .nav-button svg {
  width: 18px;
  height: 18px;
  justify-self: center;
}

body.studio-shell .nav-button:hover {
  border-color: rgba(131, 173, 205, .14);
  background: rgba(104, 233, 255, .035);
}

body.studio-shell .nav-button.active {
  border-color: rgba(104, 233, 255, .25);
  background: linear-gradient(90deg, rgba(104, 233, 255, .1), rgba(158, 140, 255, .035));
  box-shadow: inset 2px 0 var(--cyan), 0 0 22px rgba(104, 233, 255, .035);
  color: #eefcff;
}

body.studio-shell .workspace {
  width: min(100%, 1540px);
  max-width: none;
  min-height: calc(100dvh - 62px);
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 34px);
  overflow: visible;
}

body.studio-shell .view-header {
  min-height: 42px;
  align-items: center;
  margin-bottom: 17px;
}

body.studio-shell h1 {
  font-size: clamp(23px, 2.5vw, 30px);
  font-weight: 650;
  letter-spacing: -.035em;
}

body.studio-shell .eyebrow {
  margin-bottom: 3px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

body.studio-shell .mode-label {
  color: #69778a;
  font-size: 9px;
  letter-spacing: .08em;
}

body.studio-shell .work-grid {
  grid-template-columns: minmax(340px, 440px) minmax(390px, 1fr);
  gap: clamp(13px, 1.6vw, 22px);
  min-height: calc(100dvh - 148px);
}

body.studio-shell .control-panel,
body.studio-shell .preview-panel,
body.studio-shell .metric,
body.studio-shell .table-wrap,
body.studio-shell .public-account-card,
body.studio-shell .public-provenance-card,
body.studio-shell .public-safety-review-card {
  border-color: rgba(131, 173, 205, .18);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 45%),
    rgba(10, 16, 23, .78);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 18px 50px rgba(0, 0, 0, .16);
  backdrop-filter: blur(16px);
}

body.studio-shell .control-panel {
  gap: 14px;
  padding: 17px;
}

body.studio-shell .preview-panel {
  min-height: 500px;
  background-color: rgba(5, 9, 14, .68);
  background-image:
    linear-gradient(rgba(104, 233, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 233, 255, .025) 1px, transparent 1px);
  background-size: 34px 34px;
}

body.studio-shell .preview-result {
  min-height: 500px;
  background: rgba(3, 7, 11, .88);
}

body.studio-shell textarea,
body.studio-shell input,
body.studio-shell select {
  scroll-margin-block: 14px;
  border-color: rgba(131, 173, 205, .22);
  border-radius: 10px;
  background: rgba(4, 9, 14, .82);
  color: var(--text);
}

body.studio-shell textarea:focus,
body.studio-shell input:focus,
body.studio-shell select:focus {
  border-color: rgba(104, 233, 255, .7);
  box-shadow: 0 0 0 3px rgba(104, 233, 255, .065), 0 0 22px rgba(104, 233, 255, .04);
}

body.studio-shell textarea::placeholder,
body.studio-shell input::placeholder {
  color: #5d6b7e;
}

body.studio-shell .field > span,
body.studio-shell .lora-heading {
  color: #b9c5d3;
  font-size: 11px;
}

body.studio-shell .enhance-button {
  color: var(--cyan);
}

body.studio-shell .clear-prompt-button {
  color: #738196;
}

body.studio-shell details {
  border-color: rgba(131, 173, 205, .16);
}

body.studio-shell summary {
  color: #8492a5;
}

body.studio-shell .segmented {
  padding: 3px;
  border-color: rgba(131, 173, 205, .18);
  border-radius: 11px;
  gap: 2px;
  overflow: visible;
  background: rgba(4, 9, 14, .62);
}

body.studio-shell .segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: transparent;
  color: #7e8b9d;
}

body.studio-shell .segmented .selected {
  background: rgba(104, 233, 255, .09);
  box-shadow: inset 0 0 0 1px rgba(104, 233, 255, .18);
  color: #e9fcff;
}

body.studio-shell .primary-button,
body.studio-shell .secondary-button,
body.studio-shell .danger-button,
body.studio-shell .library-input-button {
  border-radius: 11px;
}

body.studio-shell .primary-button {
  border-color: rgba(255, 122, 113, .72);
  background: linear-gradient(110deg, #ff5b52, #ff746c);
  box-shadow: 0 9px 24px rgba(255, 83, 73, .13), inset 0 1px rgba(255, 255, 255, .2);
}

body.studio-shell .secondary-button,
body.studio-shell .icon-button {
  border-color: rgba(131, 173, 205, .2);
  background: rgba(15, 23, 32, .72);
}

body.studio-shell .secondary-button:hover,
body.studio-shell .icon-button:hover {
  border-color: rgba(104, 233, 255, .42);
  color: #f1fdff;
}

body.studio-shell .upload-field,
body.studio-shell .image-mapper-panel,
body.studio-shell .image-mask-panel,
body.studio-shell .image-reference-panel,
body.studio-shell .character-selector-panel,
body.studio-shell .lora-panel,
body.studio-shell .video-edit-controls,
body.studio-shell .pipeline-stage,
body.studio-shell .check-row {
  border-color: rgba(131, 173, 205, .18);
  border-radius: 12px;
  background: rgba(5, 10, 16, .54);
}

body.studio-shell .upload-field:hover {
  border-color: rgba(104, 233, 255, .58);
}

body.studio-shell .reference-panel-summary {
  border-radius: 12px;
}

body.studio-shell .image-reference-slot,
body.studio-shell .image-mapper-point,
body.studio-shell .character-selection-row,
body.studio-shell .character-profile-card {
  border-color: rgba(131, 173, 205, .16);
  border-radius: 10px;
  background: rgba(5, 10, 16, .68);
}

body.studio-shell .empty-state,
body.studio-shell .loading-state {
  color: #718095;
}

body.studio-shell .empty-state svg {
  color: #688096;
  stroke-width: 1.35;
}

body.studio-shell .form-hint,
body.studio-shell .library-summary,
body.studio-shell .audit-note {
  color: #718095;
  font-size: 11px;
}

body.studio-shell .queue-panel,
body.studio-shell dialog,
body.studio-shell .asset-context-menu {
  border-color: rgba(131, 173, 205, .25);
  border-radius: 16px;
  background: rgba(6, 11, 17, .97);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .7), 0 0 50px rgba(104, 233, 255, .04);
  backdrop-filter: blur(22px);
}

body.studio-shell dialog::backdrop {
  background: rgba(1, 4, 8, .8);
  backdrop-filter: blur(8px);
}

body.studio-shell dialog > header,
body.studio-shell dialog > footer,
body.studio-shell .asset-viewer > header,
body.studio-shell .asset-viewer > footer {
  background: rgba(12, 19, 27, .92);
}

body.studio-shell .output-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 11px;
}

body.studio-shell .output-item,
body.studio-shell .library-picker-item,
body.studio-shell .reference-library-item,
body.studio-shell .asset-input-provenance-card {
  border-color: rgba(131, 173, 205, .17);
  border-radius: 13px;
  background: rgba(10, 16, 23, .82);
}

body.studio-shell .output-item[data-asset]:hover,
body.studio-shell .output-item[data-asset]:focus-visible {
  border-color: rgba(104, 233, 255, .46);
  box-shadow: 0 0 24px rgba(104, 233, 255, .045);
}

body.studio-shell .output-type,
body.studio-shell .project-badge,
body.studio-shell .badge {
  border-radius: 999px;
}

body.studio-shell .project-section {
  border-color: rgba(131, 173, 205, .14);
}

body.studio-shell table th {
  background: rgba(16, 24, 34, .96);
}

body.studio-shell .toast {
  border-color: rgba(131, 173, 205, .28);
  border-radius: 12px;
  background: rgba(14, 21, 30, .96);
}

body.studio-shell.public-mode .public-bug-report {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 5px 8px;
  transform: none;
  border-radius: 9px;
  font-size: 9px;
}

body.studio-shell.public-mode .public-bug-report svg {
  width: 13px;
  height: 13px;
}

body.studio-shell .public-chat-layout {
  max-width: 940px;
}

body.studio-shell #chat.active {
  height: var(--studio-active-view-height, calc(100dvh - 112px));
  min-height: 520px;
}

body.studio-shell .public-chat-log {
  padding: 6px 3px 10px;
}

body.studio-shell .public-chat-message {
  border: 1px solid rgba(131, 173, 205, .12);
  border-radius: 14px;
  background: rgba(17, 27, 37, .86);
}

body.studio-shell .public-chat-message.user {
  border-color: rgba(255, 98, 89, .2);
  background: rgba(67, 29, 26, .82);
}

body.studio-shell .public-chat-message.character {
  border-color: hsla(var(--character-hue), 70%, 62%, .34);
  background: linear-gradient(135deg, hsla(var(--character-hue), 54%, 19%, .92), rgba(14, 22, 30, .9));
  box-shadow: inset 3px 0 0 hsla(var(--character-hue), 78%, 66%, .72);
}

body.studio-shell .public-chat-message.lumina {
  border-color: rgba(222, 228, 234, .6);
  background: #d4d7da;
}

body.studio-shell #publicChatForm {
  border-color: rgba(131, 173, 205, .2);
  border-radius: 16px;
  background: rgba(9, 15, 22, .86);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

body.studio-shell.studio-keyboard-open {
  min-height: var(--studio-visible-height, 100dvh);
}

body.studio-shell.studio-keyboard-open .workspace {
  min-height: var(--studio-visible-height, 100dvh);
  scroll-padding-bottom: calc(var(--studio-keyboard-occlusion, 0px) + 18px);
}

/* The public Moonshack Companion surface owns its own keyboard-aware height
   and composer/dock boundary.  The legacy padding shim was written for the
   old #chat view; applying it to #companion turns the keyboard occlusion into
   literal empty space underneath the composer. */
body.studio-shell.studio-keyboard-open .view.active:not(#chat):not(#companion):not(#rooms) {
  padding-bottom: calc(var(--studio-keyboard-occlusion, 0px) + 18px);
}

body.studio-shell.studio-keyboard-open #chat.active {
  height: var(--studio-active-view-height, calc(var(--studio-visible-height, 100dvh) - 70px));
  min-height: 220px;
}

body.studio-shell.studio-keyboard-open #chat .view-header {
  display: none;
}

body.studio-shell.studio-keyboard-open #publicChatForm {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

body.studio-shell .public-chat-transcript {
  border-color: rgba(131, 173, 205, .18);
  border-radius: 15px;
  background: rgba(5, 10, 16, .64);
}

body.studio-shell .public-chat-review-message {
  border-radius: 13px;
}

body.studio-shell .public-account-card {
  padding: 18px;
}

body.studio-shell .public-account-avatar {
  border-color: rgba(104, 233, 255, .34);
  background: rgba(104, 233, 255, .06);
}

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

  body.studio-shell .preview-panel,
  body.studio-shell .preview-result {
    min-height: 410px;
  }
}

@media (max-width: 640px) {
  body.studio-shell .topbar {
    height: 58px;
    gap: 7px;
    padding: 0 9px;
  }

  body.studio-shell .studio-menu-toggle {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  body.studio-shell .brand {
    flex: 0 0 35px;
  }

  body.studio-shell .brand-mark {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  body.studio-shell .brand-copy {
    display: none;
  }

  body.studio-shell .status-strip {
    min-width: 0;
    flex: 1 1 auto;
    gap: 4px;
  }

  body.studio-shell .activity-status {
    width: auto;
    min-width: 72px;
    flex: 1 1 auto;
  }

  body.studio-shell .activity-copy {
    font-size: 9px;
  }

  body.studio-shell .status.secondary {
    display: none;
  }

  body.studio-shell .top-actions {
    display: flex;
    gap: 3px;
  }

  body.studio-shell .top-actions .icon-button {
    display: none;
  }

  body.studio-shell.public-mode .top-actions #publicSaveGuest {
    display: inline-flex;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
  }

  body.studio-shell.public-mode .top-actions #publicLogout,
  body.studio-shell.public-mode .top-actions .guest-session-status {
    display: none;
  }

  body.studio-shell.public-mode .public-bug-report {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
  }

  body.studio-shell.public-mode .public-bug-report span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  body.studio-shell .studio-nav-scrim {
    inset: 58px 0 0;
  }

  body.studio-shell .rail {
    top: 58px;
    bottom: 0;
    width: min(286px, calc(100vw - 42px));
    height: auto;
    flex-direction: column;
    padding: 13px 11px max(13px, env(safe-area-inset-bottom));
    border: 0;
    border-right: 1px solid rgba(131, 173, 205, .18);
    overflow: hidden;
  }

  body.studio-shell .nav-button {
    min-width: 0;
    min-height: 46px;
    flex: 0 0 auto;
  }

  body.studio-shell .shell {
    min-height: calc(100dvh - 58px);
    padding: 0;
  }

  body.studio-shell .workspace {
    min-height: calc(100dvh - 58px);
    padding: 13px 10px 20px;
  }

  body.studio-shell .view-header {
    min-height: 38px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 13px;
  }

  body.studio-shell .view-header .segmented {
    width: 100%;
  }

  body.studio-shell .view-header .segmented button {
    min-width: 0;
    min-height: 36px;
    flex: 1;
  }

  body.studio-shell .control-panel {
    padding: 13px;
    border-radius: 14px;
  }

  body.studio-shell .preview-panel,
  body.studio-shell .preview-result {
    min-height: 340px;
    border-radius: 14px;
  }

  body.studio-shell .output-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.studio-shell .library-controls,
  body.studio-shell .library-control,
  body.studio-shell .library-segmented {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.studio-shell .library-control {
    overflow: hidden;
  }

  body.studio-shell .library-segmented {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  body.studio-shell .library-segmented button {
    flex: 0 0 auto;
    min-width: 90px;
  }

  body.studio-shell .output-item {
    border-radius: 11px;
  }

  body.studio-shell .output-item img,
  body.studio-shell .output-item video {
    height: 164px;
  }

  body.studio-shell .queue-panel {
    top: 66px;
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    max-height: calc(100dvh - 76px);
    border: 1px solid rgba(131, 173, 205, .24);
    border-radius: 15px;
  }

  body.studio-shell #chat.active {
    height: var(--studio-active-view-height, calc(100dvh - 84px));
    min-height: 0;
  }

  body.studio-shell #chat .view-header {
    min-height: 32px;
    align-items: center;
    flex-direction: row;
  }

  body.studio-shell #publicChatForm {
    border-radius: 14px;
  }

  body.studio-shell .toast {
    bottom: 10px;
  }
}

@media (max-width: 380px) {
  body.studio-shell .output-item img,
  body.studio-shell .output-item video {
    height: 148px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.studio-shell .rail,
  body.studio-shell .studio-nav-scrim {
    transition: none;
  }
}
