/* One creator; the scene stays visible beside the editor and behind its phone peek. */
.creator-shell { position: absolute; z-index: 3; inset: auto 0 0; box-sizing: border-box; height: min(78%, 780px); max-height: min(78%, 780px); border: 1px solid var(--rule); border-bottom: 0; border-radius: 20px 20px 0 0; background: rgb(10 13 26 / 0.94); color: var(--ink); font: 14px/1.4 var(--sans); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; }
.creator-shell[hidden], .creator-shell [hidden] { display: none !important; }
.creator-editor { display: flex; flex-direction: column; max-height: 100%; height: 100%; min-height: 0; }
.creator-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 8px; flex: none; }
.creator-title { margin: 0; font: 700 18px/1.25 var(--sans); }
.creator-grab { display: none; }
.creator-close { padding: 8px 12px; border: 0; border-radius: 999px; background: rgb(233 237 245 / 0.1); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; }
.creator-tabs { display: flex; gap: 4px; padding: 0 16px 10px; flex: none; border-bottom: 1px solid var(--rule); }
.creator-tab { flex: 1; padding: 10px 6px; border: 1px solid transparent; border-radius: 999px; background: none; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; }
.creator-tab[aria-selected="true"] { border-color: rgb(255 180 92 / 0.5); background: rgb(255 180 92 / 0.14); color: var(--ink); }
.creator-versions { flex: none; padding: 10px 16px 0; }
.creator-versions:empty, .creator-preview-versions:empty, .creator-footer:empty { display: none; }
.creator-body { display: flex; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.creator-tabpanel { flex: 1; min-width: 0; min-height: 0; padding: 14px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; box-sizing: border-box; }
.creator-tabpanel > :is(form, .creator-fields) { display: grid; gap: 12px; }
.creator-message, .creator-send { display: grid; align-content: start; gap: 12px; }
.creator-footer { display: grid; gap: 8px; padding: 10px 16px; flex: none; border-top: 1px solid var(--rule); background: rgb(10 13 26 / 0.97); }
.creator-peek { display: none; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 18px calc(13px + env(safe-area-inset-bottom, 0px)); border: 0; background: none; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
.creator-peek-action { color: var(--spark); }
.creator-shell :is(button, summary), .creator-shell input { min-height: 44px; }
.creator-shell .studio-switch input { min-height: 0; height: 26px; flex: none; }
.creator-shell .studio-switch { gap: 12px; min-height: 44px; }
.creator-shell :is(button, input, summary, [tabindex]):focus-visible { outline: 2px solid var(--spark); outline-offset: 2px; }
.creator-shell :is(.send-box, .studio, .builder-bar) { position: static; inset: auto; width: 100%; max-height: none; margin: 0; transform: none; border: 0; border-radius: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
.creator-shell .studio-head { position: static; margin: 0; }
.creator-shell .studio-section:first-child { padding-top: 0; }
.creator-shell .studio-footer { padding-bottom: 8px; }
.creator-shell .builder-plans { grid-template-columns: 1fr 1fr; }
.creator-shell .builder-plan:not(button) { cursor: auto; }
.creator-shell .builder-plan.is-selected { border-color: rgb(233 237 245 / 0.65); background: rgb(233 237 245 / 0.1); }
.creator-shell .builder-plan.is-deluxe.is-selected { border-color: #ffbe57; box-shadow: 0 0 0 1px #ffbe57; background: linear-gradient(160deg, rgb(255 190 90 / 0.16), rgb(255 190 90 / 0.03)); }
.creator-shell .builder-terms { line-height: 1.5; }
.creator-shell .builder-versions { box-sizing: border-box; width: 100%; }
.creator-shell .send-primary:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.recording .creator-shell, :is(.hero-mode, .embed-mode, .autoshow-mode) .creator-shell { display: none !important; }
.creator-preview-region { display: grid; gap: 8px; padding: 12px; }
.creator-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.creator-shell[data-mode="preview"] { left: 50%; right: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: min(460px, calc(100% - 24px)); height: auto; max-height: calc(100% - 24px); transform: translateX(-50%); border: 1px solid var(--rule); border-radius: 18px; background: rgb(10 13 26 / 0.84); }
.creator-shell[data-mode="preview"] .builder-bar { gap: 8px; }
.creator-shell[data-mode="preview"] .builder-bar .send-primary { flex-basis: 100%; }
.creator-shell :is(.studio-more, .creator-notice) { line-height: 1.45; }
.creator-message-notice { display: grid; gap: 8px; }
.creator-message-source { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.creator-notice { padding: 10px 12px; border: 1px solid rgb(255 180 92 / 0.4); border-radius: 10px; background: rgb(255 180 92 / 0.09); color: var(--ink); font-size: 13px; }
.creator-notice-text { margin: 0; }
.creator-look-words { display: grid; gap: 4px; }
.creator-notice-action { justify-self: start; padding: 8px 0; border: 0; background: none; color: var(--spark); font: 600 13px var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.creator-upgrade-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-top: 8px; padding-block: 2px; }
.creator-upgrade-notice .creator-notice-action { padding-inline: 2px; }
.creator-result { display: grid; gap: 10px; min-width: 0; padding: 14px; border: 1px solid rgb(255 180 92 / 0.4); border-radius: 12px; background: rgb(255 180 92 / 0.07); color: var(--ink); font: 14px/1.4 var(--sans); }
.creator-result[hidden], .creator-result [hidden] { display: none !important; }
.creator-result-title { margin: 0; font: 700 18px/1.25 var(--sans); }
.creator-result-message, .creator-result-description, .creator-result-feedback { margin: 0; font-size: 13px; line-height: 1.5; }
.creator-result-description { color: var(--muted); font-size: 12px; }
.creator-result-feedback { color: var(--spark); }
.creator-result-link { min-width: 0; min-height: 44px; text-transform: none; }
.creator-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.creator-result-actions :is(button, a), .creator-result-retry { box-sizing: border-box; min-height: 44px; }
.creator-result-actions :is(button, a) { flex: 1 1 110px; }
.creator-result-watch { display: grid; place-items: center; text-align: center; text-decoration: none; }
.creator-result-actions button:disabled { cursor: default; opacity: 0.6; }
.creator-result :is(button, a, input, [tabindex]):focus-visible { outline: 2px solid var(--spark); outline-offset: 2px; }
.gift-card .creator-result { max-width: 100%; box-sizing: border-box; }
.creator-advanced { margin-top: 14px; border-top: 1px solid var(--rule); }
.creator-advanced > summary { padding: 12px 0; color: var(--muted); font: 600 13px var(--sans); cursor: pointer; }
#app .creator-shell .creator-advanced[open] .panel.lil-gui { position: static; inset: auto; display: block; width: 100%; max-height: none; z-index: auto; overflow: visible; }
.creator-footer .send-row { flex-wrap: wrap; }
@media (max-width: 759px) {
  /* Show is a shelf over the scene; Message and Send retain room for their fields. */
  .creator-shell[data-mode="edit"] { transform: translateY(var(--creator-drag-y, 0px)); transition: transform 160ms ease-out; }
  .creator-shell[data-mode="edit"][data-dragging="true"] { transition: none; }
  .creator-shell[data-tab="show"][data-mode="edit"]:not([data-collapsed="true"]) { height: max(55%, min(420px, 78%)); max-height: 78%; }
  .creator-head { min-height: 44px; gap: 8px; padding: 0 12px; }
  .creator-title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .creator-grab { display: grid; flex: 1; justify-items: center; align-content: center; gap: 4px; min-width: 44px; padding: 4px 8px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 600 11px/1.2 var(--sans); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
  .creator-grab:active { cursor: grabbing; }
  .creator-grab-line { width: 36px; height: 4px; border-radius: 999px; background: rgb(233 237 245 / 0.45); }
  .creator-grab-label { display: block; }
  .creator-close { flex: none; padding: 6px 12px; }
  .creator-tabs { gap: 3px; padding: 0 12px 4px; }
  .creator-tab { padding: 6px 4px; font-size: 13px; }
  .creator-versions { padding: 4px 12px 0; }
  .creator-shell .creator-versions .builder-versions { gap: 2px; padding: 0; }
  .creator-shell .creator-versions .builder-version { min-width: 0; padding: 5px 6px; font-size: 12px; line-height: 1.2; }
  .creator-footer { gap: 6px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .creator-footer .send-status:empty { display: none; }
  .creator-footer .send-row { flex-wrap: nowrap; gap: 6px; }
  .creator-footer .send-row > button { min-width: 0; padding: 6px 8px; font-size: 13px; line-height: 1.2; }
  .creator-shell[data-collapsed="true"] .creator-editor { display: none; }
  .creator-shell[data-collapsed="true"] .creator-peek { display: flex; }
  .creator-shell[data-collapsed="true"] { height: auto; max-height: none; transition: none; }
  .creator-tabpanel { padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
  .creator-show { padding: 8px max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px)); }
}
@media (min-width: 760px) {
  .creator-shell { top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: auto; width: min(420px, calc(100% - 24px)); height: auto; max-height: none; border: 1px solid var(--rule); border-radius: 18px; }
  .creator-peek { display: none; }
  .creator-shell[data-mode="preview"] { top: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .creator-shell[data-mode="edit"] { transition: none; }
}
@media (hover: hover) { .creator-tab:hover, .creator-close:hover { background: rgb(233 237 245 / 0.14); color: var(--ink); } }
