:root {
  --experience-ink: #142a33;
  --experience-muted: #64747b;
  --experience-teal: #007c8c;
  --experience-teal-strong: #006676;
  --experience-teal-soft: #e8f6f5;
  --experience-paper: #fbfaf6;
  --experience-surface: #ffffff;
  --experience-line: #d8e2e1;
  --experience-gold: #a86a2f;
  --experience-success: #1d7a57;
  --experience-warning: #a86420;
  --experience-danger: #b34c3e;
  --experience-shadow: 0 18px 50px rgba(24, 54, 61, 0.08);
  --experience-shadow-soft: 0 8px 24px rgba(24, 54, 61, 0.06);
  --experience-radius: 20px;
  --experience-ease: 190ms cubic-bezier(.2, .8, .2, 1);
  --experience-mobile-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

html {
  scroll-behavior: smooth;
  background: var(--experience-paper);
}

body.experience-ready {
  color: var(--experience-ink);
  background:
    radial-gradient(circle at 8% 6%, rgba(148, 226, 226, 0.24), transparent 30rem),
    radial-gradient(circle at 92% 0%, rgba(241, 210, 165, 0.16), transparent 28rem),
    var(--experience-paper);
  font-family: "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

body.experience-ready.experience-modal-open {
  overflow: hidden;
}

body.experience-ready .modal-mask {
  z-index: 400 !important;
}

body.experience-ready::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(20, 42, 51, 0.018) 1px, transparent 1px);
  background-size: 100% 28px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  z-index: -1;
}

.experience-ready button,
.experience-ready input,
.experience-ready textarea,
.experience-ready select {
  font: inherit;
}

.experience-ready input,
.experience-ready textarea,
.experience-ready select {
  border-color: var(--experience-line);
  color: var(--experience-ink);
  background: rgba(255, 255, 255, 0.96);
}

.experience-ready input:focus,
.experience-ready textarea:focus,
.experience-ready select:focus,
.experience-ready button:focus-visible,
.experience-ready a:focus-visible,
.experience-ready [tabindex]:focus-visible {
  outline: 3px solid rgba(0, 124, 140, 0.2) !important;
  outline-offset: 2px;
  border-color: var(--experience-teal) !important;
}

.experience-ready button:not(.ghost):not(.secondary):not(.warn):not(.danger),
.experience-ready .button:not(.secondary) {
  background: var(--experience-teal);
  border-color: var(--experience-teal);
  color: #fff;
}

.experience-ready button:not(:disabled) {
  transition: transform var(--experience-ease), box-shadow var(--experience-ease), background var(--experience-ease), border-color var(--experience-ease);
}

.experience-ready button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
}

.experience-ready button:disabled,
.experience-ready [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none !important;
}

.experience-ready .shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.experience-ready .top-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 72px;
  padding: 10px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(20, 42, 51, 0.09);
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(18px) saturate(135%);
}

.experience-ready .top-brand img {
  width: 136px;
  height: auto;
}

.experience-ready .top-brand strong {
  color: var(--experience-ink);
  font-size: 14px;
}

.experience-ready .top-brand span {
  color: var(--experience-muted);
  font-size: 11px;
}

.experience-ready .top-nav-links {
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(20, 42, 51, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  overflow: visible;
}

.experience-ready .top-nav-links button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: none !important;
  color: var(--experience-muted);
  white-space: nowrap;
}

.experience-ready .top-nav-links button:hover {
  color: var(--experience-teal-strong) !important;
  background: var(--experience-teal-soft) !important;
}

.experience-ready .top-nav-links button.active {
  color: var(--experience-teal-strong) !important;
  background: transparent !important;
  border-bottom: 3px solid var(--experience-teal) !important;
}

.experience-ready .account-trigger {
  min-height: 44px;
  border-radius: 14px;
  background: #fff !important;
  box-shadow: var(--experience-shadow-soft) !important;
}

/* Keep the established home composition; the redesign starts inside creation. */
body.experience-ready:not([data-view="home"]) .home-portal {
  display: none !important;
}

.experience-ready .home-portal {
  position: relative;
  isolation: isolate;
  width: auto;
  max-width: 1160px;
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: 24px 16px 72px;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  text-align: center;
}

/* Match the selected photography-studio reference with a real scene asset.
   Live HTML remains separate, so navigation and hero copy stay accessible. */
body.experience-ready[data-view="home"] {
  min-height: 100svh;
  background-color: #ead9c5;
  background-image:
    linear-gradient(90deg, rgba(248, 237, 221, 0.04), rgba(255, 255, 255, 0.08) 48%, rgba(126, 86, 50, 0.04)),
    url("/assets/openlai-home-studio-v1.jpg");
  background-repeat: no-repeat;
  background-position: center, center;
  background-size: cover, cover;
  background-attachment: scroll;
  animation: none;
}

body.experience-ready[data-view="home"] .shell {
  min-height: 100svh;
  background: transparent !important;
}

/* Separate navigation from the studio light so the beam starts below the app
   chrome instead of visually cutting through it. */
body.experience-ready[data-view="home"] .top-nav {
  border-bottom-color: rgba(104, 72, 44, 0.14) !important;
  background: rgba(246, 236, 222, 0.95) !important;
  box-shadow: 0 10px 30px rgba(78, 50, 28, 0.07) !important;
  -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
  backdrop-filter: blur(18px) saturate(112%) !important;
}

.experience-ready[data-view="home"] .home-portal::before,
.experience-ready[data-view="home"] .home-portal::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.experience-ready[data-view="home"] .home-portal::before {
  inset: 0;
  background:
    radial-gradient(ellipse 42% 18% at 28% 77%, rgba(255, 248, 222, 0.58), rgba(255, 236, 193, 0.18) 54%, transparent 76%);
  filter: blur(12px);
  opacity: 0.78;
  transform: translate3d(-3%, 0, 0) scale(1.03);
  animation: experience-home-studio-light 10s ease-in-out infinite alternate;
}

.experience-ready[data-view="home"] .home-portal::after {
  inset: 0;
  background:
    radial-gradient(
      ellipse 46% 34% at 52% 48%,
      rgba(248, 239, 225, 0.9) 0%,
      rgba(248, 239, 225, 0.76) 42%,
      rgba(248, 239, 225, 0.34) 67%,
      transparent 86%
    ),
    linear-gradient(180deg, rgba(255, 250, 241, 0.02), rgba(91, 57, 31, 0.035));
  opacity: 0.94;
}

