/* ===== XFIT Health — дизайн-система ===== */
:root {
  --bg: #F3F7F4; --surface: #FFFFFF; --surface2: #F7FAF8; --ink: #11201A; --ink2: #475A50; --ink3: #7F9087; --line: #E2EAE5;
  --brand: #00B050; --brand-d: #008A3E; --brand-l: #E5F7EC; --brand-g: linear-gradient(135deg, #12C45F 0%, #00A04A 55%, #00843B 100%);
  --amber: #F5A623; --amber-d: #C97F00; --amber-l: #FFF3DB; --red: #E5484D; --red-l: #FDECEC; --blue: #3B82F6; --blue-l: #E8F0FE; --violet: #7C5CFA; --violet-l: #EFEAFF;
  --zone-opt: #00B050; --zone-norm: #86D29B; --zone-out: #F5A623; --zone-crit: #E5484D;
  --ring-sleep: #5E8DB8; --ring-plan: #00B050; --ring-index: #2F8FE8;
  --radius: 22px; --radius-s: 14px; --shadow: 0 1px 2px rgba(17,32,26,.04), 0 10px 30px rgba(17,32,26,.07); --shadow-s: 0 1px 2px rgba(17,32,26,.05), 0 3px 10px rgba(17,32,26,.05);
  --nav-h: 68px; --safe-b: env(safe-area-inset-bottom, 0px);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Тёмная тема — графитовая, в духе спортивных трекеров: глубокий фон, мягкое свечение, тонкие линии */
:root[data-theme="dark"] {
  --bg: #0B0F11; --surface: #14191C; --surface2: #1A2024; --ink: #F1F4F3; --ink2: #A7B2AF; --ink3: #74807D; --line: #242C30;
  --brand-d: #3DDC84; --brand-l: #10281B; --amber: #F5B13A; --amber-d: #F5B84A; --amber-l: #2D2410; --red: #FF5A5F; --red-l: #351A1C; --blue: #5EA2FF; --blue-l: #14233B; --violet: #9C84FF; --violet-l: #231E42;
  --zone-norm: #3B6F50;
  --ring-sleep: #8FB4D9; --ring-plan: #1BE36B; --ring-index: #3FA2FF;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px rgba(0,0,0,.45); --shadow-s: 0 1px 0 rgba(255,255,255,.03) inset, 0 4px 14px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 1.25rem; letter-spacing: -.01em; font-weight: 750; }
h3 { font-size: 1.0625rem; font-weight: 700; }
.muted { color: var(--ink2); } .faint { color: var(--ink3); } .small { font-size: 0.875rem; } .tiny { font-size: 0.7812rem; }
.center { text-align: center; } .row { display: flex; align-items: center; gap: 12px; } .col { display: flex; flex-direction: column; gap: 12px; }
.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; } .gap8 { gap: 8px; } .gap4 { gap: 4px; } .gap16 { gap: 16px; }
.hidden { display: none !important; } .nowrap { white-space: nowrap; } .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }

/* ===== Каркас ===== */
#app { min-height: 100dvh; }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.main { width: 100%; max-width: 640px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + var(--safe-b) + 28px); }
.page { animation: pageIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.topbar h1 { font-size: 1.5rem; }
.back { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-s); display: grid; place-items: center; flex: none; }
.back svg { width: 22px; height: 22px; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-s); display: grid; place-items: center; position: relative; flex: none; }
.iconbtn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }

.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding: 6px 8px var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: flex; justify-content: space-around; }
.nav a { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink3); text-decoration: none; font-size: 0.7188rem; font-weight: 600; border-radius: 16px; position: relative; transition: color .2s; }
.nav a svg { width: 26px; height: 26px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.nav a.active { color: var(--brand-d); } .nav a.active svg { transform: translateY(-1px) scale(1.08); }
.nav a .dot { position: absolute; top: 6px; right: calc(50% - 20px); width: 9px; height: 9px; border-radius: 50%; background: var(--amber); border: 2px solid var(--surface); }
.side { display: none; }
.rail { display: none; }
@media (min-width: 1024px) {
  .shell { grid-template-columns: 250px minmax(0, 1fr) 330px; }
  .nav { display: none; }
  .main { padding: 28px 28px 60px; max-width: 760px; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 26px 16px; border-right: 1px solid var(--line); background: var(--surface); }
  .side .logo { margin: 0 8px 22px; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: var(--ink2); text-decoration: none; font-weight: 650; position: relative; }
  .side a svg { width: 22px; height: 22px; } .side a:hover { background: var(--surface2); }
  .side a.active { background: var(--brand-l); color: var(--brand-d); }
  .rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100dvh; overflow: auto; padding: 28px 22px 28px 0; }
  .back-hide-desktop { display: none; }
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.logo i { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-g); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 0.9375rem; font-weight: 900; box-shadow: 0 4px 14px rgba(0,176,80,.35); }

/* ===== Карточки и кнопки ===== */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 18px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tap { transition: transform .15s, box-shadow .15s; cursor: pointer; } .card.tap:active { transform: scale(.985); }
.card + .card, .stack > * + * { margin-top: 14px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.section-title h2 { font-size: 1.1875rem; } .section-title a, .link { color: var(--brand-d); font-weight: 650; text-decoration: none; font-size: 0.9375rem; background: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 1rem; transition: transform .12s, filter .15s, box-shadow .2s; user-select: none; }
.btn:active { transform: scale(.97); } .btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand-g); color: #fff; box-shadow: 0 6px 18px rgba(0,160,74,.32); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.soft { background: var(--brand-l); color: var(--brand-d); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--red-l); color: var(--red); }
.btn.block { width: 100%; } .btn.sm { min-height: 42px; padding: 0 16px; font-size: 0.9062rem; border-radius: 13px; }
.btn.white { background: #fff; color: #0A5F2B; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.btn.glass { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(6px); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 0.8125rem; font-weight: 650; background: var(--surface2); color: var(--ink2); white-space: nowrap; }
.chip.good { background: var(--brand-l); color: var(--brand-d); } .chip.mid { background: var(--amber-l); color: var(--amber-d); } .chip.bad { background: var(--red-l); color: var(--red); } .chip.blue { background: var(--blue-l); color: var(--blue); } .chip.violet { background: var(--violet-l); color: var(--violet); }
.pill-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); }
.pill-tabs button { flex: 1; min-height: 40px; border-radius: 12px; font-weight: 650; color: var(--ink2); font-size: 0.9062rem; transition: background .2s, color .2s; }
.pill-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-s); }

