:root {
  --bg: #090d0c;
  --bg-2: #0f1513;
  --panel: #131a18;
  --panel-2: #18211e;
  --line: rgba(235, 245, 240, .09);
  --text: #f2f6f4;
  --muted: #8d9d96;
  --green: #64c6b4;
  --accent-rgb: 100, 198, 180;
  --accent-bright: #91ddce;
  --accent-deep: #43a896;
  --green-soft: rgba(var(--accent-rgb), .12);
  --amber: #e8b25f;
  --amber-soft: rgba(232, 178, 95, .12);
  --teal: #5ed5cb;
  --teal-soft: rgba(94, 213, 203, .12);
  --red: #f17f79;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 24px 70px rgba(0,0,0,.38);
}

html[data-theme="sea"] {
  --green: #64c6b4;
  --accent-rgb: 100, 198, 180;
  --accent-bright: #91ddce;
  --accent-deep: #43a896;
  --green-soft: rgba(100, 198, 180, .12);
}
html[data-theme="blue"] {
  --green: #81b4e4;
  --accent-rgb: 129, 180, 228;
  --accent-bright: #acd4f4;
  --accent-deep: #5b95c7;
  --green-soft: rgba(129, 180, 228, .12);
}
html[data-theme="forest"] {
  --green: #8fd39a;
  --accent-rgb: 143, 211, 154;
  --accent-bright: #b7e9bf;
  --accent-deep: #66ae73;
  --green-soft: rgba(143, 211, 154, .12);
}
html[data-theme="amber"] {
  --green: #dfb36c;
  --accent-rgb: 223, 179, 108;
  --accent-bright: #f2d49e;
  --accent-deep: #ba8d49;
  --green-soft: rgba(223, 179, 108, .12);
}
html[data-theme="violet"] {
  --green: #aaa0e0;
  --accent-rgb: 170, 160, 224;
  --accent-bright: #d0c8f2;
  --accent-deep: #8276bf;
  --green-soft: rgba(170, 160, 224, .12);
}
html[data-theme="rose"] {
  --green: #dfa0ad;
  --accent-rgb: 223, 160, 173;
  --accent-bright: #f0c3cc;
  --accent-deep: #bd7888;
  --green-soft: rgba(223, 160, 173, .12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark; background: var(--bg); }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text); font-family: "PingFang SC", "Microsoft YaHei", Inter, system-ui, sans-serif; background: radial-gradient(circle at 90% 0%, rgba(var(--accent-rgb),.1), transparent 27rem), radial-gradient(circle at 5% 35%, rgba(232,178,95,.07), transparent 28rem), var(--bg); }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .45; pointer-events: none; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 17px; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: clamp(30px, 9vw, 46px); line-height: 1.02; letter-spacing: -.055em; }
