/* Dark — тьма, тишина и одна тлеющая искра */

:root {
  --bg: #08080a;
  --bg-side: #0c0c0f;
  --surface: #131317;
  --surface-2: #1a1a1f;
  --surface-3: #222228;
  --border: #24242a;
  --border-strong: #33333b;
  --text: #ebe9e6;
  --text-2: #b9b6b1;
  --muted: #8a8782;
  --faint: #5d5b58;
  --ember: #d0423f;
  --ember-soft: rgba(208, 66, 63, 0.14);
  --ember-glow: rgba(208, 66, 63, 0.35);
  --corona: #f4e9dc;
  --on-text: #0a0a0b;
  --text-strong: #ffffff;
  --glow-top: #15151a;
  --glow-bottom: #110c0d;
  --side-bg: rgba(12, 12, 15, .82);
  --composer-bg: rgba(19, 19, 23, .92);
  --code-bg: #0d0d10;
  --star: #ffffff;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace;

  --radius: 14px;
  --radius-lg: 24px;
  --side-w: 272px;
  --content-w: 760px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--glow-top) 0%, transparent 60%),
    radial-gradient(900px 600px at 50% 120%, var(--glow-bottom) 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--ember-soft); color: var(--text-strong); }

/* зерно поверх всего — едва заметное */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── затмение ─────────────────────────────────────────── */
.eclipse {
  position: relative; display: inline-block; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #040405 62%, #0b0b0d 100%);
  box-shadow:
    0 0 0 1px rgba(244, 233, 220, .55),
    0 0 6px 1px rgba(244, 233, 220, .35),
    0 0 22px 4px rgba(208, 66, 63, .18),
    inset 0 0 12px rgba(0, 0, 0, .9);
}
.eclipse::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0 62%, rgba(244,233,220,.9) 72%, transparent 82%);
  -webkit-mask: radial-gradient(circle, transparent 69%, #000 70%);
          mask: radial-gradient(circle, transparent 69%, #000 70%);
  filter: blur(.4px);
}
.eclipse-sm { width: 20px; height: 20px; }
.eclipse-lg { width: 72px; height: 72px; }
.eclipse-xl { width: 88px; height: 88px; }
.eclipse-lg, .eclipse-xl { animation: breathe 7s var(--ease) infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(244,233,220,.55), 0 0 8px 1px rgba(244,233,220,.3), 0 0 34px 6px rgba(208,66,63,.16), inset 0 0 16px rgba(0,0,0,.9); }
  50%      { box-shadow: 0 0 0 1px rgba(244,233,220,.7),  0 0 14px 2px rgba(244,233,220,.4), 0 0 56px 12px rgba(208,66,63,.24), inset 0 0 16px rgba(0,0,0,.9); }
}
.eclipse.thinking { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 1px rgba(244,233,220,.85), 0 0 10px 2px rgba(244,233,220,.5), 0 0 26px 6px var(--ember-glow); } }

.wordmark { font-family: var(--serif); font-weight: 400; letter-spacing: .02em; margin: 0; }
.wordmark-sm { font-size: 21px; line-height: 1; }

