:root{--ink:#17201c;--paper:#f6f7f5;--card:#ffffff;--line:#dfe3df;--muted:#5f6b64;--accent:#1f5f52;--accent-ink:#ffffff;--error:#8a2f2f;--info:#1f4d5f;--radius:10px;--font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}*{box-sizing:border-box}body,html{margin:0;padding:0}body{font-family:var(--font);color:var(--ink);background:var(--paper);-webkit-font-smoothing:antialiased}.auth-shell,.home-shell{min-height:100dvh;display:grid;place-items:center;padding:24px}.auth-card,.home-card{width:100%;max-width:380px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:32px 28px}.auth-eyebrow{margin:0;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);font-weight:600}.auth-title,.home-title{margin:10px 0 6px;font-size:22px;line-height:1.2;font-weight:650}.auth-sub,.home-sub{margin:0 0 20px;color:var(--muted);font-size:14px;line-height:1.5}.auth-alert{margin:0 0 16px;padding:10px 12px;border-radius:8px;font-size:13px;line-height:1.4;border:1px solid transparent}.auth-alert--error{color:var(--error);background:#f7ecec;border-color:#e6cccc}.auth-alert--info{color:var(--info);background:#eaf1f4;border-color:#cfe0e6}.auth-form{gap:16px}.auth-field,.auth-form{display:flex;flex-direction:column}.auth-field{gap:6px;font-size:13px;font-weight:550}.auth-field input{padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:15px;font-family:inherit;color:var(--ink);background:#fff}.auth-field input:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}.auth-actions{display:flex;gap:10px;margin-top:4px}.auth-btn{flex:1 1;display:inline-flex;align-items:center;justify-content:center;padding:11px 14px;border-radius:8px;border:1px solid var(--accent);background:var(--accent);color:var(--accent-ink);font-size:14px;font-weight:600;font-family:inherit;text-decoration:none;cursor:pointer}.auth-btn:hover{filter:brightness(1.05)}.auth-btn:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.auth-btn--ghost{background:transparent;color:var(--accent)}.auth-btn--ghost:hover{background:#eef3f1;filter:none}.auth-foot{margin:20px 0 0;font-size:12px;color:var(--muted);text-align:center}.workspace-shell{min-height:100dvh;display:flex;flex-direction:column;align-items:center;gap:24px;padding:32px 24px}.workspace-header{width:100%;max-width:640px;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.workspace-header .home-title{margin-top:10px}.workspace-header .home-sub{margin-bottom:0}.workspace-header-actions{display:flex;align-items:flex-start;gap:10px;flex:none}.workspace-header-actions .auth-btn{flex:none;width:auto}.chat-panel{width:100%;max-width:640px;min-height:420px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:16px}.chat-log{flex:1 1;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px;overflow-y:auto}.chat-bubble{max-width:80%;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.5;white-space:pre-wrap}.chat-bubble--user{align-self:flex-end;background:var(--accent);color:var(--accent-ink)}.chat-bubble--assistant{align-self:flex-start;background:var(--paper);border:1px solid var(--line)}.chat-bubble--error{align-self:flex-start;background:#f7ecec;border:1px solid #e6cccc;color:var(--error)}.chat-bubble--pending{align-self:flex-start;color:var(--muted);font-style:italic}.chat-form{display:flex;gap:10px}.chat-input{flex:1 1;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:15px;font-family:inherit;color:var(--ink);background:#fff}.chat-input:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}.chat-input:disabled{background:var(--paper);color:var(--muted)}.chat-send{flex:none;width:auto;padding:10px 18px}.chat-send:disabled{opacity:.6;cursor:not-allowed}.chat-log--static{overflow-y:visible}.history-empty{margin:0;padding:20px;color:var(--muted);font-size:14px;text-align:center}.history-empty--error{color:var(--error)}.history-list{width:100%;max-width:640px;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}.history-item{background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}.history-link{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:14px 16px;color:var(--ink);text-decoration:none}.history-link:hover{background:var(--paper)}.history-item-title{font-size:14px;font-weight:600}.history-item-meta{flex:none;font-size:12px;color:var(--muted)}.history-thread-title{margin:0;font-size:16px;font-weight:650}@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}