/* A single story field is the front door; account controls live in the global header. */
.site-header{position:sticky!important;top:0;z-index:50}
.global-user-menu{position:relative}.global-user-menu[hidden]{display:none!important}.global-user-menu summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:12px;min-height:44px;padding:0 12px;font-size:13px}.global-user-menu summary::-webkit-details-marker{display:none}.global-user-panel{position:absolute;right:0;top:calc(100% + 8px);width:220px;box-sizing:border-box;padding:8px;border:1px solid var(--line);border-radius:12px;background:#151c25;box-shadow:0 12px 35px #0007;display:grid;gap:3px}.global-user-panel a,.global-user-panel button{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px;text-decoration:none;text-align:left;color:var(--ink,#eef2f8);background:none;border:0;border-radius:7px;font:inherit;font-size:13px;cursor:pointer}.global-user-panel a:hover,.global-user-panel button:hover{background:#ffffff0b}
.toon-home .simple-entry-hero{display:block;min-height:0;padding:72px 0 52px;max-width:1100px}.simple-entry-hero .hero-copy{max-width:none;text-align:center}.simple-entry-hero .entry-kicker{font-size:12px;color:var(--accent);margin:0 0 16px}.toon-home .simple-entry-hero .hero-heading{font-size:clamp(30px,4.2vw,52px);letter-spacing:-.045em;line-height:1.25;margin:0 0 16px}.simple-entry-hero .hero-description{font-size:16px;margin:0 0 28px}.home-story-form{padding:20px;border:1px solid #46533a;background:#141c25;border-radius:20px;box-shadow:0 10px 35px #0002}.home-story-form:focus-within{border-color:var(--accent)}.home-story-form textarea{display:block;width:100%;resize:vertical;min-height:110px;max-height:360px;box-sizing:border-box;font:inherit;font-size:18px;line-height:1.7;color:var(--ink,#eef2f8);border:0;background:none;padding:6px;outline:none}.home-story-form textarea::placeholder{color:#82909c}.entry-form-bottom{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:14px}.entry-form-bottom>span{font-size:12px;color:var(--muted)}.entry-form-bottom .button{min-height:46px;padding:12px 22px}
.workspace-shell .workspace-wallet{display:none!important}.workspace-shell{max-width:none!important;width:calc(100% - 40px)!important}.wizard-input-active .story-sidebar{max-width:none!important;width:100%!important;padding:26px!important;margin:0!important;border:0;border-radius:0;background:transparent}.wizard-header{scroll-margin-top:90px}.wizard-header h2{font-size:30px}.wizard-input-active .toon-studio-grid{width:100%}.wizard-page .story-input{min-height:150px!important;height:180px;max-height:420px;font-size:18px!important;line-height:1.8}.wizard-page .story-input-wrap{margin:0}.wizard-page #story-guidance,.wizard-page .story-privacy-hint{display:none}.wizard-page #story-count{font-size:11px}.wizard-page .simple-template-options{margin:16px 0 0;border:0;background:none;border-radius:0}.simple-template-options>summary{width:fit-content;padding:8px 0!important;min-height:40px}.simple-template-options summary small,.simple-template-options .workspace-drawer-plus{display:none}.simple-template-options summary strong{font-size:13px;font-weight:500}.simple-template-options .workspace-template-content{padding:12px 0}.simple-template-options .workspace-template-content>header{display:none}.simple-template-options .story-purpose-options{gap:6px}.simple-template-options .story-purpose-options button{padding:9px;font-size:12px;min-height:40px}.simple-template-options .starter-template-list{display:flex;flex-wrap:wrap;gap:8px}.simple-template-options .starter-template-list>button{flex:1 1 180px;min-height:44px;padding:12px;border:1px solid var(--line);border-radius:9px}.simple-template-options .starter-template-list>button>span{display:none}.wizard-actions{justify-content:flex-end}.wizard-actions .button{flex:0 1 240px}.wizard-input-active #toon-provider{display:none}.wizard-header .wizard-progress button{height:8px;min-height:8px}.entry-login-note{font-size:12px;color:var(--muted);line-height:1.7}
@media(max-width:760px){.site-header .nav-wrap{flex-wrap:nowrap!important}.site-header .nav-actions{gap:8px}.site-header .brand-image{width:145px;height:auto}.global-user-menu summary{padding:0 9px;gap:5px}.global-user-panel{width:210px}.toon-home .simple-entry-hero{width:calc(100% - 28px);padding:36px 0 28px}.toon-home .simple-entry-hero .hero-heading{font-size:30px}.simple-entry-hero .hero-description{font-size:14px;line-height:1.7;margin-bottom:20px}.home-story-form{padding:14px;border-radius:16px}.home-story-form textarea{font-size:16px;min-height:125px}.entry-form-bottom{align-items:flex-end;gap:10px}.entry-form-bottom>span{font-size:11px;line-height:1.6;max-width:170px}.entry-form-bottom .button{padding:11px 16px;white-space:nowrap}.workspace-shell{width:100%!important;padding:0 14px;box-sizing:border-box}.wizard-input-active .story-sidebar{padding:20px 0!important}.wizard-header h2{font-size:25px}.wizard-page .story-input{font-size:16px!important}.wizard-actions .button{flex:1}.workspace-heading-actions #new-episode{min-height:38px}.workspace-shell .workspace-heading{gap:6px}}
@media(max-width:360px){.site-header .brand-image{width:122px}.nav-actions .language-switch select{padding-right:12px}.global-user-menu summary{font-size:12px}.toon-home .simple-entry-hero .hero-heading{font-size:27px}}
.simple-entry-hero .hero-description{max-width:none;text-align:center;display:block}
.simple-template-options summary small{display:none!important}
.wizard-header .wizard-progress button{display:grid;place-items:center;background:transparent!important;width:36px;height:36px;min-height:36px}
.wizard-header .wizard-progress button:after{content:'';display:block;width:32px;height:5px;background:var(--line);border-radius:4px}
.wizard-header .wizard-progress button[aria-current=step]:after,.wizard-header .wizard-progress button.done:after{background:var(--accent)}
.simple-template-options .starter-template-list>button>span{display:block}
.simple-template-options .starter-template-list>button small,.simple-template-options .starter-template-list .starter-template-arrow,.simple-template-options .story-purpose-options button>span{display:none!important}
.simple-template-options summary strong:after{content:' ＋';color:var(--accent)}
.simple-template-options[open] summary strong:after{content:' −'}
.wizard-input-active .local-draft-notice:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;margin:12px 0;border-radius:8px}
.wizard-input-active .local-draft-notice h2{font-size:12px;margin:0;line-height:1.6}
.wizard-input-active .local-draft-notice p,.wizard-input-active .local-draft-icon,.wizard-input-active #resume-local-draft,.wizard-input-active #browse-starter-templates{display:none}
.wizard-input-active #discard-local-draft{font-size:12px;min-height:36px;white-space:nowrap}
/* Quiet ink-and-light backdrop, with a single focus treatment around the composer. */
.toon-home{isolation:isolate;position:relative;background:#0e1015}
.toon-home:before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:0 0 auto;height:850px;background:radial-gradient(ellipse at var(--entry-x,70%) var(--entry-y,25%),#a6c88c19,transparent 48%),radial-gradient(ellipse at 12% 48%,#9d91cf16,transparent 45%),repeating-linear-gradient(115deg,transparent 0 119px,#d9e3cc04 120px,transparent 121px);mask-image:linear-gradient(#000 65%,transparent);animation:entry-light 18s ease-in-out infinite alternate}
@keyframes entry-light{to{opacity:.65;transform:translateY(18px)}}
.home-story-form{background:#181e26c9;border-color:#ffffff20;box-shadow:0 20px 70px #0002;backdrop-filter:blur(12px);transition:border-color .2s,box-shadow .2s}
.home-story-form:focus-within{border-color:#c9ed8b80;box-shadow:0 0 0 3px #c9ed8b0a,0 20px 70px #0002}
.home-story-form textarea:focus,.home-story-form textarea:focus-visible{outline:none!important;box-shadow:none!important;border:0!important}
@media(prefers-reduced-motion:reduce){.toon-home:before{animation:none}.home-story-form{transition:none}}
/* The guided editor keeps navigation outside its scrolling content. */
.wizard-input-active .story-sidebar{padding:14px 0!important}
.wizard-input-active #story-form-details{height:var(--wizard-space,calc(100dvh - 195px));min-height:240px;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;overflow:hidden}
.wizard-input-active .wizard-header{margin-bottom:8px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:0 16px}
.wizard-input-active .wizard-header>span{font-size:11px;grid-column:1}
.wizard-input-active .wizard-header h2{grid-column:1;font-size:25px;margin:5px 0 8px}
.wizard-input-active .wizard-progress{grid-column:2;grid-row:1/3}
.wizard-input-active .wizard-page:not([hidden]){overflow-y:auto;min-height:0;padding:4px 3px 12px;overscroll-behavior:contain;scrollbar-width:thin}
.wizard-input-active .wizard-actions{padding:10px 0 2px;border-top:1px solid var(--line);background:transparent;margin:0;align-items:center;gap:10px}
.wizard-input-active .wizard-actions .button{min-height:44px;margin:0!important;flex:0 1 240px}
.wizard-input-active .wizard-actions #draft-story{width:auto}
.wizard-input-active .field-error{margin:3px 0;font-size:12px}
.wizard-input-active .wizard-page .studio-fieldset{margin:0 0 14px}
.wizard-input-active #style-options{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:8px!important}
.wizard-input-active #style-options .toon-style-card{display:flex!important;flex-direction:column;gap:0;position:relative;padding:5px!important;border-radius:9px;min-height:0!important;overflow:hidden}
.wizard-input-active #style-options .style-sample{display:block;width:100%;margin:0!important;aspect-ratio:auto;height:85px;overflow:hidden;border-radius:5px}
.wizard-input-active #style-options .style-sample-image{display:block;width:100%;height:85px;object-fit:cover;aspect-ratio:auto}
.wizard-input-active #style-options .style-sample-caption,.wizard-input-active #style-options .toon-style-card>span:not(.style-sample):not(.style-palette),.wizard-input-active #toggle-studio-styles,.wizard-input-active #style-options+.style-more-button+.input-hint{display:none!important}
.wizard-input-active #style-options strong{font-size:12px;line-height:1.4;padding:7px 2px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wizard-input-active #style-options input{position:absolute;opacity:0;inset:0;pointer-events:none}
.wizard-input-active #style-options .toon-style-card:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:2px}
.wizard-input-active .character-options{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.wizard-input-active .character-card{padding:6px;min-height:0}.wizard-input-active .character-avatar{height:90px;width:100%;max-width:100px;margin:auto}.wizard-input-active .character-avatar svg{width:100%;height:90px}.wizard-input-active .character-card strong{font-size:12px}
.wizard-input-active .wizard-review{gap:8px}.wizard-input-active .wizard-review article{padding:12px}.wizard-input-active .wizard-review p{margin:5px 0 0;font-size:13px;max-height:110px;overflow-y:auto}.wizard-input-active .wizard-review button{top:4px;right:8px}
.wizard-input-active .local-draft-notice:not([hidden]){padding:4px 0!important;border:0;background:transparent;margin:10px 0 0!important}.wizard-input-active .local-draft-notice h2{font-size:11px;font-weight:400;color:var(--muted)}
@media(max-width:760px){.wizard-input-active .wizard-header h2{font-size:21px}.wizard-input-active .wizard-header{gap:0 6px}.wizard-input-active .wizard-progress{gap:0}.wizard-input-active .wizard-progress button{width:24px}.wizard-input-active .wizard-progress button:after{width:19px}.wizard-input-active #style-options{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}.wizard-input-active #style-options .style-sample,.wizard-input-active #style-options .style-sample-image{height:62px}.wizard-input-active #style-options strong{font-size:10px;padding-top:4px}.wizard-input-active .character-options{grid-template-columns:repeat(3,minmax(0,1fr))}.wizard-input-active .character-avatar,.wizard-input-active .character-avatar svg{height:62px}.wizard-input-active .wizard-actions .button{flex:1}.wizard-input-active .local-draft-notice h2{font-size:10px}.wizard-input-active .wizard-review article{padding:10px}.wizard-input-active .wizard-review p{max-height:70px}.wizard-input-active .story-sidebar{padding:8px 0!important}}
@media(max-width:760px){.wizard-input-active .workspace-heading{flex-wrap:nowrap!important;padding:6px 0!important;gap:6px}.wizard-input-active .workspace-heading>div:first-child{display:none}.wizard-input-active .workspace-subnav{order:0!important;flex-basis:auto!important;flex:1;gap:0}.wizard-input-active .workspace-heading-actions{order:1!important;margin-left:0}.wizard-input-active .workspace-tabs button{min-height:40px;padding:7px}.wizard-input-active .workspace-heading-actions #new-episode{font-size:11px;padding:7px 9px;min-height:36px}}
body:has(.wizard-input-active)>footer{display:none}
@media(max-width:760px){.wizard-input-active .wizard-actions #draft-story{flex:2!important;font-size:13px;line-height:1.4;padding:10px 12px;gap:6px}.wizard-input-active .wizard-actions #draft-story .icon{width:18px;min-width:18px}}

/* One input and one primary action; preferences stay collapsed. */
.simple-workspace.wizard-input-active .story-sidebar{max-width:840px!important;margin:auto!important}
/* The entry form belongs to the page canvas; only the input is a raised surface. */
body[data-page="service"] .simple-workspace.wizard-input-active .story-sidebar{background:transparent;box-shadow:none}
.simple-workspace.wizard-input-active #story-form-details{grid-template-rows:auto minmax(0,1fr) auto}
.simple-workspace .simple-create-header{display:block!important;margin:12px 0 20px!important}
.simple-create-header p{color:var(--muted);font-size:14px;line-height:1.6;margin:6px 0 0}
.simple-workspace .simple-create-content .sidebar-title,.simple-workspace .example-section,.simple-workspace #draft-control-note{display:none}
.simple-workspace .simple-create-content .story-input{height:clamp(140px,26vh,240px);min-height:140px!important;border-radius:14px;font-size:17px!important}
.simple-workspace .simple-create-content .studio-settings{margin-top:18px;border-top:1px solid var(--line);padding-top:8px}
.simple-workspace .simple-create-settings>summary{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;cursor:pointer;min-height:44px}
.simple-create-settings>summary>span:first-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.simple-create-settings summary strong{font-size:13px;font-weight:500}
.simple-create-settings #selection-summary{font-size:12px;color:var(--muted)}
.simple-create-settings .settings-change{font-size:0}.simple-create-settings .settings-change i{font-size:18px}
.simple-create-settings[open]>summary{margin-bottom:14px}
.simple-workspace .simple-create-note{font-size:12px;color:var(--muted);line-height:1.6;margin-right:auto}
.simple-workspace .character-processing-note{font-size:10px;line-height:1.5;color:var(--muted);margin:12px 0}
.simple-workspace .wizard-actions{justify-content:space-between}
@media(max-width:760px){.simple-create-header p{font-size:12px}.simple-workspace .simple-create-header{margin:8px 0 12px!important}.simple-workspace .simple-create-note{font-size:10px;max-width:135px}.simple-workspace .wizard-actions #draft-story{flex:0 1 auto!important}.simple-create-settings #selection-summary{font-size:11px}.simple-workspace .simple-create-content .story-input{font-size:16px!important}}

.simple-workspace #studio-start{display:none!important}

.simple-workspace #draft-story{white-space:nowrap}.simple-workspace #draft-story>span:not(.button-end){white-space:nowrap}
/* Keep generation feedback quiet and independent of any preset mascot. */
.toon-progress .progress-art{display:none!important}
.toon-progress{min-height:240px!important;padding:40px 18px!important}
.toon-progress .progress-panels{margin-top:22px}
.toon-progress h2{font-size:21px}
.character-options:empty{display:none!important}
#public-assets[hidden]{display:none!important}
.public-asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}
.public-asset-grid article{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.public-asset-grid img{display:block;width:100%;aspect-ratio:1;object-fit:contain}
.public-asset-grid h3{font-size:14px;padding:12px;margin:0}
#browse-assets{min-height:44px;text-align:left;width:100%;border-bottom:1px solid var(--line)}
#browse-assets[aria-pressed=true]{color:var(--accent)}
.saved-character-card>.text-button{display:block;min-height:44px}
@media(max-width:760px){.public-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.toon-progress{padding:30px 12px!important;min-height:200px!important}}
.simple-script-preview{font-size:16px;line-height:1.8;margin:12px 16px;white-space:pre-wrap}
.simple-script-edit>summary{cursor:pointer;font-size:12px;color:var(--muted);padding:10px 16px;min-height:40px}
.simple-workspace #save-script:disabled,.simple-workspace:has(#generate-toon:not([hidden])) #generate-first-panel{display:none!important}
.simple-workspace #generate-toon{background:var(--accent);color:#18200d;border-color:var(--accent)}

.project-cover-placeholder{display:grid;place-items:center;width:100%;height:100%;font-size:48px;color:var(--muted);background:linear-gradient(135deg,#1a222b,#12181d)}
/* One page scroll, including optional settings; no nested viewport-sized form. */
.simple-workspace.wizard-input-active #story-form-details{height:auto;min-height:0;display:block;overflow:visible}
.simple-workspace.wizard-input-active .simple-create-content{overflow:visible;overscroll-behavior:auto;min-width:0;padding-bottom:24px}
.simple-workspace.wizard-input-active .wizard-actions{position:sticky;bottom:0;background:var(--bg,#0c0e12);padding:12px 0 calc(12px + env(safe-area-inset-bottom));z-index:3}
.simple-workspace.wizard-input-active #story-input{min-height:180px;max-height:none}
.simple-workspace.wizard-input-active .panel-count-options{min-width:0;grid-template-columns:repeat(4,minmax(0,1fr))}

.simple-workspace .studio-preset{display:flex;gap:16px;align-items:center;border:1px solid #52643b;border-radius:14px;background:#bfe38509;padding:14px;margin-top:20px}.studio-preset img{width:100px;height:112px;object-fit:cover;border-radius:8px}.studio-preset small{display:block;color:#c9ed8b;font-size:11px;margin-bottom:6px}.studio-preset strong{display:block;font-size:17px}.simple-workspace .studio-preset p{font-size:12px;line-height:1.6;margin:8px 0;color:var(--muted)}.studio-preset .text-button{font-size:12px;padding:0;min-height:32px}.simple-create-note{word-break:keep-all}@media(max-width:600px){.simple-workspace .studio-preset{gap:12px;padding:12px}.studio-preset img{width:80px;height:104px}.studio-preset strong{font-size:15px}}

.simple-workspace.generation-feedback-active #story-form-details{display:none!important}.simple-workspace.generation-feedback-active #workspace-canvas{display:block!important}.simple-workspace #toon-progress{scroll-margin-top:110px}
