:root{--bg: #e3e4e1;--header: #f1f2ef;--surface: #f7f8f5;--raised: #eceeea;--input: #ffffff;--sheet: #ffffff;--line: #d0d3cd;--line-strong: #a3a7a0;--text: #2a2d2b;--muted: #646862;--primary: #1d201f;--primary-hover: #0f1110;--on-primary: #ffffff;--on-primary-muted: #b8bdb6;--terracotta: #9c5240;--terracotta-tint: #ebd9d1;--sage: #4f7f6a;--sage-tint: #d7e6dd;--mustard: #9a7d34;--mustard-tint: #ebe1c2;--slate: #3f5d6b;--slate-tint: #d9e4ea;--error: #80402e;--backdrop: rgba(29, 32, 31, .48);--code-bg: #eceeea;--font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;--fs: 15px;--radius-sm: 10px;--radius-sheet: 12px;--radius-md: 14px;--radius-lg: 20px;--radius-pill: 999px;--radius-round: 50%;--shadow-soft: 0 1px 2px rgba(29, 32, 31, .05), 0 8px 24px rgba(29, 32, 31, .07);--shadow-sheet: 0 1px 2px rgba(29, 32, 31, .06), 0 14px 40px rgba(29, 32, 31, .1);--shadow-float: 0 2px 4px rgba(29, 32, 31, .05), 0 24px 64px rgba(29, 32, 31, .14);--dur-fast: .12s;--dur-base: .2s;--dur-pill: .42s;--dur-enter: .46s;--dur-sheet: .62s;--ease-soft: cubic-bezier(.2, .75, .2, 1);--ease-pill: cubic-bezier(.3, .8, .2, 1);--ease-pop: cubic-bezier(.3, 1.5, .5, 1);--header-h: 64px;--sidebar-w: 276px;color-scheme:light}:root[data-theme=dark]{--bg: #171918;--header: #1c1f1d;--surface: #222523;--raised: #2c2f2d;--input: #1a1c1b;--sheet: #262927;--line: #3a3d3b;--line-strong: #5f635d;--text: #e9ebe7;--muted: #a5a9a2;--primary: #e9ebe7;--primary-hover: #ffffff;--on-primary: #1d201f;--on-primary-muted: #4a4e4b;--terracotta: #d48c77;--terracotta-tint: #3d2a24;--sage: #84b79f;--sage-tint: #233229;--mustard: #ccab5e;--mustard-tint: #3a321d;--slate: #93b4c4;--slate-tint: #22303a;--error: #e5907a;--backdrop: rgba(0, 0, 0, .6);--code-bg: #1a1c1b;--shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);--shadow-sheet: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 40px rgba(0, 0, 0, .35);--shadow-float: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 64px rgba(0, 0, 0, .5);color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:var(--fs);line-height:1.55;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}button,input,textarea,select{font:inherit;color:inherit}a{color:var(--slate);font-weight:640;text-underline-offset:3px;text-decoration-color:var(--line-strong)}:focus-visible{outline:2px solid var(--sage);outline-offset:2px}h1,h2,h3,h4,p{margin:0}@keyframes rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes land{0%{opacity:0;transform:translateY(22px) rotate(1.4deg) scale(.97)}to{opacity:1;transform:none}}@keyframes pop-in{0%{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}@keyframes from-right{0%{opacity:0;transform:translate(34px)}to{opacity:1;transform:none}}@keyframes fade-in{0%{opacity:0}}@keyframes pulse-dot{0%,to{opacity:.35}50%{opacity:1}}.enter{animation:rise var(--dur-enter) var(--ease-soft) both;animation-delay:calc(var(--i, 0) * 38ms)}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}.btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 20px;border:1px solid var(--line);border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-size:.86rem;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap;text-decoration:none;transition:background var(--dur-fast) ease,transform var(--dur-fast) ease,color var(--dur-fast) ease}.btn:hover{background:var(--raised)}.btn:active{transform:scale(.96)}.btn:disabled{opacity:.4;cursor:default;transform:none}.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}.btn.primary:hover{background:var(--primary-hover)}.btn.danger{background:transparent;color:var(--error)}.btn.danger.is-armed{background:var(--terracotta);border-color:var(--terracotta);color:#fff}.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}.btn.ghost:hover{background:var(--raised);color:var(--text)}.btn.small{min-height:32px;padding:6px 14px;font-size:.8rem}.btn svg{width:16px;height:16px}.actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.icon-btn{appearance:none;display:inline-grid;place-items:center;width:34px;height:34px;flex:none;border:0;border-radius:var(--radius-round);background:transparent;color:var(--muted);cursor:pointer;transition:background var(--dur-fast) ease,color var(--dur-fast) ease,transform var(--dur-fast) ease}.icon-btn:hover{background:var(--raised);color:var(--text)}.icon-btn:active{transform:scale(.92)}.icon-btn:disabled{opacity:.35;cursor:default;background:transparent;transform:none}.icon-btn.is-armed{background:var(--terracotta);color:#fff}.icon-btn svg{width:18px;height:18px}.input,.textarea,.select{width:100%;padding:10px 14px;border:1px solid var(--line);border-radius:var(--radius-md);background:var(--input);color:var(--text);outline:none;font-size:.95rem;line-height:1.5;transition:border-color var(--dur-fast) ease}.input:focus,.textarea:focus,.select:focus{border-color:var(--sage)}.textarea{resize:vertical;min-height:96px}.textarea.mono{font-family:var(--mono);font-size:.85rem}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}.field>label,.label{color:var(--text);font-size:.92rem;font-weight:660}.field .hint,.say-small{color:var(--muted);font-size:.86rem;line-height:1.4}.row{display:flex;gap:10px;align-items:center}.row.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.muted{color:var(--muted);font-size:.86rem;line-height:1.45}.danger-text{color:var(--error)}.switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font-size:.92rem;user-select:none}.switch input{width:18px;height:18px;margin:0;accent-color:var(--sage)}.dot{display:inline-block;width:9px;height:9px;border-radius:var(--radius-round);flex:none}.toggle{position:relative;display:inline-block;width:40px;height:24px;flex:none}.toggle input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.toggle span{position:absolute;inset:0;border-radius:var(--radius-pill);background:var(--line);transition:background var(--dur-base) ease}.toggle span:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:var(--radius-round);background:#fff;box-shadow:0 1px 2px #0003;transition:transform var(--dur-pill) var(--ease-pill)}.toggle input:checked+span{background:var(--sage)}.toggle input:checked+span:after{transform:translate(16px)}.toggle input:focus-visible+span{outline:2px solid var(--sage);outline-offset:2px}.seg{position:relative;display:inline-flex;gap:2px;padding:4px;background:var(--raised);border-radius:var(--radius-pill);max-width:100%}.seg .pill{position:absolute;top:4px;left:0;z-index:0;border-radius:var(--radius-pill);background:var(--surface);box-shadow:var(--shadow-soft);pointer-events:none;transition:transform var(--dur-pill) var(--ease-pill),width var(--dur-pill) var(--ease-pill)}.seg button{position:relative;z-index:1;appearance:none;padding:7px 16px;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--muted);font-size:.82rem;font-weight:640;cursor:pointer;white-space:nowrap;transition:color var(--dur-base) ease}.seg button[aria-pressed=true]{color:var(--text)}.chip{appearance:none;display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:4px 14px 4px 5px;border:0;border-radius:var(--radius-pill);background:var(--raised);color:var(--text);font-size:.84rem;font-weight:620;cursor:pointer;transition:background var(--dur-fast) ease,transform var(--dur-fast) ease}.chip:hover{transform:translateY(-1px)}.chip.plain{padding-left:14px}.chip.add{background:transparent;border:1.5px dashed var(--line-strong);color:var(--muted)}.chip[aria-pressed=true]{box-shadow:0 0 0 2px var(--primary)}.chip .x{color:var(--muted);font-weight:700;margin-left:2px}.order-arrow{color:var(--muted);font-size:.86rem}.card{background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft)}.card.pad{padding:24px}.quiet{background:var(--raised);border-radius:var(--radius-md);padding:14px 16px}.app{display:flex;height:100%;overflow:hidden}.sidebar{width:var(--sidebar-w);flex:none;display:flex;flex-direction:column;gap:18px;min-height:0;padding:22px 14px 14px;background:var(--header);border-right:1px solid var(--line)}.brand{display:flex;align-items:center;gap:6px;padding:0 0 0 10px;font-size:.98rem;font-weight:720;letter-spacing:.012em}.brand .grow{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand .sep{color:var(--mustard)}.brand small{color:var(--muted);font-size:inherit;font-weight:560;letter-spacing:0}.new-chat{width:100%;justify-content:flex-start;padding-left:14px}.nav{position:relative;display:grid;gap:2px}.nav .pill{position:absolute;top:0;left:0;right:0;z-index:0;border-radius:var(--radius-sm);background:var(--surface);box-shadow:var(--shadow-soft);pointer-events:none;transition:transform var(--dur-pill) var(--ease-pill),height var(--dur-pill) var(--ease-pill),opacity var(--dur-base) ease}.nav-item{position:relative;z-index:1;appearance:none;display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--muted);font-size:.86rem;font-weight:620;text-align:left;cursor:pointer;white-space:nowrap;transition:color var(--dur-base) ease,background var(--dur-base) ease}.nav-item:hover{color:var(--text);background:var(--raised)}.nav-item[aria-current=page]{color:var(--text);background:transparent}.nav-item svg{width:18px;height:18px}.sidebar-search .input{padding:8px 12px;border-radius:var(--radius-sm);font-size:.86rem;background:var(--surface)}.chat-list{flex:1;overflow-y:auto;min-height:0;display:grid;align-content:start;gap:2px;overscroll-behavior:contain;margin:0 -4px;padding:0 4px}.list-label{padding:10px 12px 4px;font-size:.92rem;font-weight:660}.row-item{appearance:none;display:grid;gap:3px;width:100%;padding:10px 12px;border:0;border-radius:var(--radius-md);background:transparent;color:inherit;text-align:left;cursor:pointer;transition:background var(--dur-base) ease}.row-item:hover,.row-item[aria-pressed=true]{background:var(--raised)}.row-item strong{display:flex;align-items:center;gap:10px;min-width:0;font-size:.95rem;font-weight:620;line-height:1.3}.row-item strong em{font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-item>span{padding-left:0;color:var(--muted);font-size:.86rem;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px}.chat-row .row-text{display:grid;gap:3px;min-width:0}.chat-row .row-sub{overflow:hidden;color:var(--muted);font-size:.86rem;line-height:1.4;white-space:nowrap;text-overflow:ellipsis}.row-item .status-dot{flex:none;width:8px;height:8px;border-radius:var(--radius-round)}.row-item .status-dot.working{background:var(--muted);animation:pulse-dot 1.2s ease-in-out infinite}.row-item .status-dot.unread{background:var(--slate)}.main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%}.chat-bg{position:absolute;inset:0;z-index:0;background-size:cover;background-position:center;pointer-events:none}.chat-bg:after{content:"";position:absolute;inset:0;background:var(--bg);opacity:var(--dim, .4)}.main.has-bg>:not(.chat-bg){position:relative;z-index:1}.main.has-bg .drawer,.main.has-bg .drawer-back,.main.has-bg .modal-back{position:fixed;z-index:46}.main.has-bg .drawer-back{z-index:45}.main.has-bg .modal-back{z-index:50}.head{flex:none;display:flex;align-items:center;gap:8px;height:var(--header-h);padding:0 24px}.head .title-wrap{flex:1;min-width:0;display:flex;align-items:center;gap:12px}.page-title{overflow:hidden;font-size:clamp(1.8rem,4vw,2.8rem);font-weight:660;line-height:1.1;letter-spacing:-.045em;white-space:nowrap;text-overflow:ellipsis;animation:from-right .42s var(--ease-soft) both}.chat-title{overflow:hidden;font-size:clamp(1.3rem,2.6vw,1.75rem);font-weight:660;line-height:1.15;letter-spacing:-.035em;white-space:nowrap;text-overflow:ellipsis}.head-tools{display:flex;align-items:center;gap:2px}.preset-switch{position:relative;flex:none;min-width:0}.preset-switch .chip{max-width:240px;padding-right:10px;background:var(--surface);box-shadow:var(--shadow-soft)}.preset-switch .chip.is-follow{color:var(--muted)}.preset-switch .chip:disabled{opacity:.5;cursor:default;transform:none}.preset-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.preset-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:30;display:grid;gap:2px;width:min(340px,86vw);max-height:60vh;overflow-y:auto;padding:6px;background:var(--surface);border-radius:var(--radius-md);box-shadow:var(--shadow-float);animation:pop-in .26s var(--ease-pop) both}.preset-pop button{appearance:none;display:flex;align-items:center;gap:10px;padding:9px 10px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text);text-align:left;cursor:pointer}.preset-pop button:hover,.preset-pop button[aria-selected=true]{background:var(--raised)}.preset-pop strong{display:block;font-size:.9rem;font-weight:640}.preset-pop span span{display:block;color:var(--muted);font-size:.8rem;line-height:1.35}.preset-icon{display:none}.preset-chevron{display:inline-flex}@media(max-width:560px){.preset-switch .chip{width:34px;height:34px;min-height:34px;padding:0;justify-content:center;border-radius:var(--radius-round)}.preset-icon{display:inline-flex}.preset-label,.preset-chevron{display:none}.preset-pop{position:fixed;top:58px;left:12px;right:12px;width:auto}}.menu-btn{display:none!important}.head.mobile-only{display:none}.page{flex:1;overflow-y:auto;padding:8px 32px 40px}.page-inner{max-width:960px;margin:0 auto}.page-head{display:flex;align-items:flex-end;gap:16px;min-height:var(--header-h);margin-bottom:20px;flex-wrap:wrap}.page-head .page-title{flex:1;min-width:0}.section{margin-top:36px}.section>.label{display:block;margin-bottom:4px;font-size:1.05rem}.section>.muted{margin-bottom:14px}.backdrop{display:none}@media(max-width:900px){.sidebar{position:fixed;z-index:40;top:0;bottom:0;left:0;transform:translate(-100%);transition:transform var(--dur-pill) var(--ease-pill);box-shadow:var(--shadow-float)}.app.nav-open .sidebar{transform:none}.app.nav-open .backdrop{display:block;position:fixed;inset:0;z-index:30;background:var(--backdrop)}.menu-btn{display:inline-grid!important}.head.mobile-only{display:flex}.head{padding:0 12px}.page{padding:4px 16px 32px}.page-head{min-height:52px;margin-bottom:12px}}@media(max-width:560px){.hide-narrow{display:none!important}}.avatar{flex:none;display:inline-grid;place-items:center;overflow:hidden;border-radius:var(--radius-round);color:#fff;font-weight:720;user-select:none}.avatar img{width:100%;height:100%;object-fit:cover}.avatar-stack{display:inline-flex;flex:none}.avatar-stack .avatar{box-shadow:0 0 0 2px var(--bg);margin-left:-8px}.avatar-stack .avatar:first-child{margin-left:0}.chat-scroll{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain}.chat-inner{max-width:860px;margin:0 auto;padding:8px 20px 28px;display:grid;gap:14px}.empty-chat{padding:72px 20px;text-align:center}.empty-chat h2{font-size:clamp(1.6rem,3.4vw,2.2rem);font-weight:660;letter-spacing:-.04em;line-height:1.1}.empty-chat p{margin:10px auto 0;max-width:460px;color:var(--muted);font-size:1.05rem;line-height:1.45}.msg{display:flex;gap:12px;align-items:flex-start;animation:rise var(--dur-enter) var(--ease-soft) both}.msg .msg-body{flex:1;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:6px}.msg .msg-body>*{min-width:0}.msg .msg-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;padding:0 4px}.msg .msg-name{font-size:.95rem;font-weight:660}.msg .msg-meta{color:var(--muted);font-size:.8rem}.msg.assistant .bubble{padding:16px 20px;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft);overflow-wrap:anywhere}.msg.user{flex-direction:row-reverse}.msg.user .msg-body{justify-items:end}.msg.user .msg-head{justify-content:flex-end}.msg.user .bubble{max-width:85%;padding:12px 18px;background:var(--raised);border-radius:var(--radius-lg);white-space:pre-wrap;overflow-wrap:anywhere}.mention{color:var(--slate);font-weight:660}.msg-actions{display:flex;align-items:center;flex-wrap:wrap;opacity:0;transition:opacity var(--dur-base) ease}.msg:hover .msg-actions,.msg:focus-within .msg-actions,.msg-actions.show{opacity:1}@media(hover:none){.msg-actions{opacity:1}}.msg-actions .icon-btn{width:30px;height:30px}.msg-actions .icon-btn svg{width:16px;height:16px}.armed-label{margin-left:4px;color:var(--terracotta);font-size:.8rem;font-weight:660}.branch-nav{display:inline-flex;align-items:center;margin-right:4px;color:var(--muted);font-size:.8rem;font-variant-numeric:tabular-nums}.branch-nav .icon-btn{width:26px;height:26px}.msg-edit{display:grid;gap:10px;width:100%;animation:rise .32s var(--ease-soft) both}.msg-edit .textarea{min-height:110px;font-size:var(--fs)}.msg-edit .actions{justify-content:flex-end}.msg-error{padding:0 6px;color:var(--error);font-size:.86rem}.reasoning{max-height:280px;overflow-y:auto;padding:12px 16px;background:var(--raised);border-radius:var(--radius-md);color:var(--muted);font-size:.88rem;line-height:1.5;white-space:pre-wrap}.reasoning-toggle{justify-self:start;padding:0 6px;border:0;background:none;color:var(--muted);font-size:.84rem;font-weight:620;cursor:pointer}.directing{display:flex;align-items:center;gap:10px;padding:6px 8px;color:var(--muted);font-size:.9rem;animation:rise var(--dur-enter) var(--ease-soft) both}.directing .dot{background:var(--mustard);animation:pulse-dot 1.2s ease-in-out infinite}.cursor-blink:after{content:"";display:inline-block;width:8px;height:8px;margin-left:6px;border-radius:var(--radius-round);background:var(--terracotta);vertical-align:middle;animation:pulse-dot 1s ease-in-out infinite}.composer-wrap{flex:none;padding:6px 20px calc(16px + env(safe-area-inset-bottom))}.composer{position:relative;display:grid;gap:10px;max-width:860px;margin:0 auto;padding:12px;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft)}.composer textarea{width:100%;min-height:44px;max-height:40vh;padding:8px 10px;border:0;background:transparent;outline:none;resize:none;font-size:1rem;line-height:1.5}.composer-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.composer-bar .say-small{flex:1;min-width:140px;padding-left:4px}.order-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:2px 4px}.mention-pop{position:absolute;left:12px;bottom:calc(100% + 8px);z-index:20;display:grid;gap:2px;min-width:220px;max-height:260px;overflow-y:auto;padding:6px;background:var(--surface);border-radius:var(--radius-md);box-shadow:var(--shadow-float);animation:pop-in .26s var(--ease-pop) both}.mention-pop button{appearance:none;display:flex;align-items:center;gap:10px;padding:8px 10px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--text);font-size:.9rem;font-weight:620;text-align:left;cursor:pointer}.mention-pop button[aria-selected=true],.mention-pop button:hover{background:var(--raised)}.scene-card{display:grid;gap:8px;padding:22px 24px;background:var(--sheet);border-radius:var(--radius-sheet);box-shadow:var(--shadow-sheet);animation:land var(--dur-sheet) cubic-bezier(.2,.8,.2,1) both}.scene-card .label{color:var(--muted);font-size:.8rem}.scene-card h3{font-size:1.3rem;font-weight:660;letter-spacing:-.025em;line-height:1.2}.scene-card p{font-size:.98rem;line-height:1.65;white-space:pre-wrap}.scene-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.scene-item{display:grid;grid-template-rows:auto 1fr auto auto;gap:10px;padding:22px}.scene-item h3{font-size:1.25rem;font-weight:660;letter-spacing:-.03em;line-height:1.2}.scene-item p{display:-webkit-box;overflow:hidden;-webkit-line-clamp:6;-webkit-box-orient:vertical;color:var(--muted);font-size:.92rem;line-height:1.55;white-space:pre-wrap}.md{overflow-wrap:anywhere;line-height:1.65}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md p{margin:.55em 0}.md pre{position:relative;padding:14px 16px;overflow-x:auto;background:var(--code-bg);border-radius:var(--radius-sheet);font-size:.84rem;line-height:1.55}.md code{font-family:var(--mono);font-size:.9em}.md :not(pre)>code{padding:1px 6px;background:var(--raised);border-radius:6px}.md blockquote{margin:.6em 0;padding:10px 14px;background:var(--raised);border-radius:var(--radius-sm);color:var(--muted)}.md table{display:block;overflow-x:auto;border-collapse:collapse}.md th,.md td{padding:6px 10px;border-bottom:1px solid var(--line);text-align:left}.md img{max-width:100%;border-radius:var(--radius-sm)}.md em{color:var(--muted)}.code-copy{position:absolute;top:8px;right:8px;min-height:28px;padding:4px 12px;border:1px solid var(--line);border-radius:var(--radius-pill);background:var(--surface);color:var(--text);font-family:var(--font-sans);font-size:.75rem;font-weight:700;cursor:pointer}.code-copy:hover{background:var(--raised)}.code-lang{position:absolute;top:12px;left:16px;color:var(--muted);font-family:var(--font-sans);font-size:.72rem;font-weight:620}.md pre.has-lang{padding-top:36px}.hljs-keyword,.hljs-selector-tag,.hljs-built_in{color:var(--terracotta)}.hljs-string,.hljs-attr{color:var(--sage)}.hljs-number,.hljs-literal{color:var(--mustard)}.hljs-comment{color:var(--muted);font-style:italic}.hljs-title,.hljs-function{color:var(--slate)}.modal-back{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:16px;background:var(--backdrop);animation:fade-in var(--dur-base) ease both}.modal{display:flex;flex-direction:column;width:100%;max-width:560px;max-height:90vh;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);animation:land var(--dur-sheet) cubic-bezier(.2,.8,.2,1) both}.modal.wide{max-width:920px}.modal-head{display:flex;align-items:center;gap:8px;padding:22px 24px 8px}.modal-head .grow{font-size:1.5rem;font-weight:660;letter-spacing:-.035em;line-height:1.15}.modal-body{padding:12px 24px 16px;overflow-y:auto}.modal-foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:12px 24px 22px}.drawer-back{position:fixed;inset:0;z-index:45;background:var(--backdrop);animation:fade-in var(--dur-base) ease both}.drawer{position:fixed;z-index:46;top:10px;right:10px;bottom:10px;width:min(440px,calc(100vw - 20px));display:flex;flex-direction:column;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);animation:from-right var(--dur-enter) var(--ease-soft) both}.drawer-body{flex:1;overflow-y:auto;padding:8px 20px 20px;overscroll-behavior:contain}.drawer-foot{padding:12px 20px 18px;color:var(--muted);font-size:.86rem}.toasts{position:fixed;z-index:100;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:8px;transform:translate(-50%);pointer-events:none}.toast{display:inline-flex;align-items:center;gap:10px;max-width:min(560px,92vw);padding:12px 20px;background:var(--primary);color:var(--on-primary);border-radius:var(--radius-pill);box-shadow:var(--shadow-float);font-size:.88rem;font-weight:600;animation:pop-in .38s var(--ease-pop) both}.toast.error:before{content:"";width:8px;height:8px;flex:none;border-radius:var(--radius-round);background:var(--terracotta)}.login{display:flex;align-items:center;justify-content:center;height:100%;padding:16px}.login form{width:100%;max-width:380px;padding:36px}.login h1{font-size:clamp(1.9rem,4vw,2.4rem);font-weight:660;letter-spacing:-.04em;line-height:1.05}.login p.say{margin:10px 0 26px;color:var(--muted);font-size:1.05rem}.steps{display:grid;gap:10px}.step{appearance:none;display:flex;align-items:center;gap:14px;width:100%;padding:18px 20px;border:0;background:var(--surface);border-radius:var(--radius-lg);box-shadow:var(--shadow-soft);color:inherit;text-align:left;cursor:pointer;transition:transform var(--dur-fast) ease}.step:hover{transform:translateY(-1px)}.step .num{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;border-radius:var(--radius-round);background:var(--raised);font-size:.86rem;font-weight:700}.step.done .num{background:var(--sage);color:#fff}.step.done strong{color:var(--muted);text-decoration:line-through}.step strong{display:block;font-size:1rem;font-weight:640}.step .say-small{display:block;margin-top:2px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.char-card{display:grid;grid-template-rows:auto 1fr auto;gap:12px;min-height:196px;padding:20px;cursor:pointer;transition:transform var(--dur-fast) ease,opacity var(--dur-base) ease}.char-card:hover{transform:translateY(-2px)}.char-card.is-off{background:transparent;box-shadow:none;outline:1px dashed var(--line-strong);outline-offset:-1px}.char-card.is-off .name,.char-card.is-off .avatar{opacity:.6}.char-card .top{display:flex;align-items:center;justify-content:space-between;gap:10px}.char-card .name{font-size:1.35rem;font-weight:660;letter-spacing:-.03em;line-height:1.15}.char-card .say-small{display:-webkit-box;margin-top:6px;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical}.char-card .foot{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.86rem}.colors{display:flex;gap:10px}.color-choice{width:26px;height:26px;border:0;border-radius:var(--radius-round);cursor:pointer;box-shadow:0 0 0 2px var(--surface)}.color-choice[aria-pressed=true]{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--primary)}.editor-top{display:grid;grid-template-columns:auto 1fr;gap:24px;align-items:start}@media(max-width:640px){.editor-top{grid-template-columns:1fr}}.segments{display:grid;gap:12px}.seg-text{padding:14px 16px;background:var(--raised);border-radius:var(--radius-md)}.block{overflow:hidden;background:var(--sheet);border-radius:var(--radius-md);box-shadow:var(--shadow-soft);transition:opacity var(--dur-base) ease}.block.disabled{opacity:.6;box-shadow:none;outline:1px dashed var(--line-strong);outline-offset:-1px}.block-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px 6px 14px}.block-tag{color:var(--slate);font-family:var(--mono);font-size:.86rem;font-weight:600}.block-body{display:grid;gap:10px;padding:4px 14px 14px}.variant-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.variant-tab{appearance:none;min-height:30px;padding:5px 14px;border:1px solid var(--line);border-radius:var(--radius-pill);background:transparent;color:var(--text);font-size:.8rem;font-weight:640;cursor:pointer;transition:background var(--dur-fast) ease}.variant-tab:hover{background:var(--raised)}.variant-tab.active{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}.variant-tab.add{border-style:dashed;border-color:var(--line-strong);color:var(--muted)}.preview-box{max-height:60vh;margin:0;overflow:auto;padding:18px 20px;background:var(--sheet);border-radius:var(--radius-sheet);box-shadow:var(--shadow-sheet);font-family:var(--mono);font-size:.82rem;line-height:1.55;white-space:pre-wrap}.table-wrap{overflow-x:auto}.table{width:100%;border-collapse:collapse;font-size:.88rem}.table th{padding:14px 16px 8px;color:var(--muted);font-size:.8rem;font-weight:620;text-align:left;white-space:nowrap}.table td{padding:12px 16px;border-top:1px solid var(--line);vertical-align:top}.status-ok{color:var(--sage);font-weight:640}.status-error{color:var(--error);font-weight:640}.status-aborted{color:var(--muted)}.dlog{display:grid;gap:10px}.dlog-item{padding:14px 16px;background:var(--sheet);border-radius:var(--radius-md);box-shadow:var(--shadow-soft);display:grid;gap:6px;animation:rise var(--dur-enter) var(--ease-soft) both}.dlog-item .what{display:flex;align-items:center;gap:8px;font-size:.95rem;font-weight:640}.dlog-item .why{color:var(--muted);font-size:.88rem;line-height:1.45}.dlog-item .meta{color:var(--muted);font-size:.78rem}.dlog-item details summary{cursor:pointer;color:var(--slate);font-size:.84rem;font-weight:640}.dlog-item pre{margin:6px 0 0;max-height:260px;overflow:auto;padding:10px 12px;background:var(--raised);border-radius:var(--radius-sm);font-family:var(--mono);font-size:.78rem;line-height:1.5;white-space:pre-wrap}.param-row{display:grid;grid-template-columns:72px minmax(0,1fr) 76px auto;align-items:center;gap:10px}.param-row input[type=range]{width:100%;accent-color:var(--sage)}.param-row .is-default{color:var(--muted)}.bg-thumb{width:160px;height:100px;border-radius:var(--radius-md);background-size:cover;background-position:center;box-shadow:var(--shadow-soft);position:relative;overflow:hidden}.bg-thumb:after{content:"";position:absolute;inset:0;background:var(--bg);opacity:var(--dim, .4)}.tree{display:grid;gap:2px;font-size:.88rem}.tree-node{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--dur-base) ease}.tree-node:hover{background:var(--raised)}.tree-node.on-path{background:var(--raised);box-shadow:inset 3px 0 0 var(--terracotta)}.tree-node .who{flex:none;font-weight:640}.tree-node .txt{overflow:hidden;color:var(--muted);white-space:nowrap;text-overflow:ellipsis}.tree-children{margin-left:12px;padding-left:10px;border-left:1px dashed var(--line)}.tree-label{padding:8px 10px 2px;color:var(--muted);font-size:.8rem;font-weight:620}
