:root {
  --bg: #0f1115;
  --panel: rgba(22, 25, 32, 0.7);
  --panel-solid: #161920;
  --panel-deep: #0c0e12;
  --surface-2: #232731;
  --glass: rgba(22, 25, 32, 0.72);
  --line: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.09);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --txt: #e2e8f0;
  --txt-strong: #ffffff;
  --mut: #9ca3af;
  --dim: #6b7280;
  --emerald: #10b981;
  --emerald-2: #34d399;
  --emerald-text: #34d399;
  --blue: #3b82f6;
  --blue-2: #38bdf8;
  --blue-text: #38bdf8;
  --purple: #8b5cf6;
  --indigo: #818cf8;
  --indigo-text: #a5b4fc;
  --rose: #f43f5e;
  --orange: #f97316;
  --yellow: #fbbf24;
  --yellow-text: #fbbf24;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.15);

  /* Полосы, которые Telegram занимает поверх вебвью: в полноэкранном режиме
     шапка клиента прозрачная, а кнопки «Закрыть»/«Настройки» рисуются поверх
     страницы. Значения выставляет app.js из Telegram.WebApp; в браузере — 0,
     поэтому обычная вёрстка не меняется. */
  --tg-top-inset: 0px;
  --tg-bottom-inset: 0px;
  --tg-left-inset: 0px;
  --tg-right-inset: 0px;
}

body.light {
  --bg: #f2f5f9;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --panel-deep: #edf1f7;
  --surface-2: #e4e9f1;
  --glass: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 42, 0.07);
  --line-strong: rgba(15, 23, 42, 0.13);
  --hover-bg: rgba(15, 23, 42, 0.05);
  --txt: #273244;
  --txt-strong: #0f172a;
  --mut: #5c6b80;
  --dim: #8a97ab;
  --emerald-text: #059669;
  --blue-text: #2563eb;
  --indigo-text: #6366f1;
  --yellow-text: #b45309;
  --shadow-card: 0 4px 10px -2px rgba(30, 41, 59, 0.08), 0 2px 4px -1px rgba(30, 41, 59, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  display: flex;
  overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.25);
}

h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--mut);
}

a {
  text-decoration: none;
  color: inherit;
}

.sidebar {
  width: 250px;
  height: 100vh;
  height: 100dvh;
  flex-shrink: 0;
  background: var(--panel-solid);
  border-right: 1px solid var(--line);
  padding: calc(26px + var(--tg-top-inset)) 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  margin-bottom: 34px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
  color: #fff;
}

.brand-logo svg {
  width: 19px;
  height: 19px;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--txt-strong), var(--mut));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.side-nav .tab,
.bottom-nav .tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  color: var(--mut);
  font-weight: 500;
  font-size: 0.93rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.side-nav .tab svg,
.bottom-nav .tab svg {
  width: 19px;
  height: 19px;
  transition: transform 0.18s ease;
}

.side-nav .tab:hover,
.bottom-nav .tab:hover {
  background: var(--hover-bg);
  color: var(--txt-strong);
}

.side-nav .tab:hover svg {
  transform: scale(1.12);
}

.side-nav .tab.active {
  background: var(--surface-2);
  color: var(--txt-strong);
}

.side-nav .tab.active svg {
  color: var(--emerald);
}

.side-foot {
  border-top: 1px solid var(--line);
  padding: 16px 8px 0;
  font-size: 0.78rem;
  color: var(--mut);
  line-height: 1.7;
}

.side-foot span {
  color: var(--dim);
}

.side-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  margin-bottom: 12px;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.side-profile:hover {
  background: var(--hover-bg);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  border: 2px solid var(--line-strong);
}

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

.avatar.big {
  width: 96px;
  height: 96px;
  font-size: 2rem;
}

.profile-info {
  min-width: 0;
}

.p-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--txt-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-sub {
  font-size: 0.74rem;
  color: var(--dim);
  margin-top: 2px;
}

