:root {
  color-scheme: dark;
  --bg: #101311;
  --sidebar: #131714;
  --panel: #171c19;
  --panel-raised: #1d231f;
  --line: rgba(232, 240, 234, .075);
  --text: #edf1eb;
  --muted: #8a958c;
  --subtle: #626d64;
  --accent: #c8f169;
  --accent-dark: #a7d34c;
  --mint: #89d8b7;
  --danger: #f5a49c;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app-shell { display: grid; grid-template-columns: 316px minmax(0, 1fr); width: min(1520px, 100%); height: 100vh; height: 100dvh; min-height: 0; margin: 0 auto; background: var(--bg); overflow: hidden; }
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 28px 20px 16px; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand-row, .sidebar-heading, .topbar, .topbar-actions, .chat-header, .chat-person, .code-row, .modal-actions { display: flex; align-items: center; }
.brand-row { justify-content: space-between; margin: 0 3px 43px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -1.3px; text-decoration: none; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; color: var(--accent); background: rgba(200, 241, 105, .09); border: 1px solid rgba(200, 241, 105, .12); border-radius: 11px; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-period { color: var(--accent); }
.mobile-search, .mobile-settings { display: none !important; }
.sidebar-heading { justify-content: space-between; margin-bottom: 19px; }
.eyebrow { margin: 0 0 8px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.sidebar-heading h1 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.65px; }
.count-pill { display: inline-grid; min-width: 20px; height: 20px; padding: 0 6px; place-items: center; margin-left: 5px; vertical-align: 2px; color: #a8b0a7; background: #252b26; border-radius: 8px; font: 600 10px var(--font); }
.icon-button { display: inline-grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; color: #9aa49b; background: transparent; border: 1px solid transparent; border-radius: 11px; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.icon-button:hover { color: var(--accent); background: #222822; border-color: var(--line); }
.sidebar-heading .icon-button + .icon-button { margin-left: 5px; }
.icon-button svg { width: 18px; height: 18px; }
.search-box { display: flex; height: 42px; align-items: center; gap: 10px; padding: 0 11px; color: var(--subtle); background: #1a1f1b; border: 1px solid rgba(255,255,255,.04); border-radius: 11px; }
.search-box svg { width: 16px; height: 16px; flex: 0 0 auto; }
.search-box input { width: 100%; min-width: 0; color: var(--text); background: none; border: 0; outline: 0; font-size: 12px; }
.search-box input::placeholder { color: #6b756c; }
kbd { display: inline-grid; min-width: 18px; height: 19px; place-items: center; color: #7d877e; background: #282e29; border: 1px solid rgba(255,255,255,.055); border-radius: 5px; font: 10px var(--font); }
.conversation-list { flex: 1; min-height: 0; overflow: auto; padding-top: 14px; scrollbar-width: thin; scrollbar-color: #303931 transparent; }
.conversation-item { display: flex; width: 100%; align-items: center; gap: 11px; padding: 10px 9px; margin-bottom: 3px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: background .2s, transform .2s, border-color .2s; }
.conversation-item.entering { animation: rise-in .38s both; }
.conversation-item:hover { background: #1b211c; transform: translateX(2px); }
.conversation-item.active { background: #202720; border-color: rgba(255,255,255,.04); }
.avatar { display: grid; flex: 0 0 auto; place-items: center; color: #121812; background: #d1d9ca; border-radius: 50%; font-family: var(--display); font-weight: 800; text-transform: lowercase; }
.avatar-list { width: 42px; height: 42px; font-size: 16px; }
.avatar-profile { width: 38px; height: 38px; color: #b8c1b8; background: #252c26; border: 1px solid #303831; font-size: 15px; }
.avatar-small { width: 34px; height: 34px; color: #1a2118; background: var(--accent); font-size: 14px; }
.conversation-copy { flex: 1; min-width: 0; }
.conversation-line, .conversation-preview { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.conversation-copy strong { overflow: hidden; color: #e2e8e0; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { color: #69736b; font-size: 9px; white-space: nowrap; }
.conversation-preview { margin-top: 5px; color: #8a958c; font-size: 10px; }
.conversation-preview > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-tag { color: #9fb479; font-size: 8px; letter-spacing: .4px; }
.empty-list { padding: 31px 12px; color: #78837a; text-align: center; font-size: 11px; line-height: 1.65; }
.sidebar-bottom { padding-top: 15px; border-top: 1px solid var(--line); }
.privacy-note { display: flex; align-items: center; gap: 10px; padding: 10px 8px 15px; }
.privacy-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: var(--mint); background: rgba(137,216,183,.08); border-radius: 10px; }
.privacy-icon svg { width: 17px; height: 17px; }
.privacy-note strong, .privacy-note small, .profile-copy strong, .profile-copy small { display: block; }
.privacy-note strong { color: #b6c0b6; font-size: 10px; font-weight: 600; }
.privacy-note small { margin-top: 3px; color: #69746b; font-size: 9px; }
.profile-button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 9px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: background .2s; }
.profile-button:hover { background: #1e241f; }
.profile-copy { flex: 1; min-width: 0; }
.profile-copy strong { overflow: hidden; color: #dce3da; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { margin-top: 3px; color: #78837a; font-size: 9px; }
.profile-chevron { width: 15px; height: 15px; color: #68736a; }

.main-panel { display: flex; min-width: 0; flex-direction: column; position: relative; overflow: hidden; }
.topbar { height: 66px; flex: 0 0 auto; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--line); }
.topbar-title { display: flex; align-items: center; gap: 9px; color: #89938a; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.live-dot, .demo-badge span, .welcome-eyebrow span, .sample-indicator { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 10px rgba(200,241,105,.38); }
.topbar-actions { gap: 16px; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: #a5b09e; background: #1b211b; border: 1px solid rgba(200,241,105,.09); border-radius: 20px; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
.demo-badge span { width: 5px; height: 5px; }
.top-profile { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.top-profile svg { width: 14px; height: 14px; color: #7b857c; }
.top-profile:hover svg { color: var(--accent); }

.welcome-view { position: relative; display: flex; flex: 1; flex-direction: column; justify-content: center; overflow: hidden; padding: 0 clamp(44px, 9vw, 146px); }
.welcome-view::before { position: absolute; top: 0; right: -14%; width: 80%; height: 100%; background: radial-gradient(ellipse at 56% 49%, rgba(146,182,78,.075), transparent 63%); content: ""; pointer-events: none; }
.welcome-copy { position: relative; z-index: 1; max-width: 465px; padding: 0 0 25px; animation: fade-up .65s .05s both; }
.welcome-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 23px; color: #9aa492; }
.welcome-eyebrow span { width: 5px; height: 5px; }
.welcome-copy h2 { margin: 0; color: #edf1eb; font-family: var(--display); font-size: clamp(40px, 4.6vw, 62px); font-weight: 600; letter-spacing: -3.2px; line-height: 1.12; }
.welcome-copy h2 span { color: var(--accent); }
.welcome-description { max-width: 355px; margin: 21px 0 27px; color: #909a91; font-size: 13px; line-height: 1.8; }
.welcome-actions { display: flex; align-items: center; gap: 11px; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 10px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #1d2516; background: var(--accent); box-shadow: 0 4px 15px rgba(182,225,91,.09); }
.button-primary:hover { background: #d5ff7d; box-shadow: 0 7px 22px rgba(182,225,91,.16); }
.button-primary > span { font-size: 16px; font-weight: 500; }
.button-quiet { color: #a1aaa1; background: transparent; border-color: rgba(255,255,255,.1); }
.button-quiet:hover { color: #e2e9df; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.17); }
.button-quiet svg { width: 15px; height: 15px; }
.welcome-footnote { display: flex; align-items: center; gap: 8px; margin-top: 31px; color: #727d74; font-size: 10px; }
.tiny-lock { color: var(--mint); font-size: 15px; }
.welcome-art { position: absolute; top: 50%; right: clamp(20px, 6.5vw, 110px); width: 350px; height: 340px; transform: translateY(-55%); animation: float-in .9s .1s both; }
.art-glow { position: absolute; top: 66px; left: 60px; width: 250px; height: 250px; background: radial-gradient(circle, rgba(185,228,108,.12), transparent 68%); filter: blur(10px); }
.art-orbit { position: absolute; top: 28px; left: 10px; width: 315px; height: 280px; border: 1px solid rgba(205,230,173,.075); border-radius: 49% 51% 55% 45% / 49% 44% 56% 51%; transform: rotate(-25deg); }
.orbit-two { top: 44px; left: 31px; width: 270px; height: 260px; border-color: rgba(205,230,173,.055); transform: rotate(35deg); }
.art-card { position: absolute; width: 201px; height: 194px; padding: 19px; background: linear-gradient(145deg, #252c25, #1c221e); border: 1px solid rgba(236,242,232,.11); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.card-back { top: 62px; left: 114px; opacity: .62; transform: rotate(9deg); }
.card-front { top: 94px; left: 34px; overflow: hidden; transform: rotate(-7deg); }
.art-avatar { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 15px; color: #20251c; background: linear-gradient(140deg,#e2d1b8,#9cae8c); border-radius: 12px; font: 700 17px var(--display); }
.art-dot { display: block; width: 23px; height: 23px; margin-bottom: 15px; background: #839775; border-radius: 50%; }
.art-line { display: block; width: 83px; height: 6px; margin-bottom: 8px; background: #697468; border-radius: 9px; opacity: .7; }
.art-line.short { width: 55px; opacity: .35; }
.art-bubble { display: inline-block; margin-top: 17px; padding: 10px 12px; color: #d3dacd; background: #30392f; border-radius: 5px 13px 13px 13px; font-size: 9px; }
.art-bubble span { margin-left: 3px; color: var(--accent); }
.sparkle { position: absolute; color: var(--accent); }
.sparkle-one { top: 55px; left: 275px; font-size: 25px; }
.sparkle-two { right: 13px; bottom: 70px; color: #94b3a0; font-size: 18px; }
.welcome-bottom { position: absolute; right: 36px; bottom: 26px; left: 36px; display: flex; justify-content: space-between; color: #58635a; font-size: 8px; font-weight: 700; letter-spacing: 1.1px; }
.welcome-bottom span:last-child { display: inline-flex; align-items: center; gap: 9px; }
.welcome-bottom i { display: inline-block; width: 26px; height: 1px; background: #475047; }

.chat-view { display: flex; min-height: 0; flex: 1; flex-direction: column; animation: fade-up .3s both; }
.chat-header { height: 74px; flex: 0 0 auto; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.back-button { display: none; width: 30px; height: 34px; place-items: center; color: #a3ada4; background: none; border: 0; cursor: pointer; }
.back-button svg { width: 19px; height: 19px; }
.avatar-chat { width: 40px; height: 40px; font-size: 16px; }
.chat-person { flex-direction: column; align-items: flex-start; gap: 4px; }
.chat-person strong { font-size: 12px; font-weight: 600; }
.chat-person small { color: #758077; font-size: 10px; }
.chat-header-spacer { flex: 1; }
.message-list { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; padding: 27px clamp(22px, 6vw, 90px); scrollbar-width: thin; scrollbar-color: #303931 transparent; }
.day-divider { display: flex; align-items: center; gap: 13px; align-self: center; margin: 4px 0 26px; color: #747e75; font-size: 9px; }
.day-divider::before, .day-divider::after { width: 38px; height: 1px; background: var(--line); content: ""; }
.message-row { display: flex; width: 100%; margin: 0 0 12px; animation: message-in .25s both; }
.message-row.mine { justify-content: flex-end; }
.message-bubble { max-width: min(72%, 440px); padding: 12px 15px 8px; color: #d4ddd4; background: #1e251f; border: 1px solid rgba(255,255,255,.035); border-radius: 4px 15px 15px 15px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.mine .message-bubble { color: #253019; background: #bfe865; border: 0; border-radius: 15px 4px 15px 15px; }
.message-meta { display: block; margin-top: 5px; color: #89958b; text-align: right; font-size: 8px; }
.mine .message-meta { color: #53683a; }
.message-composer { display: flex; min-height: 60px; align-items: center; gap: 12px; padding: 8px 12px 8px 15px; margin: 0 clamp(22px, 5vw, 72px); background: #1c221e; border: 1px solid rgba(255,255,255,.075); border-radius: 15px; }
.composer-plus { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; color: #98a399; background: #282f29; border: 0; border-radius: 8px; font-size: 19px; cursor: pointer; }
.message-composer input { width: 100%; min-width: 0; color: var(--text); background: none; border: 0; outline: 0; font-size: 12px; }
.message-composer input::placeholder { color: #737e75; }
.send-button { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; color: #26321a; background: var(--accent); border: 0; border-radius: 11px; cursor: pointer; transition: transform .2s, background .2s; }
.send-button:hover { background: #d5ff7d; transform: translateY(-1px); }
.send-button svg { width: 17px; height: 17px; }

.modal { position: fixed; width: min(430px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 31px; color: var(--text); background: #1a201b; border: 1px solid rgba(255,255,255,.1); border-radius: 19px; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.modal::backdrop { background: rgba(5,8,6,.74); backdrop-filter: blur(5px); }
.modal[open] { animation: modal-in .22s both; }
.modal form { position: relative; }
.modal-close { position: absolute; top: -12px; right: -9px; display: grid; width: 30px; height: 30px; place-items: center; color: #9aa49b; background: #262d27; border: 1px solid rgba(255,255,255,.055); border-radius: 9px; font-size: 20px; cursor: pointer; }
.modal .eyebrow { color: #9aac81; }
.modal h2 { margin: 7px 0 8px; font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: -.9px; }
.modal-description { margin: 0 0 23px; color: #929c93; font-size: 11px; line-height: 1.75; }
.field-label { display: block; margin-bottom: 8px; color: #b6c0b6; font-size: 10px; font-weight: 600; }
.text-field { width: 100%; height: 44px; padding: 0 13px; color: var(--text); background: #131814; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; outline: 0; font-size: 12px; transition: border .2s, box-shadow .2s; }
.text-field:focus { border-color: rgba(200,241,105,.6); box-shadow: 0 0 0 3px rgba(200,241,105,.08); }
.text-field::placeholder { color: #69746b; }
.code-card { padding: 15px; margin-top: 14px; background: #202820; border: 1px solid rgba(200,241,105,.12); border-radius: 12px; }
.code-label { color: #8e9b8c; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.code-row { justify-content: space-between; margin: 5px 0 3px; }
.code-row strong { color: var(--accent); font-family: var(--display); font-size: 27px; letter-spacing: 6px; }
.copy-button { padding: 7px 9px; color: #d2dfc2; background: #303b2d; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; font-size: 9px; cursor: pointer; }
.copy-button:hover { color: var(--accent); }
.code-card small { color: #849085; font-size: 9px; }
.inline-note { padding: 9px 10px; margin-top: 11px; color: var(--danger); background: rgba(245,164,156,.07); border-radius: 8px; font-size: 10px; }
.modal-actions { justify-content: flex-end; gap: 9px; margin-top: 22px; }
.modal-actions .button { min-height: 39px; }
.code-search-row { display: flex; gap: 9px; }
.code-input { max-width: 148px; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; }
.code-search-row .button { flex: 1; }
.find-result { min-height: 20px; margin-top: 14px; font-size: 10px; line-height: 1.5; }
.find-result.error { color: var(--danger); }
.find-result.success { display: flex; align-items: center; gap: 9px; padding: 10px; color: #dce6d9; background: #242e24; border: 1px solid rgba(200,241,105,.1); border-radius: 10px; cursor: pointer; }
.find-result.success:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.find-result.success .avatar { width: 30px; height: 30px; font-size: 12px; }
.find-result.success strong { display: block; font-size: 10px; }
.find-result.success small { display: block; margin-top: 3px; color: #8b998b; font-size: 9px; }
.sample-hint { display: flex; align-items: center; gap: 7px; padding-top: 14px; margin-top: 9px; color: #7d897e; border-top: 1px solid var(--line); font-size: 9px; }
.sample-indicator { width: 5px; height: 5px; background: #8cbd76; }
.sample-hint button { padding: 3px 6px; color: #c8dfae; background: #283328; border: 0; border-radius: 5px; font: 700 9px var(--display); letter-spacing: 1px; cursor: pointer; }
.legacy-message-warning { display: block; margin-top: 6px; color: #f1c38f; text-align: right; font-size: 8px; }
.key-verify { display: grid; gap: 11px; padding: 14px; margin: 16px 0; background: rgba(204,238,218,.065); border: 1px solid rgba(213,243,225,.13); border-radius: 12px; }
.key-verify > strong { color: #e1eee5; font-size: 11px; }
.key-verify code { color: #c3f4d4; font: 600 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.key-confirm { display: flex; align-items: flex-start; gap: 9px; color: #a3b3a8; font-size: 10px; line-height: 1.6; cursor: pointer; }
.key-confirm input { flex: 0 0 auto; accent-color: var(--accent); }
.verify-key-button { width: 100%; }
.security-limit { margin-bottom: 0; color: #e4bd9e; }
.modal-small { width: min(385px, calc(100vw - 32px)); }
.modal-small .modal-description { margin-bottom: 0; }
.toast { position: fixed; right: 24px; bottom: 23px; z-index: 5; padding: 11px 15px; color: #e5eddf; background: #293329; border: 1px solid rgba(200,241,105,.16); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .22s, transform .22s; }
.toast.visible { opacity: 1; transform: translateY(0); }

button:disabled, [role="button"][aria-busy="true"] {
  cursor: progress;
  opacity: .68;
}
button[data-loading="true"]::after {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: button-spin .7s linear infinite;
}
[role="button"][aria-busy="true"] { pointer-events: none; }
button:active:not(:disabled) { transform: scale(.98); }

@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-in { from { opacity: 0; translate: 14px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes message-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes button-spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 282px minmax(0, 1fr); }
  .sidebar { padding-right: 15px; padding-left: 15px; }
  .welcome-view { padding-right: clamp(28px, 5vw, 60px); padding-left: clamp(28px, 5vw, 60px); }
  .welcome-art { display: none; }
  .welcome-copy { max-width: min(440px, 100%); }
}
@media (max-width: 740px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sidebar { display: flex; min-height: 0; height: 100%; padding-top: calc(28px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-right: 0; }
  .main-panel { display: none; height: 100%; min-height: 0; }
  .app-shell.show-chat .sidebar { display: none; }
  .app-shell.show-chat .main-panel { display: flex; }
  .brand-row { margin-bottom: 30px; }
  .mobile-search, .mobile-settings { display: inline-grid !important; }
  .sidebar-heading .icon-button { display: none; }
  .topbar { height: 58px; padding: 0 18px; }
  .topbar-actions { gap: 10px; }
  .welcome-view { justify-content: flex-end; min-height: 0; padding: 0 26px calc(54px + env(safe-area-inset-bottom)); }
  .welcome-art { top: 28%; right: 50%; transform: translate(50%, -50%) scale(.78); }
  .welcome-copy { max-width: 460px; padding: 0; }
  .welcome-copy h2 { font-size: clamp(39px, 10vw, 55px); letter-spacing: -2.5px; }
  .welcome-description { margin: 16px 0 22px; font-size: 12px; }
  .welcome-footnote { margin-top: 21px; }
  .welcome-bottom { right: 22px; bottom: 17px; left: 22px; }
  .chat-header { height: calc(65px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); gap: 9px; padding-right: 14px; padding-left: 14px; }
  .back-button { display: grid; }
  .message-list { padding: 20px 16px; }
  .message-composer { gap: 8px; min-height: 57px; padding: 7px; margin: 0 12px calc(8px + env(safe-area-inset-bottom)); }
  .message-composer input, .search-box input, .text-field { font-size: 16px; }
}
@media (max-width: 390px) {
  .welcome-view { padding-right: 20px; padding-left: 20px; }
  .welcome-art { top: 25%; transform: translate(50%, -50%) scale(.67); }
  .welcome-copy h2 { font-size: 38px; }
  .welcome-actions { gap: 7px; }
  .button { gap: 7px; padding-right: 12px; padding-left: 12px; font-size: 10px; }
  .welcome-footnote { font-size: 9px; }
  .modal { padding: 27px 23px; }
}
@media (max-height: 620px) {
  .sidebar { padding-top: 17px; padding-bottom: 10px; }
  .brand-row { margin-bottom: 23px; }
  .welcome-art { opacity: .35; transform: translateY(-55%) scale(.58); }
  .modal { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding-top: 24px; padding-bottom: 24px; }
  .mode-choices { gap: 6px; margin-bottom: 12px; }
  .mode-choice { min-height: 54px; }
}
@media (max-width: 740px) and (max-height: 680px) {
  .welcome-view { justify-content: center; overflow-y: auto; padding-top: 28px; padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
  .welcome-art { display: none; }
  .welcome-copy { margin: auto 0; }
  .welcome-eyebrow { margin-bottom: 14px; }
  .welcome-description { margin-top: 12px; margin-bottom: 16px; }
  .welcome-footnote { margin-top: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Frosted glass finishes */
:root {
  --bg: #0b1113;
  --sidebar: rgba(17, 25, 26, .76);
  --panel: rgba(23, 33, 33, .7);
  --panel-raised: rgba(33, 47, 45, .7);
  --line: rgba(222, 244, 235, .11);
  --accent: #b9f4d1;
  --accent-dark: #80cbaa;
  --mint: #a2eed4;
  --danger: #ffafa9;
  --accent-ink: #10241b;
}

body {
  background:
    radial-gradient(ellipse at 79% 12%, rgba(59, 139, 126, .17), transparent 35%),
    radial-gradient(ellipse at 26% 82%, rgba(115, 135, 88, .13), transparent 37%),
    #0b1113;
}
.app-shell { background: transparent; }
.sidebar {
  background: linear-gradient(165deg, rgba(23, 34, 34, .88), rgba(14, 22, 23, .82));
  border-right-color: rgba(225, 246, 237, .1);
  box-shadow: 14px 0 55px rgba(1, 8, 9, .19);
  backdrop-filter: blur(26px) saturate(135%);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
}
.main-panel { background: linear-gradient(145deg, rgba(22, 33, 33, .47), rgba(10, 16, 17, .34)); }
.topbar { border-bottom-color: rgba(225, 246, 237, .09); }
.search-box, .message-composer {
  background: rgba(226, 247, 237, .055);
  border-color: rgba(223, 247, 237, .12);
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 8px 28px rgba(0,0,0,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.conversation-item.active, .conversation-item:hover {
  background: rgba(207, 239, 219, .075);
  border-color: rgba(218, 247, 229, .1);
}
.privacy-icon, .brand-mark {
  background: rgba(173, 234, 205, .11);
  border-color: rgba(189, 245, 217, .15);
}
.live-dot, .demo-badge span, .welcome-eyebrow span, .sample-indicator {
  background: #a5f3cd;
  box-shadow: 0 0 12px rgba(136, 238, 192, .55);
}
.demo-badge {
  color: #b5d1c3;
  background: rgba(215, 245, 228, .055);
  border-color: rgba(211, 244, 225, .12);
  backdrop-filter: blur(12px);
}
.button-primary {
  color: #10241b;
  background: linear-gradient(135deg, #cdf8dc, #94dfbb);
  box-shadow: 0 7px 25px rgba(115, 218, 165, .13);
}
.button-primary:hover { background: linear-gradient(135deg, #e0ffe9, #b1f0cc); }
.welcome-copy h2 span { color: #b9f4d1; }
.welcome-view::before {
  background: radial-gradient(ellipse at 55% 47%, rgba(116, 201, 164, .1), transparent 65%);
}
.art-glow { background: radial-gradient(circle, rgba(133, 230, 187, .17), transparent 70%); }
.art-card {
  background: linear-gradient(145deg, rgba(221, 244, 231, .13), rgba(165, 201, 190, .055));
  border-color: rgba(224, 248, 235, .19);
  box-shadow: 0 24px 75px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.art-bubble { background: rgba(147, 202, 177, .16); border: 1px solid rgba(215,245,226,.1); }
.art-line { background: #9bb5a6; }
.chat-header { border-bottom-color: rgba(225, 246, 237, .09); }
.message-bubble {
  background: linear-gradient(145deg, rgba(203, 233, 218, .105), rgba(139, 184, 165, .07));
  border-color: rgba(221, 245, 232, .1);
  box-shadow: inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mine .message-bubble {
  color: #10251b;
  background: linear-gradient(145deg, #c8f4d7, #9de2bb);
  box-shadow: 0 7px 24px rgba(106, 206, 155, .12);
}
.send-button {
  color: #10241b;
  background: linear-gradient(135deg, #cdf8dc, #94dfbb);
}
.send-button:hover { background: #e0ffeb; }
.modal {
  background: linear-gradient(145deg, rgba(32, 48, 46, .93), rgba(17, 27, 28, .96));
  border-color: rgba(224, 248, 236, .16);
  box-shadow: 0 35px 110px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(28px) saturate(135%);
  -webkit-backdrop-filter: blur(28px) saturate(135%);
}
.modal::backdrop { background: rgba(3, 8, 9, .72); backdrop-filter: blur(11px); }
.modal-close, .copy-button, .composer-plus {
  background: rgba(228, 247, 236, .09);
  border-color: rgba(223, 246, 233, .12);
}
.text-field {
  background: rgba(7, 14, 15, .4);
  border-color: rgba(225, 246, 237, .13);
}
.code-card, .mode-choice, .find-result.success, .find-result.deleted-result {
  background: rgba(204, 238, 218, .065);
  border-color: rgba(213, 243, 225, .13);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.code-row strong { color: #c3f4d4; }
.toast {
  background: rgba(29, 48, 42, .94);
  border-color: rgba(176, 240, 202, .2);
  backdrop-filter: blur(18px);
}

.mode-choices { display: grid; gap: 9px; padding: 0; margin: 0 0 18px; border: 0; }
.mode-choices legend { margin-bottom: 8px; }
.mode-choice {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.mode-choice:hover { transform: translateY(-1px); border-color: rgba(184, 241, 209, .32); }
.mode-choice:has(input:checked) {
  background: rgba(175, 233, 199, .105);
  border-color: rgba(179, 243, 207, .38);
}
.mode-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #c7f4d7;
  background: rgba(169, 238, 199, .1);
  border: 1px solid rgba(203, 245, 218, .12);
  border-radius: 11px;
  font-size: 17px;
}
.anonymous-icon { color: #d7d9e8; background: rgba(195, 195, 228, .1); }
.mode-copy { flex: 1; }
.mode-copy strong, .mode-copy small { display: block; }
.mode-copy strong { color: #e1eee5; font-size: 11px; }
.mode-copy small { margin-top: 4px; color: #91a398; font-size: 9px; }
.mode-check {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(227, 246, 234, .3);
  border-radius: 50%;
}
.mode-choice input:checked ~ .mode-check {
  border: 5px solid #b5f0ce;
  box-shadow: 0 0 10px rgba(170, 242, 201, .3);
}
.rotate-button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 12px;
  color: #b5d8c4;
  background: none;
  border: 0;
  border-top: 1px solid rgba(224, 247, 233, .09);
  font-size: 10px;
  cursor: pointer;
}
.rotate-button:hover { color: #dcffe9; }
.code-card { margin-top: 17px; }
.code-card small { display: block; }
.find-result.deleted-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 189, 168, .16);
  border-radius: 11px;
}
.deleted-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #f4c2ac;
  background: rgba(255, 191, 162, .1);
  border-radius: 50%;
}
.deleted-result strong, .deleted-result small { display: block; }
.deleted-result strong { color: #f0d4c4; font-size: 10px; }
.deleted-result small { margin-top: 4px; color: #a9968b; font-size: 9px; }
.avatar-unknown { color: #e0e3ed; background: linear-gradient(145deg, #66707e, #3e4858) !important; }
.empty-chat-note { align-self: center; padding: 11px 15px; color: #9aa99f; background: rgba(218,243,227,.06); border: 1px solid rgba(224,247,233,.08); border-radius: 20px; font-size: 10px; }
.modal-description { color: #a3b3a8; }
.field-label { color: #c1d3c6; }

@media (max-width: 740px) {
  .sidebar {
    background: linear-gradient(165deg, rgba(23, 34, 34, .96), rgba(14, 22, 23, .95));
  }
  .welcome-art { opacity: .9; }
  .welcome-copy h2 { text-shadow: 0 3px 24px rgba(0,0,0,.25); }
}

.settings-select { margin-bottom: 18px; }
.motion-setting { display: flex; align-items: center; gap: 9px; margin: 0 0 19px; color: var(--muted); font-size: 10px; cursor: pointer; }
.motion-setting input { accent-color: var(--accent); }
.settings-name-field { display: grid; gap: 8px; }
.settings-name-field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-anonymous-note { padding: 12px; margin: 0 0 16px; color: #b5d8c4; background: rgba(169,238,199,.08); border: 1px solid rgba(203,245,218,.12); border-radius: 10px; font-size: 10px; line-height: 1.6; }

html[data-theme="midnight"] {
  --bg: #080d16;
  --sidebar: rgba(14, 21, 35, .82);
  --panel: rgba(17, 26, 43, .76);
  --panel-raised: rgba(28, 40, 63, .82);
  --line: rgba(210, 225, 255, .12);
  --text: #edf2ff;
  --muted: #9aa8c4;
  --subtle: #72809b;
  --accent: #a9c2ff;
  --accent-dark: #82a2ef;
  --mint: #9fc5ff;
  --danger: #ffaaa8;
  --accent-ink: #142039;
}
html[data-theme="midnight"] body {
  background:
    radial-gradient(ellipse at 79% 12%, rgba(73, 101, 173, .2), transparent 35%),
    radial-gradient(ellipse at 26% 82%, rgba(52, 95, 117, .16), transparent 37%),
    #080d16;
}
html[data-theme="midnight"] .sidebar { background: linear-gradient(165deg, rgba(23, 34, 57, .9), rgba(12, 19, 33, .87)); }
html[data-theme="midnight"] .main-panel { background: linear-gradient(145deg, rgba(24, 37, 62, .55), rgba(8, 14, 27, .42)); }
html[data-theme="midnight"] .brand-mark,
html[data-theme="midnight"] .privacy-icon { background: rgba(169,194,255,.11); border-color: rgba(169,194,255,.18); }
html[data-theme="midnight"] .button-primary,
html[data-theme="midnight"] .send-button { color: #142039; background: linear-gradient(135deg, #c5d5ff, #96b1f6); }
html[data-theme="midnight"] .button-primary:hover,
html[data-theme="midnight"] .send-button:hover { background: #d8e3ff; }
html[data-theme="midnight"] .welcome-copy h2 span,
html[data-theme="midnight"] .code-row strong,
html[data-theme="midnight"] .mode-icon { color: #c1d2ff; }
html[data-theme="midnight"] .welcome-view::before { background: radial-gradient(ellipse at 55% 47%, rgba(126,160,235,.12), transparent 65%); }
html[data-theme="midnight"] .art-glow { background: radial-gradient(circle, rgba(130,165,245,.2), transparent 70%); }
html[data-theme="midnight"] .message-composer,
html[data-theme="midnight"] .search-box { background: rgba(195,211,255,.065); border-color: rgba(202,218,255,.15); }
html[data-theme="midnight"] .message-bubble { background: linear-gradient(145deg, rgba(193,211,255,.12), rgba(128,157,213,.08)); border-color: rgba(202,218,255,.13); }
html[data-theme="midnight"] .mine .message-bubble { color: #172341; background: linear-gradient(145deg, #c5d5ff, #96b1f6); }
html[data-theme="midnight"] .modal { background: linear-gradient(145deg, rgba(32,46,74,.96), rgba(14,22,39,.98)); border-color: rgba(204,220,255,.18); }
html[data-theme="midnight"] .text-field { color: var(--text); background: rgba(8,14,27,.52); border-color: rgba(202,218,255,.15); }
html[data-theme="midnight"] .code-card,
html[data-theme="midnight"] .mode-choice,
html[data-theme="midnight"] .find-result.success,
html[data-theme="midnight"] .key-verify { background: rgba(185,204,255,.08); border-color: rgba(202,218,255,.16); }
html[data-theme="midnight"] .settings-anonymous-note { color: #c8d7ff; background: rgba(169,194,255,.09); border-color: rgba(169,194,255,.16); }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #edf3f0;
  --sidebar: rgba(247, 250, 248, .9);
  --panel: rgba(251, 253, 252, .86);
  --panel-raised: #fff;
  --line: rgba(35, 60, 49, .13);
  --text: #17251e;
  --muted: #617067;
  --subtle: #718078;
  --accent: #18865c;
  --accent-dark: #116c49;
  --mint: #16734f;
  --danger: #a23b35;
  --accent-ink: #fff;
}
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 79% 12%, rgba(103, 180, 145, .19), transparent 35%),
    radial-gradient(ellipse at 26% 82%, rgba(172, 190, 133, .19), transparent 37%),
    #edf3f0;
}
html[data-theme="light"] .sidebar { background: linear-gradient(165deg, rgba(248,252,249,.96), rgba(234,242,237,.94)); border-right-color: rgba(35,60,49,.13); box-shadow: 14px 0 55px rgba(37,66,52,.08); }
html[data-theme="light"] .main-panel { background: linear-gradient(145deg, rgba(250,253,251,.72), rgba(233,242,237,.6)); }
html[data-theme="light"] .topbar,
html[data-theme="light"] .chat-header { border-color: rgba(35,60,49,.12); }
html[data-theme="light"] .topbar-title,
html[data-theme="light"] .welcome-eyebrow,
html[data-theme="light"] .welcome-description,
html[data-theme="light"] .chat-person small,
html[data-theme="light"] .privacy-note small,
html[data-theme="light"] .profile-copy small { color: #64746a; }
html[data-theme="light"] .sidebar-heading h1,
html[data-theme="light"] .welcome-copy h2,
html[data-theme="light"] .conversation-copy strong,
html[data-theme="light"] .profile-copy strong,
html[data-theme="light"] .chat-person strong { color: #1b2a22; }
html[data-theme="light"] .conversation-item.active,
html[data-theme="light"] .conversation-item:hover,
html[data-theme="light"] .profile-button:hover { background: rgba(46,110,77,.09); border-color: rgba(46,110,77,.12); }
html[data-theme="light"] .search-box,
html[data-theme="light"] .message-composer { color: #68766e; background: rgba(255,255,255,.78); border-color: rgba(35,60,49,.15); box-shadow: inset 0 1px rgba(255,255,255,.8), 0 8px 28px rgba(35,60,49,.06); }
html[data-theme="light"] .search-box input,
html[data-theme="light"] .message-composer input { color: #1b2a22; }
html[data-theme="light"] .search-box input::placeholder,
html[data-theme="light"] .message-composer input::placeholder { color: #77847c; }
html[data-theme="light"] .message-bubble { color: #25372d; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(232,241,235,.95)); border-color: rgba(35,60,49,.1); box-shadow: 0 5px 18px rgba(35,60,49,.055); }
html[data-theme="light"] .mine .message-bubble { color: #173725; background: linear-gradient(145deg, #d4f1df, #bce6ce); }
html[data-theme="light"] .message-meta { color: #687b6e; }
html[data-theme="light"] .mine .message-meta { color: #4b7058; }
html[data-theme="light"] .empty-chat-note { color: #556b5d; background: rgba(255,255,255,.72); border-color: rgba(35,60,49,.11); }
html[data-theme="light"] .art-card { background: linear-gradient(145deg, rgba(255,255,255,.83), rgba(223,237,228,.67)); border-color: rgba(35,60,49,.15); box-shadow: 0 24px 75px rgba(35,60,49,.12), inset 0 1px rgba(255,255,255,.8); }
html[data-theme="light"] .art-bubble { color: #34493b; background: rgba(81,135,99,.12); border-color: rgba(35,60,49,.1); }
html[data-theme="light"] .art-line { background: #819487; }
html[data-theme="light"] .modal { color: var(--text); background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(237,245,240,.99)); border-color: rgba(35,60,49,.16); box-shadow: 0 35px 110px rgba(24,50,35,.2), inset 0 1px rgba(255,255,255,.9); }
html[data-theme="light"] .modal .eyebrow,
html[data-theme="light"] .field-label { color: #42604d; }
html[data-theme="light"] .modal h2 { color: #1c2a22; }
html[data-theme="light"] .modal-description,
html[data-theme="light"] .settings-name-field small { color: #596b60; }
html[data-theme="light"] .text-field { color: #1b2a22; background: rgba(255,255,255,.82); border-color: rgba(35,60,49,.16); }
html[data-theme="light"] .text-field::placeholder { color: #7b8980; }
html[data-theme="light"] .code-card,
html[data-theme="light"] .mode-choice,
html[data-theme="light"] .find-result.success,
html[data-theme="light"] .key-verify { color: #26382e; background: rgba(80,141,102,.08); border-color: rgba(35,60,49,.14); box-shadow: inset 0 1px rgba(255,255,255,.5); }
html[data-theme="light"] .code-row strong,
html[data-theme="light"] .mode-icon,
html[data-theme="light"] .key-verify code { color: #18734e; }
html[data-theme="light"] .mode-copy strong,
html[data-theme="light"] .key-verify > strong { color: #24382b; }
html[data-theme="light"] .mode-copy small,
html[data-theme="light"] .key-confirm { color: #64756a; }
html[data-theme="light"] .button-primary,
html[data-theme="light"] .send-button { color: #fff; background: linear-gradient(135deg, #248a60, #16724d); }
html[data-theme="light"] .button-primary:hover,
html[data-theme="light"] .send-button:hover { background: #116c49; }
html[data-theme="light"] .button-quiet { color: #52665a; border-color: rgba(35,60,49,.18); }
html[data-theme="light"] .button-quiet:hover { color: #203a2a; background: rgba(35,60,49,.06); }
html[data-theme="light"] .modal-close,
html[data-theme="light"] .copy-button,
html[data-theme="light"] .composer-plus { color: #53685b; background: rgba(48,100,66,.1); border-color: rgba(35,60,49,.13); }
html[data-theme="light"] .composer-plus { color: #45634f; }
html[data-theme="light"] .toast { color: #20372a; background: rgba(248,253,249,.96); border-color: rgba(47,126,79,.2); box-shadow: 0 8px 24px rgba(35,60,49,.14); }
html[data-theme="light"] .settings-anonymous-note { color: #345b43; background: rgba(74,148,96,.09); border-color: rgba(47,126,79,.16); }
html[data-theme="light"] .sidebar-heading .icon-button:hover { background: rgba(35,60,49,.08); }
html[data-reduce-motion="true"] *,
html[data-reduce-motion="true"] *::before,
html[data-reduce-motion="true"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}

html:not([data-theme]), html[data-theme="glass"] {
  color-scheme: dark;
  --bg: #09131f;
  --sidebar: rgba(15, 27, 43, .82);
  --panel: rgba(21, 37, 56, .72);
  --panel-raised: rgba(34, 54, 77, .76);
  --line: rgba(207, 229, 255, .13);
  --text: #edf5ff;
  --muted: #a4b5ca;
  --subtle: #8094ad;
  --accent: #b9dcff;
  --accent-dark: #91bce9;
  --mint: #b8e2f8;
  --danger: #ffb9b7;
  --accent-ink: #14263b;
}
html:not([data-theme]) body, html[data-theme="glass"] body {
  background:
    radial-gradient(ellipse at 82% 10%, rgba(94, 151, 218, .22), transparent 37%),
    radial-gradient(ellipse at 18% 88%, rgba(101, 179, 203, .14), transparent 40%),
    linear-gradient(145deg, #09131f, #101e2e 55%, #0b1725);
}
html:not([data-theme]) .sidebar, html[data-theme="glass"] .sidebar {
  background: linear-gradient(155deg, rgba(27, 45, 66, .84), rgba(12, 24, 39, .82));
  border-right-color: rgba(213, 233, 255, .13);
  box-shadow: 14px 0 55px rgba(1, 8, 20, .22);
}
html:not([data-theme]) .main-panel, html[data-theme="glass"] .main-panel {
  background: linear-gradient(145deg, rgba(25, 43, 64, .57), rgba(10, 20, 34, .42));
}
html:not([data-theme]) .search-box, html[data-theme="glass"] .search-box,
html:not([data-theme]) .message-composer, html[data-theme="glass"] .message-composer {
  color: #b5c8dc;
  background: rgba(210, 230, 255, .075);
  border-color: rgba(216, 235, 255, .16);
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 8px 28px rgba(0,0,0,.1);
}
html:not([data-theme]) .conversation-item.active, html[data-theme="glass"] .conversation-item.active,
html:not([data-theme]) .conversation-item:hover, html[data-theme="glass"] .conversation-item:hover,
html:not([data-theme]) .profile-button:hover, html[data-theme="glass"] .profile-button:hover {
  background: rgba(190, 219, 255, .1);
  border-color: rgba(204, 229, 255, .13);
}
html:not([data-theme]) .brand-mark, html[data-theme="glass"] .brand-mark,
html:not([data-theme]) .privacy-icon, html[data-theme="glass"] .privacy-icon {
  color: #c8e4ff;
  background: rgba(166, 207, 255, .12);
  border-color: rgba(202, 228, 255, .18);
}
html:not([data-theme]) .button-primary, html[data-theme="glass"] .button-primary,
html:not([data-theme]) .send-button, html[data-theme="glass"] .send-button {
  color: #12253b;
  background: linear-gradient(135deg, #e0f0ff, #a9d1f7 58%, #91c4ef);
  border-color: rgba(236, 247, 255, .46);
  box-shadow: inset 0 1px rgba(255,255,255,.7), 0 8px 25px rgba(100, 163, 222, .2);
}
html:not([data-theme]) .button-primary:hover, html[data-theme="glass"] .button-primary:hover,
html:not([data-theme]) .send-button:hover, html[data-theme="glass"] .send-button:hover {
  background: linear-gradient(135deg, #eff7ff, #bfe0ff);
  box-shadow: inset 0 1px rgba(255,255,255,.8), 0 10px 30px rgba(117, 180, 237, .27);
}
html:not([data-theme]) .welcome-copy h2 span, html[data-theme="glass"] .welcome-copy h2 span,
html:not([data-theme]) .code-row strong, html[data-theme="glass"] .code-row strong,
html:not([data-theme]) .mode-icon, html[data-theme="glass"] .mode-icon {
  color: #c6e2ff;
}
html:not([data-theme]) .welcome-view::before, html[data-theme="glass"] .welcome-view::before {
  background: radial-gradient(ellipse at 55% 47%, rgba(127, 184, 244, .15), transparent 66%);
}
html:not([data-theme]) .art-glow, html[data-theme="glass"] .art-glow {
  background: radial-gradient(circle, rgba(137, 193, 247, .22), transparent 70%);
}
html:not([data-theme]) .art-card, html[data-theme="glass"] .art-card {
  background: linear-gradient(145deg, rgba(222, 239, 255, .16), rgba(133, 171, 210, .075));
  border-color: rgba(222, 240, 255, .23);
  box-shadow: 0 24px 75px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.19);
}
html:not([data-theme]) .art-bubble, html[data-theme="glass"] .art-bubble {
  color: #d9eaff;
  background: rgba(152, 195, 238, .18);
  border-color: rgba(220, 239, 255, .16);
}
html:not([data-theme]) .chat-header, html[data-theme="glass"] .chat-header,
html:not([data-theme]) .topbar, html[data-theme="glass"] .topbar {
  border-color: rgba(213, 233, 255, .12);
}
html:not([data-theme]) .message-bubble, html[data-theme="glass"] .message-bubble {
  color: #e2edfa;
  background: linear-gradient(145deg, rgba(204, 226, 252, .13), rgba(136, 171, 210, .085));
  border-color: rgba(218, 236, 255, .14);
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}
html:not([data-theme]) .mine .message-bubble, html[data-theme="glass"] .mine .message-bubble {
  color: #13283e;
  background: linear-gradient(145deg, #d9edff, #a9d3f6);
  box-shadow: 0 7px 24px rgba(106, 166, 224, .17);
}
html:not([data-theme]) .modal, html[data-theme="glass"] .modal {
  color: #edf5ff;
  background: linear-gradient(145deg, rgba(35, 55, 78, .96), rgba(16, 29, 45, .97));
  border-color: rgba(218, 238, 255, .2);
  box-shadow: 0 35px 110px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(30px) saturate(145%);
  -webkit-backdrop-filter: blur(30px) saturate(145%);
}
html:not([data-theme]) .modal::backdrop, html[data-theme="glass"] .modal::backdrop {
  background: rgba(4, 10, 19, .73);
  backdrop-filter: blur(12px);
}
html:not([data-theme]) .modal .eyebrow, html[data-theme="glass"] .modal .eyebrow,
html:not([data-theme]) .field-label, html[data-theme="glass"] .field-label {
  color: #c1d7ef;
}
html:not([data-theme]) .modal-description, html[data-theme="glass"] .modal-description,
html:not([data-theme]) .settings-name-field small, html[data-theme="glass"] .settings-name-field small {
  color: #b0c1d5;
}
html:not([data-theme]) .text-field, html[data-theme="glass"] .text-field {
  color: #edf5ff;
  background: rgba(8, 17, 29, .48);
  border-color: rgba(211, 232, 255, .17);
}
html:not([data-theme]) .text-field:focus, html[data-theme="glass"] .text-field:focus {
  border-color: rgba(185, 220, 255, .72);
  box-shadow: 0 0 0 3px rgba(153, 199, 248, .13);
}
html:not([data-theme]) .text-field::placeholder, html[data-theme="glass"] .text-field::placeholder {
  color: #93a9c1;
}
html:not([data-theme]) .code-card, html[data-theme="glass"] .code-card,
html:not([data-theme]) .mode-choice, html[data-theme="glass"] .mode-choice,
html:not([data-theme]) .find-result.success, html[data-theme="glass"] .find-result.success,
html:not([data-theme]) .key-verify, html[data-theme="glass"] .key-verify {
  color: #e5f0fd;
  background: rgba(187, 216, 249, .085);
  border-color: rgba(209, 231, 255, .16);
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}
html:not([data-theme]) .mode-choice:has(input:checked), html[data-theme="glass"] .mode-choice:has(input:checked) {
  background: rgba(171, 211, 255, .14);
  border-color: rgba(193, 223, 255, .45);
}
html:not([data-theme]) .mode-copy strong, html[data-theme="glass"] .mode-copy strong,
html:not([data-theme]) .key-verify > strong, html[data-theme="glass"] .key-verify > strong {
  color: #eff6ff;
}
html:not([data-theme]) .mode-copy small, html[data-theme="glass"] .mode-copy small,
html:not([data-theme]) .key-confirm, html[data-theme="glass"] .key-confirm,
html:not([data-theme]) .key-verify code, html[data-theme="glass"] .key-verify code {
  color: #b5c9e0;
}
html:not([data-theme]) .modal-close, html[data-theme="glass"] .modal-close,
html:not([data-theme]) .copy-button, html[data-theme="glass"] .copy-button,
html:not([data-theme]) .composer-plus, html[data-theme="glass"] .composer-plus {
  color: #d3e7fc;
  background: rgba(204, 227, 252, .12);
  border-color: rgba(216, 236, 255, .17);
}
html:not([data-theme]) .settings-anonymous-note, html[data-theme="glass"] .settings-anonymous-note {
  color: #cce4ff;
  background: rgba(149, 194, 243, .1);
  border-color: rgba(193, 222, 255, .18);
}
html:not([data-theme]) .toast, html[data-theme="glass"] .toast {
  color: #edf5ff;
  background: rgba(26, 44, 65, .96);
  border-color: rgba(190, 221, 255, .22);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(18px);
}

@media (hover: none) {
  .button:hover, .conversation-item:hover, .send-button:hover, .mode-choice:hover {
    transform: none;
  }
}

html[data-theme="glass"] {
  color-scheme: light;
  --bg: #eaf0f7;
  --sidebar: rgba(244, 248, 253, .78);
  --panel: rgba(249, 252, 255, .68);
  --panel-raised: rgba(255, 255, 255, .78);
  --line: rgba(90, 119, 151, .15);
  --text: #26364a;
  --muted: #65768b;
  --subtle: #8292a5;
  --accent: #b8d8f4;
  --accent-dark: #91bde2;
  --mint: #6f9fbd;
  --danger: #a54850;
  --accent-ink: #24394d;
}
html[data-theme="glass"] body {
  color: #26364a;
  background:
    radial-gradient(ellipse at 80% 9%, rgba(183, 211, 242, .42), transparent 37%),
    radial-gradient(ellipse at 16% 88%, rgba(205, 223, 238, .52), transparent 39%),
    linear-gradient(145deg, #eaf0f7, #e4ecf5 55%, #edf2f8);
}
html[data-theme="glass"] .app-shell { background: transparent; }
html[data-theme="glass"] .sidebar {
  color: #26364a;
  background: linear-gradient(155deg, rgba(250, 252, 255, .85), rgba(235, 242, 250, .78));
  border-right-color: rgba(91, 119, 151, .16);
  box-shadow: 12px 0 42px rgba(73, 101, 133, .08), inset -1px 0 rgba(255,255,255,.72);
}
html[data-theme="glass"] .main-panel {
  background: linear-gradient(145deg, rgba(250, 252, 255, .57), rgba(235, 242, 250, .42));
}
html[data-theme="glass"] .brand,
html[data-theme="glass"] .sidebar-heading h1,
html[data-theme="glass"] .welcome-copy h2,
html[data-theme="glass"] .conversation-copy strong,
html[data-theme="glass"] .profile-copy strong,
html[data-theme="glass"] .chat-person strong { color: #293b51; }
html[data-theme="glass"] .eyebrow,
html[data-theme="glass"] .topbar-title,
html[data-theme="glass"] .welcome-description,
html[data-theme="glass"] .chat-person small,
html[data-theme="glass"] .privacy-note small,
html[data-theme="glass"] .profile-copy small,
html[data-theme="glass"] .conversation-preview { color: #687b91; }
html[data-theme="glass"] .privacy-note strong { color: #3e536a; }
html[data-theme="glass"] .conversation-time,
html[data-theme="glass"] .welcome-footnote,
html[data-theme="glass"] .welcome-bottom { color: #7c8da1; }
html[data-theme="glass"] .count-pill,
html[data-theme="glass"] kbd {
  color: #60748c;
  background: rgba(255,255,255,.56);
  border-color: rgba(111, 140, 174, .14);
}
html[data-theme="glass"] .icon-button { color: #647c97; }
html[data-theme="glass"] .icon-button:hover,
html[data-theme="glass"] .profile-button:hover,
html[data-theme="glass"] .conversation-item:hover,
html[data-theme="glass"] .conversation-item.active {
  color: #314b68;
  background: rgba(255,255,255,.62);
  border-color: rgba(112, 147, 185, .18);
  box-shadow: inset 0 1px rgba(255,255,255,.85), 0 5px 16px rgba(78, 112, 148, .06);
}
html[data-theme="glass"] .conversation-item.archived { opacity: .76; }
html[data-theme="glass"] .search-box,
html[data-theme="glass"] .message-composer {
  color: #6c8098;
  background: rgba(255,255,255,.57);
  border-color: rgba(99, 131, 167, .18);
  box-shadow: inset 0 1px rgba(255,255,255,.9), 0 8px 24px rgba(75, 104, 139, .07);
}
html[data-theme="glass"] .search-box input,
html[data-theme="glass"] .message-composer input { color: #293b51; }
html[data-theme="glass"] .search-box input::placeholder,
html[data-theme="glass"] .message-composer input::placeholder { color: #8192a6; }
html[data-theme="glass"] .brand-mark,
html[data-theme="glass"] .privacy-icon {
  color: #547da3;
  background: rgba(197, 222, 246, .56);
  border-color: rgba(117, 155, 194, .19);
  box-shadow: inset 0 1px rgba(255,255,255,.86);
}
html[data-theme="glass"] .button-primary,
html[data-theme="glass"] .send-button {
  color: #29435d;
  background: linear-gradient(145deg, #f9fcff, #c5def5 72%, #b6d5ef);
  border-color: rgba(255,255,255,.9);
  box-shadow: inset 0 1px rgba(255,255,255,.95), 0 6px 18px rgba(99, 143, 189, .17);
}
html[data-theme="glass"] .button-primary:hover,
html[data-theme="glass"] .send-button:hover {
  background: linear-gradient(145deg, #fff, #d8eafa);
  box-shadow: inset 0 1px #fff, 0 8px 22px rgba(99, 143, 189, .22);
}
html[data-theme="glass"] .button-quiet {
  color: #526b86;
  background: rgba(255,255,255,.37);
  border-color: rgba(99, 131, 167, .2);
}
html[data-theme="glass"] .button-quiet:hover {
  color: #304c6b;
  background: rgba(255,255,255,.72);
}
html[data-theme="glass"] .welcome-copy h2 span,
html[data-theme="glass"] .code-row strong,
html[data-theme="glass"] .mode-icon { color: #648db4; }
html[data-theme="glass"] .welcome-view::before {
  background: radial-gradient(ellipse at 55% 47%, rgba(158, 193, 230, .22), transparent 66%);
}
html[data-theme="glass"] .art-glow {
  background: radial-gradient(circle, rgba(149, 191, 235, .34), transparent 70%);
}
html[data-theme="glass"] .art-orbit { border-color: rgba(108, 147, 188, .17); }
html[data-theme="glass"] .art-card {
  background: linear-gradient(145deg, rgba(255,255,255,.77), rgba(215, 231, 248, .56));
  border-color: rgba(255,255,255,.88);
  box-shadow: 0 22px 55px rgba(73, 102, 138, .16), inset 0 1px rgba(255,255,255,.95);
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}
html[data-theme="glass"] .art-avatar {
  color: #435b75;
  background: linear-gradient(140deg, #e7dcd0, #afc4d7);
}
html[data-theme="glass"] .art-line { background: #8ea4b9; }
html[data-theme="glass"] .art-bubble {
  color: #455d76;
  background: rgba(186, 211, 237, .57);
  border: 1px solid rgba(255,255,255,.74);
}
html[data-theme="glass"] .sparkle { color: #779cc1; }
html[data-theme="glass"] .chat-header,
html[data-theme="glass"] .topbar { border-color: rgba(90, 119, 151, .14); }
html[data-theme="glass"] .demo-badge {
  color: #607992;
  background: rgba(255,255,255,.5);
  border-color: rgba(99, 131, 167, .16);
}
html[data-theme="glass"] .live-dot,
html[data-theme="glass"] .demo-badge span,
html[data-theme="glass"] .welcome-eyebrow span,
html[data-theme="glass"] .sample-indicator {
  background: #81b5d2;
  box-shadow: 0 0 10px rgba(112, 169, 203, .32);
}
html[data-theme="glass"] .message-bubble {
  color: #3d526a;
  background: linear-gradient(145deg, rgba(255,255,255,.81), rgba(226, 237, 249, .72));
  border-color: rgba(255,255,255,.88);
  box-shadow: inset 0 1px rgba(255,255,255,.93), 0 5px 16px rgba(82, 111, 146, .07);
}
html[data-theme="glass"] .mine .message-bubble {
  color: #314d69;
  background: linear-gradient(145deg, #e5f2ff, #c2def7);
  box-shadow: inset 0 1px #fff, 0 6px 18px rgba(101, 146, 190, .14);
}
html[data-theme="glass"] .message-meta,
html[data-theme="glass"] .mine .message-meta { color: #71859b; }
html[data-theme="glass"] .empty-chat-note,
html[data-theme="glass"] .empty-list {
  color: #647a91;
  background: rgba(255,255,255,.54);
  border-color: rgba(106, 139, 174, .15);
}
html[data-theme="glass"] .modal {
  color: #2d4056;
  background: linear-gradient(145deg, rgba(250,253,255,.96), rgba(230,239,249,.97));
  border-color: rgba(255,255,255,.92);
  box-shadow: 0 28px 80px rgba(55, 79, 108, .2), inset 0 1px rgba(255,255,255,.98);
  backdrop-filter: blur(28px) saturate(125%);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
}
html[data-theme="glass"] .modal::backdrop { background: rgba(57, 76, 99, .3); }
html[data-theme="glass"] .modal h2 { color: #2c4058; }
html[data-theme="glass"] .modal .eyebrow,
html[data-theme="glass"] .field-label { color: #526b86; }
html[data-theme="glass"] .modal-description,
html[data-theme="glass"] .settings-name-field small { color: #63778d; }
html[data-theme="glass"] .text-field {
  color: #2b4058;
  background: rgba(255,255,255,.76);
  border-color: rgba(99, 131, 167, .2);
}
html[data-theme="glass"] .text-field::placeholder { color: #8192a5; }
html[data-theme="glass"] .text-field:focus {
  border-color: rgba(103, 151, 197, .66);
  box-shadow: 0 0 0 3px rgba(135, 178, 220, .15);
}
html[data-theme="glass"] .code-card,
html[data-theme="glass"] .mode-choice,
html[data-theme="glass"] .find-result.success,
html[data-theme="glass"] .find-result.deleted-result,
html[data-theme="glass"] .key-verify {
  color: #3c536c;
  background: rgba(255,255,255,.57);
  border-color: rgba(99, 131, 167, .18);
  box-shadow: inset 0 1px rgba(255,255,255,.9);
}
html[data-theme="glass"] .code-label,
html[data-theme="glass"] .code-card small { color: #71849a; }
html[data-theme="glass"] .mode-choice:has(input:checked) {
  background: rgba(195, 221, 246, .55);
  border-color: rgba(108, 151, 195, .4);
}
html[data-theme="glass"] .mode-copy strong,
html[data-theme="glass"] .key-verify > strong { color: #354b64; }
html[data-theme="glass"] .mode-copy small,
html[data-theme="glass"] .key-confirm,
html[data-theme="glass"] .key-verify code { color: #667e97; }
html[data-theme="glass"] .mode-icon,
html[data-theme="glass"] .anonymous-icon {
  color: #5f83a6;
  background: rgba(196, 219, 242, .58);
  border-color: rgba(109, 149, 190, .19);
}
html[data-theme="glass"] .modal-close,
html[data-theme="glass"] .copy-button,
html[data-theme="glass"] .composer-plus {
  color: #526b86;
  background: rgba(255,255,255,.7);
  border-color: rgba(99, 131, 167, .17);
}
html[data-theme="glass"] .rotate-button {
  color: #58799a;
  border-top-color: rgba(90, 119, 151, .15);
}
html[data-theme="glass"] .settings-anonymous-note {
  color: #4c6e8b;
  background: rgba(195, 221, 246, .43);
  border-color: rgba(99, 144, 189, .19);
}
html[data-theme="glass"] .inline-note { color: #a54850; }
html[data-theme="glass"] .toast {
  color: #304760;
  background: rgba(250,253,255,.93);
  border-color: rgba(99, 144, 189, .23);
  box-shadow: 0 8px 24px rgba(55, 79, 108, .17);
  backdrop-filter: blur(18px);
}
html[data-theme="glass"] .back-button { color: #4e6c8b; }
html[data-theme="glass"] .back-button:active,
html[data-theme="glass"] .icon-button:active,
html[data-theme="glass"] .profile-button:active { background: rgba(255,255,255,.78); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 18px 0;
  background: rgba(115, 144, 174, .09);
  border: 1px solid rgba(110, 139, 170, .12);
  border-radius: 11px;
}
.auth-tab {
  min-height: 35px;
  color: #637990;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease, color .25s ease;
}
.auth-tab.active {
  color: #354e68;
  background: rgba(255,255,255,.83);
  border-color: rgba(255,255,255,.94);
  box-shadow: 0 2px 8px rgba(65, 92, 123, .08), inset 0 1px #fff;
}
.password-fields { display: grid; gap: 8px; margin-top: 17px; }
.password-fields small { margin: 0 0 2px; color: #71849a; font-size: 9px; line-height: 1.55; }
.password-fields .field-label:not(:first-child) { margin-top: 5px; }
.login-code { max-width: 100%; margin-bottom: 14px; }
.login-submit { width: 100%; margin-top: 18px; }
.account-session {
  display: grid;
  gap: 8px;
  padding: 13px;
  margin: 16px 0 4px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(102, 133, 167, .17);
  border-radius: 12px;
}
.account-session strong { color: #3c536c; font-size: 10px; }
.account-session small { color: #71849a; font-size: 9px; line-height: 1.55; }
.account-session .button { justify-self: start; min-height: 35px; }
.account-session .danger-action {
  color: #8d454d;
  background: rgba(255,241,242,.64);
  border-color: rgba(182, 106, 118, .24);
}
.archived-chat-note {
  align-self: center;
  max-width: 440px;
  padding: 10px 14px;
  margin: 0 0 20px;
  color: #637990;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(102, 133, 167, .15);
  border-radius: 12px;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

button, [role="button"] { touch-action: manipulation; }
.back-button { position: relative; z-index: 2; min-width: 42px; min-height: 42px; }

.find-people-button {
  display: inline-flex;
  width: auto;
  min-height: 38px;
  gap: 7px;
  padding: 0 11px;
  color: #526b86;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(99, 131, 167, .18);
  border-radius: 12px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.find-people-button svg { width: 16px; height: 16px; }
.find-people-button:hover {
  color: #304c6b;
  background: rgba(255,255,255,.76);
  border-color: rgba(99, 131, 167, .28);
}
.find-people-prompt {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 10px;
  margin-top: 10px;
  color: #435c76;
  text-align: left;
  background: rgba(255,255,255,.49);
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255,255,255,.9), 0 3px 12px rgba(75, 104, 139, .045);
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2,.75,.25,1), box-shadow .28s ease, background .28s ease, border-color .28s ease;
}
.find-people-prompt:hover {
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 1px #fff, 0 5px 15px rgba(75, 104, 139, .075);
  transform: translateY(-.5px);
}
.find-people-prompt-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: #4d7197;
  background: rgba(238,245,252,.95);
  border: 1px solid rgba(116, 148, 183, .12);
  border-radius: 9px;
}
.find-people-prompt-icon svg { width: 17px; height: 17px; }
.find-people-prompt-copy { flex: 1; min-width: 0; }
.find-people-prompt strong, .find-people-prompt small { display: block; }
.find-people-prompt strong { color: #354e68; font-size: 10px; font-weight: 650; }
.find-people-prompt small { margin-top: 3px; color: #71849a; font-size: 9px; line-height: 1.35; }
.find-people-prompt-action {
  padding: 6px 8px;
  color: #506d8a;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(116, 148, 183, .14);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}
.color-mode-field { padding: 0; margin: 0 0 18px; border: 0; }
.color-mode-field legend { margin-bottom: 5px; }
.color-mode-hint { margin: 0 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.color-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.color-mode-choice {
  position: relative;
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  color: var(--text);
  background: rgba(255,255,255,.36);
  border: 1px solid rgba(99, 131, 167, .17);
  border-radius: 10px;
  font-size: 9px;
  cursor: pointer;
}
.color-mode-choice:has(input:checked) {
  background: rgba(255,255,255,.72);
  border-color: color-mix(in srgb, var(--accent) 70%, #708aa4);
  box-shadow: inset 0 1px rgba(255,255,255,.9), 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}
.color-mode-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.color-mode-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.color-swatch {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid rgba(35, 55, 75, .13);
  border-radius: 50%;
  box-shadow: inset 0 1px rgba(255,255,255,.52);
}
.swatch-sky { background: #b8d8f4; }
.swatch-lavender { background: #bcb0eb; }
.swatch-mint { background: #91cdb9; }
.swatch-rose { background: #e8a8b4; }
.swatch-peach { background: #e8b98f; }
.swatch-sage { background: #b4c58a; }

html[data-accent="sky"] {
  --accent: #b8d8f4;
  --accent-ink: #24394d;
  --accent-highlight: #f9fcff;
  --accent-mid: #c5def5;
  --accent-rgb: 184, 216, 244;
}
html[data-accent="lavender"] {
  --accent: #bcb0eb;
  --accent-ink: #30294c;
  --accent-highlight: #fcfaff;
  --accent-mid: #d1c8f2;
  --accent-rgb: 188, 176, 235;
}
html[data-accent="mint"] {
  --accent: #91cdb9;
  --accent-ink: #214338;
  --accent-highlight: #f8fffb;
  --accent-mid: #b5e0d2;
  --accent-rgb: 145, 205, 185;
}
html[data-accent="rose"] {
  --accent: #e8a8b4;
  --accent-ink: #502f38;
  --accent-highlight: #fffafb;
  --accent-mid: #f0c5ce;
  --accent-rgb: 232, 168, 180;
}
html[data-accent="peach"] {
  --accent: #e8b98f;
  --accent-ink: #4d3522;
  --accent-highlight: #fffaf5;
  --accent-mid: #f0d0b2;
  --accent-rgb: 232, 185, 143;
}
html[data-accent="sage"] {
  --accent: #b4c58a;
  --accent-ink: #37432a;
  --accent-highlight: #fcfff7;
  --accent-mid: #d0dda9;
  --accent-rgb: 180, 197, 138;
}
html[data-accent] .brand-period,
html[data-accent] .sparkle,
html[data-accent] .welcome-copy h2 span,
html[data-accent] .code-row strong,
html[data-accent] .mode-icon { color: var(--accent-dark, var(--accent)); }
html[data-accent] { --accent-dark: var(--accent); }
html[data-accent] .button-primary,
html[data-accent] .send-button {
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent-highlight), var(--accent-mid) 66%, var(--accent));
  border-color: rgba(255,255,255,.88);
  box-shadow: inset 0 1px rgba(255,255,255,.88), 0 5px 15px rgba(var(--accent-rgb), .38);
}
html[data-accent] .button-primary:hover,
html[data-accent] .send-button:hover {
  color: var(--accent-ink);
  background: linear-gradient(145deg, #fff, var(--accent-highlight) 48%, var(--accent-mid));
}
html[data-theme][data-accent] .mine .message-bubble {
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent-highlight), var(--accent-mid) 75%, var(--accent));
  box-shadow: inset 0 1px rgba(255,255,255,.8), 0 5px 16px rgba(var(--accent-rgb), .3);
}
html[data-accent] .brand-mark,
html[data-accent] .privacy-icon,
html[data-accent] .mode-icon {
  border-color: rgba(var(--accent-rgb), .35);
}
html[data-accent] .avatar-small {
  color: var(--accent-ink);
  background: linear-gradient(145deg, var(--accent-highlight), var(--accent));
  box-shadow: inset 0 1px rgba(255,255,255,.8), 0 3px 10px rgba(var(--accent-rgb), .28);
}
html[data-accent] .brand-mark,
html[data-accent] .privacy-icon,
html[data-accent] .mode-icon {
  color: var(--accent-ink);
  background: rgba(var(--accent-rgb), .24);
}
html[data-theme="glass"][data-accent] .conversation-item.active {
  background: color-mix(in srgb, var(--accent) 27%, white);
  border-color: color-mix(in srgb, var(--accent) 38%, white);
  box-shadow: inset 0 1px rgba(255,255,255,.9), 0 4px 12px rgba(var(--accent-rgb), .12);
}
html[data-accent] .mode-choice:has(input:checked),
html[data-accent] .color-mode-choice:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 38%, white);
  border-color: color-mix(in srgb, var(--accent) 75%, #526b86);
}
html[data-accent] .mode-choice input:checked ~ .mode-check {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .45);
}
html[data-accent] .find-people-prompt-icon {
  color: color-mix(in srgb, var(--accent) 52%, #263d55);
  background: color-mix(in srgb, var(--accent) 42%, white);
}
html[data-accent] .find-people-prompt-action {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 25%, white);
  border-color: color-mix(in srgb, var(--accent) 24%, white);
}
html[data-accent] button:focus-visible,
html[data-accent] input:focus-visible,
html[data-accent] a:focus-visible {
  outline-color: color-mix(in srgb, var(--accent) 75%, #54718f);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2);
}
html[data-theme="glass"] .sidebar,
html[data-theme="glass"] .main-panel,
html[data-theme="glass"] .search-box,
html[data-theme="glass"] .message-composer,
html[data-theme="glass"] .conversation-item,
html[data-theme="glass"] .profile-button,
html[data-theme="glass"] .button,
html[data-theme="glass"] .send-button,
html[data-theme="glass"] .message-bubble,
html[data-theme="glass"] .modal,
html[data-theme="glass"] .brand-mark,
html[data-theme="glass"] .privacy-icon,
html[data-theme="glass"] .avatar-small,
html[data-theme="glass"] .icon-button {
  transition-duration: .32s;
  transition-timing-function: cubic-bezier(.2,.72,.25,1);
}
.button:hover { transform: translateY(-1px); }
.conversation-item { transition-timing-function: cubic-bezier(.2,.72,.25,1); }
.conversation-item.entering { animation-duration: .42s; animation-timing-function: cubic-bezier(.2,.72,.25,1); }
.chat-view { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.72,.25,1); }
.message-row { animation-duration: .32s; animation-timing-function: cubic-bezier(.2,.72,.25,1); }
.modal[open] { animation-duration: .3s; animation-timing-function: cubic-bezier(.2,.72,.25,1); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(4px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 740px) {
  .sidebar-heading .find-people-button { display: none; }
  .mobile-search {
    display: inline-flex !important;
    width: auto;
    padding: 0 10px;
  }
  .color-mode-options { gap: 6px; }
}

/* ==========================================================================
   Liquid Glass Aesthetic Toggle Switch (Dark / Light Mode)
   ========================================================================== */
.glass-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

html[data-theme="light"] .glass-toggle-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(240, 246, 242, 0.75));
  border-color: rgba(35, 60, 49, 0.14);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 6px 20px rgba(35, 60, 49, 0.08);
}

.glass-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.glass-toggle-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.glass-toggle-subtitle {
  color: var(--muted);
  font-size: 10px;
}

.liquid-glass-toggle {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 32px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.liquid-glass-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.liquid-glass-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 3px;
  background: linear-gradient(145deg, rgba(16, 20, 18, 0.95), rgba(8, 11, 9, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.65),
    inset 0 -1px 2px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.35);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.liquid-glass-glow {
  position: absolute;
  inset: -1px;
  border-radius: 32px;
  background: radial-gradient(circle at 75% 50%, rgba(200, 241, 105, 0.2), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.liquid-glass-thumb {
  position: relative;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(210, 222, 215, 0.85) 100%);
  backdrop-filter: blur(8px);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.45),
    0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transform: translateX(0);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

.thumb-highlight {
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.toggle-icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.icon-moon {
  color: #171e18;
  opacity: 1;
  transform: scale(1);
}

.icon-sun {
  position: absolute;
  color: #d97706;
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

.liquid-glass-toggle input:checked + .liquid-glass-track {
  background: linear-gradient(145deg, rgba(245, 248, 246, 0.94), rgba(220, 230, 224, 0.92));
  border-color: rgba(35, 60, 49, 0.16);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    inset 0 -1px 2px rgba(255, 255, 255, 0.8),
    0 4px 14px rgba(35, 60, 49, 0.1);
}

.liquid-glass-toggle input:checked + .liquid-glass-track .liquid-glass-glow {
  opacity: 1;
  background: radial-gradient(circle at 25% 50%, rgba(251, 191, 36, 0.35), transparent 70%);
}

.liquid-glass-toggle input:checked + .liquid-glass-track .liquid-glass-thumb {
  transform: translateX(26px);
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  box-shadow:
    0 3px 10px rgba(217, 119, 6, 0.28),
    0 1px 3px rgba(0, 0, 0, 0.15),
    inset 0 1px 1px #fff;
}

.liquid-glass-toggle input:checked + .liquid-glass-track .icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

.liquid-glass-toggle input:checked + .liquid-glass-track .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ==========================================================================
   Personal AI Companion Styles
   ========================================================================== */
.ai-companion-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  margin-bottom: 8px;
  text-align: left;
  background: linear-gradient(135deg, rgba(200, 241, 105, 0.06), rgba(137, 216, 183, 0.03));
  border: 1px solid rgba(200, 241, 105, 0.18);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
}

.ai-companion-item:hover {
  background: linear-gradient(135deg, rgba(200, 241, 105, 0.12), rgba(137, 216, 183, 0.07));
  border-color: rgba(200, 241, 105, 0.35);
  transform: translateX(2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ai-companion-item.active {
  background: linear-gradient(135deg, rgba(200, 241, 105, 0.18), rgba(137, 216, 183, 0.12));
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(200, 241, 105, 0.22);
}

html[data-theme="light"] .ai-companion-item {
  background: linear-gradient(135deg, rgba(46, 110, 77, 0.07), rgba(46, 110, 77, 0.02));
  border-color: rgba(46, 110, 77, 0.18);
  box-shadow: 0 3px 12px rgba(35, 60, 49, 0.05);
}

html[data-theme="light"] .ai-companion-item:hover {
  background: linear-gradient(135deg, rgba(46, 110, 77, 0.12), rgba(46, 110, 77, 0.05));
  border-color: rgba(46, 110, 77, 0.3);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: var(--accent);
  background: rgba(200, 241, 105, 0.12);
  border: 1px solid rgba(200, 241, 105, 0.24);
  border-radius: 6px;
  text-transform: uppercase;
}

html[data-theme="light"] .ai-badge {
  color: #1a6d45;
  background: rgba(46, 110, 77, 0.1);
  border-color: rgba(46, 110, 77, 0.2);
}

.ai-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  background: #1c221e;
}

.ai-avatar-preset {
  font-size: 20px;
  line-height: 1;
}

/* Modal Avatar Section */
.ai-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

html[data-theme="light"] .ai-avatar-section {
  background: rgba(35, 60, 49, 0.04);
  border-color: rgba(35, 60, 49, 0.1);
}

.ai-avatar-preview-wrap {
  position: relative;
  flex: 0 0 auto;
}

.ai-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(200, 241, 105, 0.1);
  display: grid;
  place-items: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.ai-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-preview-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  padding: 1px 5px;
  font-size: 7px;
  font-weight: 800;
  color: #162010;
  background: var(--accent);
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.ai-avatar-controls {
  flex: 1;
  min-width: 0;
}

.ai-avatar-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 5px;
}

.ai-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}

/* Preset Icons Grid */
.ai-preset-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 8px;
  margin: 6px 0 16px;
}

.ai-icon-chip {
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-icon-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.ai-icon-chip.active {
  background: rgba(200, 241, 105, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(200, 241, 105, 0.28);
}

html[data-theme="light"] .ai-icon-chip {
  background: rgba(35, 60, 49, 0.05);
  border-color: rgba(35, 60, 49, 0.12);
}

html[data-theme="light"] .ai-icon-chip.active {
  background: rgba(46, 110, 77, 0.15);
  border-color: #2e6e4d;
  box-shadow: 0 0 10px rgba(46, 110, 77, 0.2);
}

.ai-prompt-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
  font-size: 12px;
  margin-bottom: 14px;
}

.ai-dialog-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

/* AI Typing Indicator */
.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 18px;
  border-radius: 15px 15px 15px 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ai-theme-accent, var(--accent));
  opacity: 0.35;
  animation: typing-bounce 1.35s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.35; }
  40% { transform: scale(1.15); opacity: 1; }
}

/* ==========================================================================
   3 Custom Themes per Persona (Randomized on every web open for AI)
   ========================================================================== */

/* 1. Talkative Girl (3 Light Pinkish Frosted Themes) */
[data-ai-theme="girl-sakura"] {
  --ai-theme-accent: #ff75a0;
  --ai-theme-bg: linear-gradient(150deg, rgba(48, 19, 36, 0.98), rgba(28, 12, 22, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(255, 117, 160, 0.16), rgba(255, 117, 160, 0.06));
  --ai-theme-bubble-border: rgba(255, 117, 160, 0.24);
  --ai-theme-mine: linear-gradient(145deg, #ff75a0, #f472b6);
  --ai-theme-mine-color: #2b0615;
  --ai-theme-glow: rgba(255, 117, 160, 0.22);
  --ai-theme-header: rgba(48, 19, 36, 0.85);
}

[data-ai-theme="girl-rose-quartz"] {
  --ai-theme-accent: #f48c9a;
  --ai-theme-bg: linear-gradient(150deg, rgba(52, 25, 34, 0.98), rgba(30, 14, 20, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(244, 140, 154, 0.16), rgba(244, 140, 154, 0.06));
  --ai-theme-bubble-border: rgba(244, 140, 154, 0.24);
  --ai-theme-mine: linear-gradient(145deg, #f48c9a, #fba1b7);
  --ai-theme-mine-color: #320a14;
  --ai-theme-glow: rgba(244, 140, 154, 0.22);
  --ai-theme-header: rgba(52, 25, 34, 0.85);
}

[data-ai-theme="girl-neon-blush"] {
  --ai-theme-accent: #f43f5e;
  --ai-theme-bg: linear-gradient(150deg, rgba(54, 14, 30, 0.98), rgba(24, 7, 14, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(244, 63, 94, 0.18), rgba(244, 63, 94, 0.07));
  --ai-theme-bubble-border: rgba(244, 63, 94, 0.28);
  --ai-theme-mine: linear-gradient(145deg, #fb7185, #f43f5e);
  --ai-theme-mine-color: #ffffff;
  --ai-theme-glow: rgba(244, 63, 94, 0.28);
  --ai-theme-header: rgba(54, 14, 30, 0.85);
}

/* 2. Playful Boy (3 Light Blue Patterned Themes) */
[data-ai-theme="boy-sky-grid"] {
  --ai-theme-accent: #38bdf8;
  --ai-theme-bg: radial-gradient(rgba(56, 189, 248, 0.13) 1px, transparent 1px) 0 0 / 22px 22px,
                 linear-gradient(150deg, rgba(14, 28, 48, 0.98), rgba(7, 15, 26, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(56, 189, 248, 0.05));
  --ai-theme-bubble-border: rgba(56, 189, 248, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #38bdf8, #60a5fa);
  --ai-theme-mine-color: #061930;
  --ai-theme-glow: rgba(56, 189, 248, 0.22);
  --ai-theme-header: rgba(14, 28, 48, 0.85);
}

[data-ai-theme="boy-azure-waves"] {
  --ai-theme-accent: #60a5fa;
  --ai-theme-bg: repeating-linear-gradient(45deg, rgba(96, 165, 250, 0.04) 0, rgba(96, 165, 250, 0.04) 10px, transparent 10px, transparent 20px),
                 linear-gradient(150deg, rgba(12, 24, 44, 0.98), rgba(6, 12, 22, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(96, 165, 250, 0.14), rgba(96, 165, 250, 0.05));
  --ai-theme-bubble-border: rgba(96, 165, 250, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #60a5fa, #818cf8);
  --ai-theme-mine-color: #091734;
  --ai-theme-glow: rgba(96, 165, 250, 0.22);
  --ai-theme-header: rgba(12, 24, 44, 0.85);
}

[data-ai-theme="boy-cyan-dots"] {
  --ai-theme-accent: #22d3ee;
  --ai-theme-bg: radial-gradient(circle, rgba(34, 211, 238, 0.15) 1.5px, transparent 1.5px) 0 0 / 26px 26px,
                 linear-gradient(150deg, rgba(10, 26, 40, 0.98), rgba(5, 14, 22, 0.98));
  --ai-theme-bubble: linear-gradient(145deg, rgba(34, 211, 238, 0.14), rgba(34, 211, 238, 0.05));
  --ai-theme-bubble-border: rgba(34, 211, 238, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #22d3ee, #38bdf8);
  --ai-theme-mine-color: #052028;
  --ai-theme-glow: rgba(34, 211, 238, 0.22);
  --ai-theme-header: rgba(10, 26, 40, 0.85);
}

/* 3. Hacker (3 Dark Gray / Amber-Brown Themes) */
[data-ai-theme="hacker-amber-terminal"] {
  --ai-theme-accent: #f59e0b;
  --ai-theme-bg: linear-gradient(155deg, rgba(25, 24, 20, 0.98), rgba(12, 11, 9, 0.99));
  --ai-theme-bubble: linear-gradient(145deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.04));
  --ai-theme-bubble-border: rgba(245, 158, 11, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #f59e0b, #d97706);
  --ai-theme-mine-color: #1a1204;
  --ai-theme-glow: rgba(245, 158, 11, 0.2);
  --ai-theme-header: rgba(25, 24, 20, 0.9);
}

[data-ai-theme="hacker-cyber-bronze"] {
  --ai-theme-accent: #d97706;
  --ai-theme-bg: linear-gradient(155deg, rgba(28, 22, 18, 0.98), rgba(14, 11, 9, 0.99));
  --ai-theme-bubble: linear-gradient(145deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.04));
  --ai-theme-bubble-border: rgba(217, 119, 6, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #d97706, #b45309);
  --ai-theme-mine-color: #ffffff;
  --ai-theme-glow: rgba(217, 119, 6, 0.2);
  --ai-theme-header: rgba(28, 22, 18, 0.9);
}

[data-ai-theme="hacker-matrix-carbon"] {
  --ai-theme-accent: #fbbf24;
  --ai-theme-bg: linear-gradient(rgba(251, 191, 36, 0.03) 50%, transparent 50%) 0 0 / 100% 4px,
                 linear-gradient(155deg, rgba(20, 20, 18, 0.98), rgba(10, 10, 8, 0.99));
  --ai-theme-bubble: linear-gradient(145deg, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0.04));
  --ai-theme-bubble-border: rgba(251, 191, 36, 0.22);
  --ai-theme-mine: linear-gradient(145deg, #fbbf24, #f59e0b);
  --ai-theme-mine-color: #211603;
  --ai-theme-glow: rgba(251, 191, 36, 0.2);
  --ai-theme-header: rgba(20, 20, 18, 0.9);
}

/* Applying AI Persona Theme when Chat is Active */
.chat-view[data-ai-active="true"] {
  background: var(--ai-theme-bg) !important;
}

.chat-view[data-ai-active="true"] .chat-header {
  background: var(--ai-theme-header, transparent);
  border-bottom-color: var(--ai-theme-bubble-border);
}

.chat-view[data-ai-active="true"] .message-bubble:not(.mine .message-bubble) {
  background: var(--ai-theme-bubble);
  border-color: var(--ai-theme-bubble-border);
  box-shadow: 0 4px 16px var(--ai-theme-glow);
}

.chat-view[data-ai-active="true"] .mine .message-bubble {
  background: var(--ai-theme-mine);
  color: var(--ai-theme-mine-color);
  box-shadow: 0 4px 16px var(--ai-theme-glow);
}

.chat-view[data-ai-active="true"] .message-composer {
  border-color: var(--ai-theme-bubble-border);
  box-shadow: 0 4px 22px var(--ai-theme-glow);
}

.chat-view[data-ai-active="true"] .send-button {
  background: var(--ai-theme-mine);
  color: var(--ai-theme-mine-color);
}