/* ===== Поля ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 0.875rem; font-weight: 650; color: var(--ink2); }
.input, textarea.input, select.input { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1.0625rem; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { padding: 14px 16px; min-height: 92px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0,176,80,.14); }
.input.big { min-height: 66px; font-size: 1.5rem; font-weight: 700; text-align: center; }
.err { color: var(--red); font-size: 0.875rem; font-weight: 600; } .hint { color: var(--ink3); font-size: 0.8438rem; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 54px; height: 54px; border-radius: 16px; background: var(--surface2); border: 1.5px solid var(--line); font-size: 1.625rem; font-weight: 500; display: grid; place-items: center; }
.stepper button:active { background: var(--brand-l); }
.stepper .input { text-align: center; font-weight: 800; font-size: 1.625rem; min-height: 54px; }
.switch { position: relative; width: 54px; height: 32px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.3,1.5,.5,1); }
.switch input:checked + i { background: var(--brand); } .switch input:checked + i::after { transform: translateX(22px); }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 14px; padding: 15px 18px; min-height: 62px; width: 100%; text-align: left; text-decoration: none; color: inherit; }
.list > * + * { border-top: 1px solid var(--line); }
.list .ico { width: 40px; height: 40px; border-radius: 13px; background: var(--brand-l); display: grid; place-items: center; font-size: 1.25rem; flex: none; }

/* ===== Герой «Сегодня» ===== */
.hello h1 { font-size: 1.6875rem; } .hello p { color: var(--ink2); margin-top: 4px; }
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px; color: #fff; box-shadow: 0 14px 34px rgba(0,120,56,.28); background: var(--brand-g); animation: heroIn .5s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; } .hero::after { width: 140px; height: 140px; right: 50px; bottom: -80px; background: rgba(255,255,255,.08); }
.hero.sun { background: linear-gradient(135deg, #F7B733 0%, #F59E0B 40%, #E07B00 100%); box-shadow: 0 14px 34px rgba(224,123,0,.3); }
.hero.calm { background: linear-gradient(135deg, #3C4FA8 0%, #2E3D8C 60%, #202C6B 100%); box-shadow: 0 14px 34px rgba(46,61,140,.34); }
.hero.club { background: linear-gradient(135deg, #0F8F8A 0%, #0B7F7C 50%, #09636A 100%); box-shadow: 0 14px 34px rgba(11,127,124,.3); }
.hero.food { background: linear-gradient(135deg, #FF8A3D 0%, #F26A1B 60%, #D9500B 100%); box-shadow: 0 14px 34px rgba(242,106,27,.3); }
.hero.done { background: linear-gradient(135deg, #12C45F 0%, #00A04A 55%, #00843B 100%); }
.hero .em { width: 58px; height: 58px; border-radius: 19px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 1.9375rem; margin-bottom: 14px; position: relative; z-index: 1; backdrop-filter: blur(4px); }
.hero h2 { font-size: 1.5rem; line-height: 1.2; position: relative; z-index: 1; letter-spacing: -.02em; }
.hero p { margin-top: 6px; opacity: .93; position: relative; z-index: 1; font-size: 1rem; }
.hero .btn { margin-top: 18px; position: relative; z-index: 1; }

/* ===== Огонёк и серия ===== */
.flame { position: relative; width: 64px; height: 76px; flex: none; }
.flame svg { width: 100%; height: 100%; overflow: visible; }
.flame.lit .body { animation: flicker 1.8s ease-in-out infinite; transform-origin: 50% 90%; }
.flame.lit .glow { animation: glow 2.4s ease-in-out infinite; }
.flame.dim { filter: grayscale(.9) opacity(.55); }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(0); } 25% { transform: scale(1.04, .97) rotate(-1.5deg); } 50% { transform: scale(.97, 1.04) rotate(1deg); } 75% { transform: scale(1.03, .98) rotate(-.5deg); } }
@keyframes glow { 0%,100% { opacity: .55; } 50% { opacity: .95; } }
.streak-card { display: flex; align-items: center; gap: 16px; }
.streak-card .num { font-size: 2.5rem; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.7188rem; font-weight: 650; color: var(--ink3); }
.week .d i { width: 100%; max-width: 40px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); font-style: normal; font-size: 0.9375rem; border: 1.5px dashed var(--line); }
.week .d.done i { background: var(--brand); border: 0; color: #fff; animation: pop .4s cubic-bezier(.3,1.7,.5,1) both; }
.week .d.frozen i { background: var(--blue-l); border: 0; color: var(--blue); }
.week .d.today i { border: 2px solid var(--brand); border-style: solid; }
.week .d.today { color: var(--ink); }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
.freezes { display: inline-flex; align-items: center; gap: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .h { text-align: center; font-size: 0.75rem; color: var(--ink3); font-weight: 650; padding-bottom: 4px; }
.cal .c { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 0.875rem; font-weight: 650; background: var(--surface2); color: var(--ink3); position: relative; }
.cal .c.done { background: var(--brand); color: #fff; } .cal .c.frozen { background: var(--blue-l); color: var(--blue); } .cal .c.today { outline: 2px solid var(--brand); outline-offset: 1px; color: var(--ink); }
.cal .c.empty { background: none; }
.milestones { display: flex; gap: 8px; flex-wrap: wrap; }
.ms { padding: 8px 12px; border-radius: 14px; background: var(--surface2); font-weight: 700; font-size: 0.875rem; color: var(--ink3); }
.ms.got { background: var(--amber-l); color: var(--amber-d); }

/* ===== План дня ===== */
.plan-step { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-s); min-height: 70px; cursor: pointer; transition: transform .12s; }
.plan-step:active { transform: scale(.985); }
.plan-step .chk { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--line); display: grid; place-items: center; flex: none; transition: all .25s cubic-bezier(.3,1.6,.5,1); color: transparent; }
.plan-step.done .chk { background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.06); }
.plan-step.done .t { text-decoration: line-through; text-decoration-color: var(--ink3); color: var(--ink3); }
.plan-step .ic { font-size: 1.5rem; flex: none; } .plan-step .t { font-weight: 650; line-height: 1.25; } .plan-step .s { font-size: 0.8438rem; color: var(--ink3); }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-wrap .in { position: absolute; text-align: center; }
.ring-bg { stroke: var(--line); } .ring-fg { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }

/* ===== Питание ===== */
.macro { flex: 1; } .macro .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; } .macro .bar i { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.meal { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.meal .th { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-l); display: grid; place-items: center; font-size: 1.5rem; flex: none; overflow: hidden; } .meal .th img { width: 100%; height: 100%; object-fit: cover; }
.askbar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 5; display: flex; align-items: flex-end; gap: 8px; background: var(--surface); padding: 8px; border-radius: 24px; box-shadow: 0 10px 34px rgba(17,32,26,.16); border: 1px solid var(--line); }
.askbar textarea { flex: 1; border: 0; outline: none; resize: none; background: none; font-size: 1.0625rem; padding: 10px 8px; min-height: 48px; max-height: 120px; line-height: 1.35; }
.askbar .circle { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface2); }
.askbar .circle.go { background: var(--brand-g); color: #fff; box-shadow: 0 4px 12px rgba(0,160,74,.35); }
.askbar .circle svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .askbar { bottom: 16px; } }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; } .quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-s); font-weight: 650; font-size: 0.875rem; }
.tile { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-s); text-align: left; transition: transform .12s; min-height: 108px; }
.tile:active { transform: scale(.97); } .tile .e { font-size: 1.75rem; } .tile b { font-size: 1rem; } .tile span { font-size: 0.8125rem; color: var(--ink3); line-height: 1.3; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile.sel { box-shadow: inset 0 0 0 2.5px var(--brand), var(--shadow-s); background: var(--brand-l); }
.recipe h3 { font-size: 1.125rem; } .recipe ol { margin: 8px 0 0; padding-left: 20px; color: var(--ink2); } .recipe li { margin-bottom: 5px; }
.ing { display: inline-flex; padding: 4px 10px; border-radius: 10px; background: var(--brand-l); color: var(--brand-d); font-size: 0.8438rem; font-weight: 600; margin: 3px 4px 3px 0; }
.ing.miss { background: var(--amber-l); color: var(--amber-d); }

/* ===== Анализы ===== */
.sys { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-s); cursor: pointer; text-align: left; transition: transform .12s; position: relative; overflow: hidden; }
.sys:active { transform: scale(.975); } .sys .e { font-size: 1.75rem; } .sys b { font-size: 1rem; line-height: 1.2; }
.sys .meter { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .sys .meter i { display: block; height: 100%; border-radius: 3px; }
.sys.good .meter i { background: var(--brand); } .sys.mid .meter i { background: var(--amber); } .sys.bad .meter i { background: var(--red); }
.mrow { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; width: 100%; text-align: left; }
.mrow .nm { font-weight: 650; line-height: 1.2; } .mrow .val { font-weight: 800; font-size: 1.125rem; text-align: right; line-height: 1.1; } .mrow .un { font-size: 0.75rem; color: var(--ink3); font-weight: 600; }
.gauge { position: relative; height: 10px; border-radius: 5px; display: flex; overflow: visible; margin: 10px 0 4px; }
.gauge span { height: 100%; } .gauge .z-out { background: var(--zone-out); opacity: .5; } .gauge .z-norm { background: var(--zone-norm); } .gauge .z-opt { background: var(--zone-opt); }
.gauge .pin { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: left .8s cubic-bezier(.2,.8,.2,1); }
.lvl { width: 12px; height: 12px; border-radius: 50%; flex: none; } .lvl.optimal { background: var(--zone-opt); } .lvl.normal { background: var(--zone-norm); } .lvl.out { background: var(--zone-out); } .lvl.critical { background: var(--zone-crit); } .lvl.unknown { background: var(--line); }
.aiCard { background: linear-gradient(135deg, var(--violet-l), var(--blue-l)); border-radius: var(--radius); padding: 20px; position: relative; }
.aiCard .tag { display: inline-flex; gap: 6px; align-items: center; font-size: 0.8125rem; font-weight: 700; color: var(--violet); margin-bottom: 8px; }
.disc { font-size: 0.7812rem; color: var(--ink3); margin-top: 10px; line-height: 1.4; }
.upl { border: 2px dashed var(--line); border-radius: 22px; padding: 26px 18px; text-align: center; background: var(--surface); }
.th-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 12px; align-items: center; }
.review-row { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 108px; gap: 6px 12px; align-items: center; }
.review-row:last-child { border: 0; } .review-row.warn { background: var(--amber-l); } .review-row.gone { opacity: .45; }
.review-row .input { min-height: 44px; font-size: 1rem; text-align: right; padding: 0 12px; }
.warnbox { background: var(--amber-l); color: var(--amber-d); padding: 10px 12px; border-radius: 12px; font-size: 0.8438rem; font-weight: 600; }

/* ===== Диаграммы ===== */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 0.6875rem; fill: var(--ink3); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 3; }
.chart .dot.last { fill: var(--brand); }
.chart .band-ref { fill: var(--zone-norm); opacity: .22; } .chart .band-opt { fill: var(--zone-opt); opacity: .2; }
.chart .area { fill: url(#gradArea); }

/* ===== XFIT ===== */
.card-club { border-radius: 26px; padding: 22px; color: #fff; background: linear-gradient(135deg, #0B1F17 0%, #12362A 55%, #0F5A3A 100%); position: relative; overflow: hidden; box-shadow: 0 16px 36px rgba(11,31,23,.4); }
.card-club::before { content: "XFIT"; position: absolute; right: -6px; top: -14px; font-size: 6rem; font-weight: 900; letter-spacing: -.05em; opacity: .07; }
.card-club .num { font-size: 2.25rem; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.card-club .bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.18); margin-top: 14px; overflow: hidden; } .card-club .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3DDC84, #B6F36A); border-radius: 4px; }
.st-pending { background: var(--amber-l); color: var(--amber-d); } .st-confirmed { background: var(--brand-l); color: var(--brand-d); } .st-rescheduled { background: var(--blue-l); color: var(--blue); }
.st-declined, .st-cancelled, .st-missed { background: var(--red-l); color: var(--red); } .st-done { background: var(--surface2); color: var(--ink2); }
.st-new { background: var(--amber-l); color: var(--amber-d); } .st-preparing { background: var(--blue-l); color: var(--blue); } .st-ready { background: var(--brand-l); color: var(--brand-d); } .st-picked { background: var(--surface2); color: var(--ink2); }
.rec { border-radius: 20px; padding: 16px 18px; background: var(--surface); box-shadow: var(--shadow-s); border-left: 5px solid var(--brand); }
.rec.spa { border-color: var(--violet); } .rec.bar { border-color: var(--amber); }
.rec .who { font-size: 0.8125rem; font-weight: 700; color: var(--ink3); margin-bottom: 4px; }
.menu-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.menu-item .em { width: 54px; height: 54px; border-radius: 16px; background: var(--amber-l); display: grid; place-items: center; font-size: 1.75rem; flex: none; }
.qty { display: flex; align-items: center; gap: 4px; } .qty button { width: 38px; height: 38px; border-radius: 12px; background: var(--surface2); font-size: 1.25rem; font-weight: 700; } .qty b { min-width: 24px; text-align: center; }
.cartbar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .slot { min-height: 46px; border-radius: 13px; background: var(--surface2); font-weight: 700; border: 1.5px solid transparent; } .slot.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; } .days::-webkit-scrollbar { display: none; }
.dayp { flex: none; width: 62px; padding: 10px 0; border-radius: 16px; background: var(--surface2); text-align: center; border: 1.5px solid transparent; } .dayp b { display: block; font-size: 1.25rem; } .dayp span { font-size: 0.75rem; color: var(--ink3); font-weight: 650; }
.dayp.on { background: var(--brand-l); border-color: var(--brand); } .dayp.on span { color: var(--brand-d); }

/* ===== Чек-ин и онбординг ===== */
.flow { min-height: 100dvh; display: flex; flex-direction: column; padding: 18px 20px calc(24px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
.flow .prog { display: flex; gap: 5px; margin: 6px 0 4px; } .flow .prog i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; } .flow .prog i.on { background: var(--brand); }
.flow .body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 18px 0; animation: slideIn .38s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
.flow .body.rev { animation-name: slideBack; } @keyframes slideBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.flow h1 { font-size: 1.875rem; } .flow .lead { color: var(--ink2); font-size: 1.0625rem; margin-top: -8px; }
.flow .foot { display: flex; flex-direction: column; gap: 10px; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; } .mood { aspect-ratio: .86; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-s); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 2.375rem; border: 2.5px solid transparent; transition: transform .15s cubic-bezier(.3,1.6,.5,1), border-color .15s; }
.mood span { font-size: 0.7188rem; font-weight: 650; color: var(--ink3); } .mood.on { border-color: var(--brand); transform: scale(1.08); background: var(--brand-l); } .mood:active { transform: scale(.94); }
.moons { display: flex; gap: 8px; justify-content: space-between; } .moon { flex: 1; aspect-ratio: 1; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-s); font-size: 1.75rem; display: grid; place-items: center; border: 2.5px solid transparent; filter: grayscale(1) opacity(.6); transition: all .2s; }
.moon.on { filter: none; border-color: var(--violet); background: var(--violet-l); transform: translateY(-3px); }
.timebox { display: flex; flex-direction: column; gap: 6px; flex: 1; align-items: center; padding: 14px 8px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-s); }
.timebox label { font-size: 0.8125rem; font-weight: 700; color: var(--ink3); } .timebox input { border: 0; background: none; font-size: 2.375rem; font-weight: 800; text-align: center; width: 100%; outline: none; letter-spacing: -.02em; }
.sexrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .sexrow button { padding: 26px 10px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-s); font-weight: 750; font-size: 1.125rem; border: 2.5px solid transparent; display: flex; flex-direction: column; gap: 8px; align-items: center; } .sexrow button span { font-size: 2.5rem; } .sexrow button.on { border-color: var(--brand); background: var(--brand-l); }
.consent { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-s); cursor: pointer; } .consent input { width: 26px; height: 26px; accent-color: var(--brand); flex: none; margin-top: 1px; }
.celebrate { text-align: center; } .celebrate .flame { width: 120px; height: 140px; margin: 0 auto; } .celebrate .big { font-size: 4rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-top: 4px; }