.avatar-btn {
  width: 50px;
  height: 50px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.avatar-btn:hover {
  transform: scale(1.08);
}

.modal.narrow {
  width: min(420px, 100%);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-form label.wide {
  min-width: 0;
}

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.file-label {
  cursor: pointer;
}

.shell {
  flex: 1;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  /* Контент (графики, длинные строки) не должен двигать страницу по горизонтали. */
  overflow-x: hidden;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--glass);
  border-bottom: 1px solid var(--line);
  /* Верхняя полоса под кнопки Telegram: max() не даёт шапке раздуваться —
     инсет заменяет обычный отступ, а не добавляется к нему. Фон шапки
     (glass + blur) продолжается вверх, поэтому полоса не выглядит пустой. */
  padding: max(16px, var(--tg-top-inset)) calc(26px + var(--tg-right-inset))
           16px calc(26px + var(--tg-left-inset));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar h1 {
  font-size: 1.35rem;
}

.topbar p {
  font-size: 0.84rem;
  color: var(--mut);
  margin-top: 3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel-deep);
  color: var(--mut);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  color: var(--txt-strong);
  border-color: var(--emerald);
  transform: rotate(15deg);
}

.content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 26px 90px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.28s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 20px;
  white-space: nowrap;
}

.pill-yellow {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--yellow-text);
}

.pill-green {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  margin-bottom: 0;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-label {
  color: var(--mut);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-num {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--txt-strong);
  letter-spacing: -0.02em;
}

.stat-num small {
  font-size: 0.95rem;
  color: var(--mut);
  font-weight: 500;
}

.stat-delta {
  font-size: 0.75rem;
  margin-top: 5px;
  color: var(--mut);
  min-height: 1.1em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-delta.emerald { color: var(--emerald-text); }
.stat-delta.warn { color: var(--yellow-text); }
.stat-delta.rose { color: var(--rose); }

.icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-circle svg {
  width: 20px;
  height: 20px;
}

.ic-emerald { background: rgba(16, 185, 129, 0.12); color: var(--emerald); }
.ic-purple { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.ic-orange { background: rgba(249, 115, 22, 0.12); color: var(--orange); }
.ic-blue { background: rgba(56, 189, 248, 0.12); color: var(--blue-2); }
.ic-rose { background: rgba(244, 63, 94, 0.12); color: var(--rose); }

.bar-track {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: var(--panel-deep);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.grad-green { background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
.grad-purple { background: linear-gradient(90deg, #7c3aed, var(--indigo)); }
.grad-orange { background: linear-gradient(90deg, var(--emerald), var(--emerald-2)); }
.grad-orange.over { background: linear-gradient(90deg, var(--orange), #fb923c); }
.grad-blue { background: linear-gradient(90deg, #60a5fa, #2563eb); }

.stat-cap {
  font-size: 0.73rem;
  color: var(--dim);
  margin-top: 8px;
  text-align: right;
  min-height: 1.1em;
}

.water-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.water-row .grow {
  flex: 1;
}

/* Пресеты воды: +200/+300/свой объём */
.water-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.water-chip {
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.1);
  color: var(--blue-text, #38bdf8);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.water-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.water-chip.accent {
  background: rgba(56, 189, 248, 0.25);
}

.water-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.water-custom input {
  width: 76px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--txt-strong);
  font-size: 0.9rem;
}

/* Карточка цели по весу в разделе «Вес» */
.weight-goal-card {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.03));
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* Блок уведомлений в настройках */
.notify-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notify-row[hidden] {
  display: none;
}

.notify-label {
  font-size: 0.9rem;
  color: var(--txt);
  min-width: 0;
}

.notify-row select {
  flex-shrink: 0;
  min-width: 130px;
}

.notify-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Онбординг: шаги с точками */
.onboard .onboard-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
}

.onboard .onboard-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, width 0.2s ease;
}

.onboard .onboard-dots i.on {
  background: var(--blue);
  width: 20px;
  border-radius: 999px;
}

.onboard-steps .onboard-step {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.onboard-steps .onboard-step.active {
  display: flex;
}

.onboard-steps .onboard-step .icon-circle {
  width: 56px;
  height: 56px;
}

.onboard-steps .onboard-step p {
  color: var(--mut);
  font-size: 0.92rem;
  line-height: 1.5;
}

.onboard-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.weight-goal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.weight-goal-top .stat-num.goal span {
  color: var(--emerald-text, #34d399);
}

.weight-goal-right {
  text-align: right;
}

.round-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--mut);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.round-btn svg {
  width: 15px;
  height: 15px;
}

.round-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue-text);
}

.round-btn.ghosted:hover {
  background: var(--surface-2);
  color: var(--txt-strong);
}

.insight-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(139, 92, 246, 0.22) !important;
  padding-left: 26px;
}

.insight-rail {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--purple), var(--blue));
}

.insight-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.insight-bot {
  position: relative;
  flex-shrink: 0;
}

.ping-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.25);
  animation: pingSoft 3s ease-out infinite;
}

@keyframes pingSoft {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.65); opacity: 0; }
}

