/* Оформление в стиле Apple: Liquid Glass. Подключается последним и переопределяет токены и материалы. */
:root {
  /* палитра: кольца Apple Fitness + системные цвета */
  --accent: #B5F02B; --accent-press: #A2DE12; --accent-ink: #3C6E00; --accent-soft: rgba(150,215,20,.18); --on-accent: #0C1600;
  --lime-200: #E4FFA6; --lime-300: #CDFA5A; --lime-400: #B5F02B; --lime-500: #9FDF10; --lime-600: #7FBF00; --lime-700: #3C6E00;
  --mint-500: #3ADBC8; --mint-600: #00B8A9; --mint-ink: #007A70;
  --sky-400: #5AC8FA; --sky-600: #0A84FF; --sky-ink: #0A6CD6;
  --copper: #D97300; --copper-soft: rgba(255,149,0,.16);
  --danger: #FF3B30; --danger-soft: rgba(255,59,48,.12);
  --ok: #30C456; --ok-ink: #1C7F36; --ok-soft: rgba(52,199,89,.15);
  --warn: #FF9500; --warn-ink: #B25E00; --warn-soft: rgba(255,149,0,.14);
  --info: #007AFF; --info-soft: rgba(0,122,255,.10);
  --macro-p: #7FBF00; --macro-f: #00B8A9; --macro-c: #0A84FF;
  --ring-track: rgba(120,120,128,.16);
  --bg: #F2F2F7;
  --surface: rgba(255,255,255,.64);
  --surface-2: rgba(120,120,128,.12);
  --surface-solid: #ffffff;
  --border: rgba(60,60,67,.13);
  --border-strong: rgba(60,60,67,.24);
  --text: #0B0B0F; --text-2: #5C5C64; --text-3: #7B7B83;
  --overlay: rgba(12,14,24,.26);
  --knob: #fff;
  --glass-fill: rgba(255,255,255,.5);
  --glass-thick: rgba(246,246,250,.78);
  --glass-edge: rgba(255,255,255,.8);
  --glass-btn: rgba(255,255,255,.72);
  --glass-dark: rgba(28,28,34,.74);
  --glass-hl: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), inset 0 10px 14px -12px rgba(255,255,255,.9);
  --glass-blur: blur(26px) saturate(190%);
  --glass-shadow: 0 12px 32px -10px rgba(20,30,60,.24), 0 2px 6px rgba(20,30,60,.06);
  --card-shadow: 0 10px 30px -16px rgba(20,30,60,.2), 0 1px 2px rgba(20,30,60,.04);
  --shadow-sheet: 0 -16px 48px rgba(20,30,60,.2);
  --field: rgba(255,255,255,.72);
  --tab-on: rgba(120,120,128,.16);
  --seg-on: #fff;
  --hero-bg: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.52) 58%, rgba(181,240,43,.26));
  --cta-bg: linear-gradient(160deg, rgba(205,250,90,.38), rgba(181,240,43,.14));
  --cta-edge: rgba(200,245,110,.75);
  --orb-1: rgba(181,240,43,.46); --orb-2: rgba(90,200,250,.40); --orb-3: rgba(255,120,150,.18); --orb-4: rgba(58,219,200,.30);
  --accent-grad: linear-gradient(180deg, #D2FB63 0%, #B5F02B 55%, #A4E416 100%);
  --accent-glow: 0 8px 20px -8px rgba(120,185,0,.7);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --accent-ink: #C8F751; --accent-soft: rgba(181,240,43,.16);
  --mint-ink: #5FE6DA; --sky-ink: #6CB8FF;
  --copper: #FF9F0A; --copper-soft: rgba(255,159,10,.18);
  --danger: #FF453A; --danger-soft: rgba(255,69,58,.18);
  --ok: #30D158; --ok-ink: #4ADE78; --ok-soft: rgba(48,209,88,.16);
  --warn-ink: #FFB340; --info-soft: rgba(10,132,255,.18);
  --ring-track: rgba(140,140,150,.22);
  --bg: #000000;
  --surface: rgba(46,46,52,.58);
  --surface-2: rgba(120,120,128,.24);
  --surface-solid: #1C1C1E;
  --border: rgba(150,150,160,.2);
  --border-strong: rgba(170,170,180,.34);
  --text: #ffffff; --text-2: #A9A9B1; --text-3: #86868E;
  --overlay: rgba(0,0,0,.5);
  --knob: #636366;
  --glass-fill: rgba(40,40,46,.55);
  --glass-thick: rgba(26,26,30,.8);
  --glass-edge: rgba(255,255,255,.12);
  --glass-btn: rgba(120,120,128,.3);
  --glass-dark: rgba(60,60,68,.72);
  --glass-hl: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(255,255,255,.04), inset 0 10px 14px -12px rgba(255,255,255,.14);
  --glass-shadow: 0 14px 36px -10px rgba(0,0,0,.75), 0 2px 6px rgba(0,0,0,.4);
  --card-shadow: 0 12px 32px -18px rgba(0,0,0,.9);
  --shadow-sheet: 0 -16px 48px rgba(0,0,0,.6);
  --field: rgba(120,120,128,.22);
  --tab-on: rgba(255,255,255,.14);
  --seg-on: rgba(130,130,140,.6);
  --hero-bg: linear-gradient(145deg, rgba(64,64,72,.66), rgba(46,46,52,.5) 58%, rgba(181,240,43,.16));
  --cta-bg: linear-gradient(160deg, rgba(181,240,43,.2), rgba(181,240,43,.07));
  --cta-edge: rgba(181,240,43,.28);
  --orb-1: rgba(150,215,20,.22); --orb-2: rgba(10,132,255,.30); --orb-3: rgba(94,92,230,.24); --orb-4: rgba(0,184,169,.18);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent-ink: #C8F751; --accent-soft: rgba(181,240,43,.16);
  --mint-ink: #5FE6DA; --sky-ink: #6CB8FF;
  --copper: #FF9F0A; --copper-soft: rgba(255,159,10,.18);
  --danger: #FF453A; --danger-soft: rgba(255,69,58,.18);
  --ok: #30D158; --ok-ink: #4ADE78; --ok-soft: rgba(48,209,88,.16);
  --warn-ink: #FFB340; --info-soft: rgba(10,132,255,.18);
  --ring-track: rgba(140,140,150,.22);
  --bg: #000000;
  --surface: rgba(46,46,52,.58);
  --surface-2: rgba(120,120,128,.24);
  --surface-solid: #1C1C1E;
  --border: rgba(150,150,160,.2);
  --border-strong: rgba(170,170,180,.34);
  --text: #ffffff; --text-2: #A9A9B1; --text-3: #86868E;
  --overlay: rgba(0,0,0,.5);
  --knob: #636366;
  --glass-fill: rgba(40,40,46,.55);
  --glass-thick: rgba(26,26,30,.8);
  --glass-edge: rgba(255,255,255,.12);
  --glass-btn: rgba(120,120,128,.3);
  --glass-dark: rgba(60,60,68,.72);
  --glass-hl: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(255,255,255,.04), inset 0 10px 14px -12px rgba(255,255,255,.14);
  --glass-shadow: 0 14px 36px -10px rgba(0,0,0,.75), 0 2px 6px rgba(0,0,0,.4);
  --card-shadow: 0 12px 32px -18px rgba(0,0,0,.9);
  --shadow-sheet: 0 -16px 48px rgba(0,0,0,.6);
  --field: rgba(120,120,128,.22);
  --tab-on: rgba(255,255,255,.14);
  --seg-on: rgba(130,130,140,.6);
  --hero-bg: linear-gradient(145deg, rgba(64,64,72,.66), rgba(46,46,52,.5) 58%, rgba(181,240,43,.16));
  --cta-bg: linear-gradient(160deg, rgba(181,240,43,.2), rgba(181,240,43,.07));
  --cta-edge: rgba(181,240,43,.28);
  --orb-1: rgba(150,215,20,.22); --orb-2: rgba(10,132,255,.30); --orb-3: rgba(94,92,230,.24); --orb-4: rgba(0,184,169,.18);
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* палитра: кольца Apple Fitness + системные цвета */
  --accent: #B5F02B; --accent-press: #A2DE12; --accent-ink: #3C6E00; --accent-soft: rgba(150,215,20,.18); --on-accent: #0C1600;
  --lime-200: #E4FFA6; --lime-300: #CDFA5A; --lime-400: #B5F02B; --lime-500: #9FDF10; --lime-600: #7FBF00; --lime-700: #3C6E00;
  --mint-500: #3ADBC8; --mint-600: #00B8A9; --mint-ink: #007A70;
  --sky-400: #5AC8FA; --sky-600: #0A84FF; --sky-ink: #0A6CD6;
  --copper: #D97300; --copper-soft: rgba(255,149,0,.16);
  --danger: #FF3B30; --danger-soft: rgba(255,59,48,.12);
  --ok: #30C456; --ok-ink: #1C7F36; --ok-soft: rgba(52,199,89,.15);
  --warn: #FF9500; --warn-ink: #B25E00; --warn-soft: rgba(255,149,0,.14);
  --info: #007AFF; --info-soft: rgba(0,122,255,.10);
  --macro-p: #7FBF00; --macro-f: #00B8A9; --macro-c: #0A84FF;
  --ring-track: rgba(120,120,128,.16);
  --bg: #F2F2F7;
  --surface: rgba(255,255,255,.64);
  --surface-2: rgba(120,120,128,.12);
  --surface-solid: #ffffff;
  --border: rgba(60,60,67,.13);
  --border-strong: rgba(60,60,67,.24);
  --text: #0B0B0F; --text-2: #5C5C64; --text-3: #7B7B83;
  --overlay: rgba(12,14,24,.26);
  --knob: #fff;
  --glass-fill: rgba(255,255,255,.5);
  --glass-thick: rgba(246,246,250,.78);
  --glass-edge: rgba(255,255,255,.8);
  --glass-btn: rgba(255,255,255,.72);
  --glass-dark: rgba(28,28,34,.74);
  --glass-hl: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(255,255,255,.3), inset 0 10px 14px -12px rgba(255,255,255,.9);
  --glass-blur: blur(26px) saturate(190%);
  --glass-shadow: 0 12px 32px -10px rgba(20,30,60,.24), 0 2px 6px rgba(20,30,60,.06);
  --card-shadow: 0 10px 30px -16px rgba(20,30,60,.2), 0 1px 2px rgba(20,30,60,.04);
  --shadow-sheet: 0 -16px 48px rgba(20,30,60,.2);
  --field: rgba(255,255,255,.72);
  --tab-on: rgba(120,120,128,.16);
  --seg-on: #fff;
  --hero-bg: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.52) 58%, rgba(181,240,43,.26));
  --cta-bg: linear-gradient(160deg, rgba(205,250,90,.38), rgba(181,240,43,.14));
  --cta-edge: rgba(200,245,110,.75);
  --orb-1: rgba(181,240,43,.46); --orb-2: rgba(90,200,250,.40); --orb-3: rgba(255,120,150,.18); --orb-4: rgba(58,219,200,.30);
  --accent-grad: linear-gradient(180deg, #D2FB63 0%, #B5F02B 55%, #A4E416 100%);
  --accent-glow: 0 8px 20px -8px rgba(120,185,0,.7);
  color-scheme: light;
}

