/* ============================================================
   DREAMERS ASSISTANT — v2: новое меню, «Сегодня», «Тренировки»,
   «Цели», «Ещё», единый опрос здоровья, карточка контента
   Подключается последним и только дополняет style.css.
   ============================================================ */

:root { --muted2: #9fb0c2; --nav-inactive: #8597ab; --v2-r: 20px; }

/* ---------- нижнее меню: 5 вкладок с иконками ---------- */
.app-nav .nav-btn { gap: 3px; color: var(--nav-inactive); }
.nav-ic { display: grid; place-items: center; width: 46px; height: 30px; border-radius: 12px; transition: background .18s; pointer-events: none; }
.nav-ic svg { width: 23px; height: 23px; }
.app-nav .nav-label { font-size: 10.5px; font-weight: 700; }
.app-nav .nav-btn.active { color: var(--accent-light); }
.app-nav .nav-btn.active .nav-ic { background: var(--accent-soft); }
html[data-theme="light"] .app-nav .nav-btn { color: #6b7c8f; }

/* ---------- общие элементы ---------- */
.v2-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.v2-titlebar h2 { margin: 0; }
.v2-icons { display: flex; gap: 8px; }
.v2-icon-btn { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: grid; place-items: center; padding: 0; }
.v2-icon-btn:active { transform: scale(.94); }
.v2-pill-btn { height: 42px; padding: 0 16px; border-radius: 13px; border: 0; background: var(--accent); color: #0d131c; font-size: 14.5px; font-weight: 800; }
.v2-pill-btn:active { transform: scale(.97); }
.v2-back { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 8px; margin: -4px 0 10px -4px; border: 0; border-radius: 11px; background: none; color: var(--accent-light); font-size: 15px; font-weight: 700; }
.v2-back:active { background: var(--card); }
.v2-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--v2-r); padding: 16px; margin-bottom: 12px; }
.v2-card-t { font-size: 16px; font-weight: 750; margin-bottom: 4px; }
.v2-muted { font-size: 13px; color: var(--muted2); line-height: 1.45; }
.v2-h3 { font-size: 17px; font-weight: 750; margin: 18px 0 10px; }
.v2-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted2); }
.v2-btn { height: 46px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--accent); color: #0d131c; font-size: 15px; font-weight: 800; width: 100%; }
.v2-btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--border); font-weight: 700; }
.v2-btn.blue { background: var(--blue); }
.v2-btn.gold { background: var(--gold); }
.v2-btn.fire { background: var(--fire); }
.v2-btn:disabled { opacity: .5; }
.v2-btn:active:not(:disabled) { transform: scale(.98); }
.v2-row2 { display: flex; gap: 8px; }
.v2-row2 > * { flex: 1; }
.v2-link { background: none; border: 0; padding: 4px 0; color: var(--accent-light); font-size: 14px; font-weight: 700; }
.v2-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; background: var(--card2); color: #c4d0dc; font-size: 12px; font-weight: 650; }
.v2-chip.green { background: var(--accent-soft); color: var(--accent-light); }
.v2-chip.orange { background: var(--fire-soft); color: var(--fire); }
.v2-chip.red { background: var(--danger-soft); color: #ff8a8e; }
.v2-chip.blue { background: var(--blue-soft); color: var(--blue); }
.v2-chip.gold { background: var(--gold-soft); color: var(--gold); }
.v2-empty { padding: 14px 4px; color: var(--muted2); font-size: 14px; line-height: 1.5; }
.v2-bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.v2-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.v2-err { color: #ff8a8e; font-size: 13.5px; margin-top: 8px; }
.v2-ok { background: var(--accent-soft); color: var(--accent-light); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 650; margin-top: 10px; }

/* ---------- сегментированный переключатель ---------- */
.v2-seg, .tabs.v2-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); margin-bottom: 14px; overflow: visible; }
.v2-seg .tab-btn, .v2-seg button { height: 40px; border-radius: 10px; border: 0; background: none; color: #c4d0dc; font-size: 14.5px; font-weight: 650; margin: 0; padding: 0; white-space: nowrap; }
.v2-seg .tab-btn.active, .v2-seg button.active { background: var(--accent); color: #0d131c; font-weight: 800; box-shadow: none; }
.v2-seg.orange button.active { background: var(--fire); }
.v2-seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.v2-seg3 button { height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: var(--card2); color: var(--text); font-size: 14px; font-weight: 650; }
.v2-seg3 button.active { background: var(--fire); color: #0d131c; border-color: transparent; font-weight: 800; }

/* ---------- «Сегодня» ---------- */
.v2-hello { margin: 2px 0 14px; }
.v2-date { font-size: 14px; color: var(--muted2); margin-bottom: 2px; }
.v2-hello .home-hi { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.v2-hello .home-streak { font-size: 14px; font-weight: 700; color: var(--fire); margin-top: 4px; }
.hd-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--v2-r); padding: 16px; margin-bottom: 12px; }
.hd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.hd-head b { font-size: 16px; font-weight: 750; }
.hd-head span { font-size: 13px; color: var(--muted2); font-weight: 650; }
.hd-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.hd-item:first-of-type { border-top: 0; }
.hd-check { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid #5b6c80; background: none; padding: 0; display: grid; place-items: center; color: #0d131c; }
.hd-check.on { background: var(--accent); border-color: var(--accent); }
.hd-check.on::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid #0d131c; border-bottom: 2.5px solid #0d131c; transform: rotate(-45deg) translate(1px, -1px); }
.hd-body { flex: 1; min-width: 0; }
.hd-title { font-size: 15px; font-weight: 650; line-height: 1.35; }
.hd-item.done .hd-title { color: var(--muted2); text-decoration: line-through; }
.hd-meta { font-size: 12.5px; color: var(--muted2); margin-top: 1px; }
.hd-time { font-size: 13px; font-weight: 750; color: var(--muted2); flex: none; }
.hd-go { flex: none; height: 32px; padding: 0 11px; border-radius: 10px; border: 0; background: var(--fire-soft); color: var(--fire); font-size: 13px; font-weight: 750; }
.hd-overdue { display: flex; align-items: center; gap: 10px; background: var(--danger-soft); border: 1px solid rgba(229,72,77,.35); color: #ff8a8e; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 650; margin-bottom: 10px; width: 100%; text-align: left; }
.hd-overdue b { color: #ffb3b5; }
.hd-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.hd-add { display: flex; gap: 8px; margin-top: 10px; }
.hd-add input { flex: 1; margin: 0; }
.hd-add button { flex: none; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--card2); color: var(--accent-light); font-weight: 800; font-size: 20px; }

.hw-row { display: flex; align-items: center; gap: 12px; }
.hw-val { font-size: 22px; font-weight: 800; color: var(--blue); }
.hw-val small { font-size: 13.5px; color: var(--muted2); font-weight: 650; }
.hw-cups { display: flex; gap: 4px; flex: 1; min-width: 0; }
.hw-cups i { flex: 1; height: 26px; border-radius: 7px; background: var(--card2); max-width: 26px; }
.hw-cups i.on { background: var(--blue); }
.hw-plus { flex: none; height: 46px; padding: 0 14px; border-radius: 13px; border: 0; background: var(--blue); color: #0d131c; font-size: 15px; font-weight: 800; }

.hh-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.hh-row:first-of-type { border-top: 0; }
.hh-streak { font-size: 13px; font-weight: 750; color: var(--fire); flex: none; }

.hr-tile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--v2-r); padding: 14px 16px; margin-bottom: 12px; color: var(--text); }
.hr-tile svg { width: 30px; height: 30px; flex: none; }
.hr-tile b { display: block; font-size: 15.5px; }
.hr-tile span { display: block; font-size: 13px; color: var(--muted2); margin-top: 2px; }
.hr-tile i { margin-left: auto; font-style: normal; color: var(--nav-inactive); font-size: 22px; }
#page-home .today-plan-btn { margin-bottom: 12px; }

/* ---------- «Ещё» ---------- */
.v2-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.v2-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 118px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--v2-r); padding: 16px; color: var(--text); }
.v2-tile svg { width: 28px; height: 28px; margin-bottom: 4px; }
.v2-tile b { font-size: 15.5px; font-weight: 750; }
.v2-tile span { font-size: 12.5px; color: var(--muted2); line-height: 1.35; }
.v2-tile:active { transform: scale(.98); }
.v2-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--v2-r); overflow: hidden; }
.v2-row { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 16px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font-size: 15px; font-weight: 650; text-align: left; }
.v2-row:first-child { border-top: 0; }
.v2-row i { font-style: normal; color: var(--nav-inactive); font-size: 20px; }
.v2-role { margin-bottom: 12px; }