.experience-ready[data-view="home"] .home-portal > * {
  position: relative;
  z-index: 1;
}

@keyframes experience-home-studio-light {
  0% { transform: translate3d(-4%, 0, 0) scale(1.03); opacity: 0.58; }
  50% { transform: translate3d(1%, -1%, 0) scale(1.05); opacity: 0.86; }
  100% { transform: translate3d(6%, 1%, 0) scale(1.03); opacity: 0.68; }
}

@media (prefers-reduced-motion: reduce) {
  body.experience-ready[data-view="home"],
  .experience-ready[data-view="home"] .home-portal::before,
  .experience-ready[data-view="home"] .home-portal::after {
    animation: none;
  }
}

.experience-home-copy {
  max-width: 640px;
}

.experience-ready .home-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(220, 205, 190, 0.82);
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.experience-ready #homeHeroTitle {
  max-width: 820px;
  margin: 0 auto 14px;
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

.experience-ready .home-subtitle {
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 16px;
}

.experience-ready .home-cta-row {
  justify-content: center;
  margin: 32px auto 0;
}

.experience-ready .home-cta-row button {
  min-height: 46px;
  padding-inline: 22px;
  border-radius: 999px;
}

.experience-home-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  color: var(--experience-muted);
  font-size: 13px;
}

.experience-home-trust span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--experience-success);
  font-weight: 800;
}

.experience-home-preview {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--experience-shadow);
  overflow: hidden;
}

.experience-home-preview::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: rgba(148, 226, 226, 0.34);
  filter: blur(4px);
}

.experience-home-preview-head,
.experience-preview-card,
.experience-preview-track {
  position: relative;
}

.experience-home-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.experience-home-preview-head span {
  color: var(--experience-muted);
  font-size: 12px;
}

.experience-home-preview-head b {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.experience-preview-live {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--experience-success);
  background: #eaf7f0;
  font-size: 12px;
  font-weight: 700;
}

.experience-preview-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.experience-preview-track span {
  position: relative;
  padding-top: 15px;
  color: var(--experience-muted);
  font-size: 11px;
  text-align: center;
}

.experience-preview-track span::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  border-radius: 999px;
  background: #e1e9e8;
}

.experience-preview-track span.is-done::before,
.experience-preview-track span.is-active::before {
  background: var(--experience-teal);
}

.experience-preview-track span.is-active {
  color: var(--experience-teal-strong);
  font-weight: 700;
}

.experience-preview-card {
  padding: 22px;
  border: 1px solid var(--experience-line);
  border-radius: 18px;
  background: #fff;
}

.experience-preview-card-label {
  color: var(--experience-teal-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.experience-preview-card h3 {
  margin: 8px 0 14px;
  font-size: 22px;
}

.experience-preview-line {
  height: 10px;
  margin: 9px 0;
  border-radius: 999px;
  background: #edf1f0;
}

.experience-preview-line:nth-child(4) { width: 82%; }
.experience-preview-line:nth-child(5) { width: 64%; }

.experience-preview-people {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.experience-preview-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--experience-teal);
  font-weight: 800;
}

.experience-preview-people small {
  display: block;
  color: var(--experience-muted);
}

/* App layout and the signature creation rail. */
.experience-ready .studio-layout {
  width: min(1320px, calc(100% - 40px));
  max-width: none;
  margin: 14px auto 64px;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.experience-ready .side-nav {
  position: sticky;
  top: 82px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 18px;
  background: rgba(251, 250, 246, 0.92);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

/* The legacy rail drew its connector on the layout panel itself. The new rail
   is a horizontal card track, so no vertical connector or panel divider is
   needed in the experience shell. */
.experience-ready .side-nav::before,
.experience-ready .side-nav::after,
.experience-ready .side-nav button[data-flow-target]::after,
.experience-ready .workspace-panel {
  border-left: 0 !important;
  background-image: none !important;
}

.experience-ready .side-nav-title {
  display: none !important;
}

.experience-ready .side-nav button[data-flow-target] {
  position: relative;
  min-height: 58px;
  margin: 0;
  padding: 10px 12px 10px 52px;
  border: 1px solid transparent !important;
  border-radius: 12px;
  color: var(--experience-muted);
  background: transparent !important;
  box-shadow: none !important;
  text-align: left;
}

body.experience-ready[data-view="studio"] .side-nav button[data-flow-target] {
  padding: 10px 12px 10px 52px !important;
}

.experience-ready .side-nav button[data-flow-target]::before {
  content: attr(data-experience-index);
  position: absolute;
  left: 13px;
  top: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--experience-line);
  border-radius: 50%;
  color: var(--experience-muted);
  background: #fff;
  transform: translateY(-50%);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.experience-ready .side-nav button[data-flow-target]:not(:last-of-type)::after {
  display: none;
}

.experience-ready .side-nav button[data-flow-target].active {
  color: var(--experience-teal-strong) !important;
  background: var(--experience-teal-soft) !important;
  border-color: rgba(0, 124, 140, 0.18) !important;
  font-weight: 750;
}

.experience-ready .side-nav button[data-flow-target].active::before,
.experience-ready .side-nav button[data-flow-target].is-complete::before {
  border-color: var(--experience-teal);
  color: #fff;
  background: var(--experience-teal);
}

.experience-ready .side-nav button[data-flow-target].is-complete::before {
  content: "✓";
}

.experience-ready .side-nav button[data-flow-target].is-locked {
  opacity: 0.55;
}

.experience-ready .side-nav .experience-assets-link,
.experience-ready .side-nav .experience-assets-title {
  display: none !important;
}

.experience-ready .workspace-panel {
  min-width: 0;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

.experience-ready .studio-workbench-heading {
  margin: 0 0 12px;
}

.experience-ready .studio-workbench-heading h2 {
  margin: 0;
  font-size: clamp(26px, 2.4vw, 36px);
  letter-spacing: -0.035em;
}

.experience-ready .studio-workbench-heading p {
  max-width: 720px;
  color: var(--experience-muted);
}

body.experience-ready[data-view="studio"] .workspace-panel > .layout {
  display: none !important;
}

.experience-studio-grid {
  display: none;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 24px;
  align-items: start;
}

body.experience-ready[data-view="studio"] .experience-studio-grid {
  display: grid;
}

.experience-stage-main {
  min-width: 0;
}

.experience-stage-summary {
  position: sticky;
  top: 98px;
}

body.experience-ready[data-view="studio"] .experience-stage-panel {
  display: none !important;
}

body.experience-ready[data-view="studio"][data-studio-step="content"] #section-core-config,
body.experience-ready[data-view="studio"][data-studio-step="script"] #section-core-config,
body.experience-ready[data-view="studio"][data-studio-step="generate"] #section-generation-workbench,
body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench {
  display: block !important;
  animation: experience-stage-forward 210ms ease both;
}

body.experience-ready[data-slide-direction="backward"] .experience-stage-panel {
  animation-name: experience-stage-backward !important;
}

@keyframes experience-stage-forward {
  from { opacity: 0; transform: translateX(34px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes experience-stage-backward {
  from { opacity: 0; transform: translateX(-34px); }
  to { opacity: 1; transform: translateX(0); }
}

.experience-ready .experience-stage-panel.section,
.experience-ready .experience-stage-panel.section.collapsible-section {
  margin: 0 !important;
  border: 1px solid rgba(20, 42, 51, 0.1) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--experience-shadow-soft) !important;
  overflow: visible;
}

.experience-ready .experience-stage-panel > summary {
  pointer-events: none;
}

.experience-ready .experience-stage-panel > summary .section-head::after,
.experience-ready .experience-stage-panel .title-copy h2::before {
  display: none !important;
}

.experience-ready .experience-stage-panel .section-head {
  min-height: 68px;
  padding: 20px 22px 12px;
}

.experience-ready .experience-stage-panel .section-head h2 {
  font-size: 25px;
  letter-spacing: -0.025em;
}

.experience-ready .experience-stage-panel .section-body,
.experience-ready .experience-stage-panel > .section-grid {
  padding: 8px 22px 24px;
}

body.experience-ready[data-view="studio"] #section-script-workbench.experience-composite-script {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.experience-ready[data-view="studio"][data-studio-step="content"] #section-script-workbench.experience-composite-script {
  display: none !important;
}

body.experience-ready[data-view="studio"][data-studio-step="script"] #section-core-config > summary,
body.experience-ready[data-view="studio"][data-studio-step="script"] #section-core-config > .section-body > :not(#section-script-workbench) {
  display: none !important;
}

body.experience-ready[data-view="studio"][data-studio-step="script"] #section-core-config #section-script-workbench {
  display: block !important;
}

body.experience-ready[data-view="studio"] #section-script-workbench .section-head {
  padding-inline: 0;
}

body.experience-ready[data-view="studio"] #section-script-workbench > .section-grid {
  padding-inline: 0;
}

.experience-ready #topicSceneMenu .experience-create-scene {
  margin-top: 8px;
  border-top: 1px solid var(--experience-line) !important;
  border-radius: 0 !important;
  color: var(--experience-teal-strong) !important;
  font-weight: 800;
}

