/* ===========================================================
   Pulse — тёмная тема, мобильный первым, десктоп вторым.
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #090c11;
  --bg-soft: #0d1219;
  --card: #131a24;
  --card-2: #18202b;
  --line: #222c3a;
  --line-soft: #1a2230;
  --text: #e9eef6;
  --muted: #8a97ad;
  --muted-2: #5f6b7e;

  --accent: #5b8cff;
  --accent-2: #8b5cf6;
  --good: #2fd39a;
  --neutral: #7d8aa0;
  --warn: #f5a524;
  --bad: #f2544b;

  --hr: #ff5a6e;
  --hrv: #8b7cff;
  --sleep: #4ba3ff;
  --spo2: #2dd4bf;
  --stress: #f5a524;
  --resp: #38bdf8;
  --temp: #fb923c;
  --activity: #a3e635;

  --deep: #4f5dff;
  --light: #4ba3ff;
  --rem: #a855f7;
  --awake: #f59e0b;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --sidebar: 248px;
}

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(91, 140, 255, 0.14), transparent 62%),
    radial-gradient(900px 520px at 8% 4%, rgba(139, 92, 246, 0.11), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }

/* ─────────────────────────────  каркас  ───────────────────────────────── */

.app { display: flex; min-height: 100vh; }

.sidebar { display: none; }

.main {
  flex: 1;
  min-width: 0;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 0 12px;
  background: linear-gradient(var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
}
.topbar .who { flex: 1; min-width: 0; }
.topbar .hello { font-size: 18px; font-weight: 650; letter-spacing: -0.3px; }
.topbar .date { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff; flex: none;
  box-shadow: 0 8px 22px -10px rgba(91, 140, 255, 0.9);
}
.brand-name { font-weight: 700; letter-spacing: -0.4px; font-size: 17px; }

.sos {
  flex: none;
  border: 1px solid rgba(242, 84, 75, 0.42);
  background: rgba(242, 84, 75, 0.12);
  color: #ff8b84;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.2s ease;
}
.sos:hover { background: rgba(242, 84, 75, 0.2); }
.sos:active { transform: scale(0.96); }

/* нижняя навигация (мобильный) */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(11, 15, 21, 0.86);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
}
.tabbar button {
  flex: 1;
  background: none;
  border: 0;
  padding: 7px 2px;
  color: var(--muted-2);
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 10.5px;
  border-radius: 12px;
  transition: color 0.18s ease;
}
.tabbar button.on { color: var(--accent); }
.tabbar button .icon { width: 21px; height: 21px; }

/* ───────────────────────────  общие элементы  ─────────────────────────── */

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }

.section { margin-top: 22px; }
.section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 2px 10px;
}
.section-head h2 {
  margin: 0; font-size: 12px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
}
.section-head .more { margin-left: auto; font-size: 12.5px; color: var(--accent); background: none; border: 0; padding: 0; }

h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; letter-spacing: -0.2px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  border-radius: 13px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 550;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:hover { border-color: #334054; }
.btn:active { transform: scale(0.98); }
.btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 26px -16px rgba(91, 140, 255, 1);
}
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.chip.good { background: rgba(47, 211, 154, 0.13); color: var(--good); }
.chip.neutral { background: rgba(125, 138, 160, 0.15); color: var(--neutral); }
.chip.warn { background: rgba(245, 165, 36, 0.14); color: var(--warn); }
.chip.bad { background: rgba(242, 84, 75, 0.14); color: var(--bad); }

/* ────────────────────────────  главный экран  ─────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px 18px;
}
.hero::after {
  content: "";
  position: absolute; inset: -50% -20% auto auto;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-rings { position: relative; width: 118px; height: 118px; flex: none; }
.hero-rings .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-meta { min-width: 0; }
.hero-state { font-size: 19px; font-weight: 680; letter-spacing: -0.4px; line-height: 1.25; }
.hero-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

.mini-rings {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-top: 2px;
}
.mini {
  min-width: 0;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 10px 6px;
  text-align: center;
}
.mini .v { font-size: 17px; font-weight: 680; letter-spacing: -0.4px; }
.mini .v small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 1px; }
.mini .k {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ring-value { fill: var(--text); font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.ring-sub { fill: var(--muted); font-size: 11px; }
.ring-caption { fill: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.ring-arc { animation: draw 1.1s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
@keyframes draw { from { stroke-dashoffset: 999; } }

/* живой пульс */
.live {
  display: flex; align-items: center; gap: 14px;
}
.live-heart {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  background: rgba(255, 90, 110, 0.12);
  color: var(--hr);
  display: grid; place-items: center;
}
.live-heart .icon { animation: beat 1s ease-in-out infinite; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.18); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
}
.live-value { font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.live-value span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.live-spark { flex: 1; min-width: 0; opacity: 0.9; }

/* плитки показателей */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative;
  text-align: left;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 13px 9px;
  overflow: hidden;
  transition: transform 0.14s ease, border-color 0.2s ease;
}
.tile:hover { border-color: #2e3a4c; }
.tile:active { transform: scale(0.985); }
.tile-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.tile-head .icon { width: 17px; height: 17px; flex: none; }
.tile-head > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-head .chip { margin-left: auto; flex: none; }
.tile-value { font-size: 25px; font-weight: 700; letter-spacing: -1px; margin-top: 7px; line-height: 1.1; }
.tile-value small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.tile-note { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; min-height: 16px; }
.tile .spark { display: block; width: 100%; height: 34px; margin-top: 4px; }
.tile .chip { font-size: 10.5px; padding: 3px 8px; }

/* разбор от ИИ */
.insight-empty { text-align: center; padding: 8px 4px 4px; }
.insight-empty .aura {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--spo2), var(--accent));
  filter: blur(1px);
  animation: spin 7s linear infinite;
  opacity: 0.85;
}
@keyframes spin { to { transform: rotate(360deg); } }

