/* ===== Samorazvitie — приложение ===== */

body.app-body { background: radial-gradient(1200px 600px at 50% -200px, #14233c 0%, var(--bg) 55%); }

.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 110px;
}

/* Хедер */
.app-header {
  position: sticky; top: 0; z-index: 40;
  margin: 0 -16px 8px;
  padding: 14px 16px 10px;
  background: linear-gradient(to bottom, rgba(13,20,33,0.96) 70%, rgba(13,20,33,0));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.app-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.app-header .brand img { width: 30px; height: 30px; border-radius: 8px; }
.app-header .date { color: var(--muted); font-size: 13px; }

/* Нижняя навигация */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(13,20,33,0.98) 60%, rgba(13,20,33,0));
}
.bottom-nav .nav-inner {
  display: flex; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 62px; padding: 7px 4px;
  background: none; border: none; border-radius: 16px;
  color: var(--muted); font-size: 10.5px; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.nav-btn .ic { font-size: 19px; line-height: 1; }
.nav-btn.active { background: var(--accent-soft); color: var(--accent); }
.nav-btn:hover { color: var(--text); }

/* Экраны */
.screen { display: none; animation: screenIn 0.2s ease; }
.screen.active { display: block; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen-title { font-size: 21px; font-weight: 700; margin: 10px 0 4px; }
.screen-sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.section { margin-top: 22px; }
.section > h4 {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 10px 4px;
}

/* Приветствие */
.hero-greet { margin: 14px 2px 6px; }
.hero-greet h2 { font-size: 24px; font-weight: 700; line-height: 1.25; }
.hero-greet p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Виджет доверия */
.trust-widget { display: flex; align-items: center; gap: 16px; }
.trust-coin {
  flex: 0 0 auto;
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(52,211,153,0.18), rgba(45,212,191,0.08));
  border: 1.5px solid rgba(52,211,153,0.45);
}
.trust-coin .num { font-size: 24px; font-weight: 800; color: var(--accent); line-height: 1; }
.trust-coin .lbl { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
.trust-info { flex: 1; min-width: 0; }
.trust-info .level { font-weight: 700; font-size: 15.5px; }
.trust-info .note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.trust-bar { height: 6px; background: rgba(255,255,255,0.07); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.trust-bar > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s ease; }

/* Стрик */
.streak-row { display: flex; gap: 10px; margin-top: 12px; }
.streak-chip {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.streak-chip .big { font-size: 18px; font-weight: 800; }
.streak-chip .cap { color: var(--muted); font-size: 11.5px; line-height: 1.3; }

/* Обещания */
.promise-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 10px;
  transition: opacity 0.2s;
}
.promise-item .p-check {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); background: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: transparent; transition: all 0.15s;
}
.promise-item.done { opacity: 0.65; }
.promise-item.done .p-check { background: var(--accent); border-color: var(--accent); color: #06281c; }
.promise-item .p-text { flex: 1; font-size: 15px; }
.promise-item.done .p-text { text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.4); }
.promise-item .p-del { background: none; border: none; color: var(--faint); font-size: 16px; padding: 4px; }

.add-row { display: flex; gap: 8px; margin-top: 12px; }
.add-row input {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); padding: 12px 14px; font-size: 15px; outline: none;
}
.add-row input:focus { border-color: rgba(52,211,153,0.5); }
.add-row .btn { padding: 12px 16px; }

/* Анти-цель */
.anti-card { border-color: rgba(251,191,36,0.3); }
.anti-card .anti-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; color: var(--warn); }
.anti-card .anti-text { font-size: 15px; }
.anti-actions { display: flex; gap: 8px; margin-top: 12px; }
.anti-actions .btn { flex: 1; }

/* Кольцо дня */
.day-ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring {
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  background:
    radial-gradient(closest-side, var(--bg-2) 74%, transparent 75% 100%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,0.07) 0);
  transition: --p 0.4s;
}

/* Настроение */
.mood-row { display: flex; gap: 8px; }
.mood-btn {
  flex: 1; aspect-ratio: 1; max-width: 56px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.mood-btn.sel { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.08); }

/* Техники */
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tech-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; text-align: left; color: var(--text);
  display: flex; flex-direction: column; gap: 6px;
  transition: background 0.15s;
}
.tech-card:hover { background: var(--card-hover); }
.tech-card .t-ic { font-size: 22px; }
.tech-card .t-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.tech-card .t-short { color: var(--muted); font-size: 11.5px; line-height: 1.35; }