.insight-title h2 {
  font-size: 1rem;
}

.insight-title p {
  font-size: 0.76rem;
  color: var(--dim);
  margin-top: 2px;
}

.mini-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-deep);
  border: 1px solid var(--line-strong);
  color: var(--mut);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.mini-btn svg {
  width: 13px;
  height: 13px;
}

.mini-btn:hover {
  background: var(--surface-2);
  color: var(--txt-strong);
}

.mini-btn.spin svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.insight-text {
  padding-left: 56px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--txt);
  /* Длинные строки (ссылки, токены) не должны расширять карточку. */
  overflow-wrap: anywhere;
}

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

/* Grid-элементы по умолчанию не сжимаются уже min-content: canvas графиков
   распирает колонку и создаёт горизонтальный скролл на узких экранах. */
.charts-row > *,
.row-2 > *,
.charts-grid > *,
.stats-grid > * {
  min-width: 0;
}

.charts-row .card {
  margin-bottom: 16px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.row-2 .card {
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-head p {
  font-size: 0.82rem;
  color: var(--mut);
  margin-top: 3px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue-text);
  font-size: 0.83rem;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}

.link-btn:hover {
  text-decoration: underline;
}

.chart-h280 {
  height: 280px;
  position: relative;
}

.chart-h220 {
  height: 220px;
  position: relative;
}

.ring-chart {
  display: flex;
  flex-direction: column;
}

.ring-chart h2 {
  margin-bottom: 3px;
}

.muted-line {
  font-size: 0.82rem;
  color: var(--mut);
  margin-bottom: 12px;
}

.ring-wrap {
  flex: 1;
  min-height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ring-center span {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--txt-strong);
}

.ring-center small {
  font-size: 0.74rem;
  color: var(--mut);
  margin-top: 2px;
}

.ring-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.ring-leg-item {
  background: var(--panel-deep);
  border-radius: 10px;
  padding: 9px 10px;
  text-align: center;
  border: 1px solid var(--line);
}

.ring-leg-item p {
  font-size: 0.71rem;
  color: var(--mut);
}

.ring-leg-item strong {
  font-size: 0.86rem;
  color: var(--txt-strong);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.feed-item:hover {
  background: var(--hover-bg);
  border-color: var(--line);
}

.feed-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.feed-icon.ic-orange {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
}

.feed-icon svg {
  width: 19px;
  height: 19px;
}

.feed-item:hover .feed-icon {
  transform: scale(1.08);
}

.feed-main {
  flex: 1;
  min-width: 0;
}

.feed-main h4 {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--txt-strong);
}

.feed-main p {
  font-size: 0.75rem;
  color: var(--mut);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-val {
  text-align: right;
  flex-shrink: 0;
}

.feed-val b {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--txt-strong);
  display: block;
}

.feed-val small {
  font-size: 0.69rem;
  color: var(--dim);
}

.feed-val.good b {
  color: var(--emerald-text);
}

.feed-val.purple b {
  color: var(--indigo-text);
}

.feed-val.blue b {
  color: var(--blue-text);
}

.feed-empty {
  text-align: center;
  color: var(--dim);
  font-size: 0.85rem;
  padding: 34px 0;
}

.smart-log {
  margin-top: 14px;
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.smart-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--mut);
  margin-bottom: 10px;
}

.smart-label svg {
  width: 13px;
  height: 13px;
  color: var(--emerald-text);
}

.smart-row {
  display: flex;
  gap: 8px;
  background: var(--panel-deep);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.smart-row:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.smart-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  box-shadow: none !important;
  padding: 6px 8px;
}

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-2));
  color: #052e1c;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.send-btn svg {
  width: 16px;
  height: 16px;
}