/* ── вход ─────────────────────────────────────────────── */
.auth { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; text-align: center; animation: rise .8s var(--ease) both; }
.auth-card .wordmark { font-size: 54px; margin-top: 28px; line-height: 1; }
.auth-sub { color: var(--muted); margin: 10px 0 32px; font-size: 15px; }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.auth-form input::placeholder { color: var(--faint); }
.auth-form input:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 4px var(--ember-soft); }
.code-input { text-align: center; letter-spacing: .5em; font-size: 22px !important; font-family: var(--mono) !important; }
.auth-hint { color: var(--text-2); font-size: 14px; margin: 0 0 6px; }
.auth-hint b { color: var(--text); font-weight: 600; }
.auth-error { min-height: 22px; color: #e8807d; font-size: 14px; margin: 14px 0 0; }
.auth-foot { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); color: var(--faint); font-size: 12px; margin: 0; }
.btn-primary {
  height: 48px; border-radius: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--text); color: var(--on-text); transition: transform .15s, background .2s, opacity .2s;
}
.btn-primary:hover { background: var(--text-strong); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-ghost { height: 46px; border-radius: 12px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text); transition: background .2s, border-color .2s; }
.btn-ghost:hover { background: var(--surface); border-color: #44444c; }
.auth-split { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 6px 0 2px; }
.auth-split::before, .auth-split::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px; color: var(--text-2); margin: 4px 2px 6px; cursor: pointer; }
.check input { width: 16px !important; height: 16px !important; margin-top: 3px; accent-color: var(--ember); flex: none; }
.check a { color: var(--text); text-decoration-color: var(--ember); text-underline-offset: 3px; }
.safe-box { text-align: left; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); margin-bottom: 6px; }
.safe-title { margin: 0 0 8px; font-weight: 600; color: var(--text); }
.safe-box ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.btn-link { color: var(--muted); font-size: 14px; padding: 8px; }
.btn-link:hover { color: var(--text); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── каркас ───────────────────────────────────────────── */
.app { display: flex; height: 100dvh; }
.sidebar {
  width: var(--side-w); flex: none; display: flex; flex-direction: column;
  background: var(--side-bg); border-right: 1px solid var(--border);
  padding: 14px 10px max(10px, env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 14px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.new-chat {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); border: 1px solid var(--border); background: var(--surface); transition: background .2s, color .2s, border-color .2s;
}
.new-chat:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.chat-list { flex: 1; overflow-y: auto; margin: 14px -4px 8px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.group-label { color: var(--faint); font-size: 12px; letter-spacing: .04em; padding: 14px 10px 6px; }
.chat-item {
  position: relative; display: flex; align-items: center; width: 100%; padding: 8px 10px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; text-align: left; transition: background .15s, color .15s;
}
.chat-item span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chat-item:hover { background: var(--surface); color: var(--text); }
.chat-item.active { background: var(--surface-2); color: var(--text); }
.chat-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--ember); }
.chat-item .del { opacity: 0; padding: 2px; color: var(--muted); border-radius: 6px; }
.chat-item:hover .del, .chat-item.active .del { opacity: 1; }
.chat-item .del:hover { color: var(--ember); }
.chat-item .del svg { width: 15px; height: 15px; }
.empty-list { color: var(--faint); font-size: 13px; padding: 10px; }

.side-foot { position: relative; border-top: 1px solid var(--border); padding-top: 10px; }
.user-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; }
.user-btn:hover { background: var(--surface); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-3); color: var(--text); font-size: 13px; font-weight: 600; text-transform: uppercase;
}
.user-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text-2); text-align: left; }
.chev { width: 16px; height: 16px; color: var(--muted); }