.experience-ready #section-core-config .project-summary-details,
.experience-ready #section-core-config .topic-delivery-config,
.experience-ready #section-core-config .task-panel,
.experience-ready #section-generation-workbench .debug-collapsible,
.experience-ready .debug-pre {
  box-shadow: none !important;
}

.experience-ready #section-core-config .topic-preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

.experience-ready #section-core-config .topic-preset-chip {
  min-width: 0;
  min-height: 58px;
  border-radius: 14px;
  text-align: left;
}

.experience-ready #section-core-config .topic-composer {
  border: 1px solid var(--experience-line);
  border-radius: 18px;
  box-shadow: none;
}

.experience-ready #section-core-config .topic-composer-bar {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px;
}

.experience-ready #section-core-config .topic-composer-bar > .field {
  min-width: 0;
}

.experience-ready #topicSettingsBtn {
  display: none !important;
}

.experience-ready #topicMoreBtn,
.experience-ready #topicSettingsBtn,
.experience-ready #section-core-config .topic-quick-menu {
  display: none !important;
}

.experience-ready #section-core-config .topic-composer textarea::placeholder {
  color: rgba(71, 92, 98, 0.58);
  opacity: 1;
}

.experience-ready .experience-script-estimate {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 124, 140, 0.14);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(232, 246, 245, 0.78), rgba(250, 252, 248, 0.88));
}

.experience-script-estimate-copy span {
  display: block;
  color: var(--experience-teal-strong);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.experience-script-estimate-copy strong {
  display: block;
  margin-top: 4px;
  color: var(--experience-ink);
  font-size: 13px;
}

.experience-script-estimate-copy small {
  display: block;
  margin-top: 3px;
  color: var(--experience-muted);
  font-size: 11px;
}

.experience-script-estimate-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--experience-muted);
  white-space: nowrap;
}

.experience-script-estimate-value input,
.experience-script-estimate-input {
  width: auto !important;
  min-width: 92px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--experience-teal-strong) !important;
  font: 800 18px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.experience-ready #section-core-config .topic-composer textarea {
  min-height: 190px;
  font-size: 17px;
  line-height: 1.75;
}

.experience-ready #oralCopyEditor {
  min-height: 360px;
  font-size: 17px;
  line-height: 1.8;
}

.experience-scene-picker-card {
  width: min(880px, calc(100vw - 40px));
}

.experience-scene-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin: 16px 0 12px;
}

.experience-scene-grid #projectScenePickerGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 2px;
}

.experience-scene-grid .scene-picker-option {
  min-height: 190px;
  display: grid;
  grid-template-rows: 116px auto auto;
  align-content: start;
  gap: 6px;
  padding: 10px !important;
  border: 1px solid var(--experience-line) !important;
  border-radius: 15px !important;
  background: #fff !important;
  text-align: left;
  overflow: hidden;
}

.experience-scene-grid .scene-picker-option img {
  width: 100%;
  height: 116px;
  border-radius: 10px;
  object-fit: cover;
}

.experience-scene-grid .scene-picker-option:first-child::before {
  content: "使用人物原背景";
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--experience-muted);
  background: linear-gradient(135deg, #edf5f4, #f7f4ee);
  font-size: 13px;
  font-weight: 700;
}