h3 { margin-bottom: 0; font-size: 17px; }
em { font-style: normal; color: var(--green); }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-screen { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; overflow: hidden; padding: calc(26px + var(--safe-top)) 22px calc(26px + var(--safe-bottom)); background: #090d0c; }
.login-orbit { position: absolute; width: 30rem; height: 30rem; right: -13rem; top: -12rem; border: 1px solid rgba(var(--accent-rgb),.16); border-radius: 50%; box-shadow: 0 0 0 55px rgba(var(--accent-rgb),.025), 0 0 0 115px rgba(232,178,95,.018); }
.login-card { position: relative; width: min(100%, 400px); padding: 14px; }
.logo-mark { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; margin-bottom: 26px; background: linear-gradient(145deg, rgba(var(--accent-rgb),.2), rgba(232,178,95,.08)); border: 1px solid rgba(var(--accent-rgb),.25); }
.logo-mark img { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; }
.login-card h1 { font-size: 37px; margin-bottom: 12px; }
.login-card form { margin-top: 34px; }
label { display: block; margin-bottom: 8px; color: #b7c4be; font-size: 11px; }
#pinInput { width: 100%; height: 60px; border-radius: 16px; border: 1px solid var(--line); outline: 0; background: #111815; color: var(--text); text-align: center; font-size: 25px; letter-spacing: .22em; font-weight: 750; transition: .2s; }
#pinInput:focus { border-color: rgba(var(--accent-rgb),.55); box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.07); }
.primary-button { width: 100%; height: 52px; margin-top: 13px; border: 0; border-radius: 15px; background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep)); color: #07140d; font-weight: 850; cursor: pointer; box-shadow: 0 14px 38px rgba(var(--accent-rgb),.17); }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--red); text-align: center; font-size: 11px; }
.login-foot { margin-top: 28px; color: #5f6e67; font-size: 10px; text-align: center; }
.app { width: min(100%, 830px); min-height: 100vh; margin: 0 auto; padding: calc(13px + var(--safe-top)) 14px calc(90px + var(--safe-bottom)); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 1px 2px 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 42px; height: 42px; border-radius: 14px; object-fit: cover; border: 1px solid rgba(var(--accent-rgb),.2); }
.top-actions { display: flex; align-items: center; gap: 7px; }
.sync-pill { height: 31px; padding: 0 10px; display: flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.025); font-size: 9px; }
.sync-pill i { width: 6px; height: 6px; border-radius: 50%; background: #727d78; }
.sync-pill.online { color: #b8ebce; border-color: rgba(var(--accent-rgb),.2); }
.sync-pill.online i { background: var(--green); box-shadow: 0 0 9px rgba(var(--accent-rgb),.7); }
.icon-button { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: #131a18; color: #aebbb5; cursor: pointer; font-size: 17px; }
.view { display: none; animation: enter .24s ease both; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hero, .panel, .space-card, .task-card { border: 1px solid var(--line); background: linear-gradient(155deg, rgba(24,34,30,.96), rgba(13,19,17,.98)); box-shadow: var(--shadow); }
.hero { position: relative; overflow: hidden; border-radius: 27px; padding: 25px 21px 19px; }
.hero::after { content: ""; position: absolute; width: 230px; height: 230px; right: -130px; bottom: -130px; border-radius: 50%; background: rgba(var(--accent-rgb),.08); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hero-copy { position: relative; z-index: 1; width: 92%; margin: 19px 0 20px; color: #a9b7b0; font-size: 12px; line-height: 1.7; }
.hero-sigil { display: flex; align-items: end; gap: 4px; height: 43px; padding-top: 9px; }
.hero-sigil span { width: 5px; border-radius: 5px; background: var(--green); opacity: .85; animation: signal 1.8s ease-in-out infinite; }
.hero-sigil span:nth-child(1) { height: 13px; }
.hero-sigil span:nth-child(2) { height: 26px; animation-delay: .2s; }
.hero-sigil span:nth-child(3) { height: 37px; animation-delay: .4s; }
@keyframes signal { 50% { opacity: .32; transform: scaleY(.68); } }
.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: 17px; overflow: hidden; background: var(--line); }
.hero-stats div { padding: 13px 12px; background: rgba(5,9,7,.45); }
.hero-stats strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.hero-stats span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin: 23px 3px 12px; }
.text-button { border: 0; background: transparent; color: var(--green); font-size: 10px; padding: 4px 0; cursor: pointer; }
.space-list { display: grid; gap: 10px; }
.space-card { position: relative; overflow: hidden; border-radius: 20px; padding: 17px; cursor: pointer; transition: transform .18s, border-color .18s; }
.space-card:active { transform: scale(.985); }
.space-card.amber { --space-color: var(--amber); --space-soft: var(--amber-soft); }
.space-card.teal { --space-color: var(--teal); --space-soft: var(--teal-soft); }
.space-card::before { content: ""; position: absolute; left: 0; top: 17px; bottom: 17px; width: 3px; border-radius: 9px; background: var(--space-color); }
.space-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.space-account { display: flex; align-items: center; gap: 10px; }
.space-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: var(--space-soft); color: var(--space-color); font-weight: 900; font-size: 13px; }
.space-name { margin: 0 0 3px; font-size: 14px; font-weight: 720; }
.space-desc { margin: 0; color: var(--muted); font-size: 9px; }
.space-state { display: flex; align-items: center; gap: 5px; color: #85938c; font-size: 9px; white-space: nowrap; }
.space-state i { width: 6px; height: 6px; border-radius: 50%; background: #64716a; }
.space-state.online { color: #aee6c8; }
.space-state.online i { background: var(--green); box-shadow: 0 0 8px rgba(var(--accent-rgb),.65); }
.space-last { margin-top: 14px; padding: 11px 12px; border-radius: 13px; background: rgba(0,0,0,.17); border: 1px solid rgba(255,255,255,.04); color: #9eaca5; font-size: 10px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.space-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: #6f7d76; font-size: 9px; }
.demo-tag { color: var(--amber); padding: 3px 7px; border-radius: 999px; background: rgba(232,178,95,.08); }
.panel { border-radius: 21px; padding: 18px; margin-top: 13px; }
.panel-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 15px; }
.tiny-badge { border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 999px; padding: 4px 8px; color: #8e9b95; font-size: 9px; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 6px; }
.flow div { min-width: 0; padding: 11px 8px; border-radius: 13px; background: rgba(0,0,0,.18); }
.flow b { display: block; font-size: 10px; }
.flow span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.flow i { color: #5e6c65; font-style: normal; font-size: 10px; }
.empty { padding: 22px 0; margin: 0; color: var(--muted); text-align: center; font-size: 11px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 1px 13px; }
.back-button { display: none; width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line); background: #121917; color: #aab8b1; font-size: 24px; line-height: 1; }
.chat-identity { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-avatar { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 13px; background: var(--amber-soft); color: var(--amber); font-weight: 900; font-size: 12px; }
.chat-identity h2 { font-size: 18px; letter-spacing: -.02em; }
.chat-identity p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.chat-actions { display: flex; align-items: center; gap: 7px; }
.node-dot { width: 7px; height: 7px; border-radius: 50%; background: #6f7d76; }
.node-dot.online { background: var(--green); box-shadow: 0 0 9px rgba(var(--accent-rgb),.65); }
.demo-banner { margin: 0 1px 10px; padding: 8px 11px; border: 1px solid rgba(232,178,95,.15); border-radius: 11px; color: #cbae7c; background: rgba(232,178,95,.055); font-size: 9px; line-height: 1.5; }
.messages { min-height: calc(100vh - 290px); max-height: calc(100vh - 240px); overflow-y: auto; padding: 8px 2px 18px; scroll-behavior: smooth; }
.chat-empty { min-height: 360px; display: grid; place-content: center; justify-items: center; gap: 9px; text-align: center; color: var(--muted); }
.chat-empty.hidden { display: none !important; }
.empty-symbol { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 4px; border-radius: 18px; background: rgba(var(--accent-rgb),.08); border: 1px solid rgba(var(--accent-rgb),.17); color: var(--green); font-size: 21px; font-weight: 900; }
.chat-empty strong { color: #dce5e0; font-size: 14px; }
.chat-empty span { max-width: 250px; font-size: 10px; line-height: 1.6; }
.message { display: flex; margin: 0 0 14px; }
.message.user { justify-content: flex-end; }
.message.assistant, .message.system { justify-content: flex-start; }
.bubble-wrap { max-width: 88%; }
.bubble-meta { display: flex; align-items: center; gap: 7px; margin: 0 4px 5px; color: #6f7e77; font-size: 8px; }
.message.user .bubble-meta { justify-content: flex-end; }
.bubble-meta strong { color: #aab8b1; font-weight: 700; }
.bubble { padding: 12px 13px; border-radius: 17px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.72; }
.message.user .bubble { border-bottom-right-radius: 5px; background: linear-gradient(145deg, #75d9a3, #52bd82); color: #07130c; font-weight: 520; }
.message.assistant .bubble { border-bottom-left-radius: 5px; border: 1px solid var(--line); background: #141c19; color: #dce5e0; }
.message.system { justify-content: center; }
.message.system .bubble { max-width: 92%; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.035); color: #819087; font-size: 9px; text-align: center; }
.message.error .bubble { border-color: rgba(241,127,121,.2); background: rgba(241,127,121,.08); color: #eab0ad; }
.running-row { display: flex; align-items: center; gap: 8px; margin: 0 5px 8px; color: #9ba9a2; font-size: 10px; }
.running-row[hidden] { display: none; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.62); } }
.composer { position: sticky; bottom: calc(78px + var(--safe-bottom)); z-index: 3; display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid rgba(255,255,255,.1); border-radius: 19px; background: rgba(17,24,21,.95); box-shadow: 0 15px 45px rgba(0,0,0,.45); backdrop-filter: blur(18px); }
#messageInput { flex: 1; min-height: 42px; max-height: 140px; resize: none; border: 0; outline: 0; padding: 11px 10px; background: transparent; color: var(--text); line-height: 1.45; font-size: 12px; }
#messageInput::placeholder { color: #68766f; }
.send-button { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--green); color: #08140d; font-size: 20px; font-weight: 900; cursor: pointer; }
.composer-note { margin: 7px 5px 0; color: #59665f; text-align: center; font-size: 8px; }
.task-summary { display: flex; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #17201d, #111714); color: var(--muted); font-size: 10px; }
.task-summary strong { color: var(--text); font-size: 17px; }
.task-list { display: grid; gap: 9px; margin-top: 10px; }
.task-card { border-radius: 17px; padding: 14px; }
.task-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-space { display: flex; align-items: center; gap: 7px; color: #c7d2cc; font-size: 10px; font-weight: 650; }
.task-space i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.task-status { padding: 4px 8px; border-radius: 999px; color: #9daaa3; background: rgba(255,255,255,.04); font-size: 8px; }
.task-status.running { color: #aee6c8; background: rgba(var(--accent-rgb),.08); }
.task-status.error { color: #eab0ad; background: rgba(241,127,121,.08); }
.task-content { margin: 10px 0 8px; color: #aab8b1; font-size: 10px; line-height: 1.6; }
.task-foot { display: flex; justify-content: space-between; color: #66736c; font-size: 8px; }
.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: calc(9px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 26px), 520px); height: 65px; display: grid; grid-template-columns: repeat(3,1fr); padding: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: rgba(15,22,19,.92); box-shadow: 0 18px 50px rgba(0,0,0,.52); backdrop-filter: blur(20px); }
.nav-item { border: 0; border-radius: 16px; background: transparent; color: #728078; display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 8px; cursor: pointer; }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-item.active { color: var(--green); background: rgba(var(--accent-rgb),.08); }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translate(-50%, 12px); max-width: calc(100% - 36px); padding: 10px 14px; border-radius: 12px; background: rgba(var(--accent-rgb),.96); color: #06120b; font-size: 10px; font-weight: 750; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 14px 32px rgba(0,0,0,.42); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast.error { background: rgba(241,127,121,.96); color: #260807; }
@media (min-width: 650px) { .app { padding-left: 22px; padding-right: 22px; } .hero { padding: 30px; } .flow div { padding: 14px 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.access-card { display:flex; align-items:center; gap:11px; margin-top:11px; padding:13px 14px; border:1px solid rgba(94,213,203,.17); border-radius:17px; background:linear-gradient(145deg,rgba(23,40,35,.94),rgba(13,23,20,.96)); }
.access-icon { flex:0 0 auto; width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:var(--teal-soft); color:var(--teal); font-size:18px; }
.access-copy { min-width:0; flex:1; }
.access-copy span { display:block; color:#a9b9b1; font-size:9px; }
.access-copy strong { display:block; margin-top:3px; color:#dce9e3; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.access-copy small { display:block; margin-top:3px; color:#67776f; font-size:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.copy-button { flex:0 0 auto; padding:7px 9px; border:1px solid var(--line); border-radius:9px; background:#18231f; color:var(--teal); font-size:9px; cursor:pointer; }
.conversation-page-head { display:flex; align-items:flex-start; gap:10px; margin:2px 1px 18px; }
.conversation-page-head h2 { font-size:25px; letter-spacing:-.04em; }
.conversation-page-head .muted { margin-top:6px; font-size:10px; }
.back-button.visible { display:grid; }
.conversation-actions { display:flex; justify-content:flex-end; margin-bottom:11px; }
.new-conversation-button { height:40px; padding:0 14px; border:1px solid rgba(var(--accent-rgb),.22); border-radius:12px; background:rgba(var(--accent-rgb),.09); color:var(--green); font-size:10px; font-weight:700; cursor:pointer; }
.new-conversation-button span { margin-right:4px; font-size:14px; }
.conversation-list { display:grid; gap:9px; }
.conversation-card { position:relative; padding:15px; border:1px solid var(--line); border-radius:17px; background:linear-gradient(150deg,#17201d,#101714); box-shadow:0 12px 35px rgba(0,0,0,.2); cursor:pointer; transition:transform .17s,border-color .17s; }
.conversation-card:active { transform:scale(.985); }
.conversation-card.running { border-color:rgba(var(--accent-rgb),.26); }
.conversation-card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.conversation-card h3 { font-size:13px; line-height:1.4; letter-spacing:-.01em; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.conversation-badge { flex:0 0 auto; padding:4px 7px; border-radius:999px; background:rgba(255,255,255,.04); color:#7f8d86; font-size:8px; }
.conversation-badge.running { background:rgba(var(--accent-rgb),.1); color:var(--green); }
.conversation-last { margin:10px 0; color:#9aa9a1; font-size:10px; line-height:1.55; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conversation-foot { display:flex; justify-content:space-between; color:#68766f; font-size:8px; }
.chat-identity { min-width:0; }
.chat-identity h2 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:185px; }
.back-button { display:grid; place-items:center; }


.theme-card { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:11px; padding:13px 15px; border:1px solid var(--line); border-radius:17px; background:rgba(19,27,24,.86); }
.theme-title span { display:block; color:#d6dfda; font-size:11px; font-weight:650; }
.theme-title small { display:block; margin-top:3px; color:#718078; font-size:8px; }
.theme-swatches { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.theme-swatch { width:25px; height:25px; border-radius:50%; border:2px solid transparent; padding:0; cursor:pointer; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); transition:transform .16s,border-color .16s; }
.theme-swatch:active { transform:scale(.88); }
.theme-swatch.active { border-color:#f4f8f6; transform:scale(1.08); }
.theme-swatch.sea { background:linear-gradient(135deg,#8de0d0,#43a896); }
.theme-swatch.blue { background:linear-gradient(135deg,#acd4f4,#5b95c7); }
.theme-swatch.forest { background:linear-gradient(135deg,#b7e9bf,#66ae73); }
.theme-swatch.amber { background:linear-gradient(135deg,#f2d49e,#ba8d49); }
.theme-swatch.violet { background:linear-gradient(135deg,#d0c8f2,#8276bf); }
.theme-swatch.rose { background:linear-gradient(135deg,#f0c3cc,#bd7888); }

/* Full light theme */
html[data-theme="white"] {
  --bg: #f5f8f9;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef3f5;
  --line: rgba(22, 42, 52, .12);
  --text: #17262f;
  --muted: #697982;
  --green: #2f8f82;
  --accent-rgb: 47, 143, 130;
  --accent-bright: #5db7aa;
  --accent-deep: #217368;
  --green-soft: rgba(47, 143, 130, .1);
  --amber: #b7792e;
  --amber-soft: rgba(183, 121, 46, .1);
  --teal: #2d8f9a;
  --teal-soft: rgba(45, 143, 154, .1);
  --red: #c8514c;
  --shadow: 0 18px 48px rgba(32, 58, 70, .1);
}
html[data-theme="white"] body {
  color: var(--text);
  background: radial-gradient(circle at 90% 0%, rgba(var(--accent-rgb), .11), transparent 26rem), linear-gradient(180deg, #fbfcfd 0%, #eef3f5 100%);
}
html[data-theme="white"] .login-screen { background: #f3f7f8; }
html[data-theme="white"] .login-orbit { border-color: rgba(var(--accent-rgb), .17); box-shadow: 0 0 0 55px rgba(var(--accent-rgb), .035), 0 0 0 115px rgba(183,121,46,.025); }
html[data-theme="white"] .logo-mark { background: linear-gradient(145deg, rgba(var(--accent-rgb), .16), rgba(183,121,46,.06)); border-color: rgba(var(--accent-rgb), .25); }
html[data-theme="white"] #pinInput,
html[data-theme="white"] input,
html[data-theme="white"] textarea,
html[data-theme="white"] select { background: #f7fafb; color: var(--text); border-color: var(--line); }
html[data-theme="white"] #pinInput:focus,
html[data-theme="white"] input:focus,
html[data-theme="white"] textarea:focus { border-color: rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .08); }
html[data-theme="white"] .login-foot { color: #7a8991; }
html[data-theme="white"] .sync-pill,
html[data-theme="white"] .project-select,
html[data-theme="white"] .icon-button,
html[data-theme="white"] .back-button { background: #ffffff; color: #52656f; border-color: var(--line); }
html[data-theme="white"] .sync-pill { background: rgba(255,255,255,.78); }
html[data-theme="white"] .hero,
html[data-theme="white"] .panel,
html[data-theme="white"] .space-card,
html[data-theme="white"] .task-card,
html[data-theme="white"] .remote-panel { background: #ffffff; border-color: var(--line); box-shadow: var(--shadow); }
html[data-theme="white"] .hero::after { background: rgba(var(--accent-rgb), .07); }
html[data-theme="white"] .hero-copy,
html[data-theme="white"] .muted,
html[data-theme="white"] .space-desc,
html[data-theme="white"] .flow span,
html[data-theme="white"] .space-meta,
html[data-theme="white"] .conversation-foot,
html[data-theme="white"] .task-foot { color: var(--muted); }
html[data-theme="white"] .hero-stats { background: var(--line); }
html[data-theme="white"] .hero-stats div { background: #f0f5f6; }
html[data-theme="white"] .access-card { background: linear-gradient(145deg, #ffffff, #edf6f4); border-color: rgba(var(--accent-rgb), .18); }
html[data-theme="white"] .access-copy strong { color: #243940; }
html[data-theme="white"] .access-copy small { color: #70828a; }
html[data-theme="white"] .copy-button { background: #e8f0ef; color: var(--accent-deep); border-color: rgba(var(--accent-rgb), .15); }
html[data-theme="white"] .theme-card { background: #ffffff; border-color: var(--line); }
html[data-theme="white"] .theme-title span { color: #34494f; }
html[data-theme="white"] .theme-title small { color: #7c8b92; }
html[data-theme="white"] .space-last { background: #f3f7f8; border-color: rgba(22,42,52,.06); color: #536870; }
html[data-theme="white"] .flow div { background: #f1f5f6; }
html[data-theme="white"] .tiny-badge { background: #eef3f4; color: #62737b; }
html[data-theme="white"] .activity-row { border-bottom-color: rgba(22,42,52,.07); }
html[data-theme="white"] .activity-row strong { color: #30464d; }
html[data-theme="white"] .chat-identity h2 { color: #17262f; }
html[data-theme="white"] .demo-banner { background: rgba(183,121,46,.08); border-color: rgba(183,121,46,.16); color: #926126; }
html[data-theme="white"] .message.assistant .bubble { background: #eef3f5; border-color: rgba(22,42,52,.08); color: #2b3d43; }
html[data-theme="white"] .message.system .bubble { background: #eef3f4; color: #66777e; }
html[data-theme="white"] .bubble-meta { color: #73838a; }
html[data-theme="white"] .bubble-meta strong { color: #4c6068; }
html[data-theme="white"] .composer { background: rgba(255,255,255,.96); border-color: var(--line); box-shadow: 0 15px 38px rgba(32,58,70,.12); }
html[data-theme="white"] #messageInput { color: #1f333a; }
html[data-theme="white"] #messageInput::placeholder,
html[data-theme="white"] .composer-note { color: #788991; }
html[data-theme="white"] .conversation-card { background: #ffffff; border-color: var(--line); box-shadow: 0 12px 30px rgba(32,58,70,.08); }
html[data-theme="white"] .conversation-card h3 { color: #20363d; }
html[data-theme="white"] .conversation-last { color: #61747b; }
html[data-theme="white"] .new-conversation-button { background: #e9f5f2; border-color: rgba(var(--accent-rgb), .2); color: var(--accent-deep); }
html[data-theme="white"] .task-summary { background: #ffffff; border-color: var(--line); }
html[data-theme="white"] .task-space { color: #34494f; }
html[data-theme="white"] .task-content { color: #5e7178; }
html[data-theme="white"] .bottom-nav { background: rgba(255,255,255,.94); border-color: var(--line); box-shadow: 0 18px 42px rgba(32,58,70,.15); }
html[data-theme="white"] .nav-item { color: #6e8088; }
html[data-theme="white"] .nav-item.active { color: var(--accent-deep); background: rgba(var(--accent-rgb), .1); }
html[data-theme="white"] dialog { background: #ffffff; color: var(--text); border-color: var(--line); }
html[data-theme="white"] .dialog-close { background: #f2f6f7; color: #52656f; border-color: var(--line); }
html[data-theme="white"] .secondary-button { background: #f1f5f6; color: #445860; }
html[data-theme="white"] .theme-swatch.white { background: linear-gradient(135deg,#ffffff,#dfe7ea); box-shadow: inset 0 0 0 1px rgba(22,42,52,.16); }

/* White + blue theme refinement */
html[data-theme="white"] {
  --green: #4f86c6;
  --accent-rgb: 79, 134, 198;
  --accent-bright: #7aaedf;
  --accent-deep: #37699f;
  --green-soft: rgba(79, 134, 198, .1);
  --amber: #4f86c6;
  --amber-soft: rgba(79, 134, 198, .1);
  --teal: #4f86c6;
  --teal-soft: rgba(79, 134, 198, .1);
}
html[data-theme="white"] .space-card.amber,
html[data-theme="white"] .space-card.teal { --space-color: var(--green); --space-soft: var(--green-soft); }
html[data-theme="white"] .chat-avatar { color: var(--green) !important; background: var(--green-soft) !important; }
html[data-theme="white"] .message.user .bubble { background: linear-gradient(145deg, #dcecff, #c3dbf7); color: #183a5d; }
html[data-theme="white"] .demo-banner { background: rgba(79,134,198,.07); border-color: rgba(79,134,198,.17); color: #416d9e; }
html[data-theme="white"] .login-glow { background: rgba(79,134,198,.12); }
html[data-theme="white"] .access-card { background: linear-gradient(145deg, #ffffff, #eef5fd); }
html[data-theme="white"] .theme-swatch.white { background: radial-gradient(circle at 50% 50%, #4f86c6 0 24%, #ffffff 26% 100%); box-shadow: inset 0 0 0 1px rgba(22,42,52,.16); }