.send-btn:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.send-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.smart-msg {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.smart-msg.load {
  color: var(--indigo-text);
  background: rgba(139, 92, 246, 0.1);
}

.smart-msg.err {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.1);
}

.smart-msg.ok {
  color: var(--emerald-text);
  background: rgba(16, 185, 129, 0.1);
}

.form-card {
  padding: 22px;
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.inline-form:last-child {
  margin-bottom: 0;
}

.goal-form {
  border-top: 1px dashed var(--line-strong);
  padding-top: 14px;
  margin-top: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--mut);
  font-weight: 500;
}

label.wide {
  flex: 1;
  min-width: 230px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item.clickable {
  cursor: pointer;
}

.menu-item-head small {
  color: var(--mut);
  font-size: 0.74rem;
  font-weight: 500;
}

.wplan-item .done-btn {
  margin-top: 10px;
  align-self: flex-start;
}

.wplan-item.is-done {
  opacity: 0.55;
  filter: saturate(0.5);
}

.wplan-item.is-done h4 {
  text-decoration: line-through;
  text-decoration-color: rgba(16, 185, 129, 0.7);
  text-decoration-thickness: 2px;
}

.wplan-item.is-done .done-btn {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  cursor: default;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 8, 14, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Модалки не должны заезжать под кнопки Telegram и под домашнюю полосу. */
  padding: calc(16px + var(--tg-top-inset)) 16px calc(16px + var(--tg-bottom-inset));
  animation: fadeIn 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  width: min(640px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 1.05rem;
  color: var(--txt-strong);
}

.modal-body {
  padding: 18px 22px 24px;
  overflow-y: auto;
}

.r-cap {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mut);
  margin: 16px 0 9px;
}

.r-cap:first-child {
  margin-top: 0;
}

.r-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.r-list li {
  font-size: 0.9rem;
  line-height: 1.55;
  position: relative;
  padding-left: 26px;
}

.r-list.ing li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.r-list.steps {
  counter-reset: step;
}

.r-list.steps li {
  counter-increment: step;
  padding-left: 34px;
}

.r-list.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.03em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald-text);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.howto-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-deep);
  margin-bottom: 16px;
  border: 1px solid var(--line);
}

.howto-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.howto-yt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.25);
  color: var(--txt);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.howto-yt:hover {
  background: rgba(255, 0, 0, 0.16);
  transform: translateY(-1px);
}

.howto-yt svg,
.howto-yt i[data-lucide] {
  color: #ff0000;
  flex-shrink: 0;
}

.howto-yt span {
  font-weight: 600;
}

.howto-yt small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input,
select {
  background: var(--panel-deep);
  border: 1px solid var(--line-strong);
  color: var(--txt);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

input[type='date'],
input[type='time'] {
  color-scheme: dark;
}

/* ==== Статус доступа ==== */

.access-banner {
  margin: 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-text, #34d399);
}

.access-banner.warn {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-text, #fbbf24);
}

.access-banner[hidden] {
  display: none;
}

body.light input[type='date'],
body.light input[type='time'] {
  color-scheme: light;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-2));
  color: #052e1c;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.89rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:hover:not(:disabled) {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.83rem;
}

.btn.ghost {
  background: transparent;
  color: var(--emerald-text);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.btn.ghost:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.1);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hint {
  color: var(--blue-text);
  font-size: 0.85rem;
  padding-bottom: 10px;
}

.hint.ok {
  color: var(--emerald-text);
}

.entry-list {
  list-style: none;
}

.entry-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 0.91rem;
  transition: background 0.15s ease;
}

.entry-list li:hover {
  background: var(--hover-bg);
}

.entry-list li.empty {
  color: var(--dim);
  justify-content: center;
  padding: 20px;
}

.entry-main {
  flex: 1;
  min-width: 0;
}

.entry-main small {
  display: block;
  color: var(--dim);
  font-size: 0.77rem;
  margin-top: 2px;
}

.badge {
  display: inline-block;
  font-size: 0.71rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.14);
  color: var(--blue-text);
  margin-right: 8px;
  font-weight: 600;
}

.entry-value {
  white-space: nowrap;
  font-weight: 600;
}

