/* ───────────────────────────────────────────
   Трекер — iOS / liquid glass, приглушённая палитра
   ─────────────────────────────────────────── */

:root {
  --bg: #0A0B0F;
  --text: rgba(255, 255, 255, 0.94);
  --text-2: rgba(235, 235, 245, 0.58);
  --text-3: rgba(235, 235, 245, 0.32);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(28, 30, 38, 0.72);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-hi: rgba(255, 255, 255, 0.16);
  --sep: rgba(255, 255, 255, 0.08);
  --fill: rgba(120, 120, 128, 0.20);
  --fill-2: rgba(120, 120, 128, 0.12);
  --accent: #E6D3B3;
  --accent-ink: #1A1712;
  --good: #8FC1A3;
  --bad: #D59A94;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --blob-1: #2B3A55;
  --blob-2: #4A3550;
  --blob-3: #1F4744;
  --radius: 24px;
  --tabbar-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom), 10px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #EEEEF3;
  --text: rgba(0, 0, 0, 0.88);
  --text-2: rgba(60, 60, 67, 0.62);
  --text-3: rgba(60, 60, 67, 0.34);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(250, 250, 252, 0.82);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --sep: rgba(60, 60, 67, 0.12);
  --fill: rgba(120, 120, 128, 0.16);
  --fill-2: rgba(120, 120, 128, 0.08);
  --accent: #6E5A3C;
  --accent-ink: #FFFFFF;
  --good: #3F8A5E;
  --bad: #B5554C;
  --shadow: 0 10px 30px rgba(30, 30, 60, 0.10);
  --blob-1: #C9D3E8;
  --blob-2: #E3D2DE;
  --blob-3: #CBE2DC;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; height: 100%; overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
body { position: fixed; inset: 0; }

input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { user-select: text; -webkit-user-select: text; font-size: 16px; } /* < 16px — iOS зумит при фокусе */
button { background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }

/* ─── Фон ─── */
.backdrop { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(80px); opacity: 0.55;
  animation: drift 38s ease-in-out infinite alternate;
}
.b1 { background: var(--blob-1); top: -30vmax; left: -25vmax; }
.b2 { background: var(--blob-2); bottom: -35vmax; right: -30vmax; animation-delay: -12s; }
.b3 { background: var(--blob-3); top: 30%; left: 35%; width: 45vmax; height: 45vmax; opacity: 0.35; animation-delay: -24s; }
.glow {
  position: fixed; left: 50%; top: -10vh; width: 120vw; height: 60vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow, transparent), transparent);
  opacity: 0.28; pointer-events: none; transition: background 0.8s ease;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ─── Скролл: страница не тянется вниз вместе со шторкой ─── */
.scroller {
  position: fixed; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.view {
  min-height: calc(100% + 2px);
  padding: calc(env(safe-area-inset-top) + var(--tg-content-safe-area-inset-top, 0px) + 14px) 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  max-width: 560px; margin: 0 auto;
}

/* ─── Стекло ─── */
.glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 0.5px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.10), transparent 38%, transparent 70%, rgba(255, 255, 255, 0.04));
}
[data-theme="light"] .glass::before { background: linear-gradient(140deg, rgba(255, 255, 255, 0.6), transparent 45%); }