.experience-scene-grid .scene-picker-option.active {
  border-color: var(--experience-teal) !important;
  box-shadow: 0 0 0 3px rgba(0, 124, 140, 0.1) !important;
}

.experience-ready #generateScriptBtn,
.experience-ready #prepareVideoBlueprintBtn,
.experience-ready #createGenerationPlanBtn,
.experience-ready #refreshPlanBtn {
  display: none !important;
}

.experience-ready .surface-note {
  border-color: rgba(0, 124, 140, 0.12);
  color: var(--experience-muted);
  background: rgba(232, 246, 245, 0.62);
}

.experience-ready #taskHud {
  display: block !important;
  padding: 20px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--experience-shadow-soft);
}

.experience-ready #taskHud .task-hud-head {
  align-items: flex-start;
}

.experience-ready #taskHud .task-hud-title h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.experience-ready #taskHud .task-hud-title p {
  display: none;
}

.experience-ready #taskHud .task-hud-grid {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 14px;
  border-top: 0;
}

.experience-ready #taskHud .task-stat {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-sizing: border-box;
  align-items: center;
}

.experience-ready #taskHud .task-stat span {
  color: var(--experience-muted);
  font-size: 12px;
}

.experience-ready #taskHud .task-stat b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  text-align: right;
  line-height: 1.35;
}

.experience-ready #taskHud .task-hud-bottom {
  display: block;
  margin-top: 14px;
}

.experience-ready #taskHud .task-next {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 124, 140, 0.12);
  color: var(--experience-teal-strong);
  background: var(--experience-teal-soft);
}

.experience-ready #taskHud .task-next strong {
  font-size: 12px;
}

.experience-ready #taskHud .task-next p {
  margin: 5px 0 0;
  color: var(--experience-ink);
  font-size: 13px;
  line-height: 1.55;
}

.experience-ready #taskHud .task-cost {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.experience-ready #taskHud .task-cost > strong {
  margin: 0 0 8px;
  color: var(--experience-ink);
}

.experience-ready #taskHud .round-cost-stat {
  padding: 12px 14px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-sizing: border-box;
}

.experience-ready #taskHud .round-cost-ledger {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--experience-line);
}

.experience-ready #taskHud .round-cost-ledger {
  max-height: 132px;
  overflow: auto;
}

.experience-stage-inline-status {
  display: none;
}

.experience-action-bar {
  position: sticky;
  bottom: 16px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(20, 42, 51, 0.14);
  backdrop-filter: blur(16px);
}

.experience-action-meta {
  min-width: 0;
  padding-left: 6px;
}

.experience-action-meta b,
.experience-action-meta span {
  display: block;
}

.experience-action-meta b {
  margin-bottom: 2px;
  font-size: 13px;
}

.experience-action-meta span {
  overflow: hidden;
  color: var(--experience-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experience-action-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.experience-action-buttons button {
  min-height: 44px;
  border-radius: 12px;
}

.experience-new-task-btn {
  white-space: nowrap;
}

#taskHud .round-cost-ledger div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#taskHud .round-cost-ledger div > b {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  word-break: keep-all;
}

.experience-primary-action {
  min-width: 132px;
}

/* Asset-first management. */
.experience-asset-tabs {
  width: fit-content;
  display: none;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

body.experience-ready[data-view="people"] .experience-asset-tabs,
body.experience-ready[data-view="scenes"] .experience-asset-tabs {
  display: flex;
}

.experience-asset-tabs button {
  min-height: 40px;
  padding: 8px 18px;
  border: 0 !important;
  border-radius: 10px;
  color: var(--experience-muted) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.experience-asset-tabs button.active {
  color: var(--experience-teal-strong) !important;
  background: var(--experience-teal-soft) !important;
}

body.experience-ready[data-view="people"] .studio-layout,
body.experience-ready[data-view="scenes"] .studio-layout {
  width: min(1180px, calc(100% - 40px));
  grid-template-columns: 1fr;
}

.experience-asset-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 0 2px;
}

.experience-asset-toolbar-copy span {
  color: var(--experience-teal-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.experience-asset-toolbar-copy h2 {
  margin: 4px 0 5px;
  font-size: 32px;
  letter-spacing: -0.035em;
}

.experience-asset-toolbar-copy p {
  margin: 0;
  color: var(--experience-muted);
}

.experience-asset-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.experience-asset-toolbar-actions button {
  min-height: 44px;
  border-radius: 12px;
}

.experience-asset-toolbar-actions button.is-active {
  border-color: var(--experience-teal) !important;
  color: #fff !important;
  background: var(--experience-teal) !important;
}

body.experience-ready[data-view="people"] #section-portrait-assets,
body.experience-ready[data-view="scenes"] #section-scene-assets {
  margin: 0 !important;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--experience-shadow-soft);
}

body.experience-ready[data-view="people"] #section-portrait-assets > summary,
body.experience-ready[data-view="scenes"] #section-scene-assets > summary {
  display: none;
}

body.experience-ready[data-view="people"] #section-portrait-assets .section-body,
body.experience-ready[data-view="scenes"] #section-scene-assets .section-body {
  padding: 22px;
}

.experience-ready #portraitGroupForm {
  display: none !important;
}

body.experience-ready[data-view="people"] #section-portrait-assets #portraitGroupForm {
  display: none !important;
}

body.experience-ready[data-view="people"] #section-portrait-assets.experience-show-groups #portraitGroupForm {
  display: block !important;
}

.experience-ready #portraitModeSwitch,
.experience-ready #sceneModeSwitch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.experience-ready .mode-switch .mode-chip {
  min-height: 44px;
  border-radius: 12px;
}

.experience-ready #portraitLibraryPanel .builder-head,
.experience-ready #sceneLibraryPanel .builder-head {
  display: flex !important;
}

.experience-ready #portraitLibraryPanel > .actions,
.experience-ready #sceneLibraryPanel > .actions {
  justify-content: flex-end;
}

.experience-ready #deletePortraitAssetBtn,
.experience-ready #deletePortraitGroupBtn,
.experience-ready #deleteSceneBtn {
  color: var(--experience-danger) !important;
  background: #fff !important;
  border-color: rgba(179, 76, 62, 0.25) !important;
}