.insight-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.insight-head .chip { margin-left: auto; }
.insight-headline { font-size: 17px; font-weight: 650; letter-spacing: -0.3px; line-height: 1.35; }
.insight-summary { color: var(--muted); margin-top: 8px; }

.facts { display: grid; gap: 8px; margin-top: 14px; }
.fact {
  display: grid; grid-template-columns: 8px 1fr; gap: 11px; align-items: start;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 11px 12px;
}
.fact i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; display: block; }
.fact.good i { background: var(--good); }
.fact.neutral i { background: var(--neutral); }
.fact.warn i { background: var(--warn); }
.fact.bad i { background: var(--bad); }
.fact b { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 2px; }
.fact span { font-size: 13px; color: var(--muted); }

ul.list { margin: 0; padding: 0; list-style: none; }
ul.list li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 14px; }
ul.list li::before {
  content: ""; position: absolute; left: 3px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2);
}
ul.list li:last-child { margin-bottom: 0; }
ul.list.warn li::before { background: var(--warn); }
ul.list.good li::before { background: var(--good); }
ul.list.accent li::before { background: var(--accent); }

.focus {
  margin-top: 14px;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.14), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(91, 140, 255, 0.22);
  font-size: 14px;
}
.focus b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 4px; }

/* лента событий */
.timeline { display: grid; gap: 2px; }
.event { display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.event:last-child { border-bottom: 0; }
.event time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.event b { display: block; font-size: 13.5px; font-weight: 620; }
.event.good b { color: var(--good); }
.event.warn b { color: var(--warn); }
.event.bad b { color: var(--bad); }
.event span { font-size: 12.5px; color: var(--muted); }

/* ─────────────────────────────  графики  ─────────────────────────────── */

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis { fill: var(--muted-2); font-size: 13px; }
.chart-empty { color: var(--muted-2); font-size: 13px; text-align: center; padding: 28px 0; }
.chart-wrap { margin: 0 -4px; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.stacked { display: flex; width: 100%; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.stacked .seg { height: 100%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 10px 8px; text-align: center; }
.stat .v { font-size: 16px; font-weight: 680; letter-spacing: -0.4px; }
.stat .v small {
  display: block; font-size: 10px; color: var(--muted); font-weight: 500;
  letter-spacing: 0; white-space: nowrap; margin-top: 1px;
}
.stat .k { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }

.segmented { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; color: var(--muted); padding: 6px 13px; border-radius: 8px; font-size: 12.5px; transition: all 0.16s ease; }
.segmented button.on { background: var(--card-2); color: var(--text); box-shadow: 0 2px 8px -4px #000; }

/* ─────────────────────────  экран показателя  ─────────────────────────── */

.metric-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.metric-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.metric-big { font-size: 40px; font-weight: 720; letter-spacing: -1.8px; line-height: 1; }
.metric-big small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 5px; }

.back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--muted); padding: 4px 0; font-size: 13.5px;
}
.back:hover { color: var(--text); }

.about { color: var(--muted); font-size: 14px; }

/* ───────────────────────────────  чат  ────────────────────────────────── */

.chat-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 210px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 10px; }