.menu {
  position: absolute; z-index: 30; min-width: 220px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: pop .16s var(--ease);
}
.menu-up { bottom: calc(100% + 6px); left: 0; right: 0; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 14px; color: var(--text-2); }
.menu button:hover { background: var(--surface-2); color: var(--text); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 14px; flex: none; position: relative; z-index: 20; }
.model-pick { position: relative; }
.model-btn { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-family: var(--serif); font-size: 19px; }
.model-btn:hover { background: var(--surface); }
#model-menu { top: calc(100% + 6px); left: 0; min-width: 280px; }
.model-opt { flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
.model-opt b { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.model-opt small { color: var(--muted); font-size: 13px; }
.model-opt .tick { color: var(--ember); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.only-mobile { display: none; }

/* ── лента ────────────────────────────────────────────── */
.scroller { flex: 1; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.welcome { height: 100%; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 0 20px 6vh; text-align: center; animation: rise 1s var(--ease) both; }
.welcome-line { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 4vw, 36px); margin: 0; color: var(--text); letter-spacing: .01em; }
.thread { max-width: var(--content-w); margin: 0 auto; padding: 8px 20px 24px; }

.msg { margin: 0 0 28px; animation: rise .35s var(--ease) both; }
.msg-user { display: flex; flex-direction: column; align-items: flex-end; }
.bubble {
  max-width: min(85%, 620px); padding: 10px 16px; border-radius: 18px 18px 6px 18px;
  background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; word-wrap: break-word;
}
.msg-images { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-bottom: 8px; }
.msg-images img { max-width: 220px; max-height: 220px; border-radius: 12px; border: 1px solid var(--border); object-fit: cover; }

.msg-ai { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.msg-ai > .eclipse { width: 22px; height: 22px; margin-top: 4px; }
.msg-body { min-width: 0; }
.status { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; min-height: 26px; }
.status .shimmer { background: linear-gradient(90deg, var(--muted) 0%, var(--text) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.thoughts { margin: 0 0 12px; border-left: 2px solid var(--border-strong); padding-left: 14px; }
.thoughts summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.thoughts summary::-webkit-details-marker { display: none; }
.thoughts summary:hover { color: var(--text-2); }
.thoughts summary svg { width: 14px; height: 14px; transition: transform .2s; }
.thoughts[open] summary svg { transform: rotate(90deg); }
.thoughts-text { color: var(--muted); font-size: 14px; line-height: 1.6; white-space: pre-wrap; margin-top: 8px; max-height: 340px; overflow-y: auto; }

/* шаги: поиск, чтение, расчёт, память */
.steps { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; min-width: 0; }
.step svg { width: 14px; height: 14px; flex: none; }
.step .s-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-2); }
.step .s-note { color: var(--faint); white-space: nowrap; }
.step.running .s-icon { animation: spin 1.1s linear infinite; color: var(--ember); }
.step.done .s-icon { color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

.doc-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 260px; padding: 7px 10px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2);
}
.doc-chip svg { width: 16px; height: 16px; color: var(--ember); }
.doc-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.doc-chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); }
.doc-chip button:hover { color: var(--text); background: var(--surface-3); }
.doc-chip button svg { width: 11px; height: 11px; color: inherit; }
.doc-chip.loading { opacity: .6; }
.msg-docs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-bottom: 6px; }
.sheet-note { color: var(--muted); font-size: 13.5px; margin: 12px 20px 4px; }
.mem-text { font-size: 14px; color: var(--text-2); }

.sources { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }
.source {
  display: inline-flex; align-items: center; gap: 6px; max-width: 230px; padding: 4px 10px 4px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.source:hover { border-color: var(--border-strong); color: var(--text); }
.source i { font-style: normal; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); font-size: 11px; color: var(--text); flex: none; }
.source span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.msg-actions { display: flex; gap: 2px; margin-top: 6px; opacity: 0; transition: opacity .2s; }
.msg-ai:hover .msg-actions, .msg-actions.show { opacity: 1; }
.msg-actions .icon-btn { width: 30px; height: 30px; }
.msg-actions svg { width: 16px; height: 16px; }
.msg-model { color: var(--faint); font-size: 12px; align-self: center; margin-left: 6px; }
.err { color: #e8807d; }

/* ── markdown ─────────────────────────────────────────── */
.md { word-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 14px; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--serif); font-weight: 600; line-height: 1.3; margin: 24px 0 10px; }
.md h1 { font-size: 26px; } .md h2 { font-size: 22px; } .md h3 { font-size: 18.5px; } .md h4 { font-size: 16px; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 14px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--muted); }
.md a { color: var(--text); text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 3px; }
.md a:hover { color: var(--text-strong); }
.md strong { color: var(--text-strong); font-weight: 600; }
.md blockquote { margin: 0 0 14px; padding: 2px 16px; border-left: 2px solid var(--ember); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.md table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 14.5px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--border); padding: 7px 12px; text-align: left; }
.md th { background: var(--surface); font-weight: 600; }
.md :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
.md sup.cite a { text-decoration: none; display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--surface-3); font-size: 10.5px; color: var(--text); margin: 0 1px; }
.md sup.cite a:hover { background: var(--ember); }

