@media (min-width:1024px){.stories-shell{--story-bg:var(--paper);--story-panel:var(--panel);--story-raised:color-mix(in srgb, var(--panel) 87%, var(--ink));--story-raised-hover:color-mix(in srgb, var(--panel) 78%, var(--ink));--story-input:color-mix(in srgb, var(--paper) 88%, var(--panel));--story-line:var(--line);--story-text:var(--ink);--story-muted:var(--muted);--story-accent:var(--rose);--story-pink:var(--rose);--story-action:var(--rose-dark);--story-action-text:#fff;--story-danger:#a3273e;--story-success:var(--mint);background:var(--story-bg);min-height:100dvh;color:var(--story-text);font-family:var(--font-sans);overflow:hidden}html[data-theme=night] .stories-shell,html[data-theme=nai] .stories-shell{--story-accent:color-mix(in srgb, var(--rose) 68%, var(--ink));--story-pink:var(--story-accent);--story-danger:#ffb6be;--story-success:#a7d7c5}.stories-shell button,.stories-shell input,.stories-shell textarea,.stories-shell select{font:inherit}.stories-shell button:focus-visible,.stories-shell a:focus-visible,.stories-shell input:focus-visible,.stories-shell textarea:focus-visible,.stories-shell select:focus-visible{outline:2px solid var(--story-accent);outline-offset:2px}.stories-brand-mark{background:var(--story-raised);width:42px;height:42px;color:var(--story-accent);border:0;border-radius:4px;flex:0 0 42px;place-items:center;display:inline-grid}.story-kicker{color:var(--story-pink);text-transform:uppercase;margin:0;font-size:12px;font-weight:700}.story-spin{animation:.9s linear infinite story-spin}@keyframes story-spin{to{transform:rotate(360deg)}}.story-dashboard{background:linear-gradient(180deg, color-mix(in srgb, var(--story-accent) 6%, transparent), var(--story-bg) 480px), var(--story-bg);min-height:100dvh;overflow-y:auto}.story-dashboard-header{z-index:10;justify-content:space-between;align-items:center;width:100%;height:74px;padding:0 clamp(22px,5vw,72px);display:flex;position:absolute;top:0;left:0}.story-dashboard-brand,.story-dashboard-header nav,.story-dashboard-header nav a{align-items:center;display:flex}.story-dashboard-brand{font-family:var(--font-sans);gap:13px;font-size:22px}.story-dashboard-header nav{gap:6px}.story-dashboard-header nav a{min-height:40px;color:var(--story-text);border-radius:4px;gap:8px;padding:0 13px;font-size:14px;font-weight:600;text-decoration:none}.story-dashboard-header nav a:hover{background:var(--story-raised)}.story-news-hero{background:radial-gradient(circle at 84% 16%, color-mix(in srgb, var(--story-accent) 18%, transparent), transparent 48%), repeating-linear-gradient(135deg, color-mix(in srgb, var(--story-line) 32%, transparent) 0 1px, transparent 1px 34px), linear-gradient(110deg, var(--story-panel), color-mix(in srgb, var(--story-bg) 85%, var(--story-accent)));border-bottom:1px solid var(--story-line);grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);align-items:center;gap:40px;min-height:365px;padding:86px clamp(22px,6vw,88px) 48px;display:grid;position:relative;overflow:hidden}.story-news-hero:after{aspect-ratio:1;border:1px solid color-mix(in srgb, var(--story-accent) 22%, transparent);content:"";border-radius:50%;width:48vw;position:absolute;bottom:-65%;right:-8%}.story-news-copy{z-index:1;max-width:670px;position:relative}.story-news-copy h1,.story-create-content h1,.stories-auth-panel h1{color:var(--story-accent);font-family:var(--font-sans);margin:10px 0 6px;font-size:clamp(38px,5vw,68px);font-weight:600;line-height:1.08}.story-news-copy>p:not(.story-kicker){max-width:590px;color:var(--story-text);margin:12px 0 20px;font-size:18px;line-height:1.65}.story-news-copy>div{flex-wrap:wrap;gap:9px;display:flex}.story-news-copy>div span{border:1px solid color-mix(in srgb, var(--story-accent) 32%, var(--story-line));background:color-mix(in srgb, var(--story-panel) 80%, transparent);color:var(--story-accent);padding:6px 9px;font-size:11px;font-weight:700}.story-news-visual{z-index:1;min-height:240px;position:relative}.story-news-visual>svg{z-index:3;color:var(--story-pink);position:absolute;top:24px;right:13%}.story-visual-page{border:1px solid color-mix(in srgb, var(--story-accent) 30%, var(--story-line));background:color-mix(in srgb, var(--story-panel) 89%, var(--story-accent));width:min(380px,92%);height:275px;box-shadow:0 28px 70px color-mix(in srgb, var(--story-text) 20%, transparent);padding:50px 42px;position:absolute;bottom:-44px;right:5%;transform:rotate(-3deg)}.story-visual-page-back{z-index:-1;background:color-mix(in srgb, var(--story-panel) 68%, var(--story-accent));bottom:-57px;right:14%;transform:rotate(7deg)}.story-visual-page i{background:color-mix(in srgb, var(--story-text) 54%, transparent);height:6px;margin-bottom:15px;display:block}.story-visual-page i:nth-child(2n){width:88%}.story-visual-page i:nth-child(3n){width:72%}.story-dashboard-content{max-width:1320px;margin:0 auto;padding:42px clamp(22px,5vw,64px) 80px}.story-continue-heading,.story-dashboard-actions,.story-dashboard-actions button,.story-dashboard-actions label{align-items:center;display:flex}.story-continue-heading{justify-content:space-between;gap:24px;margin-bottom:22px}.story-continue-heading p{color:var(--story-muted);margin:0 0 3px;font-size:14px}.story-continue-heading h2,.story-scenario-band h2{color:var(--story-accent);font-family:var(--font-sans);margin:0;font-size:27px}.story-dashboard-actions{gap:8px}.story-dashboard-actions button,.story-dashboard-actions label{min-height:42px;color:var(--story-text);background:0 0;border:0;border-radius:3px;gap:8px;padding:0 14px;font-size:14px;font-weight:700}.story-dashboard-actions button:hover,.story-dashboard-actions label:hover{background:var(--story-raised)}.story-dashboard-actions input{display:none}.story-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.story-dashboard-card,.story-empty-state{border:1px solid var(--story-line);background:var(--story-panel);min-width:0;min-height:106px;color:var(--story-text);text-align:left;border-radius:3px;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:15px;padding:18px;transition:border-color .12s,background-color .12s;display:grid}.story-dashboard-card:hover,.story-empty-state:hover{border-color:color-mix(in srgb, var(--story-accent) 58%, var(--story-line));background:var(--story-raised)}.story-card-icon{background:var(--story-input);width:46px;height:46px;color:var(--story-accent);place-items:center;display:grid}.story-dashboard-card>span:nth-child(2),.story-empty-state>span,.story-feature-row span{flex-direction:column;gap:4px;min-width:0;display:flex}.story-dashboard-card b,.story-empty-state b,.story-feature-row b{font-size:17px}.story-dashboard-card small,.story-empty-state small,.story-feature-row small{color:var(--story-muted);font-size:13px}.story-card-meta{gap:6px;display:flex}.story-card-meta i{background:var(--story-input);color:var(--story-muted);padding:4px 7px;font-size:10px;font-style:normal;font-weight:700}.story-empty-state{border-style:dashed;grid-template-columns:auto minmax(0,1fr) auto;width:100%}.story-feature-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:48px;display:grid}.story-feature-row>button,.story-feature-row>a{border:1px solid var(--story-line);min-height:98px;color:var(--story-text);text-align:left;background:0 0;border-radius:3px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;padding:16px;text-decoration:none;display:grid}.story-feature-row>button:hover,.story-feature-row>a:hover{background:var(--story-raised)}.story-feature-row>button>svg:first-child,.story-feature-row>a>svg:first-child{color:var(--story-pink)}.story-dashboard-error,.story-dashboard-loading{border:1px solid var(--story-line);min-height:70px;color:var(--story-muted);justify-content:center;align-items:center;gap:10px;margin-bottom:16px;display:flex}.story-dashboard-error{color:var(--story-danger)}.story-dashboard-error button{color:inherit;background:0 0;border:0}.story-minimal-header{align-items:center;gap:8px;height:68px;padding:0 22px;display:flex}.story-minimal-header>button{width:42px;height:42px;color:var(--story-text);background:0 0;border:0;place-items:center;display:grid}.story-create-screen{min-height:100dvh;overflow-y:auto}.story-create-content{max-width:1160px;margin:0 auto;padding:18px 30px 72px}.story-create-content h1{font-size:clamp(38px,5vw,58px)}.story-create-content>h2{font-family:var(--font-sans);margin:0 0 22px;font-size:24px}.story-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;display:grid}.story-mode-card{border:1px solid var(--story-accent);background:var(--story-panel);min-height:250px;color:var(--story-accent);text-align:left;border-radius:5px;flex-direction:column;justify-content:center;align-items:flex-start;gap:30px;padding:38px 40% 38px 40px;display:flex;position:relative;overflow:hidden}.story-mode-card:hover:not(:disabled){background:var(--story-raised)}.story-mode-card-secondary{color:var(--story-pink);border-color:var(--story-pink)}.story-mode-card:disabled{cursor:not-allowed;opacity:.72}.story-mode-card>span{flex-direction:column;gap:8px;display:flex}.story-mode-card>span b{font-family:var(--font-sans);font-size:27px}.story-mode-card>span small{color:var(--story-text);font-size:16px;line-height:1.5}.story-mode-card>em{background:var(--story-input);color:var(--story-muted);padding:4px 7px;font-size:11px;font-style:normal;position:absolute;top:16px;right:16px}.story-mode-preview{border:1px solid var(--story-line);background:var(--story-input);width:55%;height:190px;box-shadow:-18px 0 50px color-mix(in srgb, var(--story-text) 16%, transparent);padding:36px 30px;position:absolute;bottom:-35px;right:-62px;transform:rotate(-8deg)}.story-mode-preview i{background:var(--story-muted);opacity:.6;width:100%;height:4px;margin-bottom:12px;display:block}.story-mode-preview i:nth-child(2n){width:73%}.story-scenario-band{margin-top:64px}.story-scenario-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px;display:grid}.story-scenario-list button{border:1px solid var(--story-line);background:var(--story-panel);min-height:82px;color:var(--story-text);text-align:left;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px;display:grid}.story-scenario-list button:hover{border-color:var(--story-accent)}.story-scenario-list span{flex-direction:column;gap:3px;display:flex}.story-scenario-list small{color:var(--story-muted)}.story-modal-backdrop{z-index:100;background:#050613c2;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.story-create-modal{border:1px solid var(--story-line);background:var(--story-panel);border-radius:4px;width:min(500px,100%);padding:30px;position:relative;box-shadow:0 35px 90px #00000073}.story-create-modal h2{color:var(--story-accent);font-family:var(--font-sans);margin:5px 0 6px;font-size:29px}.story-create-modal>p:not(.story-kicker){color:var(--story-muted);margin:0 0 22px;line-height:1.55}.story-create-modal label{flex-direction:column;gap:7px;margin-top:14px;font-size:13px;font-weight:700;display:flex}.story-create-modal input,.story-settings-drawer input:not([type=range]),.story-settings-drawer textarea,.story-settings-drawer select{border:1px solid var(--story-line);background:var(--story-input);width:100%;color:var(--story-text);border-radius:3px;outline:0}.story-create-modal input{height:46px;padding:0 12px}.story-create-modal input:focus,.story-settings-drawer input:focus,.story-settings-drawer textarea:focus,.story-settings-drawer select:focus{border-color:var(--story-accent)}.story-modal-close{width:34px;height:34px;color:var(--story-muted);background:0 0;border:0;place-items:center;display:grid;position:absolute;top:15px;right:15px}.story-primary-button{background:var(--story-action);width:100%;height:47px;color:var(--story-action-text);border:0;border-radius:3px;justify-content:center;align-items:center;gap:9px;margin-top:24px;font-weight:800;display:flex}.story-primary-button:disabled{opacity:.65}.story-editor-shell{background:var(--story-bg);grid-template-rows:68px minmax(0,1fr) auto;height:100dvh;display:grid;position:relative}.story-editor-header{z-index:25;border-bottom:1px solid var(--story-line);background:color-mix(in srgb, var(--story-panel) 92%, var(--story-bg));grid-template-columns:150px minmax(0,1fr) 150px;align-items:center;padding:0 18px;display:grid;position:relative}.story-editor-nav,.story-editor-actions{align-items:center;gap:7px;display:flex}.story-editor-actions{justify-content:flex-end}.story-icon-button{width:42px;height:42px;color:var(--story-text);background:0 0;border:0;border-radius:3px;flex:0 0 42px;place-items:center;display:grid}.story-icon-button:hover,.story-icon-button[aria-pressed=true]{background:var(--story-raised)}.story-icon-button:disabled{cursor:default;opacity:.34}.story-title-input{width:min(560px,100%);height:44px;color:var(--story-text);font-family:var(--font-sans);text-align:center;background:0 0;border:0;outline:0;justify-self:center;font-size:23px;font-weight:600}.story-title-input:focus{background:var(--story-raised)}.story-writing-stage{min-height:0;padding:8px 28px 170px;overflow-y:auto}.story-prose-editor{resize:none;width:min(820px,100%);min-height:100%;color:var(--story-text);font-family:var(--font-sans);background:0 0;border:0;outline:0;margin:0 auto;display:block;overflow:hidden}.story-prose-editor::placeholder{color:var(--story-muted)}.story-editor-narrow .story-prose-editor{width:min(650px,100%)}.story-editor-wide .story-prose-editor{width:min(1040px,100%)}.story-editor-shell:has(.story-settings-drawer.is-open) .story-writing-stage{padding-right:388px}.story-editor-shell:has(.story-settings-drawer.is-open) .story-generation-dock{width:min(920px,100% - 408px);right:376px}.story-generation-dock{z-index:20;border:1px solid var(--story-line);background:color-mix(in srgb, var(--story-panel) 96%, var(--story-bg));width:min(920px,100% - 32px);box-shadow:0 22px 60px color-mix(in srgb, var(--story-text) 16%, transparent);border-radius:4px;margin:0 auto 12px;position:absolute;bottom:0;left:0;right:0}.story-status{border-bottom:1px solid var(--story-line);min-height:34px;color:var(--story-success);justify-content:space-between;align-items:center;gap:10px;padding:6px 10px;font-size:12px;display:flex}.story-status-error{color:var(--story-danger)}.story-status button{color:currentColor;background:0 0;border:0;place-items:center;width:27px;height:27px;display:grid}.story-instruction-row{border-bottom:1px solid var(--story-line);min-height:48px;color:var(--story-accent);grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:0 13px;display:grid}.story-instruction-row input{width:100%;height:46px;color:var(--story-text);background:0 0;border:0;outline:0}.story-instruction-row input::placeholder{color:var(--story-muted)}.story-dock-toolbar{justify-content:space-between;align-items:center;gap:12px;min-height:54px;padding:5px 6px;display:flex}.story-dock-secondary,.story-generate-group{align-items:center;gap:3px;display:flex}.story-word-count{color:var(--story-muted);margin-left:6px;font-size:11px}.story-generation-menu-wrap,.story-branch-control{position:relative}.story-generation-mode,.story-send-button{border:0;justify-content:center;align-items:center;gap:7px;height:43px;font-weight:800;display:flex}.story-generation-mode{background:var(--story-raised);min-width:92px;color:var(--story-text);padding:0 12px}.story-send-button{background:var(--story-action);min-width:118px;color:var(--story-action-text);padding:0 18px}.story-send-button:disabled{opacity:.72}.story-popover{z-index:70;border:1px solid var(--story-line);background:var(--story-panel);border-radius:4px;position:absolute;overflow:hidden;box-shadow:0 18px 50px #0405127a}.story-generation-popover{width:250px;padding:5px;bottom:calc(100% + 8px);right:0}.story-generation-popover button{width:100%;color:var(--story-text);text-align:left;background:0 0;border:0;padding:10px;display:flex}.story-generation-popover button:hover,.story-generation-popover button[aria-current=true]{background:var(--story-raised)}.story-generation-popover span{flex-direction:column;gap:2px;display:flex}.story-generation-popover small{color:var(--story-muted)}.story-branch-popover{width:310px;padding:6px;top:calc(100% + 9px);right:0}.story-popover-heading{border-bottom:1px solid var(--story-line);justify-content:space-between;align-items:center;gap:10px;padding:7px 8px 10px;display:flex}.story-popover-heading span,.story-popover-heading button{align-items:center;gap:7px;display:flex}.story-popover-heading button{background:var(--story-raised);height:30px;color:var(--story-text);border:0;font-size:12px}.story-branch-option{width:100%;min-height:55px;color:var(--story-text);text-align:left;background:0 0;border:0;justify-content:space-between;align-items:center;gap:10px;padding:8px;display:flex}.story-branch-option:hover,.story-branch-option[aria-current=true]{background:var(--story-raised)}.story-branch-option span{flex-direction:column;gap:2px;display:flex}.story-branch-option small{color:var(--story-muted)}.story-branch-option i{color:var(--story-accent);font-size:10px;font-style:normal}.story-library-drawer{z-index:50;border-right:1px solid var(--story-line);background:var(--story-panel);width:min(340px,88vw);padding:12px;position:fixed;top:0;bottom:0;left:0;box-shadow:25px 0 70px #04051273}.story-library-heading{justify-content:space-between;align-items:center;gap:10px;height:50px;font-weight:800;display:flex}.story-library-heading>span{align-items:center;gap:9px;display:flex}.story-library-new{border:1px solid var(--story-line);background:var(--story-raised);width:100%;height:42px;color:var(--story-text);justify-content:center;align-items:center;gap:7px;font-weight:700;display:flex}.story-library-items{flex-direction:column;gap:4px;margin-top:12px;display:flex}.story-library-items>button{width:100%;min-height:58px;color:var(--story-text);text-align:left;background:0 0;border:0;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:9px;display:grid}.story-library-items>button:hover,.story-library-items>button[aria-current=page]{background:var(--story-raised)}.story-library-items span{flex-direction:column;gap:2px;min-width:0;display:flex}.story-library-items b{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.story-library-items small{color:var(--story-muted)}.story-settings-drawer{z-index:45;border-left:1px solid var(--story-line);background:var(--story-panel);grid-template-rows:58px minmax(0,1fr);width:min(360px,92vw);transition:transform .18s;display:grid;position:fixed;top:0;bottom:0;right:0;transform:translate(100%);box-shadow:-25px 0 70px #0405125c}.story-settings-drawer.is-open{transform:translate(0)}.story-settings-tabs{border-bottom:1px solid var(--story-line);grid-template-columns:repeat(3,minmax(0,1fr)) 46px;display:grid}.story-settings-tabs button{color:var(--story-muted);background:0 0;border:0;border-bottom:2px solid #0000;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:700;display:flex}.story-settings-tabs button[aria-selected=true]{border-bottom-color:var(--story-accent);color:var(--story-accent)}.story-settings-tabs .story-settings-close{color:var(--story-text);border-bottom-color:#0000}.story-settings-tabs .story-settings-close:hover{background:var(--story-raised)}.story-settings-scroll{min-height:0;padding:14px;overflow-y:auto}.story-setting-section{border-bottom:1px solid var(--story-line);padding:15px 0}.story-setting-label{color:var(--story-text);justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-size:13px;font-weight:700;display:flex}.story-setting-label small{color:var(--story-muted);font-size:10px;font-weight:400}.story-setting-section select,.story-setting-section input:not([type=range]){height:42px;padding:0 10px}.story-setting-section textarea{resize:vertical;min-height:112px;padding:10px;line-height:1.55}.story-setting-section .story-lorebook-input{min-height:180px}.story-setting-section>p{color:var(--story-muted);margin:7px 0 0;font-size:12px;line-height:1.5}.story-setting-section>small{color:var(--story-muted);text-align:right;margin-top:5px;display:block}.story-mode-value{background:var(--story-input);height:44px;color:var(--story-accent);align-items:center;gap:9px;padding:0 10px;display:flex}.story-toggle{width:100%;color:var(--story-text);text-align:left;background:0 0;border:0;align-items:center;gap:10px;display:flex}.story-toggle>span{background:var(--story-muted);border-radius:11px;width:40px;height:22px;padding:2px;transition:background .12s}.story-toggle>span i{background:var(--story-panel);border-radius:50%;width:18px;height:18px;transition:transform .12s;display:block}.story-toggle[aria-checked=true]>span{background:var(--story-action)}.story-toggle[aria-checked=true]>span i{transform:translate(18px)}.story-setting-heading{color:var(--story-accent);align-items:center;gap:10px;padding:8px 0 13px;display:flex}.story-setting-heading span{flex-direction:column;gap:2px;display:flex}.story-setting-heading small{color:var(--story-muted);font-weight:400}.story-readonly-setting{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;display:grid}.story-readonly-setting span{color:var(--story-muted)}.story-readonly-setting b{color:var(--story-accent)}.story-readonly-setting small{text-align:left;grid-column:1/-1;margin:0}.story-segmented{background:var(--story-input);grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;height:38px;padding:3px;display:grid}.story-segmented button{color:var(--story-muted);background:0 0;border:0}.story-segmented button[aria-pressed=true]{background:var(--story-raised);color:var(--story-text)}.story-range-label{justify-content:space-between;margin-bottom:8px;font-size:13px;display:flex}.story-setting-section input[type=range]{width:100%;accent-color:var(--story-accent)}.story-file-actions{border-bottom:0;flex-direction:column;gap:7px;display:flex}.story-file-actions button{border:1px solid var(--story-line);background:var(--story-raised);width:100%;height:40px;color:var(--story-text);align-items:center;gap:8px;padding:0 10px;display:flex}.story-file-actions .story-danger-button{color:var(--story-danger)}.stories-auth-wall{place-items:center;padding:24px;display:grid}.stories-auth-panel{border:1px solid var(--story-line);background:var(--story-panel);text-align:center;width:min(460px,100%);padding:40px}.stories-auth-panel>.stories-brand-mark{margin:0 auto 18px}.stories-auth-panel>p{color:var(--story-muted)}.stories-auth-panel h1{font-size:36px}.stories-auth-panel>a{background:var(--story-action);height:43px;color:var(--story-action-text);align-items:center;gap:8px;margin-top:14px;padding:0 17px;font-weight:800;text-decoration:none;display:inline-flex}@media (max-width:800px){.story-dashboard-header{height:auto;min-height:64px;padding:10px 16px;position:relative}.story-dashboard-header nav a span,.story-dashboard-header nav a:not(:last-child){display:none}.story-dashboard-header nav a{padding:0 10px}.story-news-hero{grid-template-columns:1fr;min-height:340px;padding:46px 22px 38px}.story-news-visual{opacity:.28;width:360px;position:absolute;bottom:-40px;right:-100px}.story-dashboard-content{padding:28px 16px 64px}.story-continue-heading{flex-direction:column;align-items:flex-start}.story-grid,.story-feature-row,.story-mode-grid,.story-scenario-list{grid-template-columns:1fr}.story-dashboard-card{grid-template-columns:auto minmax(0,1fr) auto}.story-card-meta{display:none}.story-create-content{padding:12px 16px 60px}.story-mode-card{min-height:230px;padding-left:26px}.story-editor-header{grid-template-columns:auto minmax(0,1fr) auto;padding:0 8px}.story-title-input{font-size:18px}.story-writing-stage{padding:4px 18px 170px}.story-editor-shell:has(.story-settings-drawer.is-open) .story-writing-stage{padding-right:18px}.story-generation-dock{width:calc(100% - 12px);margin-bottom:6px}.story-editor-shell:has(.story-settings-drawer.is-open) .story-generation-dock{width:calc(100% - 12px);right:0}.story-instruction-row{min-height:44px}.story-dock-secondary .story-icon-button:nth-child(-n+3),.story-word-count{display:none}.story-generation-mode{min-width:78px}.story-send-button{min-width:50px;padding:0 14px}.story-send-button span{display:none}}@media (max-width:520px){.story-dashboard-brand b{display:none}.story-news-copy h1{font-size:39px}.story-news-copy>p:not(.story-kicker){font-size:16px}.story-dashboard-actions{width:100%}.story-dashboard-actions button,.story-dashboard-actions label{flex:1;justify-content:center;padding:0 8px}.story-dashboard-card{min-height:90px;padding:12px}.story-card-icon{width:40px;height:40px}.story-feature-row{margin-top:30px}.story-mode-card{padding-right:30%}.story-mode-preview{opacity:.55;right:-110px}}}
@media (max-width:1023px){.stories-shell{--story-bg:var(--paper);--story-panel:var(--panel);--story-input:var(--surface-muted);--story-raised:var(--surface-muted);--story-line:var(--line);--story-text:var(--ink);--story-muted:var(--muted);--story-accent:var(--accent-text);--story-action:var(--rose-dark);--story-action-text:#fff;--story-danger:var(--accent-text);--story-success:var(--ink);min-height:100%;color:var(--story-text);background:var(--story-bg);font-family:var(--font-sans)}.stories-shell :is(button,input,textarea,select){font:inherit}.stories-shell :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--story-accent);outline-offset:2px}.stories-shell button:disabled{opacity:.45;cursor:default}.story-spin{animation:.9s linear infinite story-spin}@keyframes story-spin{to{transform:rotate(360deg)}}.story-owner{color:var(--story-muted);margin:0 0 12px;font-size:12px}.story-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr));gap:12px;display:grid}.story-dashboard-card,.story-empty-state{background:var(--story-panel);width:100%;min-width:0;min-height:88px;color:var(--story-text);text-align:left;border:0;border-radius:8px;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:16px;display:grid}.story-dashboard-card:hover,.story-empty-state:hover{background:var(--story-raised)}.story-dashboard-card>span:nth-child(2),.story-empty-state>span{flex-direction:column;gap:4px;min-width:0;display:flex}.story-dashboard-card b,.story-empty-state b{text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:650;overflow:hidden}.story-dashboard-card small,.story-empty-state small{color:var(--story-muted);font-size:12px}.story-card-icon{background:var(--story-input);width:44px;height:44px;color:var(--story-accent);border-radius:8px;place-items:center;display:grid}.story-card-meta{color:var(--story-muted);flex-direction:column;gap:4px;font-size:11px;display:flex}.story-card-meta i{font-style:normal}.story-empty-state{grid-template-columns:auto minmax(0,1fr) auto}.story-dashboard-loading{min-height:160px;color:var(--story-muted);justify-content:center;align-items:center;gap:12px;display:flex}.story-dashboard-error{background:var(--story-panel);color:var(--story-danger);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;padding:8px 12px;display:flex}.story-dashboard-error button{place-items:center;width:44px;height:44px;display:grid}.story-form-toolbar{background:var(--story-panel);align-items:center;gap:16px;min-height:64px;padding:8px 20px;display:flex}.story-form-toolbar button{min-height:44px;color:var(--story-muted);border-radius:8px;align-items:center;gap:8px;padding:8px;font-size:13px;display:flex}.story-form-toolbar h1{font-size:18px;font-weight:650}.story-create-form{background:var(--story-panel);border-radius:8px;width:min(640px,100% - 40px);margin:24px auto;padding:24px}.story-create-form h2{margin:0;font-size:18px;font-weight:650}.story-create-form>p{color:var(--story-muted);margin:8px 0 24px;font-size:13px;line-height:1.6}.story-create-form label{flex-direction:column;gap:8px;margin:16px 0;font-size:13px;display:flex}.story-create-form input{border:1px solid var(--story-line);background:var(--story-input);border-radius:8px;width:100%;min-width:0;min-height:44px;padding:8px 12px}.story-suggestions{border:0;flex-wrap:wrap;gap:8px;margin:16px 0 24px;padding:8px 0 0;display:flex}.story-suggestions legend{color:var(--story-muted);margin-bottom:8px;font-size:12px}.story-suggestions button{background:var(--story-input);border-radius:8px;min-height:44px;padding:8px 12px;font-size:13px}.story-suggestions button[aria-pressed=true]{color:var(--story-accent);outline:1px solid var(--story-accent)}.story-form-actions{justify-content:flex-end;gap:8px;display:flex}.story-form-actions>button{background:var(--story-input);border-radius:8px;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:8px 16px;font-size:14px;display:flex}.story-form-actions>.story-primary-button{color:var(--story-action-text);background:var(--story-action)}.story-editor-shell{grid-template-columns:minmax(0,1fr);display:grid;position:relative;overflow:hidden}.story-editor-shell:has(>.story-settings-drawer){grid-template-columns:minmax(0,1fr) 360px}.story-editor-workspace{grid-template-rows:64px minmax(0,1fr) auto;min-width:0;min-height:0;display:grid}.story-editor-header{background:var(--story-panel);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;min-width:0;padding:8px 16px;display:grid}.story-editor-nav,.story-editor-actions{align-items:center;gap:4px;display:flex}.story-icon-button,.stories-brand-mark{width:44px;height:44px;color:var(--story-text);background:0 0;border:0;border-radius:8px;flex:0 0 44px;place-items:center;display:grid}.story-icon-button:hover,.story-icon-button[aria-pressed=true],.stories-brand-mark:hover{background:var(--story-raised)}.stories-brand-mark{color:var(--story-accent)}.story-title-input{width:100%;min-width:0;height:44px;color:var(--story-text);text-align:center;background:0 0;border:0;border-radius:8px;font-size:18px;font-weight:650}.story-title-input:focus{background:var(--story-input)}.story-writing-stage{overscroll-behavior:contain;scrollbar-gutter:stable;min-width:0;min-height:0;padding:16px 24px;overflow:auto}.story-prose-editor{resize:none;width:min(820px,100%);min-height:100%;color:var(--story-text);background:0 0;border:0;margin:auto;padding:0;display:block;overflow:hidden}.story-prose-editor::placeholder{color:var(--story-muted)}.story-editor-narrow .story-prose-editor{width:min(650px,100%)}.story-editor-wide .story-prose-editor{width:min(1040px,100%)}.story-generation-dock{background:var(--story-panel);border-radius:8px;width:min(920px,100% - 32px);min-width:0;margin:8px auto 16px}.story-status{min-height:44px;color:var(--story-success);justify-content:space-between;align-items:center;gap:8px;padding:0 12px;font-size:12px;display:flex}.story-status-error{color:var(--story-danger)}.story-status button{color:currentColor;background:0 0;border:0;flex-shrink:0;place-items:center;width:44px;height:44px;display:grid}.story-instruction-row{min-height:48px;color:var(--story-accent);grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:0 12px;display:grid}.story-instruction-row input{width:100%;min-width:0;height:44px;color:var(--story-text);background:0 0;border:0;font-size:14px}.story-instruction-row input::placeholder{color:var(--story-muted)}.story-dock-toolbar{justify-content:space-between;align-items:center;gap:8px;min-height:56px;padding:4px 8px 8px;display:flex}.story-dock-secondary,.story-generate-group{align-items:center;gap:8px;min-width:0;display:flex}.story-word-count{color:var(--story-muted);white-space:nowrap;margin-left:4px;font-size:12px}.story-generate-group .popup-select{flex:0 120px;width:120px}.story-generate-group .popup-select-trigger{min-height:44px}.story-send-button{background:var(--story-action);min-height:44px;color:var(--story-action-text);border:0;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:8px 20px;font-size:14px;font-weight:650;display:flex}.story-editor-shell[data-focus-mode=true] .story-word-count{display:none}.story-overlay{z-index:30000;left:0;right:0;top:var(--lfn-viewport-top,0px);height:var(--lfn-viewport-height,100dvh);background:#00000073;justify-content:center;align-items:center;min-height:0;padding:24px;display:flex;position:fixed}.story-panel-surface{width:min(640px,100%);max-height:calc(var(--lfn-viewport-height,100dvh) - 48px);background:var(--story-panel);border-radius:24px;flex-direction:column;min-height:0;display:flex;overflow:hidden;box-shadow:0 16px 48px #0003}.story-panel-heading{background:var(--story-input);flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;min-height:64px;padding:8px 16px;display:flex}.story-panel-heading h2{font-size:16px;font-weight:650}.story-panel-heading button{border-radius:8px;place-items:center;width:44px;height:44px;display:grid}.story-library-content{overscroll-behavior:contain;min-height:0;padding:16px;overflow:auto}.story-library-new{background:var(--story-input);width:100%;min-height:44px;color:var(--story-accent);border:0;border-radius:8px;justify-content:center;align-items:center;gap:8px;margin-bottom:8px;padding:8px 12px;font-size:14px;display:flex}.story-library-items{flex-direction:column;gap:4px;display:flex}.story-library-items>button{width:100%;min-height:64px;color:var(--story-text);text-align:left;background:0 0;border:0;border-radius:8px;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:12px;display:grid}.story-library-items>button:hover,.story-library-items>button[aria-current=page]{background:var(--story-input)}.story-library-items span{flex-direction:column;gap:4px;min-width:0;display:flex}.story-library-items b{text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.story-library-items small{color:var(--story-muted);font-size:12px}.story-branch-option{width:100%;min-height:64px;color:var(--story-text);text-align:left;background:0 0;border:0;border-radius:8px;justify-content:space-between;align-items:center;gap:12px;padding:12px;display:flex}.story-branch-option:hover,.story-branch-option[aria-current=true]{background:var(--story-input)}.story-branch-option span{flex-direction:column;gap:4px;display:flex}.story-branch-option b{font-size:14px}.story-branch-option small{color:var(--story-muted);font-size:12px}.story-branch-option i{color:var(--story-accent);font-size:12px;font-style:normal}.story-settings-drawer{background:var(--story-panel);flex-direction:column;min-height:0;display:flex}.story-settings-tabs{flex-shrink:0;grid-template-columns:repeat(3,minmax(0,1fr)) 44px;min-height:56px;padding:4px;display:grid}.story-settings-tabs:has([hidden]){grid-template-columns:repeat(3,minmax(0,1fr))}.story-settings-tabs button{min-height:44px;color:var(--story-muted);background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;gap:8px;padding:8px;font-size:13px;display:flex}.story-settings-tabs button[aria-selected=true]{background:var(--story-input);color:var(--story-accent)}.story-settings-tabs button[hidden]{display:none}.story-settings-scroll{overscroll-behavior:contain;flex:1;min-height:0;padding:0 16px 16px;overflow:auto}.story-setting-section{border-bottom:1px solid var(--story-line);padding:16px 0}.story-setting-label{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;margin-bottom:8px;font-size:13px;font-weight:650;display:flex}.story-setting-label small{color:var(--story-muted);font-size:11px;font-weight:400}.story-setting-section :is(input:not([type=range]),textarea){border:1px solid var(--story-line);background:var(--story-input);width:100%;min-width:0;min-height:44px;color:var(--story-text);border-radius:8px;padding:8px 12px;font-size:14px}.story-setting-section textarea{resize:vertical;min-height:112px;line-height:1.6}.story-setting-section .story-lorebook-input{min-height:180px}.story-setting-section>p{color:var(--story-muted);margin:8px 0 0;font-size:12px;line-height:1.6}.story-setting-section>a{min-height:44px;color:var(--story-accent);align-items:center;font-size:13px;display:inline-flex}.story-setting-section>small{color:var(--story-muted);text-align:right;margin-top:4px;font-size:11px;display:block}.story-mode-value{min-height:44px;color:var(--story-accent);align-items:center;gap:12px;font-size:14px;display:flex}.story-toggle{width:100%;min-height:44px;color:var(--story-text);text-align:left;background:0 0;border:0;align-items:center;gap:12px;display:flex}.story-toggle>b{font-size:13px;font-weight:650}.story-toggle>span{background:var(--story-muted);border-radius:12px;flex-shrink:0;width:40px;height:24px;padding:3px}.story-toggle>span i{background:var(--story-panel);border-radius:50%;width:18px;height:18px;display:block}.story-toggle[aria-checked=true]>span{background:var(--story-action)}.story-toggle[aria-checked=true]>span i{transform:translate(16px)}.story-setting-heading{align-items:center;gap:12px;padding:16px 0 0;font-size:14px;display:flex}.story-setting-heading span{flex-direction:column;gap:4px;display:flex}.story-setting-heading small{color:var(--story-muted);font-size:12px}.story-readonly-setting{grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;font-size:13px;display:grid}.story-readonly-setting b{color:var(--story-accent)}.story-readonly-setting small{text-align:left;grid-column:1/-1;margin:0}.story-segmented{background:var(--story-input);border-radius:8px;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-height:48px;padding:4px;display:grid}.story-segmented button{min-height:44px;color:var(--story-muted);background:0 0;border:0;border-radius:6px;font-size:13px}.story-segmented button[aria-pressed=true]{background:var(--story-panel);color:var(--story-text)}.story-range-label{justify-content:space-between;align-items:center;gap:8px;font-size:13px;display:flex}.story-setting-section input[type=range]{background:linear-gradient(var(--story-line),var(--story-line)) center / 100% 6px no-repeat;width:100%;height:44px;accent-color:var(--story-accent);border:0;border-radius:0;padding:0}.story-file-actions{border:0;flex-direction:column;gap:8px;display:flex}.story-file-actions button{background:var(--story-input);border:0;border-radius:8px;align-items:center;gap:12px;width:100%;min-height:44px;padding:8px 12px;font-size:13px;display:flex}.story-file-actions .story-danger-button{color:var(--story-danger)}.stories-auth-wall{place-items:center;padding:24px;display:grid}.stories-auth-panel{background:var(--story-panel);text-align:center;border-radius:8px;width:min(460px,100%);padding:24px}.stories-auth-panel>.stories-brand-mark{margin:0 auto 16px}.stories-auth-panel h1{margin:12px 0;font-size:24px}.stories-auth-panel>p{color:var(--story-muted);font-size:13px}.stories-auth-panel>a{background:var(--story-action);min-height:44px;color:var(--story-action-text);border-radius:8px;align-items:center;gap:8px;margin:16px 4px 0;padding:8px 16px;font-size:14px;display:inline-flex}.stories-auth-panel>.story-auth-back{color:var(--story-muted);background:0 0}@media (max-width:1023px){.story-form-toolbar{padding:8px 12px}.story-create-form{width:calc(100% - 24px);margin:12px;padding:16px}.story-editor-header{gap:4px;padding:8px}.story-title-input{font-size:16px}.story-writing-stage{padding:16px}.story-generation-dock{width:calc(100% - 16px);margin:4px auto calc(8px + env(safe-area-inset-bottom))}.story-dock-toolbar,.story-dock-secondary,.story-generate-group{gap:4px}.story-dock-secondary .story-icon-button:first-child{display:inline-flex}.story-generate-group .popup-select{flex-basis:112px;width:112px}.story-word-count{font-size:10px;display:inline}.story-send-button{padding:8px 12px}.stories-shell input:not([type=range]),.stories-shell textarea{font-size:16px}}@media (max-width:599px){.story-dashboard-card{grid-template-columns:auto minmax(0,1fr) auto;padding:12px}.story-card-meta{display:none}.story-overlay{align-items:flex-end;padding:0}.story-panel-surface{width:100%;padding-bottom:env(safe-area-inset-bottom);border-radius:24px 24px 0 0}}.story-dashboard{background:var(--surface);padding-bottom:20px;display:block;overflow-y:auto}.mobile-story-home-header{background:var(--panel);border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;min-height:64px;padding:12px 20px;display:flex}.mobile-story-home-header>a{align-items:center;gap:10px;font-size:17px;font-weight:650;display:flex}.mobile-story-home-header>a svg{color:var(--rose)}.mobile-story-home-header nav{align-items:center;gap:6px;display:flex}.mobile-story-home-header nav a{border-radius:8px;justify-content:center;align-items:center;gap:6px;min-height:44px;padding:8px 10px;font-size:12px;display:flex}.mobile-story-home-header nav a:hover{background:var(--surface)}.mobile-story-welcome{border-bottom:1px solid var(--line);background:linear-gradient(130deg,var(--panel),color-mix(in srgb,var(--rose) 8%,var(--panel)));padding:26px 24px 24px;position:relative}.mobile-story-welcome>span{color:var(--rose);letter-spacing:.08em;font-size:10px;font-weight:650}.mobile-story-welcome h1{margin:8px 0;font-size:29px;font-weight:650;line-height:1.3}.mobile-story-welcome p{max-width:420px;color:var(--muted);margin:0 0 18px;font-size:13px;line-height:1.7}.mobile-story-welcome .story-primary-button{background:var(--rose);color:#fff;border:0;border-radius:8px;align-items:center;gap:7px;min-height:44px;padding:10px 16px;font-size:12px;font-weight:600;display:inline-flex}.mobile-story-stats{color:var(--muted);gap:18px;margin-top:18px;font-size:11px;display:flex}.mobile-story-stats b{color:var(--ink);font-weight:600}.story-dashboard .collection-toolbar{position:static}.story-dashboard-content{padding:16px 20px}.story-dashboard-card{border:1px solid var(--line);background:var(--panel);text-align:left;border-radius:12px;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px}.story-dashboard-card>.story-card-meta{display:none}.mobile-story-card-copy{flex-direction:column;gap:6px;min-width:0;display:flex}.mobile-story-card-copy>b{text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.mobile-story-card-copy>small{margin:0;font-size:11px}.mobile-story-card-badges{flex-wrap:wrap;gap:5px;display:flex}.mobile-story-card-badges i{text-overflow:ellipsis;white-space:nowrap;background:var(--surface);max-width:100%;color:var(--muted);border-radius:4px;padding:3px 6px;font-size:9px;font-style:normal;overflow:hidden}.mobile-story-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 20px 20px;display:grid}.mobile-story-feature-grid>:is(a,button){border:1px solid var(--line);background:var(--panel);min-width:0;min-height:88px;color:var(--ink);text-align:left;border-radius:10px;align-items:center;gap:10px;padding:14px 12px;display:flex}.mobile-story-feature-grid>:is(a,button)>svg:first-child{color:var(--rose);flex:none}.mobile-story-feature-grid>:is(a,button)>svg:last-child{color:var(--muted);flex:none;margin-left:auto}.mobile-story-feature-grid span{flex-direction:column;gap:5px;min-width:0;display:flex}.mobile-story-feature-grid b{font-size:12px;font-weight:600}.mobile-story-feature-grid small{color:var(--muted);font-size:10px;line-height:1.6}.mobile-story-no-results{color:var(--muted);flex-direction:column;align-items:center;gap:8px;padding:32px 12px;font-size:12px;display:flex}.mobile-story-no-results p{margin:0}.mobile-story-no-results button{background:var(--panel);min-height:44px;color:var(--rose);border:0;border-radius:7px;margin-top:6px;padding:8px 14px}.mobile-story-create-intro{gap:12px;margin-bottom:24px;display:flex}.mobile-story-create-intro>span{background:var(--surface);width:48px;height:48px;color:var(--rose);border-radius:12px;flex:none;place-items:center;display:grid}.mobile-story-create-intro h2{margin:0 0 6px;font-size:20px}.mobile-story-create-intro p{color:var(--muted);margin:0;font-size:12px;line-height:1.7}.story-create-form .story-suggestions button{background:var(--surface);border:0;border-radius:7px;min-height:44px;font-size:12px}.story-create-form .story-suggestions button[aria-pressed=true]{color:var(--rose);background:color-mix(in srgb,var(--rose) 10%,var(--panel))}.story-dock-toolbar{flex-wrap:wrap;row-gap:8px}.story-dock-secondary{flex:none}.story-generate-group{margin-left:auto}}@media (max-width:599px){.mobile-story-home-header{padding:10px 14px}.mobile-story-home-header nav a{padding:8px}.mobile-story-welcome{padding:24px 16px 20px}.story-dashboard-content{padding:14px 12px}.story-grid{grid-template-columns:minmax(0,1fr);gap:10px}.mobile-story-feature-grid{grid-template-columns:minmax(0,1fr);gap:8px;margin:4px 12px 16px}.mobile-story-feature-grid>:is(a,button){min-height:76px;padding:12px 14px}.mobile-story-feature-grid b{font-size:13px}.mobile-story-feature-grid small{font-size:11px}}