/* ---------- фон: мягкие цветные пятна, сквозь которые «читается» стекло ---------- */
html { background: var(--bg); }
body { background: transparent; letter-spacing: -.005em; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 34% at 8% 4%, var(--orb-1), transparent 70%),
    radial-gradient(64% 36% at 96% 12%, var(--orb-2), transparent 70%),
    radial-gradient(70% 40% at 88% 92%, var(--orb-3), transparent 70%),
    radial-gradient(60% 34% at 2% 74%, var(--orb-4), transparent 70%),
    var(--bg); }

/* ---------- типографика ---------- */
:root { --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif; --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --tabbar-h: 64px; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.024em; }
.page-head.nav h1 { font-size: 28px; }
.eyebrow { letter-spacing: .05em; font-weight: 600; }
.num, .ring .inner .v, .stats-3 .v, .kv-list .v, .num-input, .rest .time, .badge .circ .v, .daybadge .dn, .home-rings .hr .v, .mini-stats b, .slot, .tile .tv, .records .row .w, .lastbox b { font-family: var(--font-num); }

/* ---------- стеклянные поверхности ---------- */
.card, .ex-card, .list-row { background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl), var(--card-shadow); }
.card, .ex-card { border-radius: var(--r-xl); }
.list-row { border-radius: 20px; }
.list-row:active { background: var(--glass-btn); }
.list-row.on { border-color: var(--cta-edge); background: var(--cta-bg); }
.card.hero { background: var(--hero-bg); border-color: var(--glass-edge); box-shadow: var(--glass-hl), var(--glass-shadow); }
.card.cta { background: var(--cta-bg); border-color: var(--cta-edge); }
.sheet .card, .sheet .list-row { box-shadow: var(--glass-hl); }
.ex-card.done { border-color: rgba(52,199,89,.45); }
.install-hint { border: 1px solid var(--glass-edge); border-radius: var(--r-lg); }
.home-rings .hr, .tile, .daybadge, .lastbox, .kv-box { box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }

