.story-studio{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#111215;--surface:#15171a;--card:#17191d;--field:#1a1c20;--line:#262930;--line-strong:#343841;--text:#ecedef;--muted:#a3a9b3;--faint:#8e949e;--accent:#f2a65a;--accent-hover:#ffb872;--accent-ink:#1b1206;--mention:#b4ceff;--ok:#8fd3a8;--warn:#f2c48a;--danger:#ffa99c}.story-studio *{box-sizing:border-box}.story-studio{background:var(--bg);color:var(--text);min-height:calc(100dvh - 4rem);margin:0;font:14px/1.5 Inter,system-ui,sans-serif}.story-studio h1,.story-studio h2{margin:0;font-family:Space Grotesk,Inter,sans-serif}.story-studio button,.story-studio input,.story-studio select,.story-studio textarea{font:inherit;color:inherit}.story-studio button:focus-visible,.story-studio input:focus-visible,.story-studio select:focus-visible,.story-studio textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.story-studio .sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.story-studio .auth-shell,.story-studio .profile-shell{place-items:center;min-height:100vh;padding:1.25rem;display:grid}.story-studio .auth-card{border:1px solid var(--line);background:var(--card);border-radius:14px;flex-direction:column;gap:1rem;width:min(400px,100%);padding:1.75rem 1.5rem;display:flex;box-shadow:0 16px 48px #00000059}.story-studio .auth-brand{text-align:center;flex-direction:column;align-items:center;gap:8px;margin-bottom:.25rem;display:flex}.story-studio .auth-mark{width:44px;height:44px;display:block}.story-studio .auth-brand-name{margin:0;font-family:Space Grotesk,sans-serif;font-size:18px;font-weight:600}.story-studio .auth-title{color:var(--muted);margin:0;font-family:Space Grotesk,sans-serif;font-size:15px;font-weight:500}.story-studio .auth-field{flex-direction:column;gap:6px;display:flex}.story-studio .auth-card .field-inline{width:100%;min-height:40px}.story-studio .auth-password .field-inline{padding-right:42px}.story-studio .auth-password-toggle{position:absolute;top:50%;right:2px;transform:translateY(-50%)}.story-studio .auth-submit{justify-content:center;width:100%;min-height:40px}.story-studio .auth-switch{text-align:center;color:var(--muted);margin:0;font-size:13px}.story-studio .auth-switch-btn{color:var(--accent);font:inherit;font-size:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-weight:500}.story-studio .auth-switch-btn:hover{color:var(--accent-hover)}.story-studio .auth-switch-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}.story-studio .profile-section{flex-direction:column;gap:.75rem;width:min(420px,100%);display:flex}.story-studio .profile-shell{place-items:stretch stretch;gap:1rem;max-width:720px;margin:0 auto;padding:2rem}.story-studio .profile-head{justify-content:space-between;align-items:center;display:flex}.story-studio .package-grid,.story-studio .data-list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.story-studio .data-list li{justify-content:space-between;gap:.5rem;font-size:.9rem;display:flex}.story-studio .credits-pill{cursor:pointer;background:inherit;border:none}@media (width<=480px){.story-studio .auth-card{border-radius:12px;padding:1.25rem 1rem}}.story-studio .shell{padding:32px}.story-studio .muted{color:var(--muted);font-size:13px}.story-studio .label{letter-spacing:.08em;text-transform:uppercase;color:var(--faint);font-size:11px;font-weight:600}.story-studio .spacer{flex:1}.story-studio .app{flex-direction:column;flex:1;min-height:0;display:flex}.story-studio .topbar{border-bottom:1px solid var(--line);background:var(--surface);flex-wrap:wrap;align-items:center;gap:12px 24px;padding:12px 20px;display:flex}.story-studio .topbar-group{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.story-studio .topbar-end{margin-left:auto}.story-studio .brand-wrap{flex-direction:column;gap:0;line-height:1.15;display:flex}.story-studio .brand{font-family:Space Grotesk,sans-serif;font-size:17px;font-weight:600}.story-studio .brand-studio{letter-spacing:.06em;text-transform:uppercase;color:var(--faint);font-size:10px;font-weight:500}.story-studio .divider{background:var(--line-strong);width:1px;height:20px}.story-studio .btn{border:1px solid var(--line-strong);cursor:pointer;background:#1f2227;border-radius:8px;align-items:center;gap:8px;min-height:36px;padding:0 14px;font-size:13px;font-weight:500;display:inline-flex}.story-studio .btn:hover:not(:disabled){background:#262a30}.story-studio .btn:disabled{opacity:.45;cursor:not-allowed}.story-studio .btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}.story-studio .btn-primary:hover:not(:disabled){background:var(--accent-hover)}.story-studio .btn-small{min-height:32px;padding:0 10px;font-size:12px}.story-studio .icon-btn{width:32px;height:32px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;display:inline-flex}.story-studio .icon-btn:hover{color:var(--text);background:#262a30}.story-studio .field{border:1px solid var(--line-strong);background:var(--field);border-radius:8px;padding:8px 10px}.story-studio .field-inline{min-height:36px;padding:0 10px}.story-studio .segmented{background:#1c1e22;border:1px solid #2e323a;border-radius:10px;gap:2px;padding:3px;display:inline-flex}.story-studio .segmented button{min-height:32px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:7px;padding:0 14px;font-weight:500}.story-studio .segmented button:disabled{cursor:not-allowed}.story-studio .segmented button[aria-pressed=true]:disabled{color:var(--text)}.story-studio .segmented button:disabled:not([aria-pressed=true]){opacity:.45}.story-studio .segmented button[aria-pressed=true]{color:var(--text);background:#2e323a}.story-studio .ref-chip{color:var(--muted);background:#1a1c20;border:1px solid #2e323a;border-radius:10px;align-self:flex-start;align-items:center;gap:8px;padding:4px 10px 4px 4px;font-size:12px;display:flex}.story-studio .ref-chip img{object-fit:cover;border-radius:6px;width:44px;height:26px}.story-studio .style-thumb{object-fit:cover;border:1px solid #2e323a;border-radius:6px;width:56px;height:34px}.story-studio .pmenu{position:relative}.story-studio .pmenu-trigger{border:1px solid var(--line-strong);background:var(--field);cursor:pointer;border-radius:8px;align-items:center;gap:8px;max-width:280px;min-height:36px;padding:0 12px;font-weight:600;display:inline-flex}.story-studio .pmenu-trigger:hover,.story-studio .pmenu-trigger[aria-expanded=true]{background:#20232a}.story-studio .pmenu-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.story-studio .pmenu-list{z-index:30;border:1px solid var(--line-strong);background:#1f2227;border-radius:12px;flex-direction:column;gap:2px;min-width:300px;max-width:380px;max-height:70vh;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);left:0;overflow-y:auto;box-shadow:0 12px 32px #00000073}.story-studio .pmenu-row{border-radius:8px;align-items:center;gap:2px;display:flex;position:relative}.story-studio .pmenu-current{box-shadow:inset 2px 0 0 var(--accent);background:#f2a65a1a}.story-studio .pmenu-item{text-align:left;cursor:pointer;background:0 0;border:0;border-radius:8px;flex:1;justify-content:space-between;align-items:center;gap:12px;min-width:0;min-height:36px;padding:0 10px;display:flex}.story-studio .pmenu-item:hover,.story-studio .pmenu-item:focus-visible{background:#2a2e35}.story-studio .pmenu-options{z-index:31;border:1px solid var(--line-strong);background:#262a30;border-radius:12px;flex-direction:column;min-width:140px;padding:6px;display:flex;position:absolute;top:calc(100% - 2px);right:0;box-shadow:0 12px 32px #00000073}.story-studio .pmenu-danger{color:var(--danger)}.story-studio .pmenu-input{flex:1;min-height:36px}.story-studio .pmenu-confirm{flex-direction:column;flex:1;gap:8px;padding:8px 10px;font-size:13px;display:flex}.story-studio .pmenu-error{padding:4px 10px}.story-studio .pmenu-new{border:0;border-top:1px solid var(--line);min-height:36px;color:var(--accent);text-align:left;cursor:pointer;background:0 0;border-radius:8px;margin-top:4px;padding:0 10px;font-weight:600}.story-studio .pmenu-new:hover:not(:disabled),.story-studio .pmenu-new:focus-visible{background:#2a2e35}.story-studio .pmenu-new:disabled{opacity:.5;cursor:not-allowed}.story-studio .settings{max-width:460px}.story-studio .settings .field{width:100%}.story-studio .settings-actions{margin-top:4px}.story-studio .ratio-chips{flex-wrap:wrap;gap:8px;display:flex}.story-studio .ratio-chip{border:1px solid var(--line-strong);width:64px;color:var(--muted);cursor:pointer;background:0 0;border-radius:10px;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;padding:8px 0 6px;font-size:12px;display:flex}.story-studio .ratio-chip:hover{color:var(--text);background:#262a30}.story-studio .ratio-chip[aria-pressed=true]{border-color:var(--accent);color:var(--text);background:#f2a65a1a}.story-studio .ratio-shape{border:2px solid;border-radius:3px;display:block}.story-studio .ratio-chip[aria-pressed=true] .ratio-shape{border-color:var(--accent)}.story-studio .chip-link{cursor:pointer;font:inherit;border:0;font-size:12px}.story-studio .chip-link:hover{color:var(--text);background:#2e323a}.story-studio .pill{background:#1a1c20;border:1px solid #2e323a;border-radius:10px;align-items:center;gap:10px;min-height:40px;padding:0 6px 0 12px;display:flex}.story-studio .pill-label{color:var(--muted);font-size:12px}.story-studio .pill-hint{color:var(--faint);padding-right:8px;font-size:12px}.story-studio .pill-low{background:#221d15;border-color:#7a5a2a}.story-studio .pill-low .pill-label,.story-studio .pill-low .money{color:var(--warn)}.story-studio .pill-error{background:#221a1a;border-color:#5a3a36}.story-studio .pill-error .pill-label{color:var(--danger)}.story-studio .money{font-family:JetBrains Mono,monospace;font-size:14px;font-weight:500}.story-studio .skeleton{background:#2e323a;border-radius:4px;width:52px;height:10px}.story-studio .body{flex-wrap:wrap;flex:1;display:flex}.story-studio .sidebar{border-right:1px solid var(--line);background:var(--surface);flex-direction:column;flex:260px;gap:12px;max-width:320px;padding:20px 16px;display:flex}.story-studio .sidebar-head{justify-content:space-between;align-items:center;display:flex}.story-studio .main{flex-direction:column;flex:999 560px;min-width:0;display:flex}.story-studio .main-head{align-items:baseline;gap:12px;padding:18px 28px 10px;display:flex}.story-studio .main-head h1{font-size:22px;font-weight:600}.story-studio .scenes{flex:1;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));align-content:start;gap:16px;width:100%;padding:6px 28px 20px;display:grid}.story-studio .empty{color:var(--muted);margin:24px 0}.story-studio .scene{flex-direction:column;gap:8px;min-width:0;display:flex}.story-studio .thumb{border:1px solid var(--line);background:#20262b;border-radius:10px;width:100%;position:relative;overflow:hidden}.story-studio .thumb img{object-fit:cover;width:100%;height:100%;display:block}.story-studio .thumb-tag{color:#e0d6c8;background:#00000073;border-radius:4px;padding:2px 6px;font-size:11px;position:absolute;bottom:8px;left:8px}.story-studio .thumb-state{color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:10px;font-size:13px;display:flex;position:absolute;inset:0}.story-studio .thumb-failed{color:var(--danger)}.story-studio .progress{background:#343841;border-radius:2px;width:64px;height:4px;position:relative;overflow:hidden}.story-studio .progress:after{content:"";background:var(--accent);width:40%;animation:1.2s ease-in-out infinite slide;position:absolute;inset:0}@keyframes slide{}@media (prefers-reduced-motion:reduce){.story-studio .progress:after{width:60%;animation:none}}.story-studio .scene-prompt{color:var(--muted);-webkit-line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;margin:0;font-size:13px;line-height:1.5;display:-webkit-box;overflow:hidden}.story-studio .scene-error{color:var(--danger);background:#221a1a;border:1px solid #5a3a36;border-radius:10px;flex-direction:column;align-items:flex-start;gap:8px;padding:10px 12px;font-size:13px;display:flex}.story-studio .composer{border-top:1px solid var(--line);background:var(--surface);flex-direction:column;gap:10px;padding:16px 28px 20px;display:flex}.story-studio .composer-box{border:1px solid var(--line-strong);background:var(--field);border-radius:12px;flex-direction:column;gap:10px;max-width:980px;padding:12px 14px;display:flex}.story-studio .composer-box textarea{resize:vertical;background:0 0;border:0;outline:none;width:100%;line-height:1.7}.story-studio .composer-box:focus-within{border-color:var(--accent)}.story-studio .composer-refs{flex-wrap:wrap;align-items:center;gap:6px;font-size:12px;display:flex}.story-studio .chip{color:#c9cdd3;background:#22252b;border-radius:6px;padding:3px 8px;font-size:12px}.story-studio .setting-block{flex-direction:column;gap:8px;margin-top:auto;padding:2px 0;display:flex}.story-studio .setting-block .sidebar-head{justify-content:space-between;align-items:center;display:flex}.story-studio .switch{background:var(--line-strong);cursor:pointer;border:0;border-radius:999px;flex:none;width:34px;height:20px;padding:0;transition:background .15s;position:relative}.story-studio .switch-thumb{background:#fff;border-radius:50%;width:16px;height:16px;transition:transform .15s;position:absolute;top:2px;left:2px}.story-studio .switch[aria-checked=true]{background:var(--accent)}.story-studio .switch[aria-checked=true] .switch-thumb{transform:translate(14px)}.story-studio .switch:disabled{opacity:.4;cursor:not-allowed}.story-studio .setting-block .char-list,.story-studio .entity-section .char-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.story-studio .setting-row{gap:6px}.story-studio .setting-row .char-item{flex:1;min-width:0;transition:opacity .15s}.story-studio .setting-row-off .char-item{opacity:.6}.story-studio .setting-row .avatar .progress{width:24px}.story-studio .composer-actions{flex-wrap:wrap;align-items:center;gap:8px 12px;max-width:980px;display:flex}.story-studio .form-error{color:var(--danger);margin:0;font-size:13px}.story-studio .dialog{border:1px solid var(--line-strong);background:var(--card);width:calc(100% - 32px);max-width:640px;color:var(--text);border-radius:12px;padding:20px}.story-studio .dialog::backdrop{background:#0009}.story-studio .dialog h2{margin-bottom:8px;font-size:18px}@media (width<=720px){.story-studio .sidebar{border-right:0;border-bottom:1px solid var(--line);max-width:none}.story-studio .main-head,.story-studio .scenes,.story-studio .composer{padding-left:16px;padding-right:16px}}.story-studio .mono{font-family:JetBrains Mono,monospace}.story-studio .tok{color:var(--mention);white-space:nowrap;background:#8fb8ff24;border-radius:5px;padding:1px 6px;font-family:JetBrains Mono,monospace;font-size:.92em}.story-studio .tok.small{font-size:11px}.story-studio .stack{flex-direction:column;gap:14px;display:flex}.story-studio .stack-sm{flex-direction:column;gap:6px;display:flex}.story-studio .stack-lg{flex-direction:column;gap:24px;display:flex}.story-studio .row{align-items:center;gap:8px;display:flex}.story-studio .row.wrap{flex-wrap:wrap;gap:8px 16px}.story-studio .row.between{justify-content:space-between}.story-studio .self-start{align-self:flex-start}.story-studio .grid-2{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.story-studio .grid-4{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;display:grid}.story-studio .grid-4.narrow{max-width:760px}.story-studio .grid-auto{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;display:grid}.story-studio .btn-danger{color:var(--danger);background:#3a1f1c;border-color:#7a3a34}.story-studio .status-ok{color:var(--ok)}.story-studio .status-warn{color:var(--warn)}.story-studio .status-bad{color:var(--danger)}.story-studio .sidebar .char-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.story-studio .char-row{align-items:center;gap:2px;display:flex}.story-studio .char-edit{flex:none}.story-studio .char-item{text-align:left;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:10px;flex:1;align-items:center;gap:12px;min-width:0;padding:8px;display:flex}.story-studio .char-item:hover{border-color:var(--line);background:#1c1e22}.story-studio .char-text{flex-direction:column;gap:2px;min-width:0;display:flex}.story-studio .char-name{font-weight:600}.story-studio .char-status{text-align:right;margin-left:auto;font-size:11px}.story-studio .avatar{color:#e9c9a6;background:#3a3128;border-radius:8px;flex:none;justify-content:center;align-items:center;width:44px;height:44px;font-family:Space Grotesk,sans-serif;display:flex;overflow:hidden}.story-studio .avatar img{object-fit:cover;width:100%;height:100%}.story-studio .char-row-selected .char-item{border-color:var(--accent);background:#f2a65a1a}.story-studio .entity-section{flex-direction:column;gap:8px;display:flex}.story-studio .char-edit{font-weight:600}.story-studio .entity-editor{flex-direction:column;flex:1;min-height:0;display:flex}.story-studio .entity-head{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 28px;display:flex}.story-studio .entity-title{flex-wrap:wrap;align-items:baseline;gap:4px 10px;display:flex}.story-studio .entity-title h1{font-size:22px;font-weight:600}.story-studio .entity-body{flex-direction:column;flex:1;min-height:0;display:flex}.story-studio .entity-form{max-width:680px;padding:24px 28px 32px}.story-studio .entity-form .field{width:100%}.story-studio .entity-form textarea.field{resize:vertical;line-height:1.5}.story-studio .banner{background:#221a1a;border:1px solid #5a3a36;border-radius:10px;margin:12px 20px 0;padding:10px 12px}.story-studio .chars-body{flex-wrap:wrap;flex:1;display:flex}.story-studio .chars-left{border-right:1px solid var(--line);background:var(--surface);flex:380px;max-width:520px;padding:24px 20px}.story-studio .chars-right{flex:999 640px;min-width:0;padding:24px 32px 32px}.story-studio .desc{max-width:720px;margin:0;line-height:1.6}.story-studio .chars-body .field{width:100%}.story-studio .chars-body textarea.field{resize:vertical;line-height:1.5}.story-studio .base-fig{flex-direction:column;gap:6px;max-width:160px;margin:0;display:flex}.story-studio .base-fig img{border-radius:10px;width:100%;display:block}.story-studio .slot{background:#20262b;border:2px solid #0000;border-radius:8px;position:relative;overflow:hidden}.story-studio .slot img{object-fit:cover;width:100%;height:100%;display:block}.story-studio .slot-selected{border-color:var(--accent)}.story-studio .slot-pick{all:unset;cursor:pointer;width:100%;height:100%;display:block}.story-studio .slot-pick:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.story-studio .slot-btn{color:#c9cdd3;background:#111215b3;width:32px;height:32px;position:absolute;top:6px}.story-studio .slot-btn:hover{background:#111215e6}.story-studio .slot-regen{right:6px}.story-studio .slot-zoom{left:6px}.story-studio .slot-regen:disabled{opacity:.4;cursor:not-allowed}.story-studio .slot .thumb-state{text-align:center;padding:8px;font-size:12px}.story-studio .fig{flex-direction:column;gap:6px;margin:0;display:flex}.story-studio .card-sm{border:1px solid var(--line);background:var(--card);border-radius:12px;flex-direction:column;gap:8px;padding:8px;display:flex}.story-studio .expr-name{font-size:13px;font-weight:500}.story-studio .add-tile{min-height:180px;color:var(--muted);cursor:pointer;background:0 0;border:1px dashed #3a3f48;border-radius:12px;justify-content:center;align-items:center;display:flex}.story-studio .add-tile:hover{color:var(--text);border-color:var(--accent)}.story-studio .new-expr{justify-content:center}@media (width<=720px){.story-studio .chars-left{border-right:0;border-bottom:1px solid var(--line);max-width:none}.story-studio .chars-right{padding:20px 16px}.story-studio .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}.story-studio .base-zoom{all:unset;cursor:zoom-in;border-radius:10px;display:block}.story-studio .base-zoom:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.story-studio .viewer{width:100vw;max-width:100vw;height:100vh;max-height:100vh;color:var(--text);background:0 0;border:0;padding:0}.story-studio .viewer::backdrop{background:#08090bdb}.story-studio .viewer[open]{justify-content:center;align-items:center;display:flex}.story-studio .viewer-body{flex-direction:column;align-items:center;gap:10px;max-width:92vw;max-height:92vh;margin:0;display:flex}.story-studio .viewer-body img{object-fit:contain;cursor:default;border-radius:10px;max-width:92vw;max-height:calc(92vh - 36px);display:block}.story-studio .viewer-body figcaption{color:var(--muted);font-size:13px}.story-studio .viewer-close{width:40px;height:40px;color:var(--text);background:#111215cc;position:fixed;top:16px;right:16px}.story-studio .count-picker{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.story-studio .seg{border:1px solid var(--line-strong);border-radius:8px;display:inline-flex;overflow:hidden}.story-studio .seg-btn{border:0;border-right:1px solid var(--line-strong);min-width:36px;min-height:32px;color:var(--muted);font:inherit;cursor:pointer;background:0 0;font-size:13px}.story-studio .seg-btn:last-child{border-right:0}.story-studio .seg-btn:hover:not(:disabled){color:var(--text);background:#262a30}.story-studio .seg-btn[aria-checked=true]{background:var(--accent);color:var(--accent-ink);font-weight:600}.story-studio .seg-btn:disabled{opacity:.5;cursor:not-allowed}.story-studio .seg-btn:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.story-studio .field-wrap{position:relative}.story-studio .field-wrap textarea.field{padding-right:48px;display:block}.story-studio .wand-group{gap:2px;display:flex;position:absolute;top:6px;right:6px}.story-studio .wand-btn{width:32px;height:32px;color:var(--accent)}.story-studio .wand-btn:disabled{opacity:.5;cursor:not-allowed}.story-studio .wand-busy{animation:1s ease-in-out infinite wand-pulse}@keyframes wand-pulse{}@media (prefers-reduced-motion:reduce){.story-studio .wand-busy{animation:none}}.story-studio .ref-drop{border:1px dashed var(--line-strong);border-radius:10px;flex-wrap:wrap;align-items:center;gap:8px;min-height:92px;padding:8px;display:flex}.story-studio .ref-drop-over{border-color:var(--accent);background:#f2a65a0f}.story-studio .ref-static{border-style:solid;border-color:var(--line);min-height:0}.story-studio .ref-thumb{background:#20262b;border-radius:8px;width:76px;height:76px;position:relative;overflow:hidden}.story-studio .ref-thumb img{object-fit:cover;width:100%;height:100%;display:block}.story-studio .ref-remove{color:#e6e8eb;background:#111215bf;width:24px;height:24px;font-size:16px;line-height:1;position:absolute;top:2px;right:2px}.story-studio .ref-add{border:1px dashed var(--line-strong);width:76px;height:76px;color:var(--muted);font:inherit;cursor:pointer;background:0 0;border-radius:8px;font-size:12px}.story-studio .ref-add:hover:not(:disabled){border-color:var(--accent);color:var(--text)}.story-studio .ref-add:disabled{opacity:.5;cursor:not-allowed}.story-studio .mention-box{border:1px solid var(--line-strong);background:var(--field);border-radius:8px;position:relative}.story-studio .mention-box:focus-within{border-color:var(--accent)}.story-studio .mention-mirror,.story-studio .mention-input{scrollbar-gutter:stable;box-sizing:border-box;width:100%;font:inherit;letter-spacing:normal;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;border:0;margin:0;padding:8px 48px 8px 10px;font-size:14px;line-height:1.5;overflow-y:auto}.story-studio .mention-mirror{color:#0000;pointer-events:none;position:absolute;inset:0;overflow:hidden}.story-studio .mention-input{resize:vertical;color:var(--text);background:0 0;outline:none;display:block;position:relative}.story-studio .mention-mirror mark{color:#0000;border-radius:4px;box-shadow:0 0 0 1px #0000}.story-studio .mention-ok{background:#8fb8ff38;box-shadow:0 0 0 1px #8fb8ff59}.story-studio .mention-bad{text-underline-offset:3px;background:#ff807033;-webkit-text-decoration:underline wavy #ff8070;text-decoration:underline wavy #ff8070;box-shadow:0 0 0 1px #ff807066}.story-studio .mention-disabled .mention-input{opacity:.6;cursor:not-allowed}.story-studio .ref-tag{color:#b4ceff;background:#111215c7;border-radius:4px;padding:1px 5px;font-family:JetBrains Mono,monospace;font-size:10px;position:absolute;bottom:3px;left:3px}.story-studio .mention-bare{background:0 0;border:0;border-radius:0}.story-studio .mention-bare:focus-within{border:0}.story-studio .mention-bare .mention-mirror,.story-studio .mention-bare .mention-input{padding:0;line-height:1.7}.story-studio .chip-ref{color:#b4ceff;align-items:center;gap:6px;padding:2px 8px 2px 2px;display:inline-flex}.story-studio .chip-ref img{object-fit:cover;border-radius:4px;width:22px;height:22px;display:block}.story-studio .tok-bad{color:var(--danger);background:#ff807024}.story-studio .mention-menu{z-index:20;border:1px solid var(--line-strong);background:#1f2227;border-radius:12px;min-width:260px;max-width:420px;padding:6px;position:absolute;bottom:calc(100% + 14px);left:0;box-shadow:0 12px 32px #00000073}.story-studio .mention-menu-grid{grid-template-columns:repeat(3,84px);gap:6px;min-width:0;padding:8px;display:grid}.story-studio .mention-opt{cursor:pointer;border:1px solid #0000;border-radius:8px;align-items:center;gap:10px;padding:6px 8px;display:flex}.story-studio .mention-opt-active{background:#2a2e35;border-color:#8fb8ff73}.story-studio .mention-opt-off{opacity:.45;cursor:not-allowed}.story-studio .mention-thumb{width:32px;height:32px;color:var(--muted);background:#3a3128;border-radius:6px;flex:none;justify-content:center;align-items:center;font-size:13px;display:flex;overflow:hidden}.story-studio .mention-thumb img{object-fit:cover;width:100%;height:100%;display:block}.story-studio .mention-name{font-weight:500}.story-studio .mention-opt .tok{margin-left:auto}.story-studio .mention-menu-grid .mention-opt{flex-direction:column;align-items:stretch;gap:4px;padding:4px}.story-studio .mention-menu-grid .mention-thumb{aspect-ratio:1;width:100%;height:auto}.story-studio .mention-menu-grid .mention-opt .tok{text-align:center;background:0 0;margin-left:0;padding:0}.story-studio .chip-x{width:18px;height:18px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:4px;margin-left:2px;font-size:14px;line-height:1}.story-studio .chip-x:hover{color:var(--text);background:#ffffff1a}.story-studio .prompt-thumbs{flex-wrap:wrap;gap:8px;display:flex}.story-studio .prompt-thumb{background:#20262b;border:1px solid #8fb8ff59;border-radius:8px;width:64px;height:64px;position:relative;overflow:hidden}.story-studio .prompt-thumb img{object-fit:cover;width:100%;height:100%;display:block}.story-studio .prompt-thumb .ref-tag{text-align:center;text-overflow:ellipsis;white-space:nowrap;bottom:2px;left:2px;right:2px;overflow:hidden}.story-studio .enhance{align-items:center;gap:2px;display:flex;position:relative}.story-studio .enhance-menu{z-index:20;border:1px solid var(--line-strong);background:#1f2227;border-radius:12px;flex-direction:column;min-width:140px;padding:6px;display:flex;position:absolute;bottom:calc(100% + 8px);right:0;box-shadow:0 12px 32px #00000073}.story-studio .enhance-item{min-height:36px;color:var(--text);text-align:left;cursor:pointer;background:0 0;border:0;border-radius:8px;padding:0 12px;font-size:13px}.story-studio .enhance-item:hover,.story-studio .enhance-item:focus-visible{background:#2a2e35;outline:none}.story-studio .thumb-over{background:#1112158c}.story-studio .thumb-open{all:unset;cursor:zoom-in;width:100%;height:100%;display:block}.story-studio .thumb[draggable=true]{cursor:grab}.story-studio .scene-dragging{opacity:.4}.story-studio .scene-drop .thumb{outline:2px solid var(--accent);outline-offset:2px}.story-studio .thumb-open:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.story-studio .thumb-actions{opacity:0;background:#111215b8;border-radius:8px;gap:2px;padding:2px;transition:opacity .12s;display:flex;position:absolute;top:6px;right:6px}.story-studio .thumb:hover .thumb-actions,.story-studio .thumb:focus-within .thumb-actions{opacity:1}@media (hover:none){.story-studio .thumb-actions{opacity:1}}.story-studio .thumb-actions .icon-btn{color:#d5d8dd;width:30px;height:30px}.story-studio .thumb-actions .icon-btn:disabled{opacity:.35;cursor:not-allowed}.story-studio .thumb-confirm{background:#111215d9;flex-direction:column;justify-content:center;align-items:center;gap:10px;font-size:13px;display:flex;position:absolute;inset:0}.story-studio .pager{color:var(--muted);align-items:center;gap:4px;margin-left:auto;font-size:13px;display:inline-flex}.story-studio .composer-over{border-color:var(--accent);background:#f2a65a0d}.story-studio .composer-attach{width:28px;height:28px}.story-studio .setting-title{align-items:center;gap:6px;display:inline-flex}.story-studio .tooltip{display:inline-flex;position:relative}.story-studio .tooltip-trigger{border:1px solid var(--line-strong);width:16px;height:16px;color:var(--muted);cursor:help;background:0 0;border-radius:50%;padding:0;font:italic 600 10px/1 Georgia,serif}.story-studio .tooltip-trigger:hover,.story-studio .tooltip-trigger:focus-visible{color:var(--text);border-color:var(--accent);outline:none}.story-studio .tooltip-bubble{z-index:40;border:1px solid var(--line-strong);width:220px;color:var(--text);opacity:0;visibility:hidden;pointer-events:none;background:#262a30;border-radius:8px;padding:8px 10px;font-size:12px;line-height:1.45;transition:opacity .12s,transform .12s,visibility .12s;position:absolute;top:calc(100% + 8px);left:-8px;transform:translateY(-2px);box-shadow:0 12px 32px #00000073}.story-studio .tooltip-open{opacity:1;visibility:visible;transform:none}
