:root{--text:#e6d6eb;--text-h:#fff2fb;--bg:#140b1f;--panel-bg:#251131e0;--card-bg:#2d163ce6;--rail-bg:#ffe9f70f;--border:#ffd3f133;--accent:#ff9dd8;--accent-soft:#ffd0ee;--shadow:#0000006b 0 24px 60px -30px;--sans:"Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;--heading:"Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;--mono:"Cascadia Code", "Consolas", monospace;font:17px/1.6 var(--sans);letter-spacing:.01em;color:var(--text);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:radial-gradient(circle at top,#ffaae12e,#0000 34%),linear-gradient(#140b1f 0%,#24112f 100%)}*{box-sizing:border-box}html{min-height:100%}body{min-height:100dvh;margin:0}body,button,textarea{font:inherit}button{appearance:none}#root{width:min(1480px,100%);min-height:100dvh;margin:0 auto}h1,h2,h3{font-family:var(--heading);letter-spacing:-.02em;color:var(--text-h);font-weight:600}h1{margin:0 0 16px;font-size:clamp(2.5rem,5vw,4.8rem);line-height:.95}h2{font-size:1.6rem}h3{font-size:1.15rem}p{margin:0}a{color:inherit}.shell{box-sizing:border-box;justify-content:stretch;align-items:stretch;width:100%;height:100dvh;min-height:100dvh;padding:0;display:flex;overflow:clip}.auth-gate-shell{min-height:100dvh;padding:max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));background:radial-gradient(circle at 0 0,#ff95de2e,#0000 34%),linear-gradient(#120d1f,#1a1230 58%,#140f27);justify-content:center;align-items:center;display:flex}.auth-gate-card{flex-direction:column;gap:18px;width:min(520px,100%);padding:28px;display:flex}.auth-gate-card h1,.auth-gate-field span{color:var(--text-h);margin:0}.auth-gate-body{color:#f1def8;margin:0;line-height:1.65}.auth-gate-field{flex-direction:column;gap:10px;display:flex}.auth-gate-field input{min-height:48px;color:var(--text-h);font:inherit;background:#0b0a146b;border:1px solid #ffe1f72e;border-radius:16px;padding:12px 14px}.auth-gate-field input:focus{outline-offset:3px;outline:2px solid #ffc7f0}.auth-gate-actions{justify-content:flex-end;display:flex}.panel{-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);background:#0d0a181f;border:1px solid #ffe1f724;border-radius:32px;box-shadow:0 22px 48px -36px #040010a3}.core-stage{border-radius:0;flex:auto;width:100%;height:100%;min-height:100dvh;position:relative;overflow:hidden}.core-stage-backdrop,.core-stage-scrim,.core-stage-content{position:absolute;inset:0}.core-stage-backdrop{opacity:.88;filter:saturate(1.14)brightness(.94);background-color:#0000;background-image:radial-gradient(circle at 0 0,#ffa3e257,#0000 34%),radial-gradient(circle at 100% 0,#ffd5f029,#0000 28%),linear-gradient(135deg,#351143fa,#622268f0);background-position:50%;background-repeat:repeat,repeat,repeat;background-size:cover;background-attachment:scroll,scroll,scroll;background-origin:padding-box,padding-box,padding-box;background-clip:border-box,border-box,border-box;transition:opacity .28s,filter .28s,transform .28s;transform:scale(1.05)}.core-stage-backdrop.has-image{opacity:.98;filter:saturate(1.06)brightness(.68);transform:scale(1.04)}.core-stage-scrim{background:linear-gradient(#10091a14,#140a1c5c 52%,#0f081894),radial-gradient(circle,#ffb8ea14,#0000 62%)}.core-stage-content{z-index:1;padding:max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));grid-template-rows:auto minmax(0,1fr) auto;gap:24px;min-height:0;display:grid;position:relative;overflow:hidden}.stage-hud,.stage-status-bar,.stage-utility-rail,.stage-narration-topbar,.quick-actions,.command-actions,.chip-list,.narration-meta,.illustration-header,.overlay-header{flex-wrap:wrap;gap:10px;display:flex}.stage-hud{z-index:3;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand utility""status utility";align-items:start;gap:12px 18px;min-width:0;display:grid;position:relative}.stage-brand,.stage-status-bar,.stage-utility-rail,.stage-scene-head,.stage-narration-overlay,.stage-command-dock,.stage-result-overlay,.overlay-section-group,.scope-block,.illustration-card,.identity-card,.inventory-card,.log-card,.scope-card,.quest-card,.stat-grid{flex-direction:column;gap:14px;display:flex}.stage-brand{grid-area:brand;gap:6px}.stage-brand h1,.stage-narration-overlay h2,.result-headline h3,.overlay-header h2,.scope-card h3,.quest-card h3,.identity-card h3,.illustration-card h3,.failure-card h3{color:var(--text-h);margin:0}.eyebrow,.panel-kicker{letter-spacing:.24em;text-transform:uppercase;color:#ffc7f0;margin:0;font-size:12px}.stage-brand h1{overflow-wrap:anywhere;font-size:1.1rem;line-height:1.3}.stage-status-bar{grid-area:status;align-items:flex-start;min-width:0}.stage-utility-rail{grid-area:utility;justify-content:flex-end;align-self:start;align-items:flex-start;gap:10px;min-width:0;display:flex;position:relative}.stage-status-bar span,.chip-list span,.narration-meta span{color:var(--text-h);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);white-space:normal;overflow-wrap:anywhere;background:#0b0a140a;border:1px solid #ffe4f91a;border-radius:999px;align-items:center;padding:8px 12px;line-height:1.25;display:inline-flex}.chip-list span{-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0;border:none;border-radius:0;padding:0}.stage-status-bar,.command-dock-context{scrollbar-width:none}.stage-status-bar::-webkit-scrollbar{display:none}.command-dock-context::-webkit-scrollbar{display:none}.stage-intro-screen,.stage-transition-overlay,.stage-live-panel,.stage-command-dock,.stage-result-overlay,.processing-card,.failure-card{-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0;border:none;border-radius:24px}.stage-intro-screen{z-index:4;min-height:0;padding:max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));border-radius:inherit;background:0 0;justify-content:stretch;align-items:stretch;display:flex;position:absolute;inset:0;overflow:hidden}.stage-transition-overlay{z-index:5;border-radius:inherit;background:0 0;flex-direction:column;justify-content:center;align-items:center;gap:20px;padding:24px;display:flex;position:absolute;inset:0}.stage-transition-copy{text-align:center;flex-direction:column;gap:10px;max-width:460px;display:flex}.stage-transition-copy h2,.stage-transition-copy p{margin:0}.stage-transition-copy h2{color:var(--text-h)}.stage-transition-copy p:last-child{color:#f1def8;line-height:1.6}.stage-intro-loading{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:10px;max-width:360px;min-height:100%;margin:0 auto;display:flex}.stage-intro-loading p:last-child{color:#ffe1f5;max-width:26ch;line-height:1.5}.stage-transition-rings{width:148px;height:148px;position:relative}.stage-transition-rings span{border:1px solid #ffe0f766;border-radius:999px;animation:1.9s ease-in-out infinite stage-transition-pulse;position:absolute;inset:0}.stage-transition-rings span:nth-child(2){animation-delay:.18s;inset:14px}.stage-transition-rings span:nth-child(3){animation-delay:.36s;inset:28px}.stage-intro-card{grid-template-rows:minmax(0,1fr) auto;align-content:stretch;gap:32px;width:100%;height:100%;min-height:0;padding:0;display:grid;position:relative;overflow:hidden}.stage-main-region{justify-content:center;align-items:center;min-height:0;display:flex;overflow:hidden}.stage-live-panel{overscroll-behavior:contain;z-index:2;flex-direction:column;justify-content:safe center;gap:24px;width:100%;min-width:0;max-width:900px;height:100%;min-height:0;max-height:100%;padding:0;display:flex;overflow:auto}.stage-intro-head,.stage-live-panel{flex-direction:column;gap:24px;display:flex}.stage-intro-actions{justify-content:flex-end;display:flex}.intro-choice-box{box-shadow:none;background:0 0;border:none;border-radius:0;flex-direction:column;gap:16px;margin-top:auto;padding:0;display:flex}.stage-hint,.story-text,.story-objective,.result-text,.failure-card p,.processing-card p:last-child,.overlay-body,.scope-card li,.inventory-card li,.log-card p,.illustration-meta,.illustration-figure figcaption{color:#f0dff7}.result-text{color:#ffebf7f5;text-wrap:pretty;text-shadow:0 2px 18px #07021070;max-width:min(78ch,100%);font-size:1.05rem;line-height:1.8}.stage-story-block{flex-direction:column;justify-content:center;place-self:stretch center;gap:24px;width:min(980px,100%);height:100%;min-height:0;max-height:100%;display:flex;overflow:hidden}.compact-overlay{padding:16px}.compact-alert{margin-top:0}.stage-result-overlay{box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;background:0 0;border:none;border-radius:0;width:100%;max-width:min(78ch,100%);padding:0}.result-headline{flex-direction:column;gap:2px;display:flex}.result-headline .panel-kicker{opacity:.72}.result-headline h3{font-size:1.04rem;line-height:1.24}.stage-command-dock{padding:0 0 max(24px, env(safe-area-inset-bottom)) 0;z-index:2;min-width:0;min-height:0;box-shadow:none;background:0 0;border:none;border-radius:0;flex-shrink:0;align-self:stretch;gap:12px;margin:0;position:relative}.composer-card,.identity-card,.inventory-card,.log-card,.scope-card,.quest-card,.illustration-card,.phase-note{background:0 0;border:1px solid #ffe1f714;border-radius:22px;min-width:0;padding:18px;box-shadow:0 8px 18px #05000e0f}.quick-actions{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:16px;display:grid}.branch-card{text-align:left;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#ffffff05;border:1px solid #ffe1f714;border-radius:22px;flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;height:100%;min-height:120px;padding:18px 20px;font-weight:500;transition:transform .2s,background .2s,border-color .2s;display:flex}.branch-card:hover{background:#ffb8ea0f;border-color:#ffc2e829;transform:translateY(-3px)}.branch-card-kicker{letter-spacing:.18em;text-transform:uppercase;color:#ffd0ef99;font-size:10px}.branch-card-title{color:#fff5fb;text-wrap:pretty;overflow-wrap:break-word;word-break:normal;font-size:1rem;font-weight:600;line-height:1.4;display:block}.branch-card-summary{color:#f6e1f8b3;-webkit-line-clamp:2;text-wrap:pretty;overflow-wrap:break-word;word-break:normal;-webkit-box-orient:vertical;font-size:.82rem;line-height:1.5;display:-webkit-box;overflow:hidden}button{color:#27122f;font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;background:linear-gradient(135deg,#ffb8ea,#ffd897);border:1px solid #0000;border-radius:18px;padding:11px 16px;transition:transform .16s,border-color .16s,background .16s,box-shadow .16s,opacity .16s}button:disabled{opacity:.64;cursor:not-allowed;box-shadow:none;transform:none}.ghost-button{color:var(--text-h)!important;background:#100e1c0a!important;border-color:#ffe1f714!important}.command-actions{justify-content:flex-end}.command-actions .ghost-button,.command-actions button{border-radius:14px;min-height:36px;padding:8px 12px}.utility-primary-group,.utility-secondary-menu{flex-wrap:wrap;gap:8px;display:flex}.utility-secondary-shell{position:relative}.utility-secondary-menu{z-index:6;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#3413391a;border-radius:20px;flex-direction:column;width:max-content;max-width:min(260px,60vw);padding:10px;position:absolute;top:calc(100% + 8px);right:0}.utility-button{padding:6px 10px;font-size:.84rem;line-height:1.2}.utility-button.is-primary{background:#ffc2e814!important;border-color:#ffc2e829!important}.story-crawl-shell{min-height:0;box-shadow:none;background:0 0;border:none;border-radius:0;padding:8px 0;position:relative;overflow:visible}.story-crawl-shell.is-intro{flex:auto;height:100%;min-height:0;overflow:hidden}.story-crawl-shell.is-intro .story-crawl-track{justify-content:center;min-height:100%}.story-crawl-shell.is-intro .story-crawl-copy{text-align:center}.story-crawl-shell.is-ending{min-height:min(42vh,360px)}.story-crawl-mask{height:100%;min-height:inherit;position:relative;overflow:hidden}.story-crawl-mask:before,.story-crawl-mask:after{content:"";z-index:2;pointer-events:none;height:40px;position:absolute;left:0;right:0}.story-crawl-mask:before{background:linear-gradient(#0e081785,#0e081700);top:0}.story-crawl-mask:after{background:linear-gradient(#0e081700,#0e081785);bottom:0}.story-crawl-track{animation:story-crawl-down var(--crawl-duration,22s) linear 1 forwards;will-change:transform;flex-direction:column;gap:18px;display:flex}.story-crawl-track h2,.story-crawl-track h3,.stage-intro-loading h2{color:var(--text-h);text-align:center;text-wrap:balance;text-shadow:0 3px 20px #08021285;margin:0;line-height:1.28}.story-crawl-subtitle{color:#ffe3f6;opacity:.92;text-align:center;margin:0;font-size:.96rem;line-height:1.5}.story-crawl-copy{flex-direction:column;gap:18px;width:min(78ch,100%);margin:0 auto;display:flex}.story-crawl-paragraph{color:#ffe8f8;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal;text-wrap:pretty;text-shadow:0 2px 18px #0802128f;box-shadow:none;background:0 0;border:none;margin:0;padding:0;line-height:1.88}.processing-card,.illustration-fallback{position:relative;overflow:hidden}.illustration-fallback{background:radial-gradient(circle at 0 0,#ffa0e32e,#0000 40%),linear-gradient(135deg,#41215ce6,#17122af5);border:1px dashed #ffe1f72e;border-radius:20px;flex-direction:column;justify-content:center;gap:10px;min-height:220px;padding:18px;display:flex}.illustration-fallback.is-loading:after,.processing-card:after{content:"";background:linear-gradient(120deg,#0000,#ffffff14,#0000);animation:1.4s infinite shimmer;position:absolute;inset:0;transform:translate(-100%)}.alert-list{background:#ffbcdc1f;border:1px solid #ffc4e43d;border-radius:16px;padding:12px 14px}.alert-list p,.inventory-card ul,.scope-card ul,.log-card ul,.scope-block ul{margin:0}.inventory-card ul,.scope-card ul,.log-card ul,.scope-block ul{padding:0;list-style:none}.inventory-card li,.log-card li,.scope-card li,.scope-block li{flex-direction:column;gap:6px;padding:12px 0;display:flex}.inventory-card li+li,.log-card li+li,.scope-card li+li,.scope-block li+li{border-top:1px solid #ffe1f71f}.log-card li span{color:#f8c8f0;font-size:.82rem}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));display:grid}.stat-grid div{background:#ffffff0a;border:1px solid #ffe1f724;border-radius:18px;flex-direction:column;gap:8px;padding:16px;display:flex}.stat-grid span{font-size:.9rem}.illustration-figure{background:#08071257;border:1px solid #ffe1f71f;border-radius:22px;flex-direction:column;gap:12px;margin:0;padding:18px;display:flex}.illustration-card.is-preview-only{box-shadow:none;background:0 0;border:none;padding:0}.illustration-card.is-preview-only .illustration-figure{background:0 0;border:none;gap:0;padding:0}.illustration-figure img{aspect-ratio:16/9;object-fit:contain;background:#0907127a;border:1px solid #ffe1f71f;border-radius:20px;width:100%;display:block}.illustration-card.is-preview-only .illustration-figure img{max-height:calc(100dvh - 120px)}.illustration-meta,.illustration-purpose,.illustration-meta a{color:#ffd8f4}.overlay-backdrop{z-index:30;padding:max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#04020cb8;justify-content:flex-end;display:flex;position:fixed;inset:0}.overlay-surface{background:linear-gradient(180deg, #170e2afa, #130f24fa), var(--panel-bg);border-left:1px solid #ffe1f729;flex-direction:column;gap:16px;height:min(100%,100dvh - 24px);min-height:0;padding:22px;display:flex;box-shadow:0 24px 60px #0006}.overlay-drawer{width:min(560px,100%)}.overlay-modal{border:1px solid #ffe1f729;border-radius:28px;width:min(960px,100% - 64px);height:min(88dvh,960px);margin:auto}.overlay-surface.is-image-preview{width:min(1100px,100% - 48px);height:auto;max-height:calc(100dvh - 48px);box-shadow:none;background:0 0;border:none;padding:16px}.overlay-header{flex-shrink:0}.overlay-header.is-image-only{background:0 0;border:none;justify-content:flex-end;align-items:center;padding:0;display:flex}.overlay-header h2{margin:0}.overlay-body{overscroll-behavior:contain;min-height:0;overflow:auto}.overlay-surface.is-image-preview .overlay-body{overflow:visible}.phase-note{color:#f6e5ff}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}@keyframes story-crawl-down{0%{transform:translateY(0)}to{transform:translateY(-22%)}}@keyframes stage-transition-pulse{0%{opacity:.38;transform:scale(.92)}50%{opacity:.9;transform:scale(1)}to{opacity:.3;transform:scale(1.06)}}@media (width<=980px){.stage-hud{grid-template-columns:1fr;grid-template-areas:"brand""status""utility"}.stage-status-bar,.stage-utility-rail{grid-area:auto}.stage-utility-rail{justify-content:flex-start}.utility-secondary-menu{left:0;right:auto}.command-dock-head,.command-dock-footer{flex-direction:column;align-items:stretch}}@media (width<=720px){.shell{justify-content:stretch;align-items:stretch;padding:0}.core-stage{border-radius:0;flex:auto;width:100%;height:100%}.core-stage-content{padding:max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));gap:18px}.stage-command-dock{width:auto;padding:8px 0 max(14px, env(safe-area-inset-bottom));gap:8px;min-height:0;margin:0}.stage-intro-card{gap:20px;padding:0}.stage-live-panel{justify-content:flex-start;gap:16px;width:100%;max-width:100%;padding:0}.stage-status-bar,.narration-meta,.chip-list,.command-actions{gap:8px}.stage-status-bar,.command-dock-context{flex-wrap:nowrap;padding-bottom:2px;overflow-x:auto}.stage-status-bar span,.command-dock-context span{white-space:nowrap;flex:none}.stage-utility-rail{gap:8px;width:100%}.utility-primary-group{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;display:grid}.utility-primary-group .utility-button,.utility-secondary-shell>.utility-button{width:100%;min-height:44px}.utility-secondary-shell{width:100%}.utility-secondary-menu{width:100%;max-width:none;margin-top:8px;position:static}.quick-actions{grid-template-columns:1fr;gap:12px}.branch-card{min-height:100px;padding:16px 18px}.stage-story-block{width:100%}.story-crawl-shell{padding:0}.story-crawl-paragraph{line-height:1.74}.stage-result-overlay,.composer-card,.identity-card,.inventory-card,.log-card,.scope-card,.quest-card,.illustration-card,.phase-note{padding:14px}.command-dock-head{gap:10px}.command-dock-head>button,.illustration-header>button{width:100%;min-height:44px}.command-actions{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;display:grid}.command-actions>:first-child{grid-column:1/-1;min-height:46px}.command-actions>:not(:first-child){min-height:44px}.overlay-modal{border-bottom:none;border-left:none;border-right:none;border-radius:26px 26px 0 0;width:100%;height:auto;min-height:min(72dvh,620px);max-height:100%;margin:0}.overlay-surface.is-image-preview{width:100%;max-height:calc(100dvh - 12px);padding:10px 10px max(10px, env(safe-area-inset-bottom))}.overlay-backdrop{padding:max(8px, env(safe-area-inset-top)) 0 0;justify-content:stretch;align-items:flex-end}.overlay-surface{width:100%;height:auto;max-height:100%;padding:16px 14px max(16px, env(safe-area-inset-bottom));border-left:none;border-radius:26px 26px 0 0;gap:12px}.overlay-drawer{width:100%}.overlay-header{z-index:1;background:linear-gradient(#170e2afa,#170e2ad6),#130f24f5;border-bottom:1px solid #ffe1f71f;margin:-16px -14px 0;padding:16px 14px 12px;position:sticky;top:0}.overlay-header.is-image-only{margin:0 0 8px;padding:0;position:static}.overlay-header button{min-height:44px}.illustration-meta,.illustration-purpose{font-size:.92rem}.auth-gate-shell{padding:max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom))}.auth-gate-card{border-radius:24px;padding:22px 18px}.auth-gate-actions button{width:100%;min-height:46px}}@media (height<=860px){.core-stage{min-height:100dvh}.core-stage-content{gap:12px}.stage-live-panel{gap:8px;padding-top:0}.narration-meta span,.stage-status-bar span,.chip-list span{padding:5px 9px;font-size:.8rem}.story-text{max-height:6.8em;font-size:.96rem}.story-objective{padding:7px 10px;font-size:.84rem}.stage-command-dock{padding:0 0 max(14px, env(safe-area-inset-bottom)) 0;gap:10px;min-height:0}.stage-intro-card{gap:16px;padding:0}.story-crawl-shell{padding:0}.story-crawl-mask:before,.story-crawl-mask:after{height:32px}}@media (prefers-reduced-motion:reduce){.story-crawl-track{animation:none;transform:none}}
