@layer nextiStoryStudio {
 .story-editor[data-nx-story-editor],.story-editor:has(.nx-se-head) {
  --se-bg:var(--mobile-theme-background,var(--mobile-theme-bg,#080f1b));--se-surface:var(--mobile-theme-surface,#111e31);--se-accent:var(--mobile-theme-component-accent,var(--mobile-theme-accent,#13cbd7));--se-text:var(--mobile-theme-text,#edf5ff);--se-muted:var(--mobile-theme-component-muted,var(--mobile-theme-muted,#a6b8ce));--se-line:var(--mobile-theme-line,#2a394d);--se-alt:color-mix(in srgb,var(--se-accent) 7%,var(--se-surface));
  position:fixed!important;inset:auto!important;top:var(--nexti-app-viewport-top,0px)!important;left:var(--nexti-app-viewport-left,0px)!important;width:var(--nexti-app-viewport-width,100vw)!important;height:var(--nexti-app-viewport-height,100dvh)!important;z-index:2147482600!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) 360px!important;grid-template-rows:auto minmax(0,1fr)!important;grid-template-areas:"head head" "stage bottom"!important;gap:0!important;overflow:hidden!important;overscroll-behavior:contain;background:var(--se-bg)!important;color:var(--se-text)!important;font:14px/1.45 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;touch-action:manipulation!important;
 }
 .story-editor:has(.nx-se-head) * {box-sizing:border-box!important;}
 .story-editor:has(.nx-se-head)>audio {display:none!important;}
 .story-editor:has(.nx-se-head) button,.story-editor:has(.nx-se-head) select,.story-editor:has(.nx-se-head) input,.story-editor:has(.nx-se-head) textarea {font-family:inherit!important;letter-spacing:normal!important;text-transform:none!important;-webkit-tap-highlight-color:transparent;}
 .story-editor:has(.nx-se-head) button {cursor:pointer;touch-action:manipulation;}
 .story-editor:has(.nx-se-head) button:disabled {opacity:.4!important;cursor:default!important;}
 .story-editor:has(.nx-se-head) button:focus-visible,.story-editor:has(.nx-se-head) input:focus-visible,.story-editor:has(.nx-se-head) select:focus-visible {outline:2px solid var(--se-accent)!important;outline-offset:3px;}
 .nx-se-head {grid-area:head!important;display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;min-height:72px!important;padding:12px max(18px,env(safe-area-inset-right,0px)) 12px max(18px,env(safe-area-inset-left,0px))!important;background:var(--se-surface)!important;border-bottom:1px solid var(--se-line)!important;z-index:5;}
 .nx-se-title {min-width:0;flex:1;display:grid;gap:1px;}
 .nx-se-title strong {font-size:17px;font-weight:750;color:var(--se-text)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 .nx-se-title>span {font-size:12px;color:var(--se-muted)!important;}
 .nx-se-button {display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;min-height:42px!important;border:1px solid var(--se-line)!important;border-radius:14px!important;padding:9px 12px!important;background:var(--se-surface)!important;color:var(--se-text)!important;font-size:12px!important;font-weight:650!important;box-shadow:none!important;flex-shrink:0;}
 .nx-se-button svg,.nx-se-publish svg,.nx-se-layer-name svg {display:block;width:21px!important;height:21px!important;flex-shrink:0;}
 .nx-se-button.is-compact {width:42px!important;min-width:42px!important;padding:9px!important;}
 .nx-se-button.is-active {background:color-mix(in srgb,var(--se-accent) 15%,var(--se-surface))!important;color:var(--se-accent)!important;border-color:var(--se-accent)!important;}
 .nx-se-publish {display:flex!important;align-items:center!important;justify-content:center!important;gap:7px;min-height:42px!important;padding:10px 15px!important;border:1px solid var(--se-accent)!important;border-radius:15px!important;background:var(--se-alt)!important;color:var(--se-accent)!important;font-size:13px!important;font-weight:750!important;white-space:nowrap;}
 .nx-se-stage-area {grid-area:stage!important;min-height:0!important;min-width:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:18px!important;overflow:hidden!important;background:radial-gradient(ellipse at 50% 45%,color-mix(in srgb,var(--se-accent) 5%,var(--se-bg)),var(--se-bg))!important;}
 .story-editor:has(.nx-se-head) .story-editor__stage {flex:none!important;position:relative!important;width:auto!important;height:100%!important;max-width:100%!important;max-height:100%!important;aspect-ratio:9/16!important;border:1px solid #ffffff18!important;border-radius:24px!important;overflow:hidden!important;box-shadow:0 14px 60px #0004!important;background-size:cover;}
 .story-editor:has(.nx-se-head) .story-editor__media {position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;touch-action:none!important;transform-origin:50% 50%!important;}
 .story-editor:has(.nx-se-head) .story-editor__media img,.story-editor:has(.nx-se-head) .story-editor__media video {display:block!important;max-width:100%!important;max-height:100%!important;min-width:0!important;min-height:0!important;width:auto!important;height:auto!important;object-fit:contain!important;border-radius:0!important;pointer-events:none!important;user-select:none!important;-webkit-user-drag:none;}
 .story-editor:has(.nx-se-head) .story-editor__element {touch-action:none!important;}
 .nx-se-bottom {grid-area:bottom;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;background:var(--se-surface)!important;border-left:1px solid var(--se-line);scrollbar-width:thin;overscroll-behavior:contain;}
 .nx-se-dock {padding-bottom:max(12px,env(safe-area-inset-bottom,0px));}
 .nx-se-panel {padding:18px;display:grid;gap:15px;border-bottom:1px solid var(--se-line);}
 .nx-se-panel-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;}
 .nx-se-panel-heading strong {font-size:15px;font-weight:750;color:var(--se-text)!important;}
 .nx-se-panel-heading>span {color:var(--se-muted);font-size:12px;}
 .nx-se-panel-heading>button {border:0;background:transparent;color:var(--se-accent);padding:5px;font-size:12px!important;}
 .nx-se-range {display:grid!important;gap:8px!important;min-width:0!important;}
 .nx-se-range>span {display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;color:var(--se-muted)!important;}
 .nx-se-range output {font-weight:700;font-variant-numeric:tabular-nums;color:var(--se-text)!important;}
 .nx-se-range input[type=range] {appearance:none!important;-webkit-appearance:none!important;display:block!important;width:100%!important;height:26px!important;min-height:26px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;touch-action:pan-x;}
 .nx-se-range input[type=range]::-webkit-slider-runnable-track {height:5px;border-radius:5px;background:color-mix(in srgb,var(--se-accent) 25%,var(--se-line));}
 .nx-se-range input[type=range]::-webkit-slider-thumb {appearance:none;-webkit-appearance:none;width:20px;height:20px;margin-top:-7.5px;border-radius:50%;background:var(--se-surface);border:2px solid var(--se-accent);box-shadow:0 2px 8px #0003;}
 .nx-se-range input[type=range]::-moz-range-track {height:5px;border-radius:5px;background:var(--se-line);}
 .nx-se-range input[type=range]::-moz-range-thumb {width:17px;height:17px;border-radius:50%;background:var(--se-surface);border:2px solid var(--se-accent);}
 .nx-se-control-row {display:flex!important;align-items:center;gap:7px;flex-wrap:wrap;}
 .nx-se-control-row .nx-se-button {flex:1;padding-left:8px!important;padding-right:8px!important;}
 .nx-se-control-row .nx-se-button.is-compact {flex:0 0 40px;width:40px!important;min-width:40px!important;}
 .nx-se-hint {margin:0!important;font-size:11px!important;line-height:1.45!important;color:var(--se-muted)!important;}
 .nx-se-action-row {display:flex;align-items:center;gap:7px;padding:12px 14px 8px;min-height:58px;}
 .nx-se-zoom-label {flex:1;color:var(--se-muted);font-size:12px;font-variant-numeric:tabular-nums;}
 .nx-se-action-row select {min-width:0;max-width:130px;min-height:36px;border:1px solid var(--se-line)!important;border-radius:12px!important;color:var(--se-muted)!important;background:var(--se-surface)!important;padding:7px 10px!important;font-size:11px!important;}
 .nx-se-tools {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:8px 14px;min-width:0;}
 .nx-se-tools .nx-se-button {flex-direction:column!important;gap:6px!important;padding:10px 4px!important;border-radius:15px!important;font-size:10px!important;min-width:0!important;min-height:68px!important;background:var(--se-alt)!important;}
 .nx-se-tools .nx-se-button span {display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
 .nx-se-filters {display:flex;gap:9px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 2px 9px;scrollbar-width:thin;}
 .nx-se-filter {display:grid;gap:6px;flex:0 0 68px;max-width:68px;padding:0;border:0!important;background:none!important;color:var(--se-muted)!important;font-size:10px!important;}
 .nx-se-filter-sample {display:grid;place-items:center;height:82px;width:68px;background-size:cover;background-position:center;background-color:var(--se-alt);border:2px solid var(--se-line);border-radius:14px!important;font-weight:800;font-size:25px;color:var(--se-accent);}
 .nx-se-filter.is-active {color:var(--se-accent)!important;}
 .nx-se-filter.is-active .nx-se-filter-sample {border-color:var(--se-accent)!important;}
 .nx-se-compare {min-height:42px;border:1px solid var(--se-line)!important;border-radius:14px!important;background:var(--se-alt)!important;color:var(--se-accent)!important;padding:10px;font-size:12px!important;touch-action:none;}
 .nx-se-layer {display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:10px;border:1px solid var(--se-line);border-radius:16px;background:var(--se-alt);}
 .nx-se-layer.is-selected {border-color:var(--se-accent);}
 .nx-se-layer-name {display:flex;align-items:center;gap:9px;flex:1 1 100%;min-width:0;padding:2px 2px 8px;border:0;background:none;color:var(--se-text)!important;text-align:left;}
 .nx-se-layer-name span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 .nx-se-layer .nx-se-button.is-compact {width:34px!important;height:34px!important;min-height:34px!important;min-width:34px!important;padding:7px!important;border-radius:11px!important;}
 .nx-se-layer .nx-se-button svg {width:17px!important;height:17px!important;}
 .nx-se-timeline {position:relative;height:68px;border-radius:12px;margin:4px 8px;overflow:visible;background:var(--se-bg);}
 .nx-se-frames {display:flex;position:absolute;inset:0;overflow:hidden;border-radius:12px;background:linear-gradient(130deg,#114858,#202a49);}
 .nx-se-frames img {min-width:0;flex:1;object-fit:cover;height:100%;width:16.666%;pointer-events:none;}
 .nx-se-trim-window {position:absolute;top:0;bottom:0;border-top:3px solid var(--se-accent);border-bottom:3px solid var(--se-accent);box-shadow:-350px 0 0 350px #02081280,350px 0 0 350px #02081280;pointer-events:none;}
 .nx-se-trim-handle {position:absolute;top:0;bottom:0;width:18px;margin-left:-9px;border:0;background:var(--se-accent);border-radius:6px!important;padding:0;touch-action:none;cursor:ew-resize!important;}
 .nx-se-trim-handle::after {content:"";position:absolute;left:7px;top:24px;height:20px;width:3px;border-radius:2px;background:var(--se-surface);}
 .nx-se-duration {color:var(--se-muted);font-size:12px;font-variant-numeric:tabular-nums;flex:1;text-align:right;}
 .nx-se-status,.nx-se-error {margin:0;padding:12px 18px;font-size:12px;}
 .nx-se-status {color:var(--se-muted);}
 .nx-se-error {color:var(--mobile-theme-danger,#dc5a79);background:color-mix(in srgb,#c34062 8%,var(--se-surface));}
 .story-editor.nx-se-preview:has(.nx-se-head) {grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"head" "stage"!important;}
 .nx-se-preview .nx-se-bottom {display:none!important;}
 .nx-se-preview .story-editor__element {pointer-events:none!important;}
 .nx-se-preview .story-editor__guide,.nx-se-preview .story-editor__el-btn,.nx-se-preview .story-editor__trash {display:none!important;}
 .nx-se-preview .story-editor__element {outline:none!important;border-color:transparent!important;}
 .nx-se-legacy-controls:empty {display:none;}
 .story-editor:has(.nx-se-head) :is(.story-editor__chips,.story-editor__swatches,.story-editor__music-chip,.story-editor__draw-bar,.story-editor__draw-colors,.story-editor__music-panel,.story-editor__emoji-sheet) {position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:100%!important;margin:0!important;border-radius:0!important;background:var(--se-surface)!important;color:var(--se-text)!important;border:0!important;border-bottom:1px solid var(--se-line)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;padding:14px!important;}
 .story-editor:has(.nx-se-head) .story-editor__music-panel {max-height:380px!important;overflow-y:auto!important;overscroll-behavior:contain;}
 .story-editor:has(.nx-se-head) .story-editor__music-scroll {max-height:220px!important;}
 .story-editor:has(.nx-se-head) .story-editor__emoji-sheet {max-height:210px!important;overflow:auto!important;}
 .story-editor:has(.nx-se-head) .story-editor__text-overlay {position:fixed!important;inset:auto!important;top:var(--nexti-app-viewport-top,0px)!important;left:var(--nexti-app-viewport-left,0px)!important;width:var(--nexti-app-viewport-width,100vw)!important;height:var(--nexti-app-viewport-height,100dvh)!important;background:var(--se-bg)!important;color:var(--se-text)!important;z-index:20!important;}
 .story-editor:has(.nx-se-head) .story-editor__text-input {font-size:28px!important;min-height:130px!important;max-height:45%!important;overflow:auto!important;background:var(--nx-text-background,#0b1424)!important;border:1px solid #ffffff26!important;border-radius:18px!important;padding:18px!important;}
 .story-editor:has(.nx-se-head) :is(.story-editor__text-topbar,.story-editor__music-head) {color:var(--se-text)!important;}
 .story-editor:has(.nx-se-head) :is(.story-editor__text-done,.story-editor__music-done) {background:var(--se-alt)!important;color:var(--se-accent)!important;border:1px solid var(--se-line)!important;border-radius:14px!important;}
 .story-editor:has(.nx-se-head) :is(.story-editor__link-input,.story-editor__music-search) {background:var(--se-alt)!important;color:var(--se-text)!important;border:1px solid var(--se-line)!important;border-radius:14px!important;font-size:16px!important;}
 .story-editor:has(.nx-se-head) .story-editor__confirm {position:fixed!important;inset:0!important;z-index:30!important;}
 .story-editor:has(.nx-se-head) .story-editor__confirm-card {background:var(--se-surface)!important;border:1px solid var(--se-line)!important;border-radius:24px!important;color:var(--se-text)!important;}
 .story-editor:has(.nx-se-head) .story-editor__empty {color:#eef5ff!important;}
 .story-editor:has(.nx-se-head) .story-editor__pick-btn {font-size:13px!important;min-height:46px!important;max-width:95%;padding:12px 14px!important;}
 .story-editor:has(.nx-se-head) .story-editor__empty p {font-size:11px!important;line-height:1.5!important;color:#b3c2d6!important;}
 @media(max-width:767px),(hover:none) and (pointer:coarse) and (max-height:767px) and (max-width:1400px) {
  .story-editor:has(.nx-se-head) {grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr) auto!important;grid-template-areas:"head" "stage" "bottom"!important;}
  .nx-se-head {min-height:60px!important;padding:8px 12px!important;padding-top:max(8px,env(safe-area-inset-top,0px))!important;gap:8px!important;}
  .nx-se-title strong {font-size:14px!important;}
  .nx-se-title>span {font-size:10px!important;}
  .nx-se-head .nx-se-button.is-compact {width:36px!important;min-width:36px!important;min-height:36px!important;padding:7px!important;border-radius:12px!important;}
  .nx-se-publish {min-height:38px!important;padding:8px 10px!important;border-radius:13px!important;font-size:11px!important;}
  .nx-se-publish svg {width:17px!important;height:17px!important;}
  .nx-se-stage-area {padding:10px 12px!important;}
  .story-editor:has(.nx-se-head) .story-editor__stage {border-radius:18px!important;}
  .nx-se-bottom {max-height:min(56dvh,440px);overflow-y:auto;border-left:0;border-top:1px solid var(--se-line);}
  .nx-se-panel {max-height:min(33dvh,260px);overflow-y:auto;padding:13px 16px;gap:10px;overscroll-behavior:contain;}
  .nx-se-tools {display:flex!important;overflow-x:auto!important;gap:7px;padding:6px 12px 10px!important;scrollbar-width:none;}
  .nx-se-tools .nx-se-button {flex:0 0 62px!important;min-height:58px!important;max-width:72px!important;padding:8px 5px!important;font-size:10px!important;border-radius:14px!important;}
  .nx-se-tools .nx-se-button svg {width:20px!important;height:20px!important;}
  .nx-se-action-row {min-height:47px;padding:7px 12px 2px;gap:6px;}
  .nx-se-action-row .nx-se-button {width:34px!important;min-width:34px!important;min-height:34px!important;padding:6px!important;border-radius:11px!important;}
  .nx-se-action-row .nx-se-button svg {width:18px!important;height:18px!important;}
  .nx-se-action-row select {max-width:118px;min-height:32px;font-size:10px!important;}
  .nx-se-dock {padding-bottom:max(4px,env(safe-area-inset-bottom,0px));}
  .story-editor:has(.nx-se-head) .story-editor__music-panel {max-height:280px!important;}
  .story-editor:has(.nx-se-head) .story-editor__music-scroll {max-height:170px!important;}
 }
 @media(orientation:landscape) and (max-height:600px) and (min-width:520px) {
  .story-editor:has(.nx-se-head) {grid-template-columns:minmax(0,1fr) minmax(280px,46%)!important;grid-template-rows:auto minmax(0,1fr)!important;grid-template-areas:"head head" "stage bottom"!important;}
  .story-editor:has(.nx-se-head).nx-se-preview {grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"head" "stage"!important;}
  .nx-se-head {min-height:52px!important;}
  .nx-se-bottom {max-height:100%!important;border-top:0;border-left:1px solid var(--se-line);}
  .nx-se-panel {max-height:none!important;}
 }
 @media(prefers-reduced-motion:no-preference) {
  .nx-se-button:active,.nx-se-publish:active {transform:scale(.97);}
  .nx-se-panel {animation:nxStoryPanel .16s ease-out;}
  @keyframes nxStoryPanel {from{opacity:0;transform:translateY(5px);}to{opacity:1;transform:translateY(0);}}
 }
}

@layer nextiStoryStudio { .story-editor:has(.nx-se-head) .story-editor__element-text.is-link {font-size:inherit!important;} }

@layer nextiStoryStudio {
 .story-editor:has(.nx-se-head) .story-editor__font,.story-editor:has(.nx-se-head) .story-editor__pill-toggle {color:var(--se-text)!important;background:var(--se-alt)!important;border:1px solid var(--se-line)!important;border-radius:12px!important;}
 .story-editor:has(.nx-se-head) .story-editor__font.is-on {color:var(--se-accent)!important;border-color:var(--se-accent)!important;}
 .story-editor:has(.nx-se-head) .story-editor__text-input::placeholder {color:#b3c2d6!important;opacity:1;}
 .story-editor:has(.nx-se-head) .story-editor__music-track {background:var(--se-alt)!important;border-color:var(--se-line)!important;color:var(--se-text)!important;border-radius:16px!important;}
 .story-editor:has(.nx-se-head) :is(.story-editor__music-current-name,.story-editor__music-pick-name,.story-editor__music-title) {color:var(--se-text)!important;}
 .story-editor:has(.nx-se-head) :is(.story-editor__music-genre,.story-editor__music-note,.story-editor__music-track small) {color:var(--se-muted)!important;}
 .story-editor:has(.nx-se-head) .story-editor__music-play {color:var(--se-accent)!important;background:var(--se-surface)!important;}
}