.card { border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.press { transition: transform 0.18s cubic-bezier(.2, .8, .2, 1), opacity 0.18s; }
.press:active { transform: scale(0.97); }

/* ─── Заголовки ─── */
.header { display: flex; align-items: flex-end; justify-content: space-between; margin: 6px 4px 18px; }
.header h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.05; }
.header .sub { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.header .sub::first-letter, .period b::first-letter { text-transform: uppercase; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 20px; height: 20px; stroke: var(--text); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 26px 6px 10px; font-size: 13px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--text-2);
}
.section-title button { color: var(--accent); text-transform: none; letter-spacing: 0; font-size: 15px; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

/* ─── Герой: идущая задача ─── */
.hero { padding: 20px 20px 18px; border-radius: 30px; overflow: hidden; }
.hero .label { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: 0 0 0 0 var(--c); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero .task { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.hero .clock {
  font-size: 68px; font-weight: 200; letter-spacing: -2.5px; line-height: 1; margin: 14px 0 6px;
  font-variant-numeric: tabular-nums;
}
.hero .clock .sec { color: var(--text-3); }
.hero .note {
  width: 100%; border: 0; outline: 0; background: transparent; padding: 6px 0; color: var(--text-2);
}
.hero .note::placeholder { color: var(--text-3); }
.hero .row { display: flex; gap: 10px; margin-top: 14px; }
.hero .idle-title { font-size: 22px; font-weight: 600; margin-top: 10px; }

.btn {
  height: 46px; border-radius: 23px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--fill); font-weight: 600; font-size: 16px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn.grow { flex: 1; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.btn.stop { width: 46px; padding: 0; background: var(--text); color: var(--bg); }
.btn.stop svg { fill: currentColor; stroke: none; width: 14px; height: 14px; }

.progress { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--accent)); transition: width 0.6s ease; }
.goal-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-top: 14px; }

/* ─── Лента дня ─── */
.ribbon { padding: 14px 16px 12px; }
.ribbon-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ribbon-head b { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.track { position: relative; height: 14px; border-radius: 7px; background: var(--fill-2); overflow: hidden; }
.track i { position: absolute; top: 0; bottom: 0; border-radius: 2px; min-width: 2px; }
.track .now { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--text-2); }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* ─── Плитки задач ─── */
.tiles { display: flex; flex-direction: column; gap: 10px; }
.tile {
  border-radius: 20px; padding: 12px 16px 12px 12px; min-height: 64px; width: 100%;
  display: flex; align-items: center; gap: 12px; text-align: left;
  transition: transform 0.18s cubic-bezier(.2, .8, .2, 1), box-shadow 0.4s, border-color 0.4s;
}
.tile:active { transform: scale(0.96); }
.tile .ico {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
}
.tile .ico { flex: none; }
.tile .t { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.2px; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .m { flex: none; font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 7px; }
.tile.on {
  border-color: color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 12px 40px color-mix(in srgb, var(--c) 28%, transparent);
  background: color-mix(in srgb, var(--c) 14%, var(--glass));
}
.tile.on .m { color: var(--text); }
.tile .ring { width: 16px; height: 16px; flex: none; }
.tile.add { justify-content: center; gap: 8px; color: var(--text-2); border-style: dashed; min-height: 52px; }
.tile.add svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; }
.tile .flag { flex: none; font-size: 11px; padding: 3px 7px; border-radius: 8px; background: var(--fill-2); color: var(--text-2); }

.empty { text-align: center; padding: 34px 20px; color: var(--text-2); line-height: 1.45; }
.empty .big { font-size: 42px; margin-bottom: 10px; }

/* ─── Таббар ─── */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: var(--safe-b); width: min(calc(100% - 32px), 420px); height: var(--tabbar-h);
  border-radius: 32px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; z-index: 20;
  background: var(--glass-strong);
}
.tabbar button {
  border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: var(--text-3); transition: color 0.2s, background 0.3s;
}
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--text); background: var(--fill-2); }

/* ─── Сегменты (UISegmentedControl) ─── */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 12px; background: var(--fill-2); margin-bottom: 14px; }
.seg button { position: relative; z-index: 1; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: color 0.2s; }
.seg button.active { color: var(--text); font-weight: 600; }
.seg .thumb {
  position: absolute; top: 3px; bottom: 3px; border-radius: 9px; background: var(--glass-strong);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), inset 0 0.5px 0 var(--glass-hi);
  transition: transform 0.32s cubic-bezier(.3, .9, .3, 1);
}
.seg.small button { height: 28px; font-size: 13px; }