/* ===== Шторка/модалка, тосты ===== */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8,16,12,.45); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); animation: sheetUp .34s cubic-bezier(.2,.9,.3,1.05) both; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 28px; } }
.toasts { position: fixed; z-index: 90; left: 0; right: 0; top: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(92vw, 460px); padding: 13px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2) both; font-size: 0.9375rem; }
.toast.err { background: var(--red); color: #fff; } .toast.ok { background: var(--brand-d); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, var(--line) 25%, var(--surface2) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 14px; } @keyframes shimmer { to { background-position: -200% 0; } }
.spin { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; } .spin.dark { border-color: var(--line); border-top-color: var(--brand); }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 30px 16px; color: var(--ink2); } .empty .e { font-size: 2.875rem; margin-bottom: 8px; }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; width: 100%; height: 100%; }
.testbar { position: fixed; left: 8px; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); z-index: 25; background: #1b1b1b; color: #fff; border-radius: 12px; padding: 6px 10px; font-size: 0.75rem; font-weight: 700; opacity: .88; }
@media (min-width: 1024px) { .testbar { bottom: 12px; } }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 20% 0%, #CFF2DB 0%, transparent 55%), radial-gradient(circle at 100% 100%, #FFE8B8 0%, transparent 50%), var(--bg); }
.login .box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.login .logo { justify-content: center; font-size: 1.625rem; } .login .logo i { width: 46px; height: 46px; font-size: 1.25rem; border-radius: 15px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ===== Кабинет персонала ===== */
.staff-shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.staff-side { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 10px; gap: 4px; overflow-x: auto; position: sticky; top: 0; z-index: 20; align-items: center; }
.staff-side .logo { display: none; } .staff-side a { padding: 10px 14px; border-radius: 12px; color: var(--ink2); text-decoration: none; font-weight: 650; white-space: nowrap; display: flex; gap: 8px; align-items: center; position: relative; } .staff-side a.active { background: var(--brand-l); color: var(--brand-d); }
.staff-side .sp { flex: 1; } .staff-side .me { font-size: 0.8125rem; color: var(--ink3); white-space: nowrap; }
.staff-main { padding: 18px 16px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) {
  .staff-shell { grid-template-columns: 240px 1fr; }
  .staff-side { flex-direction: column; align-items: stretch; height: 100dvh; border-right: 1px solid var(--line); border-bottom: 0; padding: 22px 14px; overflow: auto; }
  .staff-side .logo { display: flex; margin: 0 8px 18px; } .staff-side .me { margin: 8px 12px; white-space: normal; }
  .staff-main { padding: 28px 34px 80px; }
}
.grid2 { display: grid; gap: 14px; grid-template-columns: 1fr; } @media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr) !important; } }
.grid3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.req { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-s); border-left: 5px solid var(--amber); }
.req.ok { border-color: var(--brand); }
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); }
.tbl th { text-align: left; font-size: 0.7812rem; color: var(--ink3); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; background: var(--surface2); } .tbl td { padding: 13px 16px; border-top: 1px solid var(--line); } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--surface2); }
.week-cal { display: grid; grid-template-columns: 52px repeat(7, minmax(110px, 1fr)); overflow: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-s); }
.week-cal .hd { padding: 10px 6px; text-align: center; font-weight: 700; font-size: 0.8125rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; } .week-cal .hd.today { color: var(--brand-d); }
.week-cal .hr { height: 56px; font-size: 0.7188rem; color: var(--ink3); text-align: right; padding: 2px 6px 0 0; border-top: 1px solid var(--line); }
.week-cal .cell { position: relative; border-top: 1px solid var(--line); border-left: 1px solid var(--line); height: 56px; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 9px; padding: 3px 7px; font-size: 0.75rem; line-height: 1.2; overflow: hidden; cursor: pointer; z-index: 1; font-weight: 650; border-left: 4px solid var(--brand); background: var(--brand-l); color: var(--brand-d); }
.ev.pending { background: var(--amber-l); border-color: var(--amber); color: var(--amber-d); } .ev.spa { border-color: var(--violet); }
.order { border-radius: 18px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 8px; }
.kan { display: grid; gap: 14px; grid-template-columns: 1fr; } @media (min-width: 900px) { .kan { grid-template-columns: repeat(3, 1fr); } }
.kan > div > h3 { margin-bottom: 10px; }
.sparkline { display: block; }