.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.cat-tab {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.cat-tab.active { background: var(--accent-soft); border-color: rgba(52,211,153,0.4); color: var(--accent); }

/* Плеер техники */
.player-phase {
  height: 200px; border-radius: 20px; margin: 14px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(160deg, rgba(52,211,153,0.1), rgba(45,212,191,0.04));
  border: 1px solid rgba(52,211,153,0.25);
}
.player-phase .ph-label { font-size: 16px; font-weight: 700; }
.player-phase .ph-count { font-size: 44px; font-weight: 800; color: var(--accent); line-height: 1; }
.player-phase .ph-cycle { color: var(--muted); font-size: 12.5px; }
.player-phase.hold { background: linear-gradient(160deg, rgba(251,191,36,0.1), rgba(251,191,36,0.03)); border-color: rgba(251,191,36,0.3); }
.player-phase.hold .ph-count { color: var(--warn); }
.breath-circle { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, rgba(52,211,153,0.5), rgba(52,211,153,0.1)); transition: transform 3s ease; }
.breath-circle.big { transform: scale(1.35); }

/* Шаги */
.step-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border-radius: 14px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line);
}
.step-row .s-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800;
}
.step-row.done { opacity: 0.55; }
.step-row.done .s-text { text-decoration: line-through; }
.step-row .s-text { flex: 1; font-size: 14.5px; cursor: pointer; }
.step-row .s-num.done { background: var(--accent); color: #06281c; }

/* Вопросы */
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.q-card .q-title { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.q-card .q-hint { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.q-card textarea, .q-card input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); padding: 11px 13px; font-size: 14.5px; outline: none; resize: vertical;
}
.q-card textarea:focus, .q-card input:focus { border-color: rgba(52,211,153,0.5); }

/* Минута */
.minute-wrap { text-align: center; padding: 30px 0 10px; }
.minute-wrap .m-big { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.minute-wrap .m-sub { color: var(--muted); font-size: 14px; max-width: 300px; margin: 0 auto 20px; }
.minute-result { font-size: 15px; margin: 18px 0; line-height: 1.6; }
.minute-result .verdict { font-weight: 800; font-size: 17px; }

/* Усталость */
.fatigue-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.fatigue-btn {
  padding: 12px 6px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--text); font-size: 11.5px; font-weight: 600; text-align: center;
}
.fatigue-btn .f-ic { font-size: 21px; }
.fatigue-btn.sel { border-color: var(--accent); background: var(--accent-soft); }
.recovery-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.recovery-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; text-align: left; color: var(--text); width: 100%;
}
.recovery-item:active { background: var(--card-hover); }

/* Гормоны */
.hormone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.hormone-card {
  padding: 14px; border-radius: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
}
.hormone-card .h-name { font-weight: 700; margin-top: 6px; }
.hormone-card .h-hint { color: var(--muted); font-size: 11.5px; }
.hormone-card .h-ic { font-size: 22px; }
.hormone-card.sel { border-color: var(--accent); background: var(--accent-soft); }

/* База механизмов */
.mech-card { margin-bottom: 12px; }
.mech-card .m-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mech-card .m-name { font-weight: 700; font-size: 15.5px; }
.mech-card .m-author { color: var(--faint); font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
.mech-card .m-essence { color: var(--muted); font-size: 13.5px; margin: 8px 0 10px; }
.mech-card .m-detail { display: none; border-top: 1px solid var(--line); padding-top: 10px; font-size: 13.5px; color: var(--muted); }
.mech-card.open .m-detail { display: block; }
.mech-card .m-more { background: none; border: none; color: var(--accent); font-size: 13px; font-weight: 600; padding: 0; }
.mech-search {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); padding: 12px 14px; font-size: 15px; outline: none; margin-bottom: 14px;
}