/* ---------- «Планы»: шапка и полоска недели ---------- */
#page-plans .ps-header { margin-bottom: 12px; }
#page-plans .ps-more-panel { margin-bottom: 12px; }
.pw-wrap { margin: 4px 0 14px; }
.pw-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pw-head b { font-size: 14px; font-weight: 750; text-transform: capitalize; }
.pw-nav { display: flex; gap: 6px; }
.pw-nav button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 16px; padding: 0; }
.pw-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.pw-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); }
.pw-day small { font-size: 11px; color: var(--muted2); font-weight: 650; text-transform: lowercase; }
.pw-day b { font-size: 16.5px; font-weight: 800; }
.pw-day i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.pw-day i.has { background: var(--accent); }
.pw-day i.all { background: var(--nav-inactive); }
.pw-day.today b { color: var(--accent-light); }
.pw-day.sel { background: var(--accent); border-color: var(--accent); color: #0d131c; }
.pw-day.sel small, .pw-day.sel b { color: #0d131c; }
.pw-day.sel i.has, .pw-day.sel i.all { background: #0d131c; }

/* ---------- «Тренировки» ---------- */
.tr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tr-stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.tr-stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.tr-stat span { display: block; font-size: 11.5px; color: var(--muted2); margin-top: 2px; line-height: 1.3; }
.tr-stat .up { color: var(--accent-light); font-weight: 750; }
.tr-stat .down { color: #ff8a8e; font-weight: 750; }
.tr-w { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 13px 14px; margin-bottom: 8px; color: var(--text); }
.tr-w.today { border-color: rgba(255,159,67,.45); }
.tr-w-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--fire-soft); color: var(--fire); display: grid; place-items: center; }
.tr-w-ic svg { width: 22px; height: 22px; }
.tr-w-b { flex: 1; min-width: 0; }
.tr-w-t { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-w-m { font-size: 12.5px; color: var(--muted2); margin-top: 2px; }
.tr-w-r { flex: none; text-align: right; font-size: 13px; font-weight: 750; color: var(--muted2); }
.tr-w-r b { display: block; font-size: 15px; color: var(--text); }
.tr-rec { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.tr-rec:first-of-type { border-top: 0; }
.tr-rec-ic { width: 30px; height: 30px; flex: none; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.tr-rec-b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 650; }
.tr-rec-b small { display: block; font-size: 12px; color: var(--muted2); font-weight: 500; }
.tr-rec-v { font-size: 14px; font-weight: 800; color: var(--gold); flex: none; }
.tr-tpl { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.tr-tpl button { flex: none; max-width: 230px; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 11px 13px; color: var(--text); }
.tr-tpl b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-tpl span { display: block; font-size: 12px; color: var(--muted2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-new { display: flex; gap: 8px; margin-bottom: 14px; }
.tr-new input { flex: 1; margin: 0; }
.tr-new button { flex: none; width: auto; padding: 0 16px; }

.tc-client { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; color: var(--text); }
.tc-client.sel { border-color: var(--fire); }
.tc-ava { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--card2); display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--fire); }
.tc-b { flex: 1; min-width: 0; }
.tc-n { font-size: 15.5px; font-weight: 700; }
.tc-m { font-size: 12.5px; color: var(--muted2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-st { flex: none; }
.tp-ex { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.tp-ex-h { display: flex; gap: 8px; align-items: center; }
.tp-ex-h input { flex: 1; margin: 0; font-weight: 700; }
.tp-ex-del { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: #ff8a8e; padding: 0; font-size: 15px; }
.tp-ex-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.tp-ex-g label { font-size: 11px; color: var(--muted2); font-weight: 700; display: flex; flex-direction: column; gap: 3px; }
.tp-ex-g input { margin: 0; text-align: center; padding: 9px 4px; }
.tp-form .text-input { margin-bottom: 8px; }
.tp-dt { display: flex; gap: 8px; }
.tp-dt input { flex: 1; min-width: 0; }
.tp-ai { display: flex; gap: 8px; margin: 4px 0 12px; }
.tp-ai input { flex: 1; margin: 0; }
.tp-ai button { flex: none; width: auto; padding: 0 14px; }
.tp-sent { background: var(--accent-soft); border: 1px solid rgba(47,191,113,.35); border-radius: 16px; padding: 14px; margin-bottom: 12px; font-size: 14.5px; line-height: 1.5; }
.tp-warn { background: var(--gold-soft); border: 1px solid rgba(232,194,104,.35); border-radius: 14px; padding: 12px; font-size: 13.5px; line-height: 1.45; margin-bottom: 10px; }
.tp-prog { border-top: 1px solid var(--border); padding: 10px 0; }
.tp-prog:first-of-type { border-top: 0; }
.tp-prog-t { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 700; }
.tp-prog-e { font-size: 12.5px; color: var(--muted2); margin-top: 3px; line-height: 1.45; }

/* ---------- экран тренировки: тоннаж, рекорды ---------- */
.wo-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.wo-sum div { background: var(--card2); border-radius: 12px; padding: 8px 10px; }
.wo-sum b { display: block; font-size: 16px; font-weight: 800; }
.wo-sum span { display: block; font-size: 10.5px; color: var(--muted2); font-weight: 700; }
.wo-sum .up { color: var(--accent-light); }
.wo-sum .down { color: #ff8a8e; }
.wo-cmp { font-size: 12.5px; color: var(--muted2); margin-top: 6px; line-height: 1.45; }
.wo-cmp b { color: var(--text); }
.wo-cmp .up { color: var(--accent-light); font-weight: 750; }
.wo-pr { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); font-size: 11px; font-weight: 800; vertical-align: middle; }
.wo-plus { width: 34px; height: 34px; flex: none; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--accent-light); font-size: 17px; font-weight: 800; line-height: 1; padding: 0; }
.wo-rest { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.wo-rest button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; font-weight: 700; }
.wo-rest b { font-size: 15px; color: var(--fire); min-width: 48px; }

/* ---------- «Цели» ---------- */
.gl-main { background: var(--card); border: 1px solid rgba(47,191,113,.35); border-radius: 22px; padding: 18px; margin-bottom: 12px; }
.gl-main-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gl-kick { font-size: 11.5px; font-weight: 800; color: var(--accent); letter-spacing: .07em; }
.gl-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin-top: 4px; }
.gl-sub { font-size: 13px; color: var(--muted2); margin-top: 4px; }
.gl-pct { font-size: 30px; font-weight: 800; color: var(--accent); flex: none; }
.gl-main .v2-bar { height: 10px; margin: 14px 0 12px; }
.gl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gl-next { background: var(--card2); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.gl-next .v2-kicker { font-size: 11px; }
.gl-next div:last-child { font-size: 15px; font-weight: 650; margin-top: 3px; }
.gl-coach { background: var(--card); border: 1px solid rgba(232,194,104,.3); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.gl-coach-h { font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.gl-coach-t { font-size: 14.5px; line-height: 1.55; }
.gl-coach button.v2-link { color: var(--gold); margin-top: 6px; }
.gl-mini { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-bottom: 8px; color: var(--text); }
.gl-mini-b { flex: 1; min-width: 0; }
.gl-mini-t { font-size: 15px; font-weight: 700; margin-bottom: 7px; }
.gl-mini .v2-bar { height: 6px; }
.gl-mini .v2-bar i { background: var(--blue); }
.gl-mini-p { font-size: 16px; font-weight: 800; color: var(--blue); flex: none; }
.gl-main .goal-step-row, .gl-main .goal-step { background: transparent; }
.gl-tools { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- «Здоровье»: единый опрос ---------- */
.hc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hc-ring { width: 74px; height: 74px; flex: none; border-radius: 50%; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--ring-c, var(--accent)) calc(var(--p, 0) * 1%), var(--card2) 0); }
.hc-ring > div { width: 60px; height: 60px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; align-content: center; }
.hc-ring b { font-size: 21px; font-weight: 800; line-height: 1; }
.hc-ring span { font-size: 10px; color: var(--muted2); }
.hc-status { font-size: 14px; line-height: 1.45; color: #c4d0dc; }
.hc-status b { color: var(--text); }
.hc-water .hw-cups i { height: 38px; max-width: none; border-radius: 10px; }
.hc-q { margin-top: 14px; }
.hc-q-l { display: flex; justify-content: space-between; font-size: 14px; color: #c4d0dc; margin-bottom: 7px; font-weight: 600; }
.hc-q-l span { color: var(--muted2); font-weight: 500; font-size: 12.5px; }
.hc-opts { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 5px; }
.hc-opts button { min-height: 40px; padding: 4px 2px; border-radius: 11px; border: 0; background: var(--card2); color: #c4d0dc; font-size: 12.5px; font-weight: 650; line-height: 1.15; }
.hc-opts button.on { background: var(--accent); color: #0d131c; font-weight: 800; }
.hc-opts.warn button.on { background: var(--fire); }
.hc-hours { display: flex; gap: 5px; flex-wrap: wrap; }
.hc-hours button { flex: 1 0 13%; min-height: 38px; border-radius: 11px; border: 0; background: var(--card2); color: #c4d0dc; font-size: 13.5px; font-weight: 700; }
.hc-hours button.on { background: #8b7cf6; color: #0d131c; }
.hc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-chips button { padding: 9px 12px; border-radius: 99px; border: 1px solid transparent; background: var(--card2); color: #c4d0dc; font-size: 13px; font-weight: 600; }
.hc-chips button.on { background: rgba(229,72,77,.16); border-color: rgba(229,72,77,.5); color: #ff8a8e; font-weight: 750; }
.hc-chips button.add { background: none; border: 1px dashed rgba(255,255,255,.25); color: var(--muted2); }
.hc-custom { display: flex; gap: 8px; margin-top: 8px; }
.hc-custom input { flex: 1; margin: 0; }
.hc-custom button { flex: none; width: auto; padding: 0 14px; height: 46px; }
.hc-more summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--accent-light); padding: 12px 0 2px; }
.hc-more summary::-webkit-details-marker { display: none; }
.hc-more .hc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.hc-more .hc-grid label { font-size: 12px; color: var(--muted2); font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.hc-more .hc-grid input { margin: 0; }
.hc-factors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hc-factors button { padding: 8px 11px; border-radius: 99px; border: 0; background: var(--card2); color: #c4d0dc; font-size: 12.5px; }
.hc-factors button.on { background: var(--blue-soft); color: var(--blue); font-weight: 750; }
.hc-save { margin-top: 16px; height: 52px; font-size: 16px; }
.hc-ai { background: var(--card); border: 1px solid rgba(232,194,104,.3); border-radius: var(--v2-r); padding: 16px; margin-bottom: 12px; }
.hc-ai-h { font-size: 13px; font-weight: 800; color: var(--gold); margin-bottom: 8px; display: flex; justify-content: space-between; }
.hc-ai-t { font-size: 15px; line-height: 1.6; }
.hc-ai-t b { display: inline-block; margin-top: 4px; color: var(--text); }
.hc-doc { background: rgba(229,72,77,.1); border: 1px solid rgba(229,72,77,.35); border-radius: 14px; padding: 12px; margin-top: 12px; }
.hc-doc-t { font-size: 14px; font-weight: 750; color: #ff8a8e; }
.hc-doc-d { font-size: 14px; line-height: 1.5; margin-top: 4px; }
.hc-red { background: var(--danger); color: #fff; border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 650; line-height: 1.45; margin-bottom: 12px; }
.hc-note { font-size: 12px; color: var(--muted2); margin-top: 10px; line-height: 1.45; }
.hc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.hc-metrics div { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.hc-metrics b { display: block; font-size: 16px; font-weight: 800; }
.hc-metrics span { font-size: 11px; color: var(--muted2); font-weight: 650; }

/* ---------- «Контент»: крупная карточка ---------- */
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ct-chips button { padding: 9px 13px; border-radius: 99px; border: 1px solid transparent; background: var(--card2); color: #c4d0dc; font-size: 13.5px; font-weight: 600; }
.ct-chips button.on { background: var(--gold-soft); border-color: rgba(232,194,104,.5); color: var(--gold); font-weight: 750; }
.ct-label { font-size: 12px; font-weight: 800; color: var(--muted2); letter-spacing: .07em; text-transform: uppercase; margin: 12px 0 7px; }
.ct-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); margin: 14px 0 12px; }
.ct-tabs button { height: 40px; border-radius: 10px; border: 0; background: none; color: #c4d0dc; font-size: 14px; font-weight: 650; }
.ct-tabs button.on { background: var(--gold); color: #0d131c; font-weight: 800; }
.ct-card { background: var(--card); border: 1px solid rgba(255,255,255,.09); border-radius: 22px; padding: 20px; margin-bottom: 12px; user-select: text; -webkit-user-select: text; }
.ct-sec + .ct-sec { border-top: 1px solid rgba(255,255,255,.08); margin-top: 18px; padding-top: 18px; }
.ct-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.ct-sec-h span { font-size: 12px; font-weight: 800; color: var(--muted2); letter-spacing: .08em; }
.ct-sec-h span.gold { color: var(--gold); }
.ct-copy { height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: none; color: #c4d0dc; font-size: 12.5px; font-weight: 650; flex: none; }
.ct-copy.ok { color: var(--accent-light); border-color: rgba(47,191,113,.45); }
.ct-hook { font-size: 23px; font-weight: 800; line-height: 1.32; letter-spacing: -.01em; }
.ct-scene { display: flex; gap: 12px; margin-top: 10px; }
.ct-scene:first-of-type { margin-top: 0; }
.ct-scene b { width: 58px; flex: none; font-size: 13px; color: var(--gold); font-weight: 750; padding-top: 2px; }
.ct-scene span { font-size: 15.5px; line-height: 1.55; }
.ct-cap { font-size: 15.5px; line-height: 1.6; white-space: pre-line; }
.ct-cta { font-size: 14.5px; font-weight: 700; margin-top: 8px; }
.ct-tags { font-size: 14px; color: var(--blue); margin-top: 8px; word-break: break-word; }
.ct-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.ct-acts button { height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: var(--card); color: var(--text); font-size: 14px; font-weight: 650; }
.ct-acts button:disabled { opacity: .5; }
.ct-style { margin-bottom: 12px; }
.ct-style textarea { min-height: 110px; }
.ct-loading { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 26px 20px; text-align: center; color: var(--muted2); font-size: 14.5px; margin-bottom: 12px; }
.ct-loading .bs-spin { margin: 0 auto 12px; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--gold); border-radius: 50%; animation: bsSpin .8s linear infinite; }
@keyframes bsSpin { to { transform: rotate(360deg); } }

@media (max-width: 360px) {
  .ct-hook { font-size: 21px; }
  .hc-opts button { font-size: 11.5px; }
  .tr-stat b { font-size: 17px; }
}

/* фиксы поверх style.css */
#page-plans .ps-header.v2-titlebar { justify-content: space-between; }
#page-plans .ps-header.v2-titlebar h2 { display: block; flex: 1; }
input, textarea, select, button { font-family: inherit; }
#page-plans .ps-input { min-height: 52px; font-size: 15px; }
#workoutOverlay .wo-head { align-items: flex-start; }
#workoutOverlay .wo-back { margin-top: 4px; }
.tr-routine { align-items: center; }
.tr-go { flex: none; height: 34px; padding: 0 12px; border-radius: 11px; background: var(--fire); color: #0d131c; font-size: 13px; font-weight: 800; display: grid; place-items: center; }
#page-plans .ps-row { align-items: center; }
#page-plans .ps-wo { margin-left: 6px; }
.wo-mv { width: 32px; height: 32px; flex: none; border-radius: 9px; border: 1px solid var(--border); background: var(--card2); color: var(--text); font-size: 15px; font-weight: 800; padding: 0; line-height: 1; }
.wo-mv:disabled { opacity: .3; }
.wo-mv:active:not(:disabled) { transform: scale(.92); }
.wo-delall { margin: 8px auto 0; display: block; background: none; border: 0; color: #ff8a8e; font-size: 14px; font-weight: 700; padding: 10px 14px; }
.tr-routine-wrap { display: flex; align-items: stretch; gap: 6px; margin-bottom: 8px; }
.tr-routine-wrap .tr-w { margin-bottom: 0; flex: 1; min-width: 0; }
.tr-x { flex: none; width: 40px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); color: var(--nav-inactive); font-size: 16px; padding: 0; }
.tr-x:active { color: #ff8a8e; }
.tp-mv { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 0; font-weight: 800; }
.tp-mv:disabled { opacity: .3; }