.code { margin: 0 0 16px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--code-bg); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.code-head button { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 7px; color: var(--muted); font-family: var(--sans); font-size: 12.5px; }
.code-head button:hover { color: var(--text); background: var(--surface-2); }
.code-head svg { width: 14px; height: 14px; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }

/* подсветка кода в тон */
.hljs-comment, .hljs-quote { color: #5f6068; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #e07a74; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #b9c48a; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #d9a66c; }
.hljs-title, .hljs-section, .hljs-function .hljs-title { color: #e8dccb; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable, .hljs-property { color: #a8b3c7; }
.hljs-built_in, .hljs-class .hljs-title { color: #c9a8d6; }
.hljs-meta, .hljs-deletion { color: #8a8782; }

/* ── поле ввода ───────────────────────────────────────── */
.composer-wrap { flex: none; padding: 0 16px max(10px, env(safe-area-inset-bottom)); }
.composer {
  max-width: var(--content-w); margin: 0 auto; padding: 10px 10px 8px 16px; border-radius: var(--radius-lg);
  background: var(--composer-bg); border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.02);
  transition: border-color .2s, box-shadow .3s;
}
.composer:focus-within { border-color: var(--border-strong); box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 0 4px rgba(208,66,63,.07); }
.composer textarea {
  display: block; width: 100%; max-height: 220px; min-height: 28px; resize: none; border: 0; outline: 0; padding: 6px 4px 4px 0;
  background: transparent; color: var(--text); font: inherit; font-size: 16px; line-height: 1.55;
}
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.tools { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  color: var(--muted); border: 1px solid var(--border); font-size: 13.5px; transition: all .2s;
}
.pill svg { width: 15px; height: 15px; }
.pill:hover { color: var(--text); border-color: var(--border-strong); }
.pill[aria-pressed="true"] { color: #f3d3d1; background: var(--ember-soft); border-color: rgba(208,66,63,.45); }
.send {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--on-text); transition: transform .15s, opacity .2s, background .2s, box-shadow .3s;
}
.send svg { width: 18px; height: 18px; stroke-width: 2.2; }
.send:hover:not(:disabled) { background: var(--text-strong); box-shadow: 0 0 18px var(--ember-glow); }
.send:active:not(:disabled) { transform: scale(.93); }
.send:disabled { opacity: .22; cursor: default; }
.send .i-stop { display: none; }
.send.stop { background: var(--surface-3); color: var(--text); }
.send.stop .i-send { display: none; }
.send.stop .i-stop { display: block; fill: currentColor; stroke: none; }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 2px 0 8px; }
.thumb { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.75); color: #fff; }
.thumb button svg { width: 12px; height: 12px; }
.disclaimer { text-align: center; color: var(--faint); font-size: 12px; margin: 8px 0 0; }

/* ── окно «Люди» ──────────────────────────────────────── */
.sheet {
  width: min(520px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 64px)); padding: 0; border-radius: 18px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
.sheet::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--border); }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.people-list { padding: 8px; overflow-y: auto; max-height: calc(min(640px, 100dvh - 64px) - 60px); }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.person:hover { background: var(--surface-2); }
.person-info { flex: 1; min-width: 0; }
.person-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.person-meta { color: var(--muted); font-size: 12.5px; }
.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); }
.tag.pending { color: #e6c27a; border-color: rgba(230,194,122,.35); }
.tag.blocked { color: #e8807d; border-color: rgba(232,128,125,.35); }
.tag.owner { color: var(--corona); }
.small-btn { padding: 5px 10px; border-radius: 8px; font-size: 13px; border: 1px solid var(--border-strong); color: var(--text-2); }
.small-btn:hover { color: var(--text); background: var(--surface-3); }

/* ── разрешения ───────────────────────────────────────── */
.perm-pick { position: relative; }
.perm-menu { left: 0; right: auto; min-width: 300px; bottom: calc(100% + 8px); }
.perm-opt { flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
.perm-opt b { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.perm-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.perm-opt .tick { color: var(--ember); }
#perm-btn[data-mode="bypass"] { color: #e8807d; border-color: rgba(232,128,125,.4); }
.confirm-card {
  margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid rgba(208,66,63,.4); box-shadow: 0 0 24px rgba(208,66,63,.06); animation: rise .25s var(--ease);
}
.confirm-card .c-title { font-size: 14px; color: var(--text); font-weight: 600; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.confirm-card .c-title svg { color: var(--ember); }
.confirm-card .c-detail { font-size: 14px; color: var(--text-2); margin-bottom: 12px; word-wrap: break-word; }
.confirm-card .c-actions { display: flex; gap: 8px; }
.confirm-card .c-actions .plan-btn { height: 34px; padding: 0 16px; font-size: 13.5px; }
.confirm-card.resolved { opacity: .6; border-color: var(--border); box-shadow: none; }
.confirm-card .c-result { font-size: 13px; color: var(--muted); }
.flag-row { display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--text-2); }
.flag-row .tag { flex: none; color: #e8807d; border-color: rgba(232,128,125,.35); }
.flag-row .f-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── тарифы ───────────────────────────────────────────── */
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.user-meta .user-email { width: 100%; }
.plan-badge { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.plan-badge.paid { color: #f3d3d1; }
.auth-foot a { color: var(--muted); }
.sheet-wide { width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.plans-body { padding: 16px 20px 22px; overflow-y: auto; max-height: calc(100dvh - 120px); }
.usage { margin: 0 0 18px; }
.usage-row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.usage-bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a8782, var(--ember)); border-radius: 6px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; padding: 18px 16px 16px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--border);
}
.plan-card.current { border-color: rgba(208,66,63,.55); box-shadow: 0 0 0 1px rgba(208,66,63,.25), 0 0 30px rgba(208,66,63,.08); }
.plan-card h4 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 24px; }
.plan-price { margin: 6px 0 14px; font-size: 14px; color: var(--muted); }
.plan-price b { font-size: 26px; color: var(--text); font-weight: 600; margin-right: 4px; }
.plan-card ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-2); flex: 1; }
.plan-card li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; line-height: 1.45; }
.plan-card li::before { content: ""; width: 6px; height: 6px; margin: 7px 0 0 4px; border-radius: 50%; background: var(--ember); opacity: .8; }
.plan-btn { height: 40px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--text); color: var(--on-text); }
.plan-btn:hover:not(:disabled) { background: var(--text-strong); }
.plan-btn:disabled { background: var(--surface-2); color: var(--muted); cursor: default; }
.plan-tag { position: absolute; top: 14px; right: 14px; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.plan-tag.now { color: #f3d3d1; border-color: rgba(208,66,63,.45); }
.pay-box { margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-strong); }
.pay-box h5 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.pay-box ol { margin: 0 0 14px; padding-left: 20px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.pay-box b { color: var(--text); }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-actions .plan-btn { padding: 0 18px; }
.legal { margin: 16px 0 0; color: var(--faint); font-size: 12px; }
.legal a { color: var(--muted); }
.disclaimer.warn { color: #e6c27a; }
.disclaimer button { color: var(--text); text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 3px; font-size: 12px; }
.pay-req { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(230,194,122,.06); border: 1px solid rgba(230,194,122,.2); margin-bottom: 6px; }
.section-label { color: var(--faint); font-size: 12px; letter-spacing: .04em; padding: 10px 12px 6px; }
.plan-select { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 13px; }
@media (max-width: 900px) { .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plans-grid { grid-template-columns: 1fr; } .plans-body { padding: 14px; } }

.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); font-size: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.6);
  animation: rise .25s var(--ease);
}