.experience-ready .library-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.experience-ready .asset-card,
.experience-ready .gallery-item {
  border-radius: 16px;
  box-shadow: none;
}

.experience-ready #section-current-context,
.experience-ready .hero-health-toggle,
.experience-ready #roleForm,
.experience-ready .debug-collapsible,
.experience-ready details[hidden] {
  display: none !important;
}

/* Toasts and friendly inline feedback. */
.experience-toast-region {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 300;
  width: min(380px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.experience-toast {
  padding: 14px 16px;
  border: 1px solid rgba(20, 42, 51, 0.12);
  border-left: 4px solid var(--experience-teal);
  border-radius: 14px;
  color: var(--experience-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--experience-shadow);
  animation: experience-toast-in 180ms ease-out both;
}

.experience-toast.is-error { border-left-color: var(--experience-danger); }
.experience-toast.is-success { border-left-color: var(--experience-success); }

.experience-toast b,
.experience-toast span { display: block; }
.experience-toast b { margin-bottom: 3px; font-size: 13px; }
.experience-toast span { color: var(--experience-muted); font-size: 13px; line-height: 1.5; }

@keyframes experience-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.experience-field-message {
  margin-top: 8px;
  color: var(--experience-warning);
  font-size: 12px;
  line-height: 1.5;
}

/* Dialogs are real viewports, not fixed desktop cards squeezed onto phones. */
.experience-ready .modal-mask {
  padding: 20px;
  background: rgba(12, 28, 34, 0.52);
  backdrop-filter: blur(8px);
}

.experience-ready .modal-card,
.experience-ready .avatar-picker-card {
  max-height: min(760px, calc(100dvh - 40px));
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(12, 28, 34, 0.26);
}

.experience-ready .modal-card .actions {
  position: sticky;
  bottom: -1px;
  z-index: 3;
  padding-top: 12px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 18px);
}

.experience-ready:has(.modal-mask[aria-hidden="false"]) {
  overflow: hidden;
}

.experience-bottom-nav,
.experience-mobile-progress {
  display: none;
}

@media (max-width: 1100px) {
  .experience-ready .studio-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .experience-studio-grid {
    grid-template-columns: 1fr;
  }

  .experience-stage-summary {
    position: static;
    order: -1;
  }

  .experience-ready #taskHud .task-hud-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .experience-ready #taskHud .task-stat {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 10px;
    border: 1px solid rgba(20, 42, 51, 0.1);
    border-radius: 10px;
  }

  .experience-ready #taskHud .task-stat b {
    display: block;
    margin-top: 0;
    text-align: left;
  }

  .experience-ready #taskHud .task-hud-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  :root {
    --experience-radius: 17px;
  }

  html,
  body.experience-ready {
    max-width: 100%;
    overflow-x: clip;
  }

  body.experience-ready {
    padding-bottom: var(--experience-mobile-bottom);
    background:
      linear-gradient(180deg, rgba(226, 246, 245, 0.82) 0, rgba(251, 250, 246, 0.96) 250px),
      var(--experience-paper);
  }

  .experience-ready .top-nav {
    min-height: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
  }

  .experience-ready .top-brand {
    min-width: 0;
  }

  .experience-ready .top-brand img {
    width: 106px;
  }

  .experience-ready .top-brand > div,
  .experience-ready .top-nav-links {
    display: none !important;
  }

  .experience-ready .account-trigger {
    min-height: 42px;
    padding: 6px 9px;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .experience-ready .account-trigger #accountName {
    display: none;
  }

  .experience-ready .account-avatar {
    width: 34px;
    height: 34px;
  }

  .experience-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    min-height: var(--experience-mobile-bottom);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 6px max(7px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(20, 42, 51, 0.1);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
  }

  .experience-bottom-nav button {
    min-width: 0;
    min-height: 50px;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 4px 2px;
    border: 0 !important;
    border-radius: 12px;
    color: var(--experience-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10px;
  }

  .experience-bottom-nav button.active {
    color: var(--experience-teal-strong) !important;
    background: var(--experience-teal-soft) !important;
  }

  .experience-bottom-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .experience-ready .home-portal {
    width: 100%;
    min-height: calc(100svh - 128px);
    display: grid !important;
    padding: 34px 18px 48px;
    align-content: center;
    text-align: center;
  }

  body.experience-ready[data-view="home"] {
    background-position: center, 9% center;
  }

  .experience-ready[data-view="home"] .home-portal::after {
    background:
      radial-gradient(
        ellipse 82% 35% at 50% 48%,
        rgba(248, 239, 225, 0.92) 0%,
        rgba(248, 239, 225, 0.78) 48%,
        rgba(248, 239, 225, 0.3) 76%,
        transparent 92%
      ),
      linear-gradient(180deg, rgba(250, 241, 228, 0.08), rgba(250, 241, 228, 0.16));
  }

  .experience-ready #homeHeroTitle {
    margin: 0 auto 14px;
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1.08;
  }

  .experience-ready .home-subtitle {
    font-size: 16px;
    line-height: 1.7;
  }

  .experience-ready .home-cta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 26px;
    justify-content: center;
  }

  .experience-ready .home-cta-row button {
    width: 100%;
    min-height: 52px;
  }

  .experience-home-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
  }

  .experience-home-preview {
    display: none;
  }

  body.experience-ready[data-view="studio"] .studio-layout,
  body.experience-ready[data-view="people"] .studio-layout,
  body.experience-ready[data-view="scenes"] .studio-layout,
  body.experience-ready[data-view="help"] .studio-layout {
    width: 100%;
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    margin: 0;
  }

  .experience-ready .side-nav {
    display: none !important;
  }

  body.experience-ready[data-view="studio"] .workspace-panel,
  body.experience-ready[data-view="people"] .workspace-panel,
  body.experience-ready[data-view="scenes"] .workspace-panel,
  body.experience-ready[data-view="help"] .workspace-panel {
    width: 100%;
  }

  body.experience-ready[data-view="studio"] .studio-workbench-heading {
    display: none !important;
  }

  .experience-mobile-progress {
    display: none;
  }

  body.experience-ready[data-view="studio"] .experience-mobile-progress {
    position: sticky;
    top: 56px;
    z-index: 45;
    min-height: 54px;
    display: block;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(20, 42, 51, 0.08);
    background: rgba(251, 250, 246, 0.94);
    backdrop-filter: blur(14px);
  }

  .experience-mobile-progress-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }

  .experience-mobile-step-card {
    min-width: 0;
    min-height: 44px !important;
    display: grid;
    grid-template-columns: auto 1fr;
    place-items: center start;
    gap: 4px;
    padding: 5px 6px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    color: var(--experience-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .experience-mobile-step-card span {
    font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  }

  .experience-mobile-step-card b {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .experience-mobile-step-card.is-active {
    border-color: rgba(0, 124, 140, 0.16) !important;
    color: var(--experience-teal-strong) !important;
    background: var(--experience-teal-soft) !important;
  }

  .experience-mobile-step-card.is-complete span::after {
    content: "✓";
    margin-left: 2px;
  }

  body.experience-ready[data-view="studio"] .experience-studio-grid {
    width: 100%;
    display: block;
  }

  .experience-stage-summary {
    display: none;
  }

  .experience-stage-main {
    width: 100%;
    padding: 14px 14px 100px;
  }

  .experience-stage-inline-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 13px;
    color: var(--experience-muted);
    background: rgba(255, 255, 255, 0.74);
    font-size: 12px;
  }

  .experience-stage-inline-status b {
    color: var(--experience-teal-strong);
  }

  .experience-ready .experience-stage-panel.section,
  .experience-ready .experience-stage-panel.section.collapsible-section {
    border-radius: 18px !important;
  }

  .experience-ready .experience-stage-panel .section-head {
    min-height: 58px;
    padding: 17px 15px 8px;
  }

  body.experience-ready[data-view="studio"] .experience-stage-panel .section-head h2 {
    font-size: 20px !important;
    white-space: nowrap !important;
  }

  .experience-ready .experience-stage-panel .section-body,
  .experience-ready .experience-stage-panel > .section-grid {
    padding: 6px 14px 18px;
  }

  .experience-ready #section-core-config .topic-preset-row {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  body.experience-ready[data-view="studio"] #section-core-config #topicParameters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .experience-ready .experience-script-estimate {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .experience-ready .experience-script-estimate-value {
    justify-content: flex-start;
  }

  .experience-ready .experience-script-estimate-value input {
    text-align: left;
  }

  .experience-ready #section-core-config .topic-preset-chip {
    width: 100%;
    min-height: 54px;
  }

  .experience-ready #section-core-config .topic-composer textarea {
    min-height: 210px;
    font-size: 16px;
  }

  .experience-ready #oralCopyEditor {
    min-height: min(48dvh, 420px);
    font-size: 16px;
  }

  .experience-scene-grid #projectScenePickerGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.experience-ready #topicSceneMenu.experience-mobile-scene-menu:not([hidden]) {
    position: fixed;
    z-index: 120;
    inset: 56px 0 var(--experience-mobile-bottom);
    width: 100%;
    max-height: none;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    border-radius: 0;
    box-shadow: none;
    background: var(--experience-paper);
  }

  body.experience-ready #topicSceneMenu.experience-mobile-scene-menu #topicSceneOptions {
    max-height: none;
    flex: 1 1 auto;
    overflow-y: auto;
  }

  .experience-ready input,
  .experience-ready select,
  .experience-ready textarea {
    min-height: 46px;
    font-size: 16px !important;
  }

  .experience-ready textarea {
    min-height: 130px;
  }

  .experience-ready button,
  .experience-ready .button {
    min-height: 44px;
  }

  .experience-ready #topicMoreBtn,
  .experience-ready #topicSettingsBtn {
    min-width: 44px;
  }

  .experience-ready .section-grid.two,
  .experience-ready .section-grid.three,
  .experience-ready .builder-grid,
  .experience-ready .media-grid {
    grid-template-columns: 1fr;
  }

  .experience-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--experience-mobile-bottom) + var(--experience-keyboard-offset, 0px));
    z-index: 70;
    min-height: 68px;
    margin: 0;
    padding: 9px 12px;
    border-width: 1px 0 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
  }

  .experience-action-meta {
    display: none;
  }

  .experience-action-buttons {
    width: 100%;
  }

  body.experience-ready[data-studio-step="script"] #experienceSaveDraftBtn {
    display: none;
  }

  .experience-action-buttons button {
    flex: 1 1 0;
  }

  .experience-new-task-btn {
    padding-inline: 10px;
    font-size: 12px;
  }

  .experience-primary-action {
    min-width: 0;
    flex: 2 1 0 !important;
  }

  .experience-asset-toolbar {
    display: block;
    padding: 20px 14px 4px;
  }

  body.experience-ready[data-view="people"] .studio-layout,
  body.experience-ready[data-view="scenes"] .studio-layout {
    padding-top: 14px;
  }

  .experience-asset-tabs {
    margin: 0 14px 8px;
  }

  .experience-asset-toolbar-copy h2 {
    font-size: 28px;
  }

  .experience-asset-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 14px;
  }

  body.experience-ready[data-view="people"] .studio-layout,
  body.experience-ready[data-view="scenes"] .studio-layout {
    width: 100%;
  }

  body.experience-ready[data-view="people"] #section-portrait-assets,
  body.experience-ready[data-view="scenes"] #section-scene-assets {
    margin: 10px 14px 30px !important;
    border-radius: 18px;
  }

  body.experience-ready[data-view="people"] #section-portrait-assets .section-body,
  body.experience-ready[data-view="scenes"] #section-scene-assets .section-body {
    padding: 14px;
  }

  .experience-ready #portraitModeSwitch,
  .experience-ready #sceneModeSwitch {
    grid-template-columns: 1fr;
  }

  .experience-ready .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .experience-ready .modal-mask {
    align-items: flex-end;
    padding: 0;
  }

  .experience-ready .modal-card,
  .experience-ready .avatar-picker-card,
  .experience-ready .auth-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    margin: 0;
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }

  .experience-ready .auth-card .form-grid {
    grid-template-columns: 1fr;
  }

  .experience-ready .auth-card .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .experience-ready .auth-card .actions button {
    width: 100%;
  }

  .experience-ready .avatar-picker-tabs,
  .experience-ready .avatar-picker-actions {
    overflow-x: auto;
  }

  .experience-ready .video-box video {
    width: 100%;
    max-height: calc(100dvh - 230px);
    object-fit: contain;
    background: #101617;
  }

  .experience-toast-region {
    top: 66px;
    left: 14px;
    right: 14px;
    width: auto;
  }
}