.del-btn {
  background: transparent;
  border: none;
  color: var(--rose);
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 0.45;
  padding: 4px 7px;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}

.del-btn:hover {
  opacity: 1;
  background: rgba(244, 63, 94, 0.1);
}

.day-summary {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.day-summary .sum-item {
  display: flex;
  flex-direction: column;
}

.day-summary .sum-label {
  color: var(--dim);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.day-summary .sum-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.day-summary .sum-value.over {
  color: var(--rose);
}

.day-summary .sum-value.ok {
  color: var(--emerald-text);
}

.menu-card .menu-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.menu-item {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.menu-item:hover {
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}

.menu-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}

.menu-item-head .badge {
  margin-right: 0;
}

.menu-item-head b {
  font-size: 0.86rem;
  color: var(--emerald-text);
}

.menu-item h4 {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--txt-strong);
  line-height: 1.35;
}

.menu-item p {
  font-size: 0.77rem;
  color: var(--mut);
  margin-top: 6px;
  line-height: 1.5;
}

.menu-summary {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--mut);
  background: var(--panel-deep);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
}

.menu-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dim);
  font-size: 0.86rem;
  padding: 26px 12px;
}

.menu-msg {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.menu-msg[hidden] {
  display: none !important;
}

/* Глобально: атрибут hidden всегда сильнее любых display из классов
   (без этого .web-login с display:grid отображается даже с hidden). */
[hidden] {
  display: none !important;
}

.web-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--tg-top-inset)) 24px calc(24px + var(--tg-bottom-inset));
  background: var(--bg);
}

.web-login-card {
  width: min(100%, 380px);
  padding: 36px 28px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.web-login-card h1 {
  margin: 14px 0 8px;
}

.web-login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.web-login-error {
  color: var(--red) !important;
  font-size: 0.85rem;
}

#telegram-login-widget {
  min-height: 44px;
}


.menu-msg.load {
  color: var(--indigo-text);
  background: rgba(139, 92, 246, 0.1);
}

.menu-msg.err {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.1);
}

.menu-msg.ok {
  color: var(--emerald-text);
  background: rgba(16, 185, 129, 0.1);
}

#btn-menu-add {
  margin-top: 14px;
  width: 100%;
  justify-content: center;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.charts-grid.two,
.charts-grid.one {
  grid-template-columns: 1fr 1fr;
}

.chart-card {
  height: 240px;
  position: relative;
}

.chart-card.tall {
  height: 320px;
}

.bottom-nav {
  display: none;
}

@media (max-width: 940px) {
  .sidebar {
    display: none;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--glass);
    border-top: 1px solid var(--line);
    padding: 8px 10px calc(8px + max(var(--tg-bottom-inset), env(safe-area-inset-bottom, 0px)));
    justify-content: space-around;
  }

  .bottom-nav .tab {
    flex-direction: column;
    gap: 4px;
    padding: 6px 10px;
    font-size: 0.62rem;
    width: auto;
    border-radius: 10px;
  }

  .bottom-nav .tab.active {
    color: var(--emerald-text);
    background: transparent;
  }

  .shell {
    padding-bottom: calc(72px + max(var(--tg-bottom-inset), env(safe-area-inset-bottom, 0px)));
  }

  .content {
    padding: 18px 14px 110px;
  }

  .feed {
    max-height: none;
    overflow-y: visible;
  }

  .charts-row,
  .row-2,
  .charts-grid.two {
    grid-template-columns: 1fr;
  }

  .insight-text {
    padding-left: 0;
  }

  .topbar {
    padding: max(14px, var(--tg-top-inset)) calc(16px + var(--tg-right-inset))
             14px calc(16px + var(--tg-left-inset));
  }

  .topbar h1 {
    font-size: 1.1rem;
  }

  /* iOS/Telegram WebView автоматически зумят страницу при фокусе в полях
     с размером шрифта меньше 16px. Фиксируем минимум на мобильных. */
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* ==== Фаза 1: UI-полировка ==== */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
}

body.light .skeleton {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.10) 50%,
    rgba(0, 0, 0, 0.04) 100%
  );
  background-size: 200% 100%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.mid { width: 65%; }
.skeleton-line.long { width: 90%; }

.skeleton-box {
  height: 80px;
  margin-bottom: 12px;
}