.period { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 14px; }
.period b { font-size: 17px; font-weight: 600; }
.period button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); }
.period button:disabled { opacity: 0.3; }
.period svg { width: 16px; height: 16px; stroke: var(--text); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Аналитика ─── */
.kpi-main { display: flex; align-items: flex-end; justify-content: space-between; }
.kpi-main .v { font-size: 44px; font-weight: 300; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.delta { font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 10px; background: var(--fill-2); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.kpis div { background: var(--fill-2); border-radius: 14px; padding: 10px 11px; }
.kpis b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.kpis span { font-size: 11.5px; color: var(--text-2); }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; margin-top: 6px; }
.bar { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 6px; overflow: hidden; min-height: 2px; background: var(--fill-2); transition: height 0.5s cubic-bezier(.2, .8, .2, 1); }
.bar.today { outline: 1px solid var(--text-3); outline-offset: 2px; }
.bar i { display: block; }
.bar-labels { display: flex; gap: 4px; margin-top: 8px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: visible; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 132px; height: 132px; flex: none; position: relative; }
.donut .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--text-2); }
.donut .c b { display: block; color: var(--text); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend { flex: 1; min-width: 0; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

.list { border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; text-align: left;
  border-bottom: 0.5px solid var(--sep);
}
.row:last-child { border-bottom: 0; }
.row .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.row .main { flex: 1; min-width: 0; }
.row .main .t { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main .s { font-size: 12.5px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.row .side { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }
.row .side small { display: block; font-weight: 400; font-size: 12px; color: var(--text-2); }
.row .minibar { height: 3px; border-radius: 2px; background: var(--fill-2); margin-top: 7px; overflow: hidden; }
.row .minibar i { display: block; height: 100%; background: var(--c); border-radius: 2px; }

.heat { display: grid; grid-template-columns: 22px repeat(24, 1fr); gap: 2px; font-size: 10px; color: var(--text-3); }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--accent); }
.heat .lbl { display: flex; align-items: center; }
.heat .hl { grid-column: span 6; font-size: 10px; }

.insight { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid var(--sep); font-size: 14.5px; line-height: 1.4; }
.insight:last-child { border-bottom: 0; }
.insight .e { font-size: 18px; width: 24px; text-align: center; flex: none; }

/* ─── Решения ─── */
.potential .v { font-size: 38px; font-weight: 300; letter-spacing: -1.2px; font-variant-numeric: tabular-nums; }
.potential .money { color: var(--accent); font-weight: 500; }
.valuebar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 12px 0 8px; background: var(--fill-2); }
.valuebar i { display: block; height: 100%; }
.valuelegend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.valuelegend span { display: flex; align-items: center; gap: 6px; }

.dcard { border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.dcard .head { display: flex; align-items: center; gap: 12px; }
.dcard .head .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.dcard .head .t { font-weight: 600; font-size: 16.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .head .cost { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.dnums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.dnums div { background: var(--fill-2); border-radius: 12px; padding: 9px 10px; }
.dnums b { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dnums span { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 13px; border-radius: 17px; font-size: 14px; font-weight: 500;
  background: var(--fill-2); color: var(--text-2); border: 0.5px solid transparent; transition: all 0.2s;
}
.chip.active { background: var(--dc, var(--accent)); color: #111; font-weight: 600; }
.dnote {
  width: 100%; margin-top: 10px; min-height: 40px; resize: none; border: 0; outline: 0; border-radius: 12px;
  background: var(--fill-2); padding: 10px 12px; color: var(--text); line-height: 1.35;
}
.dnote::placeholder { color: var(--text-3); }
.filters { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }

/* ─── Журнал ─── */
.day-head { display: flex; justify-content: space-between; margin: 22px 6px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-2); }
.entry .bar-c { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }
.entry.live .side { color: var(--accent); }

/* ─── Шторки ─── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.42);
  opacity: 0; transition: opacity 0.3s;
}
.sheet-bg.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92%;
  border-radius: 30px 30px 0 0; padding: 8px 18px calc(var(--safe-b) + 16px);
  background: var(--glass-strong);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-top: 0.5px solid var(--glass-border);
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--glass-hi);
  transform: translateY(100%); transition: transform 0.42s cubic-bezier(.2, .9, .25, 1);
  display: flex; flex-direction: column; max-width: 560px; margin: 0 auto;
}
.sheet.open { transform: translateY(0); }
.sheet .grab { padding: 6px 0 12px; touch-action: none; }
.sheet .grab::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 0 auto; }
.sheet .body { overflow-y: auto; overscroll-behavior: contain; margin: 0 -18px; padding: 0 18px; }
.sheet h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin: 2px 0 16px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 18px; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin: 0 4px 7px; }
.input {
  width: 100%; height: 48px; border-radius: 14px; border: 0; outline: 0; padding: 0 14px;
  background: var(--fill-2); color: var(--text);
}
.input:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.title-row { display: flex; gap: 10px; }
.title-row .emoji-in { width: 56px; text-align: center; font-size: 24px; padding: 0; flex: none; }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 10px; }
.emojis button { height: 38px; border-radius: 10px; font-size: 21px; }
.emojis button.active { background: var(--fill); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.2); transition: transform 0.2s; }
.swatches button.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); transform: scale(1.05); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.opts .chip { height: 36px; }
.opts .chip.active { background: var(--text); color: var(--bg); }
.hint { font-size: 12.5px; color: var(--text-3); margin: 6px 4px 0; line-height: 1.4; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid var(--sep); }
.setting:last-child { border-bottom: 0; }
.setting .l { flex: 1; }
.setting .l small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.setting .input { width: 110px; height: 38px; text-align: right; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--fill); position: relative; transition: background 0.25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); transition: transform 0.28s cubic-bezier(.3, .9, .3, 1); }
.switch.on { background: var(--good); }
.switch.on::after { transform: translateX(20px); }

.stats-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.stats-mini div { background: var(--fill-2); border-radius: 14px; padding: 10px 12px; }
.stats-mini b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stats-mini span { font-size: 12px; color: var(--text-2); }

.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); z-index: 60;
  transform: translate(-50%, -140%); padding: 11px 18px; border-radius: 20px; font-size: 14px; font-weight: 600;
  background: var(--glass-strong); transition: transform 0.4s cubic-bezier(.2, .9, .25, 1); white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }

.fade-in { animation: fadeIn 0.35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