/* плавающие панели — настоящее размытие содержимого под ними */
.tabbar, .session-head, .composer { background: var(--glass-fill); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.tabbar { height: var(--tabbar-h); padding: 5px; border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl), var(--glass-shadow); }
.tabbar a { flex-direction: column; gap: 1px; height: 54px; color: var(--text-2); font-size: 10px; font-weight: 600; letter-spacing: 0; }
.tabbar a .ic { width: 24px; height: 24px; stroke-width: 1.8; }
.tabbar a.on { background: var(--tab-on); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.session-head { border-bottom: 1px solid var(--glass-edge); box-shadow: 0 8px 24px -16px rgba(20,30,60,.3); }
.composer { border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl), var(--glass-shadow); }
.overlay { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { background: var(--glass-thick); -webkit-backdrop-filter: blur(40px) saturate(190%); backdrop-filter: blur(40px) saturate(190%); border: 1px solid var(--glass-edge); border-bottom: 0; border-radius: 32px 32px 0 0; box-shadow: var(--glass-hl), var(--shadow-sheet); }
.sheet .sheet-foot { background: transparent; }
.sheet .handle { width: 36px; background: var(--border-strong); }
.toast { background: var(--glass-dark); color: #fff; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,.14); box-shadow: var(--glass-shadow); }
.rest > div { background: var(--glass-dark); color: #fff; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), var(--glass-shadow); }
.rest .btn { background: rgba(255,255,255,.18); color: #fff; border-color: transparent; box-shadow: none; }
.rest.over > div { background: var(--accent-grad); color: var(--on-accent); }
.banner > button { background: var(--accent-grad); border: 1px solid rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--accent-glow), var(--glass-shadow); }
.banner .play { background: #0C1600; color: var(--lime-300); }

/* ---------- кнопки ---------- */
.btn { background: var(--glass-btn); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl), 0 2px 8px -4px rgba(20,30,60,.2); font-weight: 600; letter-spacing: -.01em; }
.btn.primary { background: var(--accent-grad); border-color: rgba(255,255,255,.55); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -8px 12px -8px rgba(70,120,0,.35), var(--accent-glow); }
.btn.primary:active { background: var(--accent-press); }
.btn.soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); box-shadow: none; }
.btn.primary.danger, .sheet-foot .btn.danger { background: linear-gradient(180deg, #FF6259, var(--danger)); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px -8px rgba(255,59,48,.6); }
.icon-btn, .back { background: var(--glass-btn); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl), 0 2px 8px -4px rgba(20,30,60,.2); }
.icon-btn.outline { background: var(--glass-btn); border-color: var(--glass-edge); }
.icon-btn.accent { background: var(--accent-grad); border-color: rgba(255,255,255,.55); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), var(--accent-glow); }
.auth-cta > .icon-btn { box-shadow: none; border-color: transparent; }
.chip { background: var(--glass-btn); border: 1px solid var(--glass-edge); box-shadow: var(--glass-hl); }
.chip.on { background: var(--accent-grad); border-color: rgba(255,255,255,.55); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), var(--accent-glow); }
.seg { background: var(--surface-2); border-radius: 999px; padding: 3px; box-shadow: inset 0 1px 2px rgba(0,0,0,.06); }
.seg button { border-radius: 999px; }
.seg button.on { background: var(--seg-on); box-shadow: 0 2px 8px -2px rgba(20,30,60,.25), inset 0 1px 0 rgba(255,255,255,.6); }
.dashed-btn { border-color: var(--border-strong); border-radius: var(--r-xl); background: var(--surface-2); }
.dashed-btn .plus, .ex-foot .add .plus, .tile .tv .plus, .numbered { background: var(--accent-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.slot { background: var(--glass-btn); border-color: var(--glass-edge); box-shadow: var(--glass-hl); }
.slot.on { background: var(--accent-grad); border-color: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), var(--accent-glow); }

/* ---------- поля ---------- */
.input { background: var(--field); border: 1px solid var(--border); border-radius: var(--r-md); }
.input:focus { border-color: var(--lime-500); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer .input, .composer .input:focus { background: transparent; border: 0; box-shadow: none; }
.num-input { border-radius: 14px; }
.num-input:focus { box-shadow: 0 0 0 2px var(--lime-500); }
.sets2 .check { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.sets2 .check.on { background: linear-gradient(180deg, #4BDD72, var(--ok)); border-color: rgba(255,255,255,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 14px -6px rgba(40,180,80,.7); color: #fff; }
.circle-check.on { background: var(--accent-grad); }
.sets2 > .hd .circle-check.on { background: var(--ok); }

/* ---------- мелочи, где нужен непрозрачный цвет ---------- */
.avatar > div { background: var(--surface-solid); }
.chart .pt { fill: var(--surface-solid); }
.badge .circ > div { background: #17171A; }
.badge .circ { box-shadow: 0 8px 18px -8px rgba(10,132,255,.5); }
.badge.copper .circ { background: conic-gradient(#FFB340, #FF9500, #FFB340); box-shadow: 0 8px 18px -8px rgba(255,149,0,.55); }
.badge.copper .circ .v { color: #FFB340; }
.weekstrip .dn.today { background: var(--text); color: var(--bg); }
.msg { box-shadow: var(--glass-hl); border-color: var(--glass-edge); }
.msg.me { background: var(--accent-grad); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.chat-sys { background: var(--surface-2); }
.wk7 > div.on, .daybadge.on, .thumb.lime, .cal .day.sel { background: var(--accent-grad); }
.thumb { border-radius: 14px; }
.progress { height: 8px; border-radius: 999px; }
.progress > i { border-radius: 999px; }
.bars .bar { background: var(--accent-grad); border-radius: 6px 6px 3px 3px; }
.heat i.on { background: var(--sky-600); }
.scan { border: 1px solid var(--glass-edge); }
.tab-badge { background: var(--danger); box-shadow: 0 0 0 2px var(--glass-thick); }
.splash { background: var(--bg); }
.nc-ico, .ach .a.on .ico { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px -6px rgba(20,30,60,.35); }
@media (prefers-reduced-transparency: reduce) { .tabbar, .session-head, .composer, .sheet, .toast, .rest > div { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface-solid); } .toast, .rest > div { background: #1C1C1E; } }
.session-head .btn { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.session-head .sub { font-size: 13px; }
.session-head h1 { font-size: 20px; }
.tabbar a span { white-space: nowrap; }