/* Toast */
.toast-root {
  position: fixed;
  /* Справа сверху в Telegram висят кнопки «Закрыть»/«Настройки» — тосты
     опускаем ниже полосы, которую они занимают. */
  top: calc(20px + var(--tg-top-inset));
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast {
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.9rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 360px;
  animation: toast-in 0.2s ease;
}

.toast.ok { border-color: rgba(16, 185, 129, 0.45); }
.toast.err { border-color: rgba(244, 63, 94, 0.45); }
.toast.info { border-color: rgba(59, 130, 246, 0.45); }

.toast i[data-lucide] {
  flex-shrink: 0;
}

.toast.ok i[data-lucide] { color: #10b981; }
.toast.err i[data-lucide] { color: #f43f5e; }
.toast.info i[data-lucide] { color: #3b82f6; }

.toast.out {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

/* Confirm dialog */
.confirm-text {
  margin: 0 0 18px;
  color: var(--txt);
  font-size: 0.95rem;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn.danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
}

.btn.danger:hover { filter: brightness(1.08); }

/* Empty states */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state .empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

body.light .empty-state .empty-icon {
  background: rgba(0, 0, 0, 0.06);
}

.empty-state .empty-title {
  color: var(--txt);
  font-weight: 600;
  font-size: 1rem;
}

.empty-state .empty-sub {
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 320px;
}

.empty-state .empty-action {
  margin-top: 6px;
}

/* Streak card */
.streak-card .streak-main {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 6px 0 18px;
}

.streak-card .streak-num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--emerald-text);
}

.streak-card .streak-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.streak-card .streak-goals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.streak-card .streak-goal {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}

.streak-card .streak-goal-cap {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.streak-card .streak-goal-text {
  font-size: 0.82rem;
  color: var(--txt);
  margin-top: 6px;
}

.streak-card .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-chip i[data-lucide] {
  width: 14px;
  height: 14px;
}

/* Heatmap */
.heatmap {
  overflow-x: auto;
  padding: 4px 0;
}

.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  gap: 3px;
  width: max-content;
}

.heatmap .hm {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  display: block;
}

.heatmap .hm-blank { background: transparent; }
.heatmap .hm-0 { background: rgba(255, 255, 255, 0.05); }
.heatmap .hm-1 { background: rgba(16, 185, 129, 0.25); }
.heatmap .hm-2 { background: rgba(16, 185, 129, 0.50); }
.heatmap .hm-3 { background: rgba(16, 185, 129, 0.75); }
.heatmap .hm-4 { background: #10b981; }

body.light .heatmap .hm-0 { background: rgba(0, 0, 0, 0.06); }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.heatmap-legend i.hm {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

/* Period compare */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cmp-cell {
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.cmp-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.cmp-cur {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--txt);
}

.cmp-cur small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.cmp-prev {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.cmp-delta {
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

.cmp-up { color: #10b981; }
.cmp-down { color: #f43f5e; }
.cmp-neutral { color: var(--muted); }

/* Mood */
.mood-card .mood-current {
  margin-bottom: 14px;
  min-height: 38px;
}

.mood-card .mood-display {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mood-card .mood-emoji {
  font-size: 1.8rem;
}

.mood-card .mood-score {
  font-weight: 600;
  font-size: 0.95rem;
}

.mood-card .mood-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.mood-card .mood-picker {
  display: flex;
  gap: 6px;
}

.mood-card .mood-picker button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
  color: var(--txt);
  font-family: inherit;
}

.mood-card .mood-picker button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.mood-card .mood-picker button.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.5);
}

.mood-card .mood-picker button span {
  font-size: 1.4rem;
  line-height: 1;
}

.mood-card .mood-picker button small {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ==== Доступность: системная настройка «уменьшить движение» ==== */
/* Анимации и переходы выключаются целиком, чтобы не провоцировать
   головокружение и тошноту у пользователей с чувствительностью к движению. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Индикатор загрузки оставляем, но замедляем: он сообщает о работе,
     а не украшает интерфейс. Без него непонятно, что запрос выполняется. */
  .mini-btn.spin svg {
    animation-duration: 1.4s !important;
    animation-iteration-count: infinite !important;
  }
}