.msg { max-width: 88%; padding: 11px 14px; border-radius: 17px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; animation: rise 0.26s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--accent), #6f7dff); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.err { align-self: flex-start; background: rgba(242, 84, 75, 0.1); border: 1px solid rgba(242, 84, 75, 0.3); color: #ff9b95; }

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.suggest { display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.suggest button {
  flex: none; background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 8px 13px; font-size: 12.5px; white-space: nowrap;
}
.suggest button:hover { color: var(--text); border-color: #334054; }

.composer {
  position: sticky;
  bottom: calc(74px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; align-items: flex-end;
  background: var(--bg);
  padding: 8px 0 4px;
}
.composer textarea {
  flex: 1; resize: none; min-height: 46px; max-height: 140px;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 15px; padding: 12px 14px; font: inherit; font-size: 15px;
}
.composer textarea:focus { outline: none; border-color: rgba(91, 140, 255, 0.55); }
.composer .send {
  width: 46px; height: 46px; flex: none; border: 0; border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
}
.composer .send:disabled { opacity: 0.45; }

/* ──────────────────────────────  формы  ──────────────────────────────── */

label.field { display: block; margin-top: 13px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=number], input[type=tel], textarea, select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 15px;
}
textarea { resize: vertical; min-height: 74px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(91, 140, 255, 0.55); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mood-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 8px; }
.mood-scale button {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 13px;
  padding: 11px 4px 8px; display: grid; gap: 3px; justify-items: center; font-size: 10.5px; color: var(--muted);
  transition: all 0.16s ease;
}
.mood-scale button em { font-style: normal; font-size: 20px; }
.mood-scale button.on { border-color: var(--accent); background: rgba(91, 140, 255, 0.12); color: var(--text); }

/* ──────────────────────────────  SOS  ────────────────────────────────── */

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 12, 0.93);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  animation: fade 0.25s ease both;
  overflow-y: auto;
}
@keyframes fade { from { opacity: 0; } }
.overlay header { display: flex; align-items: center; margin-bottom: 8px; }
.overlay header h2 { margin: 0; font-size: 17px; font-weight: 650; flex: 1; }
.overlay .close { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 8px; }

.breath-stage { text-align: center; margin: 10px 0 4px; }
.breath-stage .phase { font-size: 22px; font-weight: 650; letter-spacing: -0.4px; }
.breath-stage .count { font-size: 13px; color: var(--muted); margin-top: 3px; }

.breath-circle {
  flex: none;
  width: min(62vw, 240px); height: min(62vw, 240px);
  margin: 18px auto; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(91, 140, 255, 0.45), rgba(139, 92, 246, 0.18) 62%, transparent 72%);
  border: 1px solid rgba(91, 140, 255, 0.35);
  display: grid; place-items: center;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.62);
}
.breath-circle.in { transform: scale(1); }
.breath-circle.hold { transform: scale(1); }
.breath-circle.out { transform: scale(0.62); }
.breath-circle span { font-size: 34px; font-weight: 300; color: rgba(255, 255, 255, 0.55); }

.ground { counter-reset: g; }
.ground li { font-size: 14.5px; margin-bottom: 9px; color: var(--muted); }
.ground li b { color: var(--text); }

/* ─────────────────────────────  всплывашки  ──────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 18px; font-size: 13.5px;
  z-index: 120; box-shadow: var(--shadow);
  animation: toast 0.3s ease both;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

.view { animation: enter 0.28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.skeleton {
  background: linear-gradient(90deg, var(--card-2) 25%, #202a37 37%, var(--card-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.disclaimer { color: var(--muted-2); font-size: 11.5px; text-align: center; margin: 22px 0 6px; line-height: 1.5; }

/* ──────────────────────────────  десктоп  ────────────────────────────── */

@media (min-width: 900px) {
  .app { padding-left: var(--sidebar); }
  .tabbar { display: none; }

  .sidebar {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar);
    padding: 22px 14px;
    background: rgba(10, 14, 20, 0.7);
    border-right: 1px solid var(--line-soft);
    backdrop-filter: blur(12px);
    z-index: 50;
  }
  .sidebar .brand { padding: 0 8px 18px; }
  .sidebar nav { display: grid; gap: 3px; }
  .sidebar nav button {
    display: flex; align-items: center; gap: 11px;
    background: none; border: 0; color: var(--muted);
    padding: 10px 12px; border-radius: 12px; font-size: 14px; text-align: left;
    transition: all 0.16s ease;
  }
  .sidebar nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
  .sidebar nav button.on { background: rgba(91, 140, 255, 0.13); color: var(--accent); }
  .sidebar .foot { margin-top: auto; font-size: 11.5px; color: var(--muted-2); padding: 0 10px; }

  .main { padding: 0 28px 60px; max-width: 1020px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hero { grid-template-columns: auto 1fr auto; padding: 24px; }
  .hero-rings { width: 158px; height: 158px; }
  .hero-state { font-size: 22px; }
  .mini-rings { grid-column: auto; margin-top: 0; grid-template-columns: repeat(3, 100px); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .two-col > .card + .card { margin-top: 0; }
  .chat-wrap { min-height: calc(100vh - 190px); }
  .composer { bottom: 0; padding-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