/* Прогресс */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0; }
.stat-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat-box .v { font-size: 20px; font-weight: 800; color: var(--accent); }
.stat-box .c { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.3; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-top: 12px; }
.spark > div { flex: 1; border-radius: 3px 3px 0 0; background: rgba(255,255,255,0.1); min-height: 3px; }
.spark > div.good { background: linear-gradient(to top, var(--accent), var(--accent-2)); }
.spark > div.bad { background: rgba(248,113,113,0.5); }
.spark-surveys { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-top: 8px; }
.spark-surveys > div { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.spark-surveys .s-dot { width: 7px; border-radius: 99px; background: linear-gradient(to top, var(--accent-2), var(--accent)); min-height: 4px; opacity: 0.9; }
.spark-legend { color: var(--muted); font-size: 11.5px; margin-top: 7px; }
.ev-list { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.ev-title { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.ev-item { font-size: 12.5px; color: var(--muted); background: rgba(52,211,153,0.06); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.weak-card { border-color: rgba(251,191,36,0.35); }
.weak-card .w-head { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.weak-card .w-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; line-height: 1.45; }
.survey-trend { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: 4px; }
.survey-trend .st-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.survey-trend .st-col > div { width: 100%; max-width: 14px; border-radius: 4px 4px 0 0; background: linear-gradient(to top, var(--accent-2), var(--accent)); min-height: 3px; }
.survey-trend .st-val { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.att-row { font-size: 13px; color: var(--text); padding: 7px 0; border-top: 1px solid var(--line); }
.att-row:first-of-type { border-top: none; }
.att-row .att-date { color: var(--muted); font-size: 11.5px; margin-right: 8px; }
.tour-icon { font-size: 44px; margin: 6px 0 10px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 18px 0 12px; cursor: pointer; }
.consent-row input, .onboard .consent-row input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 1px 0 0; padding: 0; background: transparent; border: none; border-radius: 0; accent-color: var(--accent); }
.consent-row span { line-height: 1.45; }

.ex-insight { border-left: 3px solid var(--warn); padding: 10px 14px; background: rgba(251,191,36,0.06); border-radius: 0 12px 12px 0; margin-bottom: 10px; font-size: 13.5px; color: var(--muted); }
.ex-insight b { color: var(--text); }

.rep-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.rep-item .r-info { flex: 1; min-width: 0; }
.rep-item .r-name { font-weight: 700; font-size: 14.5px; }
.rep-item .r-progress { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rep-item .r-bar { height: 5px; background: rgba(255,255,255,0.08); border-radius: 99px; margin-top: 7px; overflow: hidden; }
.rep-item .r-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rep-item .r-plus {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06281c; font-size: 22px; font-weight: 800;
}

/* Список выбора (отговорки, удовольствия) */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; color: var(--text); font-size: 14.5px;
}
.pick-item:active, .pick-item:hover { background: var(--card-hover); }
.pick-item .pk-ic { font-size: 20px; }
.pick-item.sel { border-color: var(--accent); background: var(--accent-soft); }

/* Итоги дня (финал вечернего чекина) */
.summary-hero { text-align: center; padding: 10px 0 4px; }
.summary-hero .sh-emoji { font-size: 46px; }
.summary-hero .sh-title { font-size: 20px; font-weight: 800; margin-top: 8px; }
.summary-hero .sh-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.coin-fly { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; background: var(--accent-soft); border: 1px solid rgba(52,211,153,0.4); border-radius: 14px; padding: 10px 18px; font-weight: 800; color: var(--accent); font-size: 17px; }

/* Лотерея */
.lottery-reveal {
  margin-top: 14px; padding: 18px; border-radius: 18px; text-align: center;
  background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.03));
  border: 1px solid rgba(251,191,36,0.4);
  animation: fadeIn 0.3s ease;
}
.lottery-reveal .lr-ic { font-size: 40px; }
.lottery-reveal .lr-name { font-weight: 800; font-size: 17px; margin-top: 6px; color: var(--warn); }
.lottery-reveal .lr-text { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.lottery-reveal .lr-none { color: var(--muted); font-size: 13.5px; padding: 6px 0; }

/* Вечерний чекин шаги */
.checkin-progress { display: flex; gap: 5px; margin: 4px 0 18px; }
.checkin-progress > div { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.09); }
.checkin-progress > div.on { background: var(--accent); }

/* Установить PWA */
.install-banner {
  display: none; align-items: center; gap: 12px;
  margin: 12px 0; padding: 13px 15px;
  background: linear-gradient(135deg, rgba(52,211,153,0.12), rgba(45,212,191,0.05));
  border: 1px solid rgba(52,211,153,0.35); border-radius: 16px;
}
.install-banner.show { display: flex; }
.install-banner .ib-text { flex: 1; font-size: 13.5px; }
.install-banner .ib-text b { display: block; font-size: 14px; margin-bottom: 2px; }
.install-banner .ib-text span { color: var(--muted); }

/* Онбординг */
.onboard { max-width: 420px; margin: 0 auto; padding-top: 8vh; text-align: center; }
.onboard .ob-icon { font-size: 52px; margin-bottom: 10px; }
.onboard h1 { font-size: 26px; margin-bottom: 8px; }
.onboard p { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.onboard input {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); padding: 14px; font-size: 16px; text-align: center; outline: none; margin-bottom: 14px;
}
.onboard input:focus { border-color: rgba(52,211,153,0.5); }
.ob-steps { display: flex; justify-content: center; gap: 6px; margin: 24px 0 14px; }
.ob-steps > div { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.ob-steps > div.on { background: var(--accent); }
.onboard .promise-count { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.onboard .promise-count button {
  width: 52px; height: 52px; border-radius: 16px; font-size: 20px; font-weight: 800;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
}
.onboard .promise-count button.sel { background: var(--accent); border-color: var(--accent); color: #06281c; }

/* Настройки */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .s-label { font-size: 14.5px; }
.set-row .s-label .d { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.set-row input[type="time"] { background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 8px 10px; outline: none; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { display: none; }
.switch .track { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,0.12); transition: background 0.15s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .knob { transform: translateX(20px); }

.empty-note { color: var(--faint); font-size: 13.5px; text-align: center; padding: 18px 10px; }

/* Письмо на разрыв */
.letter-box { position: relative; min-height: 120px; }
.letter-tear { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: 0; pointer-events: none; }
.letter-box.torn textarea { filter: blur(3px); opacity: 0.35; transition: all 0.4s; }
.letter-box.torn .letter-tear { opacity: 1; animation: tearIn 0.5s ease; }
@keyframes tearIn { 0% { transform: scale(0.3) rotate(-20deg); } 70% { transform: scale(1.2) rotate(8deg); } 100% { transform: scale(1); } }

/* Лотерейный спин */
.spin-anim { animation: spinY 0.9s ease; }
@keyframes spinY { 0% { transform: rotateY(0); } 50% { transform: rotateY(360deg) scale(1.15); } 100% { transform: rotateY(720deg); } }

.share-link { font-family: ui-monospace, monospace; font-size: 12px; background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); word-break: break-all; }

/* История дней на «Прогрессе» */
.hist-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; cursor: pointer; }
.hist-card .h-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; }
.hist-card .h-date { font-weight: 700; font-size: 13.5px; }
.hist-card .h-sum { color: var(--muted); font-size: 12.5px; flex: 1; text-align: right; }
.hist-card .h-arrow { color: var(--faint); transition: transform 0.2s; }
.hist-card.open .h-arrow { transform: rotate(180deg); }
.hist-card .h-body { display: none; padding: 2px 14px 12px; border-top: 1px solid var(--line); }
.hist-card.open .h-body { display: block; }
.hist-card .h-line { font-size: 13px; color: var(--text); padding: 4px 0; }
.hist-card .h-line.h-dim { color: var(--faint); }

/* Календарь на «Прогрессе» */
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cal-nav button{background:none;border:1px solid var(--line);color:var(--muted);border-radius:8px;padding:4px 14px;font-size:15px}
.cal-nav button:disabled{opacity:.35}
.cal-title{font-weight:700;font-size:15px}
.cal-week,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-week{margin-bottom:4px}
.cal-week span{text-align:center;font-size:11px;color:var(--faint)}
.cal-cell{position:relative;text-align:center;padding:9px 0;border-radius:8px;font-size:13px}
.cal-empty{visibility:hidden}
.cal-future{color:var(--faint)}
.cal-good{background:rgba(52,211,153,.18)}
.cal-mid{background:rgba(245,158,11,.16)}
.cal-bad{background:rgba(248,113,113,.14)}
.cal-cell[data-cal]{cursor:pointer}
.cal-dot{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);width:4px;height:4px;border-radius:50%;background:var(--accent)}
.cal-stats{margin-top:10px;color:var(--muted);font-size:12.5px}
.cal-stats-dim{color:var(--faint)}