/* ===== Дополнения ===== */
:where(svg:not([width]):not(.chart)) { width: 20px; height: 20px; }
.chev { color: var(--ink3); flex: none; }
.plan-step .chk svg { width: 18px; height: 18px; }
.btn svg { width: 20px; height: 20px; }
a.card { text-decoration: none; color: inherit; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.photo-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: 18px; }
.vid { width: 100%; border-radius: 18px; background: #000; max-height: 320px; object-fit: cover; }
.row.top { align-items: flex-start; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); } .kv:last-child { border: 0; }
.big-num { font-size: 2.5rem; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.tag-ai { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 700; color: var(--violet); background: var(--violet-l); border-radius: 999px; padding: 3px 9px; }
.input.sm { min-height: 44px; font-size: 1rem; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2387988E' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.flow .lead { margin-top: 10px !important; }
.flow .row > .prog { padding: 0 0 0 0; }
a.btn, a.iconbtn, a.back { text-decoration: none; }
.iconbtn, .back { color: var(--ink); }
.flame.dim .glow { display: none; }
a { color: inherit; }
.link { color: var(--brand-d); }
.grid2 > .card, .grid3 > .card, .tiles > *, .kan .order { margin-top: 0 !important; }
/* Логотип XFIT на тёмной плашке + название */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.1875rem; line-height: 1.1; }
.logo i { flex: none; width: 84px; height: 40px; border-radius: 13px; background: #0B1F17 url(/icons/logo.svg) center / auto 22px no-repeat; box-shadow: 0 4px 14px rgba(11,31,23,.3); }
.logo span { display: flex; flex-direction: column; white-space: nowrap; }
.logo small { font-size: 0.6875rem; font-weight: 600; color: var(--ink3, #8a9a92); letter-spacing: 0; margin-top: 2px; }
.login .logo { flex-direction: column; justify-content: center; gap: 12px; font-size: 1.625rem; text-align: center; }
.login .logo i { width: 112px; height: 52px; border-radius: 16px; background-size: auto 28px; }
.login .logo span { align-items: center; }
.ava { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-l); color: var(--brand-d); display: grid; place-items: center; font-weight: 800; flex: none; }
.list > button.row { border-bottom: 1px solid var(--line); } .list > button.row:last-child { border-bottom: 0; }
.quick button.on { background: var(--brand); color: #fff; }
/* Календарь мастера */
.week-cal .hd { border: 0; font: inherit; font-weight: 700; font-size: 0.8125rem; cursor: pointer; position: sticky; top: 0; border-bottom: 1px solid var(--line); } .week-cal .hd .plus { margin-left: 6px; color: var(--brand-d); font-weight: 800; }
.week-cal .cell { cursor: cell; } .week-cal .cell:hover { background: var(--surface2); }
.blk { position: absolute; left: 0; right: 0; z-index: 0; font-size: 0.6875rem; font-weight: 650; padding: 2px 6px; overflow: hidden; cursor: pointer; }
.blk.shift { background: rgba(0,176,80,.13); color: var(--brand-d); border-left: 3px solid rgba(0,176,80,.5); }
.blk.busy { background: repeating-linear-gradient(45deg, rgba(120,135,127,.22) 0 6px, rgba(120,135,127,.1) 6px 12px); color: var(--ink2); border-left: 3px solid var(--ink3); z-index: 1; }
.ev { z-index: 2; } .ev.done { opacity: .6; }
.legend { display: inline-flex; gap: 6px; align-items: center; font-size: 0.7812rem; color: var(--ink2); margin-left: 6px; } .legend .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; margin-left: 8px; }
.legend .sw.shift { background: rgba(0,176,80,.3); } .legend .sw.busy { background: repeating-linear-gradient(45deg, #9aa8a0 0 4px, #cdd6d1 4px 8px); } .legend .sw.ev { background: var(--brand); }
.seg { display: flex; background: var(--surface2); border-radius: 14px; padding: 4px; gap: 4px; } .seg button { flex: 1; padding: 9px 6px; border-radius: 11px; font-weight: 650; font-size: 0.875rem; color: var(--ink2); } .seg button.on { background: var(--surface); color: var(--brand-d); box-shadow: var(--shadow-s); }
.note-line { margin-top: 4px; padding: 6px 10px; border-radius: 10px; background: var(--amber-l); color: var(--ink); font-size: 0.875rem; white-space: pre-wrap; }
.side .logo, .staff-side .logo { font-size: 0.9375rem; gap: 8px; } .side .logo i, .staff-side .logo i { width: 62px; height: 32px; border-radius: 10px; background-size: auto 17px; }

/* ===== Вовлечение ===== */
.hab { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-s); }
.hab .e { width: 40px; height: 40px; border-radius: 13px; background: var(--brand-l); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.hab .t { font-weight: 650; }
.hab.done { background: var(--brand-l); } .hab.done .t { text-decoration: line-through; color: var(--ink2); } .hab.skip { opacity: .6; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 12px; }
.btn.sm svg { width: 16px; height: 16px; }
.iconbtn.mini { width: 36px; height: 36px; box-shadow: none; background: var(--surface2); font-size: 0.9375rem; flex: none; }
.pushCard { background: linear-gradient(135deg, var(--blue-l), var(--violet-l)); margin-top: 14px; }
.nudge { display: flex; align-items: center; gap: 12px; margin-top: 14px; text-decoration: none; color: inherit; }
.staleCard { display: flex; align-items: center; gap: 12px; margin-top: 14px; text-decoration: none; color: inherit; background: var(--amber-l); }
.warn-ic { width: 32px; height: 32px; border-radius: 50%; background: var(--amber); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.sumrow { display: flex; align-items: center; gap: 12px; } .sumrow .e { font-size: 1.375rem; width: 32px; text-align: center; }
.tone { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.warnbox { background: var(--amber-l); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 0.875rem; }
.react { width: 44px; height: 38px; border-radius: 12px; background: var(--surface2); font-size: 1.125rem; transition: transform .15s; } .react:active { transform: scale(.92); }
.react.on { background: var(--brand-l); box-shadow: inset 0 0 0 2px var(--brand); } .react.on.bad { background: var(--red-l); box-shadow: inset 0 0 0 2px var(--red); }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-s); }
.opt .rad { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink3); flex: none; }
.opt.on { box-shadow: inset 0 0 0 2.5px var(--brand), var(--shadow-s); background: var(--brand-l); } .opt.on .rad { border-color: var(--brand); background: radial-gradient(var(--brand) 45%, transparent 50%); }
.inl-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--line); font-weight: 700; }
.stale-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: #fff; font-size: 0.75rem; font-weight: 800; text-align: center; line-height: 18px; margin-left: 6px; }
.row.top { align-items: flex-start; }

/* дневники, исследования, «Интим 18+» */
.dgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dcat { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-s); text-decoration: none; color: inherit; text-align: left; }
.dcat .e { font-size: 1.75rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 0.75rem; color: var(--ink3); padding: 4px 0; }
.cal .d { aspect-ratio: 1; border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 650; font-size: 0.875rem; position: relative; }
.cal .d.off { background: transparent; pointer-events: none; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal .d.period { background: #FBC9CC; color: #8A1D24; } .cal .d.p_period { background: #FDE6E7; color: #8A1D24; border: 1px dashed #F2A3A8; }
.cal .d.fertile { background: var(--blue-l); color: #1D4FB8; } .cal .d.ovulation { background: var(--violet); color: #fff; }
.cal .d.pms { background: var(--amber-l); color: var(--amber-d); }
.cal .d i { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.75rem; color: var(--ink2); margin-top: 12px; } .legend2 b { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 8px 13px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: 0.875rem; font-weight: 600; }
.chips button.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); }
.rate { display: flex; gap: 6px; } .rate button { flex: 1; min-height: 42px; border-radius: 12px; background: var(--surface2); font-size: 1.125rem; border: 1px solid var(--line); } .rate button.on { background: var(--brand-l); border-color: var(--brand); }
.phase { border-radius: 24px; padding: 20px; color: #fff; background: linear-gradient(135deg, #E56B8E, #C9477A); box-shadow: 0 14px 34px rgba(201,71,122,.28); }
.phase.male { background: linear-gradient(135deg, #4F7DF3, #3358C9); box-shadow: 0 14px 34px rgba(51,88,201,.28); }
.phase .big { font-size: 2.375rem; font-weight: 800; letter-spacing: -.02em; }
.tgt { margin-top: 14px; } .tgt .track { position: relative; height: 10px; border-radius: 6px; background: var(--surface2); overflow: hidden; } .tgt .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-g); border-radius: 6px; }
/* логотип: текст по центру коробки по визуальной высоте (у «Health&Fitness» нет нижних выносных элементов) */
.logo span { line-height: 1; transform: translateY(.035em); }
.logo small { line-height: 1.2; }
/* центральная кнопка XFIT в нижнем меню */
.nav a.xfitbtn { max-width: 84px; justify-content: flex-start; }
.nav a.xfitbtn i { display: block; width: 62px; height: 44px; margin-top: -14px; border-radius: 15px; background: #0B1F17 url(/icons/logo.svg) center / auto 24px no-repeat; box-shadow: 0 6px 16px rgba(11,31,23,.35); border: 3px solid var(--surface, #fff); transition: transform .2s; }
.nav a.xfitbtn.active i { box-shadow: 0 0 0 2px var(--brand), 0 6px 16px rgba(11,31,23,.35); transform: translateY(-2px); }
.nav a { min-width: 0; font-size: 0.6562rem; letter-spacing: -.01em; }
.nav a.xfitbtn i { margin-top: -10px; }
/* логотип одной картинкой: плашка и текст нарисованы вместе, поэтому всегда выровнены */
.logo { flex-direction: column; align-items: flex-start; gap: 4px; }
.logo img { display: block; height: 40px; width: auto; max-width: 100%; user-select: none; -webkit-user-drag: none; }
.logo small { margin: 0; }
.side .logo img, .staff-side .logo img { height: 34px; }
.login .logo { align-items: center; } .login .logo img { height: 52px; }
/* центральная кнопка XFIT: всегда целиком, без выступов за меню */
.nav a.xfitbtn { max-width: 96px; justify-content: center; padding: 0; }
.nav a.xfitbtn img { display: block; width: min(72px, calc(100% - 4px)); height: auto; aspect-ratio: 84 / 40; border-radius: 14px; box-shadow: 0 3px 10px rgba(11,31,23,.28); transition: transform .2s, box-shadow .2s; }
.nav a.xfitbtn.active img { box-shadow: 0 0 0 2px var(--brand), 0 3px 10px rgba(11,31,23,.28); }
.nav a.xfitbtn:active img { transform: scale(.94); }

/* ===== Мобильная вёрстка: один столбец, ничего не вылезает за экран ===== */
@media (max-width: 1023px) {
html, body { overflow-x: hidden; max-width: 100%; }
.main, .page, .page > *, .card, .list, .list > *, .tiles > *, .dgrid > * { min-width: 0; max-width: 100%; }
.main { overflow-x: clip; }
.tiles, .dgrid { grid-template-columns: 1fr; gap: 10px; }
.tile, .dcat { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: center; min-height: 0; padding: 14px 16px; }
.tile .e, .dcat .e { grid-row: 1 / span 2; font-size: 1.875rem; width: 40px; text-align: center; }
.tile b, .dcat b { grid-column: 2; font-size: 1rem; line-height: 1.25; }
.tile span:not(.e), .dcat span:not(.e) { grid-column: 2; font-size: 0.8125rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:not(:has(span:not(.e))) .e { grid-row: 1; }
.card-club, .menu-item, .rec, .cartbar { max-width: 100%; box-sizing: border-box; }
.menu-item { min-width: 0; } .menu-item .grow { min-width: 0; }
.quick { max-width: 100%; }
}
/* анализы: системы организма — списком */
.sysrow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; text-decoration: none; color: inherit; }
.sysrow .e { font-size: 1.625rem; width: 36px; text-align: center; flex: none; }
.sysrow .grow { min-width: 0; } .sysrow b { display: block; font-size: 1rem; }
.sysrow .small { margin-top: 2px; } .sysrow .small.warn { color: var(--red, #D93F3F); font-weight: 650; }
.sysrow .chip { flex: none; }
/* питание: поле «напишите словами» — обычный блок, не прилипает и не перекрывает кнопки */
.askbar.inline { position: static; box-shadow: none; align-items: center; padding: 6px 6px 6px 14px; border-radius: 18px; }
.askbar.inline textarea { min-height: 44px; padding: 11px 4px; font-size: 1rem; }
.askbar.inline .circle { width: 42px; height: 42px; }
.sysrow.noval { min-height: 52px; padding-top: 10px; padding-bottom: 10px; } .sysrow.noval b, .sysrow.noval .e { opacity: .6; } .sysrow.noval b { font-size: 0.9375rem; font-weight: 650; }
.sysrow .small.ok { color: var(--brand-d, #0a8a43); font-weight: 600; }

/* анализы: на телефоне список, на десктопе плитки */
.sys-d { display: none; } @media (min-width: 1024px) { .sys-m { display: none; } .sys-d { display: grid; } }

/* ---- Жалобы и просьбы ---- */
.st-accepted { background: var(--blue-l); color: var(--blue); } .st-in_work { background: var(--blue-l); color: var(--blue); }
.st-overdue { background: var(--red-l); color: var(--red); } .st-completed { background: var(--brand-l); color: var(--brand-d); } .st-closed { background: var(--surface2); color: var(--ink2); }
.tk-img { display: block; max-width: 100%; max-height: 260px; border-radius: 14px; object-fit: cover; }
.tk-thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.tk-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: 10px; background: var(--red); color: #fff; font-size: 0.75rem; font-weight: 700; }
.staff-side a .tk-badge { margin-left: 8px; }
.tk-over { border-left: 5px solid var(--red); } .tk-new { border-left: 5px solid var(--amber); }

/* ===== Кабинет сотрудника на телефоне: нижняя панель, без горизонтальных сдвигов ===== */
@media (max-width: 899px) {
  html, body { overflow-x: hidden; }
  .staff-shell { display: block; }
  .staff-side { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 40; border-bottom: 0; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b)); gap: 2px; box-shadow: 0 -4px 18px rgba(8,16,12,.06); scrollbar-width: none; }
  .staff-side::-webkit-scrollbar { display: none; }
  .staff-side a { flex-direction: column; gap: 2px; padding: 6px 8px; min-width: 66px; font-size: 0.6875rem; line-height: 1.15; border-radius: 12px; justify-content: center; text-align: center; white-space: normal; }
  .staff-side a svg { width: 22px; height: 22px; }
  .staff-side .sp, .staff-side .me { display: none; }
  .staff-side .tk-badge { position: absolute; top: 0; right: 10px; margin: 0; min-width: 18px; height: 18px; font-size: 0.6875rem; }
  .staff-main { padding: 14px 14px calc(96px + var(--safe-b)); }
  .staff-main .topbar { flex-wrap: wrap; gap: 8px; }
  .staff-main .topbar h1 { font-size: 1.3125rem; min-width: 0; overflow-wrap: anywhere; }
  .staff-main .row.wrap, .staff-main .row.gap8 { flex-wrap: wrap; }
  .staff-main .card { max-width: 100%; box-sizing: border-box; }
  .staff-main .card .kv { gap: 10px; } .staff-main .card .kv b { text-align: right; overflow-wrap: anywhere; }
  .staff-main .tbl { font-size: 0.8125rem; } .staff-main .tbl th, .staff-main .tbl td { padding: 9px 8px; }
  .staff-main .pill-tabs { overflow-x: auto; scrollbar-width: none; } .staff-main .pill-tabs button { white-space: nowrap; padding: 0 12px; flex: 1 0 auto; }
  .staff-main .grid2, .staff-main .grid3 { grid-template-columns: 1fr !important; }
  .staff-main .big-num { font-size: 1.75rem; }
  .staff-main .btn.sm { min-height: 40px; }
  .staff-main input, .staff-main select, .staff-main textarea { font-size: 1rem; max-width: 100%; }
  .staff-main .list > * { flex-wrap: wrap; }
  .staff-main .req .row, .staff-main .rec { max-width: 100%; }
}
@media (max-width: 899px) {
  .staff-main .topbar h1 { flex: 1 1 210px; overflow-wrap: break-word; word-break: normal; }
  .staff-main .row > .grow, .staff-main .list > * > .grow { flex: 1 1 150px; min-width: 120px; }
  .staff-main .list > * { row-gap: 8px; }
  .staff-main .list > * > .grow b { overflow-wrap: break-word; word-break: normal; }
}
.show-m { display: none; }
@media (max-width: 899px) { .staff-main .hide-m { display: none; } .staff-main .show-m { display: block; } .staff-main td:last-child .btn { padding: 0 10px; } }

/* ===================================================================
   ДИЗАЙН-СЛОЙ «Премиум»: тонкие шрифты, кольца, свечение, заставка.
   Лежит поверх базовых стилей, чтобы не трогать вёрстку.
   =================================================================== */
html { transition: background-color .35s; }
body { transition: background-color .35s, color .35s; font-weight: 400; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] body { background: radial-gradient(120% 55% at 50% -12%, rgba(0,176,80,.12), transparent 62%), var(--bg); background-attachment: fixed; }
.card, .tile, .list, .nav, .scrim .sheet { transition: background-color .35s, border-color .35s, box-shadow .35s; }

/* Тонкая, воздушная типографика */
h1 { font-weight: 600; letter-spacing: -.03em; } h2 { font-weight: 600; } h3 { font-weight: 600; }
b, strong { font-weight: 600; }
.btn { font-weight: 600; letter-spacing: .005em; }
.big-num, .card-club .num, .streak-card .num, .celebrate .big { font-weight: 300; letter-spacing: -.035em; }
.section-title h2 { font-size: 0.8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.tiny.muted, .small.muted { font-weight: 400; }

/* Тёмная тема: контуры вместо теней, мягкое свечение у акцентов */
:root[data-theme="dark"] .card, :root[data-theme="dark"] .tile, :root[data-theme="dark"] .list, :root[data-theme="dark"] .req, :root[data-theme="dark"] .rec { border: 1px solid var(--line); }
:root[data-theme="dark"] .nav { background: rgba(13,17,19,.86); border-top: 1px solid var(--line); }
:root[data-theme="dark"] .btn.primary { box-shadow: 0 6px 22px rgba(0,176,80,.28); }
:root[data-theme="dark"] .btn.ghost { background: transparent; }
:root[data-theme="dark"] .input, :root[data-theme="dark"] textarea.input, :root[data-theme="dark"] select.input { background: var(--surface2); }
:root[data-theme="dark"] .sheet { background: var(--surface); border-top: 1px solid var(--line); }
:root[data-theme="dark"] .hero { box-shadow: 0 14px 40px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.07); background: linear-gradient(150deg, #0F3321 0%, #0B1B14 78%); }
:root[data-theme="dark"] .hero.sun { background: linear-gradient(150deg, #3A2A08 0%, #1B1508 78%); }
:root[data-theme="dark"] .hero.calm { background: linear-gradient(150deg, #1D2658 0%, #0F1330 78%); }
:root[data-theme="dark"] .hero.club { background: linear-gradient(150deg, #0B3B3A 0%, #09181A 78%); }
:root[data-theme="dark"] .hero.food { background: linear-gradient(150deg, #3D210D 0%, #1B120A 78%); }
:root[data-theme="dark"] .hero.done { background: linear-gradient(150deg, #0F3321 0%, #0B1B14 78%); }
:root[data-theme="dark"] .hero::before, :root[data-theme="dark"] .hero::after { background: rgba(255,255,255,.05); }
:root[data-theme="dark"] .ring-bg { stroke: #20282C; }

/* Кольца на главной */
.rings3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 20px; }
.rg { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; animation: ringIn .7s cubic-bezier(.2,.8,.2,1) both; }
.rg:nth-child(2) { animation-delay: .08s; } .rg:nth-child(3) { animation-delay: .16s; }
@keyframes ringIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.rg .ring-wrap { width: 100% !important; max-width: 128px; height: auto !important; aspect-ratio: 1; }
.rg .ring-wrap svg { width: 100%; height: auto; display: block; }
.rg .ring-fg { transition: stroke-dashoffset 1.3s cubic-bezier(.2,.8,.2,1); }
:root[data-theme="dark"] .rg .ring-fg { filter: drop-shadow(0 0 5px var(--glow, transparent)); }
.rg .in b { font-size: clamp(1.45rem, 8vw, 2.1rem); font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.rg .in b small { font-size: .5em; font-weight: 400; opacity: .65; margin-left: 1px; }
.rg .cap { font-size: 0.6875rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ink2); text-align: center; }
.rg .sub { margin-top: -6px; font-size: 0.75rem; color: var(--ink3); text-align: center; }
@media (min-width: 1024px) { .rings3 { gap: 22px; max-width: 520px; } }

/* Динамика анализов на обзоре */
.dyn { display: flex; flex-direction: column; }
.dyn a { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.dyn a:first-child { border-top: 0; }
.dyn .nm { font-weight: 600; } .dyn .vv { text-align: right; font-weight: 600; white-space: nowrap; } .dyn .vv small { display: block; font-weight: 500; font-size: 0.75rem; }
.dyn .up { color: var(--amber-d); } .dyn .dn { color: var(--blue); } .dyn .eq { color: var(--ink3); }
.dyn svg.sparkline { width: 96px; height: 34px; }
.stale-chip { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: var(--amber-l); color: var(--amber-d); font-size: 0.6875rem; font-weight: 600; letter-spacing: .02em; }

/* Заставка XFIT */
#splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: radial-gradient(90% 60% at 50% 38%, #0F2A1D 0%, #0A0E10 70%); transition: opacity .55s ease, transform .55s ease, visibility .55s; }
#splash.out { opacity: 0; visibility: hidden; transform: scale(1.04); pointer-events: none; }
#splash .sp-in { display: flex; flex-direction: column; align-items: center; gap: 22px; }
#splash img { width: 168px; height: auto; opacity: 0; animation: spLogo 1s .15s cubic-bezier(.2,.8,.2,1) forwards; filter: drop-shadow(0 0 22px rgba(54,182,71,.35)); }
#splash .sp-line { width: 120px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
#splash .sp-line i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #00B050, #7CF2A8); transform: translateX(-100%); animation: spLine 1.1s .35s cubic-bezier(.4,0,.2,1) forwards; }
#splash .sp-tag { font-size: 0.6875rem; letter-spacing: .5em; text-transform: uppercase; color: rgba(255,255,255,.55); opacity: 0; animation: spTag .8s .55s ease forwards; padding-left: .5em; }
@keyframes spLogo { from { opacity: 0; transform: scale(.88) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spLine { to { transform: none; } }
@keyframes spTag { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #splash img, #splash .sp-tag { animation-duration: .01s; } #splash .sp-line i { animation-duration: .01s; } .page, .rg { animation: none; } }

/* Внешний вид: плитки выбора */
.apx { display: grid; gap: 8px; } .apx.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .apx.three { grid-template-columns: 1fr; }
.apx button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--surface2); border: 1.5px solid var(--line); transition: border-color .2s, background .2s, transform .12s; }
.apx button:active { transform: scale(.985); }
.apx button.on { border-color: var(--brand); background: var(--brand-l); }
.apx button .t { font-weight: 600; } .apx button .d { font-size: 0.8125rem; color: var(--ink2); }
.apx button .e { font-size: 1.4rem; width: 32px; text-align: center; }
.apx button .ck { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.apx button.on .ck { border-color: var(--brand); background: var(--brand) radial-gradient(circle, #fff 0 32%, transparent 36%); }

/* ===== Режимы шрифта ===== */
:root[data-font="large"] { font-size: 118%; }
:root[data-font="large"] body { font-weight: 450; line-height: 1.5; }
:root[data-font="large"] .muted, :root[data-font="large"] .faint { color: var(--ink); opacity: .78; }
:root[data-font="large"] .nav a { font-size: 0.8125rem; }
:root[data-font="dys"] { --font: Andika, Verdana, "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif; font-size: 106%; }
:root[data-font="dys"] body { letter-spacing: .02em; word-spacing: .1em; line-height: 1.65; font-weight: 400; }
:root[data-font="dys"] h1, :root[data-font="dys"] h2, :root[data-font="dys"] h3, :root[data-font="dys"] b, :root[data-font="dys"] strong, :root[data-font="dys"] .btn { font-weight: 700; letter-spacing: .01em; }
:root[data-font="dys"] .big-num, :root[data-font="dys"] .rg .in b { font-weight: 400; }
:root[data-font="dys"] .section-title h2 { text-transform: none; letter-spacing: .02em; font-size: 1rem; }
:root[data-font="dys"] .nav a { letter-spacing: 0; word-spacing: 0; }

/* ===================== WHOOP-слой 2: плашки, календари, давление ===================== */
:root { --bp-g: #22D17B; --bp-y: #F2C94C; --bp-o: #F2994A; --bp-r: #EB5757;
  --c-period: #E8675F; --c-period-soft: rgba(232,103,95,.28); --c-fertile: #7F8FE6; --c-ovul: #3FA7B8; --c-pms: #A55BDB;
  --cap-done: linear-gradient(90deg, #1FB86B, #2BD67E); }

/* --- Плашки-уведомления: без толстой полосы, тонкая рамка + мягкая подсветка тона --- */
.t-bad { --tone: var(--red); } .t-mid { --tone: var(--amber); } .t-good, .t-brand { --tone: var(--brand); } .t-info { --tone: #3B82F6; }
:root .card.notice { position: relative; padding: 14px 16px 14px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--tone) 30%, var(--line));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 16%, var(--surface)) 0%, var(--surface) 58%); box-shadow: none; overflow: hidden; }
.notice .n-top { display: flex; align-items: flex-start; gap: 12px; }
.notice .n-ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 1.125rem;
  background: color-mix(in srgb, var(--tone) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); }
.notice .n-lbl { display: flex; align-items: center; gap: 6px; font-size: 0.6563rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tone); }
.notice .n-lbl i { width: 6px; height: 6px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 8px var(--tone); }
.notice .n-t { display: block; margin-top: 3px; font-size: 0.9688rem; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.notice .n-x { margin-top: 10px; font-size: 0.8438rem; line-height: 1.5; color: var(--ink2); font-weight: 400; }
.notice .n-act { display: flex; gap: 8px; margin-top: 14px; }
.notice .n-pri, .notice .n-sec { font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px;
  border-radius: 999px; font-size: 0.7188rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; transition: transform .15s, opacity .15s; }
.notice .n-pri { flex: 1; background: var(--ink); color: var(--bg); border: 0; }
.notice .n-sec { background: transparent; color: var(--ink2); border: 1px solid var(--line); }
.notice .n-pri:active, .notice .n-sec:active { transform: scale(.97); }

/* --- Остальные плашки: боковая полоса → тонкая рамка и оттенок --- */
.rec { --tone: var(--brand); } .rec.spa { --tone: var(--violet); } .rec.bar { --tone: var(--amber); }
.req { --tone: var(--amber); } .req.ok { --tone: var(--brand); }
.tk-over { --tone: var(--red); } .tk-new { --tone: var(--amber); }
:root:root .rec, :root:root .req { border: 1px solid color-mix(in srgb, var(--tone) 28%, var(--line)); border-left-width: 1px; border-radius: 18px; box-shadow: none;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 12%, var(--surface)) 0%, var(--surface) 60%); }
:root:root .tk-over, :root:root .tk-new { border-left-width: 1px; border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); }
:root:root .warnbox { border-radius: 16px; padding: 12px 14px; font-size: 0.8438rem; font-weight: 500; color: var(--ink); border: 1px solid color-mix(in srgb, var(--amber) 32%, var(--line));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--amber) 15%, var(--surface)) 0%, var(--surface) 62%); }
.warnbox ul { color: var(--ink2); }

/* --- Неделя серии: тонкие кружки, выбранный день — кольцо --- */
.week .d i { border: 1px solid var(--line); background: transparent; max-width: 34px; font-weight: 600; }
.week .d.done i { background: var(--cap-done); border-color: transparent; color: #04140A; }
.week .d.frozen i { background: color-mix(in srgb, var(--blue) 22%, transparent); border-color: transparent; }
.week .d.today i { border: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.week .d { font-weight: 500; letter-spacing: .04em; }

/* --- Календари-капсулы (серия и цикл) --- */
.cal.caps { column-gap: 0; row-gap: 6px; }
.cal.caps .h, .cal.caps .wd { font-size: 0.6563rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); padding-bottom: 8px; }
.cal.caps .c, .cal.caps .d { aspect-ratio: auto; height: 38px; border-radius: 0; background: transparent; box-shadow: none; border: 0; color: var(--ink2); font: inherit; font-size: 0.8438rem; font-weight: 500;
  position: relative; display: grid; place-items: center; padding: 0; }
.cal.caps .c.empty, .cal.caps .d.off { pointer-events: none; }
.cal.caps .d { cursor: pointer; }
.cal.caps .run-1 { border-radius: 19px; } .cal.caps .run-s { border-radius: 19px 0 0 19px; } .cal.caps .run-e { border-radius: 0 19px 19px 0; } .cal.caps .run-m { border-radius: 0; }
.cal.caps .c.done { background: var(--cap-done); color: #04140A; font-weight: 600; }
.cal.caps .c.frozen { background: color-mix(in srgb, var(--blue) 24%, transparent); color: var(--blue); }
.cal.caps .d.period { background: var(--c-period); color: #fff; font-weight: 600; }
.cal.caps .d.p_period { background: var(--c-period-soft); color: var(--c-period); }
.cal.caps .d.fertile { background: color-mix(in srgb, var(--c-fertile) 60%, transparent); color: #fff; }
.cal.caps .d.ovulation { background: var(--c-ovul); color: #fff; font-weight: 600; }
.cal.caps .d.pms { background: color-mix(in srgb, var(--c-pms) 70%, transparent); color: #fff; }
.cal.caps .c.today::after, .cal.caps .d.today::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--ink); pointer-events: none; }
.cal.caps .d.today { box-shadow: none; }
.cal.caps .d i { bottom: 3px; width: 4px; height: 4px; background: currentColor; }
.cal.caps .d:disabled { opacity: .5; }
.legend2 b { width: 18px; height: 8px; border-radius: 4px; vertical-align: 0; }

/* --- Давление: датчик и недельный график --- */
.bp { position: relative; }
.bp-gauge { position: relative; max-width: 300px; margin: 0 auto; }
.bp-gauge svg { display: block; overflow: visible; }
.bp-needle { transition: transform 1.1s cubic-bezier(.2, .9, .25, 1); }
.bp-read { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.bp-cap { font-size: 0.6563rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.bp-val { font-size: 2.5rem; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.bp-unit { font-size: 0.7188rem; color: var(--ink3); }
.bp-chip { display: flex; justify-content: center; margin-top: 6px; }
.bp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; text-align: center; }
.bp-stats > div { padding: 10px 6px; border-radius: 14px; background: var(--surface2); }
.bp-stats span { display: block; font-size: 0.6563rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.bp-stats b { display: block; font-size: 1.1875rem; font-weight: 500; margin-top: 3px; }
.bp-stats small { font-size: 0.6563rem; color: var(--ink3); }
.bp-ctl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.bp-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface2); }
.bp-segb { font: inherit; border: 0; background: transparent; color: var(--ink3); min-width: 40px; height: 30px; border-radius: 9px; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.bp-segb.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.bp-nav { display: flex; align-items: center; gap: 4px; }
.bp-range { font-size: 0.7813rem; font-weight: 500; min-width: 108px; text-align: center; color: var(--ink2); }
.bp-arrow { font: inherit; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.bp-arrow:disabled { opacity: .25; cursor: default; }
.bp-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 0.6875rem; color: var(--ink3); }
.bp-leg i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.bp-leg .cap { width: 8px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.bp-leg .dash { width: 12px; height: 3px; border-radius: 2px; background: var(--bp-g); }
.bp-leg .band { width: 14px; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--bp-g) 22%, transparent); }
.bp-chart { position: relative; margin-top: 8px; }
.bp-chart svg { display: block; overflow: visible; }
.bp-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.bp-band { fill: color-mix(in srgb, var(--bp-g) 14%, transparent); }
.bp-yl { font-size: 9px; fill: var(--ink3); }
.bp-xl { font-size: 10px; fill: var(--ink2); font-weight: 500; }
.bp-xl2 { font-size: 9px; fill: var(--ink3); }
.bp-bar { fill: color-mix(in srgb, var(--ink) 13%, transparent); }
.bp-col { transform-box: fill-box; transform-origin: 50% 100%; animation: bpgrow .7s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes bpgrow { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
.bp-none { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8125rem; color: var(--ink3); }
.bp-add { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; height: 48px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--surface2); color: var(--ink); font: inherit; font-size: 0.7188rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .bp-needle, .bp-col { transition: none; animation: none; } }

/* --- Многослойные кольца (цели и анализы) --- */
.mring-card { display: flex; align-items: center; gap: 18px; padding: 18px; }
.mring { flex: none; }
.mring .ring-bg { stroke: color-mix(in srgb, var(--ink) 8%, transparent); }
.mr-seg { transition: stroke-dasharray 1.3s cubic-bezier(.2, .8, .2, 1); }
.mr-c { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.mr-c b { font-size: 1.75rem; font-weight: 300; letter-spacing: -.03em; }
.mr-c span { font-size: 0.7188rem; color: var(--ink2); }
.mr-c small { font-size: 0.6563rem; color: var(--ink3); }
.rl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rl-l { font-size: 0.625rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--ink3); margin-bottom: 2px; }
.rl-v { display: flex; align-items: baseline; gap: 7px; }
.rl-v i { flex: none; width: 9px; height: 9px; border-radius: 50%; align-self: center; }
.rl-v b { font-size: 1.5rem; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.rl-v span { font-size: 0.75rem; color: var(--ink2); min-width: 0; }
.rl-v.sm b { font-size: 1rem; } .rl-v.sm span { font-size: 0.7188rem; color: var(--ink3); }
@media (max-width: 360px) { .mring-card { flex-direction: column; align-items: stretch; } .mring { align-self: center; } }

.apx button { min-width: 0; } .apx button > div { min-width: 0; }
@media (max-width: 420px) { .apx.two { grid-template-columns: 1fr; } }

/* --- Бар: компактные тонкие строки меню --- */
.menu-item { gap: 12px; padding: 10px 14px; }
.menu-item .em { width: 42px; height: 42px; border-radius: 13px; font-size: 1.25rem; }
.menu-item b { font-size: 0.9062rem; font-weight: 500; line-height: 1.3; }
.menu-item .small { font-size: 0.75rem; line-height: 1.35; }
.menu-item .btn.sm { min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.menu-item .qty button { width: 30px; height: 30px; border-radius: 10px; font-size: 1rem; }
.menu-item .qty b { font-size: 0.875rem; min-width: 20px; }

/* --- Свайп плашек: вправо — убрать, влево — позже; на десктопе — кнопки --- */
.nw { position: relative; margin-top: 14px; border-radius: 20px; overflow: hidden; transition: height .35s cubic-bezier(.3, .8, .3, 1), margin .35s, opacity .3s; --p: 0; }
.nw.out { opacity: 0; margin-top: 0; }
.nw .card.notice { position: relative; z-index: 1; margin: 0; touch-action: pan-y; transition: transform .3s cubic-bezier(.3, .8, .3, 1); }
.nw-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 0.75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-radius: 20px; }
.nw-bg span { opacity: 0; transition: opacity .1s; }
.nw[data-dir="gone"] .nw-bg { background: color-mix(in srgb, var(--red) 28%, var(--bg)); color: var(--red); }
.nw[data-dir="later"] .nw-bg { background: color-mix(in srgb, var(--amber) 26%, var(--bg)); color: var(--amber); }
.nw[data-dir="gone"] .nw-gone, .nw[data-dir="later"] .nw-later { opacity: var(--p); }
.notice .n-hide { flex: none; padding: 0 14px; }
.notice .n-pri { min-width: 0; }
@media (max-width: 1023px) { .notice .n-hide { display: none; } .notice .n-pri { flex: 1; } }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-act { font: inherit; background: transparent; border: 0; color: inherit; text-decoration: underline; font-weight: 700; cursor: pointer; padding: 0; }