/* ── телефон ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .only-mobile { display: grid; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(86vw, 320px);
    transform: translateX(-102%); transition: transform .3s var(--ease); background: var(--bg-side);
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .app.side-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .app.side-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { justify-content: space-between; padding: max(0px, env(safe-area-inset-top)) 8px 0; height: calc(52px + env(safe-area-inset-top)); }
  .model-pick { position: absolute; left: 50%; transform: translateX(-50%); }
  #model-menu { left: 50%; transform: translateX(-50%); }
  .thread { padding: 4px 16px 16px; }
  .msg-ai { grid-template-columns: 1fr; gap: 6px; }
  .msg-ai > .eclipse { width: 18px; height: 18px; }
  .bubble { max-width: 88%; }
  .composer-wrap { padding: 0 10px max(8px, env(safe-area-inset-bottom)); }
  .disclaimer { display: none; }
  .msg-actions { opacity: 1; }
  .chat-item .del { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ══════════ КОСМОС ══════════ */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.stars i { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; background: transparent; }
.stars .s1 { animation: twinkle 6s ease-in-out infinite; }
.stars .s2 { width: 1.5px; height: 1.5px; animation: twinkle 9s ease-in-out infinite 2s; }
.stars .s3 { width: 2px; height: 2px; animation: twinkle 13s ease-in-out infinite 4s; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }
.nebula {
  position: fixed; inset: -10%; pointer-events: none; z-index: 0; opacity: .55;
  background:
    radial-gradient(40% 30% at 82% 18%, rgba(120, 60, 160, .10), transparent 70%),
    radial-gradient(35% 28% at 12% 78%, rgba(208, 66, 63, .09), transparent 70%),
    radial-gradient(30% 25% at 55% 55%, rgba(60, 80, 160, .05), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(2%, -2%, 0) scale(1.05); } }
