:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:#f4efe5;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;background:#11100e;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html{min-height:100%}body{letter-spacing:0;min-height:100%;margin:0}button,input,textarea,select{font:inherit;letter-spacing:0}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.56}.appShell{min-height:100svh;padding:env(safe-area-inset-top) 12px calc(86px + env(safe-area-inset-bottom));position:relative;overflow-x:hidden}.backdrop{z-index:-2;background:linear-gradient(#11100e94,#11100eeb 42%,#11100efa),url(/assets/story-engine-bg.png) top/cover no-repeat;position:fixed;inset:0}.backdrop:after{content:"";background:linear-gradient(90deg,#075b562e,#0000 34%,#a6402029),#11100e6b;position:absolute;inset:0}.topbar{top:env(safe-area-inset-top);z-index:20;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#181613d1;border:1px solid #f4efe521;border-radius:8px;justify-content:space-between;align-items:center;gap:12px;width:min(1180px,100%);min-height:66px;margin:0 auto 10px;padding:10px;display:flex;position:sticky}.brand{align-items:center;gap:10px;min-width:0;display:flex}.brand img{object-fit:cover;border:1px solid #f4efe533;border-radius:8px;flex:none;width:46px;height:46px}.brand h1,.brand p{margin:0}.brand h1{font-size:1.08rem;line-height:1.1}.brand p{color:#cfc3ae;text-overflow:ellipsis;white-space:nowrap;max-width:58vw;font-size:.78rem;overflow:hidden}.topActions,.composerActions,.apiActions,.docActions,.loreTools,.quickMoves{align-items:center;gap:8px;min-width:0;display:flex}.iconButton,.ghostIcon{color:#f7f0df;background:#f4efe514;border:1px solid #f4efe524;border-radius:8px;flex:none;place-items:center;width:42px;height:42px;display:inline-grid}.ghostIcon{background:#f4efe50f;width:34px;height:34px}.danger{color:#ffb1a2}.toast{right:14px;bottom:calc(90px + env(safe-area-inset-bottom));z-index:40;color:#f7f0df;overflow-wrap:anywhere;background:#14382ff0;border:1px solid #85ceb466;border-radius:8px;max-width:min(420px,100vw - 28px);padding:11px 13px;position:fixed;box-shadow:0 16px 42px #00000059}.toastError{background:#4f221af5;border-color:#ff8f7873}.mainLayout{gap:12px;width:min(1180px,100%);margin:0 auto;display:grid}.controlStrip{grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;display:grid}.hiddenInput{display:none}input,textarea,select{color:#f7f0df;background:#0b0e0db8;border:1px solid #f4efe524;border-radius:8px;outline:none;width:100%;min-width:0}input,select{min-height:43px;padding:0 12px}textarea{resize:vertical;padding:11px 12px;line-height:1.45}input:focus,textarea:focus,select:focus{border-color:#75cdb5c2;box-shadow:0 0 0 3px #75cdb524}.toolButton,.primaryButton,.providerChip,.segmented button,.tabbar button{color:#f7f0df;white-space:nowrap;background:#f4efe514;border:1px solid #f4efe524;border-radius:8px;justify-content:center;align-items:center;gap:7px;min-height:43px;text-decoration:none;display:inline-flex}.toolButton,.primaryButton{padding:0 12px}.primaryButton{background:linear-gradient(#c3502bf0,#732f20f5);border-color:#f58d5bad;box-shadow:0 10px 30px #a7422238}.scenePanel,.memoryPanel,.apiPanel,.guidePanel,.editorGrid,.directorPanel{-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#121210c7;border:1px solid #f4efe521;border-radius:8px;min-width:0}.scenePanel{flex-direction:column;height:calc(100svh - 218px);min-height:0;max-height:calc(100svh - 218px);display:flex}.transcript{flex-direction:column;flex:1;gap:12px;min-height:0;padding:12px;display:flex;overflow-y:auto}.emptyState{color:#cfc3ae;text-align:center;align-content:center;place-items:center;gap:8px;min-height:100%;display:grid}.emptyState h2,.emptyState p{overflow-wrap:anywhere;max-width:min(460px,82vw);margin:0}.message{overflow-wrap:anywhere;border:1px solid #f4efe51f;border-radius:8px;width:min(780px,100%);padding:12px}.message.assistant{background:#1f2e2ad1;align-self:flex-start}.message.player{background:#4d2d20d6;align-self:flex-end}.messageMeta{color:#d9c9ad;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-size:.8rem;display:flex}.messageMeta span{align-items:center;gap:6px;min-width:0;display:inline-flex}.message p,.memoryItem p{white-space:pre-wrap;margin:0}.composer{border-top:1px solid #f4efe51f;gap:9px;padding:12px;display:grid}.composerActions{flex-wrap:wrap;justify-content:flex-end}.quickMoves{flex-wrap:wrap}.miniButton,.checkChip{color:#efe6d4;background:#f4efe512;border:1px solid #f4efe521;border-radius:8px;justify-content:center;align-items:center;gap:6px;min-height:34px;padding:0 9px;font-size:.8rem;display:inline-flex}.statusRail{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px 0;display:grid}.statusRail span{color:#cfc3ae;text-overflow:ellipsis;white-space:nowrap;background:#090f0e94;border:1px solid #f4efe51c;border-radius:8px;align-items:center;gap:6px;min-width:0;padding:8px 9px;display:inline-flex;overflow:hidden}.editorGrid,.memoryPanel,.apiPanel,.guidePanel,.directorPanel{overscroll-behavior:contain;gap:14px;max-height:calc(100svh - 218px);padding:14px;display:grid;overflow-y:auto}.editorGrid label,.apiFields label,.directorPanel label{color:#d9c9ad;gap:7px;font-size:.88rem;display:grid}.segmented,.providerGrid{gap:8px;display:grid}.segmented{grid-template-columns:repeat(2,minmax(0,1fr))}.segmented.threeWide{grid-template-columns:repeat(3,minmax(0,1fr))}.segmented.fiveWide{grid-template-columns:repeat(2,minmax(0,1fr))}.segmented button,.providerChip{min-width:0;padding:0 8px}.segmented button.active,.providerChip.active,.tabbar button.active{background:#176055b8;border-color:#75cdb5b3}.wideSection,.sectionTitle,.loreList,.memoryList,.apiFields{min-width:0}.sectionTitle{justify-content:space-between;align-items:center;gap:10px;display:flex}.sectionTitle h2{margin:0;font-size:1rem}.loreList,.memoryList{gap:10px;display:grid}.loreCard,.memoryItem{background:#f4efe50f;border:1px solid #f4efe51f;border-radius:8px}.loreCard{gap:9px;padding:10px;display:grid}.loreHead,.memoryItem,.switchRow{align-items:center;gap:8px;display:flex}.loreHead input,.loreTools input{flex:1}.loreTools{grid-template-columns:minmax(0,1fr) 76px auto;display:grid}.checkLabel{color:#d9c9ad;align-items:center;gap:8px;min-height:42px;font-size:.88rem;display:inline-flex}.checkLabel input{accent-color:#75cdb5;width:18px;min-height:18px}.memoryInput{gap:9px;display:grid}.memoryItem{justify-content:space-between;padding:11px}.memoryItem p{color:#f3ead9;min-width:0}.providerGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.apiFields{gap:12px;display:grid}.wideLabel{grid-column:1/-1}.switchRow{flex-wrap:wrap;justify-content:space-between;min-width:0}.vaultState{color:#cfc3ae;overflow-wrap:anywhere;align-items:center;gap:6px;display:inline-flex}.apiActions,.docActions{flex-wrap:wrap}.docActions{justify-content:flex-start}.fallbackGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.checkChip{justify-content:flex-start;min-width:0}.checkChip input{accent-color:#75cdb5;width:17px;min-height:17px}.subtleText{color:#cfc3ae;overflow-wrap:anywhere;min-width:0;font-size:.78rem}.guideText{color:#efe6d4;white-space:pre-wrap;background:#080a09bd;border:1px solid #f4efe51f;border-radius:8px;max-height:calc(100svh - 240px);margin:0;padding:12px;font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,monospace;font-size:.82rem;line-height:1.55;overflow:auto}.compactPre{max-height:280px}.tabbar{right:12px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:30;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:#131210e6;border:1px solid #f4efe521;border-radius:8px;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;width:min(680px,100vw - 24px);margin:0 auto;padding:7px;display:grid;position:fixed;left:12px;box-shadow:0 22px 55px #00000061}.tabbar button{flex-direction:column;gap:3px;min-width:0;min-height:50px;padding:4px 2px;font-size:.68rem}.tabbar span{text-overflow:ellipsis;max-width:100%;overflow:hidden}@media (min-width:760px){.appShell{padding-left:18px;padding-right:18px}.brand p{max-width:420px}.controlStrip{grid-template-columns:minmax(260px,1fr) auto auto}.editorGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.wideSection{grid-column:1/-1}.segmented,.providerGrid{grid-template-columns:repeat(4,minmax(0,1fr))}.segmented.fiveWide{grid-template-columns:repeat(5,minmax(0,1fr))}.apiFields{grid-template-columns:repeat(2,minmax(0,1fr))}.fallbackGrid{grid-template-columns:repeat(4,minmax(0,1fr))}.scenePanel{height:calc(100svh - 218px);max-height:calc(100svh - 218px)}}@media (min-width:1120px){.mainLayout{grid-template-columns:1fr}.transcript{max-height:calc(100svh - 320px)}}@media (max-width:390px){.appShell{padding-left:8px;padding-right:8px}.topbar{gap:8px;min-height:58px;padding:8px}.brand{gap:8px}.brand img{width:40px;height:40px}.brand h1{font-size:1rem}.brand p{max-width:calc(100vw - 220px);font-size:.7rem}.topActions{gap:6px}.iconButton{width:38px;height:38px}.toolButton,.primaryButton{padding:0 9px;font-size:.86rem}.controlStrip{grid-template-columns:1fr 44px 44px}.controlStrip .toolButton{width:44px;padding:0}.controlStrip .toolButton svg{flex:none}.controlStrip .toolButton{font-size:0}.loreTools,.statusRail{grid-template-columns:1fr}.tabbar{gap:4px;padding:6px}.tabbar button{font-size:.62rem}}
