:root{--bg: #1f1e1d;--surface: #2a2927;--surface-raised: #35332f;--border: #3a3835;--text: #f0eee6;--text-dim: #a6a199;--accent: #d97757;--accent-ink: #2a120a;--ok: #8faa84;--danger: #e0705c;--gutter: 18px;--reading: 17px;--serif: ui-serif, "New York", Georgia, "Times New Roman", serif;--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;color-scheme:dark}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased;overscroll-behavior:none}.app{display:flex;flex-direction:column;height:100dvh}.app-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(env(safe-area-inset-top) + 12px) var(--gutter) 12px;border-bottom:1px solid var(--border);background:var(--bg)}.app-title{flex:1;min-width:0}.icon-button{flex:0 0 auto;width:38px;height:38px;border:none;border-radius:50%;background:var(--surface);color:var(--text);font-size:17px;line-height:1;cursor:pointer}.app-header h1{margin:0;font-family:var(--serif);font-size:18px;font-weight:600;letter-spacing:.01em}.app-header-sub{margin:2px 0 0;font-size:13px;color:var(--text-dim)}.link-button{background:none;border:none;color:var(--text-dim);font:inherit;font-size:15px;padding:8px;cursor:pointer}.conversation{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:20px var(--gutter) 8px;display:flex;flex-direction:column;gap:26px}.conversation-empty{justify-content:center;text-align:center;padding:var(--gutter) 28px;gap:10px}.empty-title{margin:0;font-family:var(--serif);font-size:24px;font-weight:600}.empty-body{margin:0;color:var(--text-dim);font-size:15px;line-height:1.6}.turn{display:flex;flex-direction:column}.turn-user{align-items:flex-end}.user-text{margin:0;max-width:90%;padding:11px 16px;border-radius:18px;background:var(--surface);font-size:16px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.reply{font-family:var(--serif);font-size:var(--reading);line-height:1.65;overflow-wrap:anywhere}.reply>*:first-child{margin-top:0}.reply>*:last-child{margin-bottom:0}.reply p{margin:0 0 .9em}.reply h2,.reply h3{margin:1.4em 0 .5em;font-weight:600;line-height:1.3}.reply h2{font-size:1.3em}.reply h3{font-size:1.12em}.reply ul,.reply ol{margin:0 0 .9em;padding-left:1.3em}.reply li{margin-bottom:.35em}.reply li>ul,.reply li>ol{margin:.35em 0 0}.reply li::marker{color:var(--text-dim)}.reply strong{font-weight:650;color:#fbf9f2}.reply a{color:var(--accent);text-decoration-color:#d9775773;text-underline-offset:2px}.reply code{font-family:var(--mono);font-size:.85em;padding:1px 5px;border-radius:5px;background:var(--surface)}.reply pre{margin:0 0 .9em;padding:12px 14px;border-radius:12px;background:var(--surface);overflow-x:auto}.reply pre code{padding:0;background:none;font-size:.82em;line-height:1.5}.reply hr{margin:1.4em 0;border:none;border-top:1px solid var(--border)}.steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.steps-block:not(:last-child){margin-bottom:14px}.steps-toggle{margin-top:8px;padding:0;border:none;background:none;color:var(--text-dim);font-family:var(--sans);font-size:13px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}.step-took{flex:0 0 auto;margin-left:auto;padding-left:10px;font-variant-numeric:tabular-nums;font-size:13px;opacity:.7}.step{display:flex;align-items:baseline;gap:9px;font-family:var(--sans);font-size:14px;color:var(--text-dim)}.step-mark{flex:0 0 auto;width:13px;text-align:center;font-size:11px}.step-label{overflow-wrap:anywhere}.step-running .step-mark{color:var(--accent);animation:pulse 1.1s ease-in-out infinite}.step-done .step-mark{color:var(--ok)}.step-failed .step-mark{color:var(--danger)}@keyframes pulse{0%,to{opacity:.3}50%{opacity:1}}@media (prefers-reduced-motion: reduce){.step-running .step-mark{animation:none;opacity:1}}.composer{display:flex;align-items:flex-end;gap:8px;padding:10px var(--gutter) calc(env(safe-area-inset-bottom) + 10px);border-top:1px solid var(--border);background:var(--bg)}.composer-input{flex:1;resize:none;min-height:44px;padding:11px 15px;border:1px solid var(--border);border-radius:22px;background:var(--surface);color:var(--text);font-family:var(--sans);font-size:16px;line-height:20px}.composer-input::placeholder{color:var(--text-dim)}.composer-input:focus{outline:none;border-color:var(--accent)}.send-button,.stop-button{flex:0 0 auto;height:44px;padding:0 18px;border:none;border-radius:22px;font-family:var(--sans);font-size:16px;font-weight:600;cursor:pointer}.send-button{background:var(--accent);color:var(--accent-ink)}.send-button:disabled{background:var(--surface-raised);color:var(--text-dim);cursor:default}.stop-button{background:var(--danger);color:#2b0d08}.login{display:flex;flex-direction:column;justify-content:center;gap:16px;height:100dvh;padding:calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px);max-width:420px;margin:0 auto}.login-title{margin:0;font-family:var(--serif);font-size:28px;font-weight:600}.login-sub{margin:-8px 0 8px;color:var(--text-dim)}.field{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--text-dim)}.field input{padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:var(--text);font-family:var(--sans);font-size:16px}.field input:focus{outline:none;border-color:var(--accent)}.login-error{margin:0;color:var(--danger);font-size:14px}.primary-button{height:48px;border:none;border-radius:12px;background:var(--accent);color:var(--accent-ink);font-family:var(--sans);font-size:16px;font-weight:600;cursor:pointer}.primary-button:disabled{background:var(--surface-raised);color:var(--text-dim);cursor:default}.rooms{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:18px var(--gutter) calc(env(safe-area-inset-bottom) + 90px)}.rooms-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.rooms-header h2{margin:0;font-family:var(--serif);font-size:20px;font-weight:600}.rooms-filter{display:flex;gap:6px}.chip{padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:transparent;color:var(--text-dim);font-family:var(--sans);font-size:14px;cursor:pointer}.chip-on{background:var(--surface-raised);color:var(--text)}.chip-danger{color:var(--danger);border-color:#e0705c66}.rooms-empty{margin:32px 0;text-align:center;color:var(--text-dim)}.room-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.room{position:relative;border-radius:14px;background:var(--surface)}.room-open{display:flex;align-items:center;gap:10px;width:100%;padding:14px 44px 14px 14px;border:none;border-radius:14px;background:none;color:var(--text);font-family:var(--sans);font-size:16px;text-align:left;cursor:pointer}.room-current .room-title{font-weight:600}.room-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--text-dim)}.room-dot-busy{background:var(--accent);animation:pulse 1.1s ease-in-out infinite}.room-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-when{flex:0 0 auto;color:var(--text-dim);font-size:13px}.room-more{position:absolute;top:8px;right:6px;width:34px;height:34px;border:none;border-radius:50%;background:none;color:var(--text-dim);font-size:17px;line-height:1;cursor:pointer}.room-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:0 14px 14px}.room-confirm{color:var(--text-dim);font-size:14px}.new-room{position:fixed;left:50%;transform:translate(-50%);bottom:calc(env(safe-area-inset-bottom) + 20px);padding:14px 26px;border:none;border-radius:999px;background:var(--text);color:var(--bg);font-family:var(--sans);font-size:16px;font-weight:600;white-space:nowrap;box-shadow:0 6px 20px #00000073;cursor:pointer}
