:root {
  --studio-shell-max: 1220px;
  --studio-shell-pad: 36px;
  --studio-shell-border: rgba(143, 151, 164, 0.16);
  --studio-shell-shadow: 0 16px 42px rgba(31, 41, 58, 0.07);
}

body.studio-mode-page {
  color: #16171b;
  -webkit-font-smoothing: antialiased;
}

body.studio-mode-page > .app,
body.studio-mode-page > .page {
  position: relative;
  z-index: 1;
}

body.studio-mode-page:not(.studio-mode-talking) .app,
body.studio-mode-page:not(.studio-mode-talking) > .page {
  width: 100%;
  max-width: var(--studio-shell-max);
  margin: 0 auto;
  padding: 0 var(--studio-shell-pad) 52px;
  overflow: visible;
}

body.studio-mode-page .topnav,
body.studio-mode-page .topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  overflow: visible;
  isolation: isolate;
}

body.studio-mode-page .studio-mode-switcher {
  z-index: 510;
}

body.studio-mode-page .studio-mode-menu {
  z-index: 520;
  will-change: opacity, transform;
}

body.studio-mode-page:not(.studio-mode-talking) .topnav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 calc(var(--studio-shell-pad) * -1);
  padding: 14px var(--studio-shell-pad);
  border-bottom: 1px solid rgba(143, 151, 164, 0.1);
  background: rgba(250, 250, 246, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

body.studio-mode-page:not(.studio-mode-talking) .topnav > span {
  padding: 8px 18px;
  border-radius: 999px;
  color: #8b8d93;
  font-size: 14px;
  font-weight: 500;
}

body.studio-mode-page .topnav .studio-mode-trigger,
body.studio-mode-page .topbar .studio-mode-trigger {
  min-height: 38px;
  padding: 0 16px;
}

body.studio-mode-page .back {
  display: none;
}

body.studio-mode-page:not(.studio-mode-talking) .hero {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 54px 0 30px;
  text-align: center;
}

body.studio-mode-page:not(.studio-mode-talking) .center > .hero {
  padding: 4px 0 22px;
}

body.studio-mode-page .hero h1 {
  margin: 0 0 10px;
  font-size: 46px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
}

body.studio-mode-page .hero p {
  max-width: 520px;
  margin: 0 auto 17px;
  color: #9298a5;
  font-size: 15px;
  line-height: 1.7;
}

body.studio-mode-page .hero .status,
body.studio-mode-page .center > .status {
  min-height: 42px;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid rgba(143, 151, 164, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(31, 41, 58, 0.055);
  color: #565d68;
}

body.studio-mode-page .layout,
body.studio-mode-page .container {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

body.studio-mode-page .container {
  width: min(1180px, 100%);
  max-width: 100%;
  grid-template-columns: 328px minmax(0, 1fr);
  gap: 28px;
}

body.studio-mode-page.studio-mode-story .container,
body.studio-mode-page.studio-mode-talking .stage {
  grid-template-columns: 328px minmax(0, 1fr) 298px;
}

body.studio-mode-page .layout > .profile,
body.studio-mode-page .layout > .center,
body.studio-mode-page .layout > .mode-insight {
  align-self: start;
}

body.studio-mode-page .mode-profile {
  padding: 10px;
  border: 1px solid var(--studio-shell-border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--studio-shell-shadow);
}

body.studio-mode-page .mode-profile .photo-frame,
body.studio-mode-page .mode-profile > .avatar-img,
body.studio-mode-page .mode-profile > .portrait {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 20px;
  background-color: #23252d;
}

body.studio-mode-page .mode-profile .photo-frame > img,
body.studio-mode-page .mode-profile > .portrait > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.studio-mode-page .mode-profile .photo-tag,
body.studio-mode-page .mode-profile .badge,
body.studio-mode-page .mode-profile .avatar-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.68);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.35;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

body.studio-mode-page .mode-profile .change {
  position: absolute;
  bottom: 14px;
  left: 50%;
  z-index: 2;
  padding: 9px 16px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
  color: #16171b;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

body.studio-mode-page .mode-insight {
  position: sticky;
  top: 96px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

body.studio-mode-page.studio-mode-story .mode-insight {
  margin-top: 25px;
}

body.studio-mode-page.studio-mode-talking .mode-insight {
  margin-top: 28px;
}

body.studio-mode-page.studio-mode-creative .layout > .center,
body.studio-mode-page.studio-mode-creative .layout > .mode-insight,
body.studio-mode-page.studio-mode-vlog .layout > .center,
body.studio-mode-page.studio-mode-vlog .layout > .mode-insight {
  padding-top: 11px;
}

body.studio-mode-page .mode-insight .sidecard {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--studio-shell-border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--studio-shell-shadow);
}

body.studio-mode-page .mode-insight .sideline,
body.studio-mode-page .mode-insight .keep-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #16171b;
  font-size: 14px;
  font-weight: 750;
}

body.studio-mode-page .mode-insight .sideline .green,
body.studio-mode-page .mode-insight .keep-title i {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #35cf9d;
}

body.studio-mode-page .mode-insight .scorebox {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(143, 151, 164, 0.13);
  border-radius: 15px;
  background: #fff;
}

body.studio-mode-page .mode-insight .ring {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#43d3a1 0 331deg, #e6f4ef 331deg 360deg);
}

body.studio-mode-page .mode-insight .ring::after {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

body.studio-mode-page .mode-insight .ring b {
  position: relative;
  z-index: 1;
  font-size: 19px;
}

body.studio-mode-page .mode-insight .scoretxt b {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

body.studio-mode-page .mode-insight .scoretxt span {
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.55;
}

body.studio-mode-page .mode-insight .keep {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid rgba(143, 151, 164, 0.13);
  border-radius: 14px;
  background: #fff;
}

body.studio-mode-page .mode-insight .keep .icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
}

body.studio-mode-page .mode-insight .keep .orange {
  background: #fff2ea;
  color: #ff9c55;
}

body.studio-mode-page .mode-insight .keep .blue {
  background: #eef4ff;
  color: #3c79ff;
}

body.studio-mode-page .mode-insight .keep .purple {
  background: #f3efff;
  color: #7653d6;
}

body.studio-mode-page .mode-insight .keep b {
  display: block;
  font-size: 12.5px;
}

body.studio-mode-page .mode-insight .keep p {
  margin: 4px 0 0;
  color: #9ba2ad;
  font-size: 11px;
  line-height: 1.5;
}

body.studio-mode-page .left {
  position: sticky;
  top: 96px;
}

body.studio-mode-page .profile,
body.studio-mode-page .sidecard,
body.studio-mode-page .result,
body.studio-mode-page .context,
body.studio-mode-page .avatar-card {
  border-color: var(--studio-shell-border);
  border-radius: 22px;
  box-shadow: var(--studio-shell-shadow);
}

body.studio-mode-page .card,
body.studio-mode-page .canvas > .step {
  border-color: var(--studio-shell-border);
  border-radius: 24px;
  box-shadow: var(--studio-shell-shadow);
}

body.studio-mode-page .canvas > .step {
  padding: 22px;
}

body.studio-mode-page .section-label,
body.studio-mode-page .left-label,
body.studio-mode-page .main-label {
  color: #8c929d;
  font-size: 12px;
  font-weight: 600;
}

body.studio-mode-page .primary,
body.studio-mode-page .btn.primary {
  border-color: #16171b;
  background: #16171b;
}

body.studio-mode-page::after {
  position: fixed;
  z-index: 900;
  inset: 0;
  content: "";
  background: rgba(250, 250, 246, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}

body.studio-mode-page.is-mode-leaving::after {
  opacity: 1;
}

@media (min-width: 1181px) {
  body.studio-mode-page.studio-mode-creative .layout,
  body.studio-mode-page.studio-mode-vlog .layout {
    grid-template-columns: 328px minmax(0, 1fr) 298px;
    gap: 28px;
  }
}

@media (max-width: 1180px) and (min-width: 861px) {
  body.studio-mode-page .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  body.studio-mode-page.studio-mode-story .container,
  body.studio-mode-page.studio-mode-talking .stage {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  body.studio-mode-page .layout > .sidebar {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 0;
  }

  body.studio-mode-page .mode-insight {
    position: static;
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
  }

  body.studio-mode-page .layout > .sidebar .sidecard {
    margin-bottom: 0;
  }
}

@media (max-width: 860px) {
  body.studio-mode-page:not(.studio-mode-talking) .app,
  body.studio-mode-page:not(.studio-mode-talking) > .page {
    max-width: none;
    padding-right: 20px;
    padding-left: 20px;
  }

  body.studio-mode-page:not(.studio-mode-talking) .topnav {
    margin-right: -20px;
    margin-left: -20px;
    padding-right: 20px;
    padding-left: 20px;
  }

  body.studio-mode-page .hero h1 {
    font-size: 38px;
  }

  body.studio-mode-page.studio-mode-story .container,
  body.studio-mode-page.studio-mode-talking .stage {
    grid-template-columns: 1fr;
  }

  body.studio-mode-page .mode-insight {
    position: static;
    display: flex;
    grid-column: auto;
    flex-direction: column;
    margin-top: 0;
  }

  body.studio-mode-page.studio-mode-story .halo {
    width: min(610px, 100vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.studio-mode-page::after {
    transition: none;
  }
}

.creative-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1200;
  padding: 10px 16px;
  transform: translateX(-50%) translateY(12px);
  border-radius: 999px;
  background: rgba(20, 22, 28, 0.92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.creative-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.creative-toast.error {
  background: rgba(132, 32, 42, 0.94);
}

body.studio-mode-creative .global-sidebar-brand {
  font-size: 25px;
}

body.studio-mode-creative .global-nav-item {
  font-size: 14px;
}

body.studio-mode-creative .global-sidebar-foot h4 {
  font-size: 15px;
}

body.studio-mode-creative .global-sidebar-foot p {
  font-size: 11.5px;
}

body.studio-mode-creative .topnav > span,
body.studio-mode-creative .topnav .studio-mode-trigger {
  font-size: 14px;
}

body.studio-mode-creative .mode-profile .name {
  font-size: 16.5px;
}

body.studio-mode-creative .mode-profile .desc,
body.studio-mode-creative .mode-profile .hint {
  font-size: 12.5px;
}

body.studio-mode-creative .mode-profile .badge {
  font-size: 11.5px;
}

body.studio-mode-creative .mode-profile .change {
  font-size: 13.5px;
}

body.studio-mode-creative .hero h1 {
  font-size: 46px;
}

body.studio-mode-creative .hero p {
  font-size: 15px;
}

body.studio-mode-creative .hero .status,
body.studio-mode-creative .center > .status {
  font-size: 12px;
}

body.studio-mode-creative .cardtitle {
  font-size: 17.5px;
}

body.studio-mode-creative .sub,
body.studio-mode-creative .regen {
  font-size: 12.5px;
}

body.studio-mode-creative .step {
  font-size: 17.5px;
}

body.studio-mode-creative .textbox {
  font-size: 16px;
}

body.studio-mode-creative .counter {
  font-size: 11.5px;
}

body.studio-mode-creative .btn {
  font-size: 13.5px;
}

body.studio-mode-creative .prompt textarea {
  font-size: 13.5px;
}

body.studio-mode-creative .promptmeta,
body.studio-mode-creative .resulttools {
  font-size: 11.5px;
}

body.studio-mode-creative .mode-insight .sideline,
body.studio-mode-creative .mode-insight .keep-title {
  font-size: 14.5px;
}

body.studio-mode-creative .mode-insight .ring b {
  font-size: 21px;
}

body.studio-mode-creative .mode-insight .scoretxt b {
  font-size: 14.5px;
}

body.studio-mode-creative .mode-insight .scoretxt span {
  font-size: 11.5px;
}

body.studio-mode-creative .mode-insight .keep b {
  font-size: 13px;
}

body.studio-mode-creative .mode-insight .keep p {
  font-size: 11.5px;
}

body.studio-mode-creative .footer {
  font-size: 12.5px;
}

body.studio-mode-creative .gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.studio-mode-creative .gallery .video {
  display: none;
}