/* Result controls sit in the same row as the page title. The old floating
   action card duplicated the result message and consumed a full row. */
html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head {
  align-items: center;
  gap: 12px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head > #previewStatus {
  display: none !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head .result-action-bar {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  box-shadow: none;
}

/* Keep the current-result message compact; the player below is the primary
   result surface and should remain visible without a large empty card. */
html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-current-card {
  min-height: 0 !important;
  height: auto !important;
  padding: 8px !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-current-card .hint {
  margin-bottom: 4px !important;
  font-size: 11px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-current-card .output {
  min-height: 30px !important;
  max-height: 42px;
  padding: 6px 8px;
  font-size: 11px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-current-card .output pre {
  margin: 0;
  line-height: 1.35;
}

/* A collapsed status summary should not retain the old fixed-height spacer. */
html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .collapsible {
  min-height: 0 !important;
  height: auto !important;
  align-self: start;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .collapsible > summary {
  min-height: 38px;
  padding: 8px 12px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .collapsible:not([open]) > .collapsible-body {
  display: none;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-ledger div > b {
  min-width: max-content;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

@media (max-width: 760px) {
  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head {
    align-items: flex-start;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head .result-action-bar {
    margin-left: auto !important;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons {
    gap: 6px;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons button {
    min-height: 40px;
    padding: 0 9px;
  }
}

/* Compact result sequence: review the video first, then the history record. */
html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head {
  order: 1;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .result-content-grid {
  order: 2;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .result-history-card {
  order: 3;
  margin: 0 !important;
  padding: 8px !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card > .section-head {
  min-height: 28px;
  margin: 0 0 4px !important;
  padding: 0 4px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-list {
  max-height: none;
  gap: 0;
  padding: 0 4px;
  overflow: visible;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item {
  min-height: 48px;
  padding: 4px 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-thumb {
  width: 40px;
  height: 48px;
  aspect-ratio: auto;
  border-radius: 6px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-copy strong {
  font-size: 12px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-copy span {
  margin-top: 2px;
  font-size: 10px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item .actions {
  gap: 6px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item .actions button {
  min-width: 48px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .surface-note {
  grid-column: auto !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-ledger div {
  align-items: center;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-ledger div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-ledger div > b {
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
  text-align: right;
}

@media (max-width: 760px) {
  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-history-card .output-history-item .actions button {
    flex: 1 1 0;
    min-height: 40px;
  }
}

/* Result review layout: keep the task cockpit on the right while the result
   itself reads as a vertical review sequence. The action bar belongs to the
   result panel, so it never floats over the player or the page footer. */
body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-studio-grid {
  grid-template-columns: minmax(0, 1fr) 286px !important;
  gap: 24px !important;
  align-items: start;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-stage-summary {
  display: block;
  position: sticky !important;
  top: 98px;
  order: initial !important;
  min-width: 0;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud {
  margin-top: 0;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-content-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: stretch;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack {
  order: -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .surface-note {
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 10px 12px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .result-current-card,
body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .collapsible {
  min-height: 86px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-current-card .output {
  min-height: 58px !important;
  max-height: 92px;
  padding: 8px 10px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .result-preview-card {
  order: 2;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .experience-action-bar {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  margin: 16px 0 0 !important;
  border-radius: 15px !important;
  box-shadow: none !important;
  background: rgba(247, 251, 250, 0.96);
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .experience-result-sidebar-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--experience-line);
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics > summary {
  min-height: 38px;
  padding: 8px 0;
  font-size: 12px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .collapsible-body {
  padding: 0;
}

@media (max-width: 1100px) {
  body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-studio-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-stage-summary {
    position: static !important;
    order: 2 !important;
  }
}

@media (max-width: 760px) {
  body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-stage-summary {
    display: block;
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] .result-detail-stack > .surface-note {
    grid-column: auto;
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .experience-action-bar {
    margin-top: 12px !important;
    padding: 9px 12px;
  }
}

/* Result page boundary fixes. The legacy studio shell is intentionally locked
   on desktop for the first three steps; the result page is a long review
   surface and must own the document scroll instead. */
html body.experience-ready[data-view="studio"][data-studio-step="result"] {
  height: auto !important;
  min-height: 100vh;
  overflow-x: clip !important;
  overflow-y: auto !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .shell {
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .workspace-panel {
  max-height: none !important;
  overflow: visible !important;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-bottom {
  display: block !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-width: 0;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-stat {
  grid-template-columns: minmax(0, 76px) minmax(0, 1fr) !important;
  min-width: 0;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-stat b {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-next,
html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-cost,
html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-stat,
html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .round-cost-ledger,
html body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .experience-result-sidebar-details {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 380px) {
  .experience-ready .library-grid {
    grid-template-columns: 1fr 1fr;
  }

  .experience-ready .home-portal {
    padding-inline: 15px;
  }

  .experience-ready #homeHeroTitle {
    font-size: 44px;
  }
}

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

/* Result workspace: turn the output page into a calm review surface rather
   than another stack of indistinguishable cards. */
body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-studio-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] .experience-stage-summary {
  position: static;
  order: 2;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud {
  margin-top: 0;
}

.result-workbench .section-head {
  align-items: center;
}

.result-workbench .section-head .status {
  max-width: 52%;
  text-align: right;
}

.result-history-card {
  margin-bottom: 16px !important;
  border: 1px solid rgba(20, 42, 51, 0.09) !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, rgba(232, 246, 245, 0.55), rgba(255, 255, 255, 0.96) 58%) !important;
}

.result-history-card > .section-head {
  margin-bottom: 8px !important;
}

.result-history-card .output-history-list {
  max-height: 178px;
  overflow: auto;
  padding-right: 4px;
}

.result-history-card .output-history-item {
  min-height: 68px;
  padding: 9px 4px;
  border-bottom-color: rgba(20, 42, 51, 0.08);
}

.result-history-card .output-history-item .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.result-history-card .output-history-item .actions button {
  min-width: 58px;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.result-content-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr) !important;
  gap: 16px !important;
  align-items: stretch;
}

.result-preview-card {
  min-width: 0;
  position: relative;
  padding: 14px;
  border: 1px solid rgba(20, 42, 51, 0.1);
  border-radius: 18px;
  background: #101718;
  box-shadow: 0 14px 34px rgba(20, 42, 51, 0.14);
}

.video-generation-loading {
  position: absolute;
  inset: 14px 14px 62px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  color: #e9fbfb;
  text-align: left;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 24, 29, 0.32), rgba(8, 24, 29, 0.82));
  border-radius: 12px;
}

.video-generation-loading > div {
  display: grid;
  gap: 4px;
}

.video-generation-loading strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.video-generation-loading span:not(.video-generation-spinner) {
  color: rgba(233, 251, 251, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.video-generation-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 3px solid rgba(233, 251, 251, 0.3);
  border-top-color: #76e3e3;
  border-radius: 50%;
  animation: result-video-spin 0.9s linear infinite;
}

@keyframes result-video-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .video-generation-spinner { animation: none; }
}

/* The diagnostics live in the task sidebar. Keep a compact fixed viewport
   and render entries as plain text instead of nested bordered cards. */
body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .log-list {
  height: 184px;
  min-height: 184px;
  max-height: 184px;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  padding: 2px 6px 2px 0;
  scrollbar-gutter: stable;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .log-item,
body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .log-item.error,
body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .log-item.success {
  margin: 0;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--experience-ink);
  font-size: 11px;
  line-height: 1.45;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .result-diagnostics .log-time {
  margin-bottom: 2px;
  color: var(--experience-muted);
  font-size: 10px;
}

.result-preview-card video {
  display: block;
  min-height: 240px;
  max-height: min(560px, 68vh);
  border-radius: 12px;
  background: #0d1213;
  object-fit: contain;
}

.result-preview-card audio {
  border-radius: 10px;
}

.result-preview-card .preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.result-preview-card .preview-actions .button,
.result-preview-card .preview-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 118px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  box-sizing: border-box;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.result-preview-card .preview-actions .button {
  color: #fff;
  background: var(--experience-teal);
  border: 1px solid var(--experience-teal);
  text-decoration: none;
}

.result-preview-card .preview-actions .button:hover {
  background: var(--experience-teal-strong);
  border-color: var(--experience-teal-strong);
}

.result-detail-stack {
  min-width: 0;
  gap: 12px;
}

/* Keep the result message directly beneath the page title. It is status copy,
   not a second result card, so it should not introduce another border or
   consume space beside the player. */
.result-workbench .result-status-copy {
  margin: -4px 0 0;
  padding: 0 6px 2px;
  min-height: 18px;
  color: var(--experience-muted, #62757a);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
}

html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-workbench .result-status-copy {
  order: 1;
  margin-top: -36px;
  margin-left: 17px;
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 760px) {
  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-workbench .result-status-copy {
    margin-top: -6px;
    margin-left: 0;
  }
}

.result-detail-stack > .surface-note,
.result-current-card {
  border-radius: 16px !important;
}

.result-current-card {
  min-width: 0;
  border: 1px solid rgba(20, 42, 51, 0.1) !important;
  background: #fff !important;
}

.result-current-card .output {
  min-height: 100px !important;
  max-height: 210px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: #f7fbfa;
}

.result-workbench .collapsible {
  border-color: rgba(20, 42, 51, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.result-workbench .collapsible > summary {
  min-height: 44px;
  padding: 12px 14px;
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 12px;
}

@media (max-width: 900px) {
  .result-content-grid {
    grid-template-columns: 1fr !important;
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .result-workbench .section-head {
    align-items: flex-start;
    gap: 8px;
  }

  .result-workbench .section-head .status {
    max-width: 48%;
    font-size: 11px;
  }

  .result-history-card {
    padding: 12px !important;
  }

  .result-history-card .output-history-list {
    max-height: 232px;
  }

  .result-history-card .output-history-item {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: start;
  }

  .result-history-card .output-history-item .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .result-history-card .output-history-item .actions button {
    flex: 1 1 0;
  }

  .result-preview-card {
    padding: 10px;
    border-radius: 15px;
  }

  .result-preview-card video {
    min-height: 180px;
    max-height: calc(100dvh - 270px);
  }

  .result-preview-card .preview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-preview-card .preview-actions .button,
  .result-preview-card .preview-actions button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 12px;
  }

  body.experience-ready[data-view="studio"][data-studio-step="result"] #taskHud .task-hud-grid {
    grid-template-columns: 1fr;
  }
}

/* Final mobile layout pass. Keep app chrome opaque, preserve a true 44px
   touch target, and let result-page actions wrap inside their own panel. */
@media (max-width: 760px) {
  .experience-ready .top-nav {
    margin-bottom: 0 !important;
  }

  body.experience-ready:not([data-view="home"]) .top-nav {
    border-bottom-color: rgba(20, 42, 51, 0.1) !important;
    background: rgba(244, 249, 247, 0.98) !important;
    box-shadow: 0 8px 22px rgba(20, 42, 51, 0.06) !important;
    -webkit-backdrop-filter: blur(16px) saturate(112%) !important;
    backdrop-filter: blur(16px) saturate(112%) !important;
  }

  body.experience-ready[data-view="home"] {
    padding-bottom: 0;
  }

  .experience-toast-region {
    max-height: min(30dvh, 220px);
    gap: 8px;
    overflow: hidden;
  }

  .experience-toast {
    padding: 11px 12px;
    border-radius: 12px;
  }

  .experience-toast b,
  .experience-toast span {
    font-size: 12px;
  }

  .experience-ready #accountDropdown {
    position: fixed !important;
    top: 64px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--experience-mobile-bottom) - 76px) !important;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .experience-ready #topicParameters select,
  .experience-ready #scriptGenerateCost,
  .experience-ready .topic-clear-action {
    min-height: 44px !important;
  }

  .experience-action-buttons button {
    min-width: 0;
    min-height: 48px;
    padding-inline: 6px !important;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench {
    padding: 16px 12px !important;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 10px !important;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head > .title-wrap {
    width: 100% !important;
    min-width: 0;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] #section-preview-workbench > .section-head .result-action-bar {
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  html body.experience-ready[data-view="studio"][data-studio-step="result"] .result-action-bar .experience-action-buttons button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 8px !important;
    white-space: nowrap;
  }
}