.auth, .app { position: relative; z-index: 1; }

/* чёрная дыра вместо простого затмения */
.eclipse {
  background: radial-gradient(circle at 50% 50%, #000 0 57%, #050404 60%, transparent 61%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 214, 170, .75),
    0 0 4px 1px rgba(255, 190, 140, .65),
    0 0 14px 3px rgba(255, 130, 80, .35),
    0 0 40px 10px rgba(208, 66, 63, .18) !important;
}
.eclipse::after {
  /* гравитационная линза: тонкое кольцо света вокруг тени */
  content: ""; position: absolute; inset: -9%; border-radius: 50%; z-index: 1; filter: none !important;
  background: conic-gradient(from var(--spin), rgba(255,230,200,.0), rgba(255,220,180,.85) 18%, rgba(255,150,90,.2) 35%,
              rgba(255,230,200,.0) 50%, rgba(255,200,150,.6) 70%, rgba(255,230,200,0) 90%) !important;
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 66%, transparent 69%) !important;
          mask: radial-gradient(circle, transparent 60%, #000 62%, #000 66%, transparent 69%) !important;
  animation: lens 9s linear infinite;
}
.eclipse::before {
  /* аккреционный диск — вращающееся раскалённое кольцо */
  content: ""; position: absolute; left: -62%; right: -62%; top: 34%; bottom: 34%; border-radius: 50%; z-index: -1;
  background: conic-gradient(from var(--spin), #ffd9a8, #ff8a4c 12%, #d0423f 25%, #5a1418 38%, #ff9c5c 52%,
              #ffe2b8 62%, #d0423f 76%, #3a0d10 88%, #ffd9a8);
  -webkit-mask: radial-gradient(closest-side, transparent 48%, #000 56%, #000 78%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 48%, #000 56%, #000 78%, transparent 100%);
  filter: blur(.6px) saturate(1.1); opacity: .95;
  animation: disk 14s linear infinite;
}
@keyframes disk { to { --spin: 360deg; } }
@keyframes lens { to { --spin: -360deg; } }
.eclipse-sm::before, .msg-ai > .eclipse::before { filter: blur(.3px); opacity: .85; }
.eclipse.thinking::before { animation-duration: 2.2s; opacity: 1; }
.eclipse.thinking::after { animation-duration: 1.6s; }
.eclipse.thinking { animation: hole-pulse 1.6s ease-in-out infinite; }
@keyframes hole-pulse { 50% { box-shadow: 0 0 0 1px rgba(255,214,170,.95), 0 0 8px 2px rgba(255,190,140,.8), 0 0 22px 6px rgba(255,130,80,.45), 0 0 60px 16px rgba(208,66,63,.28) !important; } }
.eclipse-lg, .eclipse-xl { animation: none; margin: 0 40px; }
.welcome .eclipse-lg { width: 96px; height: 96px; }
.auth-card .eclipse-xl { width: 104px; height: 104px; }
.msg-ai > .eclipse { margin-left: 3px; }

/* ══════════ МЕНЮ «+» ══════════ */
.plus-pick { position: relative; }
.plus-btn { border: 1px solid var(--border); border-radius: 50%; width: 34px; height: 34px; }
.plus-btn svg { width: 17px; height: 17px; }
.plus-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.tools-menu { left: -6px; right: auto; bottom: calc(100% + 10px); min-width: 300px; max-height: 70vh; overflow-y: auto; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-label { color: var(--faint); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px 4px; }
.switch-row { justify-content: space-between; }
.switch-row .sr-left { display: flex; align-items: center; gap: 10px; }
.switch-row small { display: block; color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--surface-3); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
[aria-pressed="true"] > .switch, .switch.on { background: var(--ember); }
[aria-pressed="true"] > .switch::after, .switch.on::after { transform: translateX(14px); background: #fff; }
.chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); transition: all .2s;
}
.chip svg { width: 14px; height: 14px; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.ember { color: #f3d3d1; background: var(--ember-soft); border-color: rgba(208,66,63,.4); }
.chip.warn { color: #e8807d; border-color: rgba(232,128,125,.4); }
.chip .x { opacity: .6; margin-left: 2px; }
.perm-opt-inline { padding-left: 14px !important; }

/* ══════════ НАСТРОЙКИ ══════════ */
.settings { width: min(920px, calc(100vw - 24px)); height: min(680px, calc(100dvh - 40px)); padding: 0; }
.settings[open] { display: grid; grid-template-rows: auto 1fr; }
.settings-body { display: grid; grid-template-columns: 210px 1fr; min-height: 0; }
.settings-nav { border-right: 1px solid var(--border); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.settings-nav button { text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.settings-nav button:hover { background: var(--surface-2); color: var(--text); }
.settings-nav button.active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--ember); }
.settings-pane { padding: 18px 26px 28px; overflow-y: auto; }
.settings-pane h4 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 4px 0 16px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row .label { min-width: 0; }
.set-row .label b { display: block; font-weight: 600; font-size: 14.5px; color: var(--text); }
.set-row .label small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.set-col { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-col label b { font-weight: 600; font-size: 14.5px; }
.set-col label small { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }
.field, .select {
  width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font: inherit; font-size: 14.5px;
}
.select { width: auto; min-width: 200px; cursor: pointer; }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.5; }
.field:focus, .select:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ember-soft); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.theme-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-card { width: 116px; border-radius: 12px; border: 1px solid var(--border); padding: 6px; background: var(--surface-2); text-align: center; font-size: 13px; color: var(--text-2); }
.theme-card.on { border-color: var(--ember); box-shadow: 0 0 0 2px var(--ember-soft); color: var(--text); }
.theme-card .prev { height: 58px; border-radius: 8px; margin-bottom: 6px; position: relative; overflow: hidden; }
.theme-card .prev.dark { background: #0b0b0e; }
.theme-card .prev.light { background: #f5f3ef; }
.theme-card .prev.system { background: linear-gradient(135deg, #0b0b0e 50%, #f5f3ef 50%); }
.theme-card .prev::after { content: ""; position: absolute; left: 10px; right: 26px; bottom: 9px; height: 10px; border-radius: 6px; background: #d0423f; opacity: .7; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-big { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 24px; font-weight: 600; overflow: hidden; flex: none; }
.avatar-big img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar { overflow: hidden; }
.save-bar { display: flex; gap: 10px; align-items: center; padding-top: 16px; }
.save-bar .plan-btn { padding: 0 18px; height: 38px; }
.danger-btn { padding: 8px 14px; border-radius: 9px; font-size: 13.5px; border: 1px solid rgba(232,128,125,.45); color: #e8807d; }
.danger-btn:hover { background: rgba(232,128,125,.1); }
.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--text-2); }
@media (max-width: 720px) {
  .settings-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .settings-nav { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .settings-nav button { white-space: nowrap; }
  .settings-pane { padding: 14px 16px 24px; }
  .set-row { flex-direction: column; align-items: flex-start; }
}

/* ══════════ ШРИФТ И РАЗМЕР ══════════ */
html[data-font="system"] { --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html[data-font="serif"] { --sans: var(--serif); }
html[data-font="mono"] { --sans: var(--mono); }
html[data-size="small"] .thread, html[data-size="small"] .composer { zoom: .92; }
html[data-size="large"] .thread, html[data-size="large"] .composer { zoom: 1.1; }
.code pre code { color: #e6e3de; }

/* ══════════ СВЕТЛАЯ ТЕМА ══════════ */
html[data-theme="light"] {
  --bg: #f5f3ef; --bg-side: #efece7; --surface: #ffffff; --surface-2: #f2f0ec; --surface-3: #e7e4de;
  --border: #e2ded7; --border-strong: #cfc9c0; --text: #1c1b1a; --text-2: #3d3b38; --muted: #75716b; --faint: #a39f98;
  --ember: #c23a35; --ember-soft: rgba(194, 58, 53, .12); --ember-glow: rgba(194, 58, 53, .25);
  --on-text: #ffffff; --text-strong: #000000; --glow-top: #fbfaf8; --glow-bottom: #f4ecea;
  --side-bg: rgba(239, 236, 231, .92); --composer-bg: rgba(255, 255, 255, .96); --code-bg: #1d1d22; color-scheme: light;
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --bg: #f5f3ef; --bg-side: #efece7; --surface: #ffffff; --surface-2: #f2f0ec; --surface-3: #e7e4de;
    --border: #e2ded7; --border-strong: #cfc9c0; --text: #1c1b1a; --text-2: #3d3b38; --muted: #75716b; --faint: #a39f98;
    --ember: #c23a35; --ember-soft: rgba(194, 58, 53, .12); --ember-glow: rgba(194, 58, 53, .25);
    --on-text: #ffffff; --text-strong: #000000; --glow-top: #fbfaf8; --glow-bottom: #f4ecea;
    --side-bg: rgba(239, 236, 231, .92); --composer-bg: rgba(255, 255, 255, .96); --code-bg: #1d1d22; color-scheme: light;
  }
  html[data-theme="system"] .stars, html[data-theme="system"] .noise { opacity: 0; }
  html[data-theme="system"] .nebula { opacity: .25; }
  html[data-theme="system"] .chip.ember, html[data-theme="system"] .pill[aria-pressed="true"] { color: var(--ember); }
}
html[data-theme="light"] .stars, html[data-theme="light"] .noise { opacity: 0; }
html[data-theme="light"] .nebula { opacity: .25; }
html[data-theme="light"] .chip.ember, html[data-theme="light"] .pill[aria-pressed="true"] { color: var(--ember); }
html[data-theme="light"] .menu, html[data-theme="light"] .sheet { box-shadow: 0 18px 50px rgba(0,0,0,.15); }
