/* ═══ VitaTrack design system · v3 — business class ═══ */
@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f5f7;
  --bg-glow1: rgba(13, 110, 84, 0.05);
  --bg-glow2: rgba(30, 58, 95, 0.04);
  --surface: #ffffff;
  --surface2: #eef0f2;
  --text: #101828;
  --text2: #52606d;
  --text3: #98a2ae;
  --border: rgba(16, 24, 40, 0.08);
  --accent: #0d6e54;
  --accent2: #12866a;
  --accent-deep: #08503d;
  --accent-soft: rgba(13, 110, 84, 0.09);
  --blue: #2f6fb2; --blue-soft: rgba(47, 111, 178, 0.10);
  --orange: #b7791f; --orange-soft: rgba(183, 121, 31, 0.11);
  --red: #c0392b; --red-soft: rgba(192, 57, 43, 0.10);
  --purple: #0e8fa3; --purple-soft: rgba(14, 143, 163, 0.11); /* "purple" slot now holds the cyan used for fasting */
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 16px 44px rgba(16, 24, 40, 0.18);
  --radius: 16px;
  --nav-h: 92px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0c1015;
  --bg-glow1: rgba(18, 134, 106, 0.06);
  --bg-glow2: rgba(47, 111, 178, 0.05);
  --surface: #182029;
  --surface2: #222c38;
  --text: #e9edf2;
  --text2: #9aa7b4;
  --text3: #5d6b7a;
  --border: rgba(233, 237, 242, 0.07);
  --accent: #2ea888;
  --accent2: #2ea888;
  --accent-deep: #0d6e54;
  --accent-soft: rgba(46, 168, 136, 0.12);
  --blue: #5b93cf; --blue-soft: rgba(91, 147, 207, 0.12);
  --orange: #d09540; --orange-soft: rgba(208, 149, 64, 0.12);
  --red: #d65f52; --red-soft: rgba(214, 95, 82, 0.12);
  --purple: #37c0d8; --purple-soft: rgba(55, 192, 216, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font); color: var(--text);
  letter-spacing: -0.011em;
  font-feature-settings: 'cv05', 'cv11'; /* Inter: open lowercase l, single-storey a alternates off — cleaner UI look */
  min-height: 100vh; overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(900px 600px at 115% -5%, var(--bg-glow1), transparent 60%),
    radial-gradient(800px 600px at -15% 108%, var(--bg-glow2), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  transition: background 0.3s;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
::selection { background: var(--accent-soft); }

/* ── Motion ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes popIn { 0% { transform: scale(0.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Boot splash ── */
.boot-splash {
  height: 100vh; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0f5c46, #07352a); color: #fff;
}
.boot-logo { animation: bounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); display: flex; }
.boot-logo svg { width: 58px; height: 58px; }
.boot-name { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; }
.spinner {
  width: 26px; height: 26px; border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* ── Layout ── */
.screen {
  max-width: 560px; margin: 0 auto; padding: 18px 16px calc(var(--nav-h) + 26px);
  animation: fadeUp 0.35s ease both;
}
.screen-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 18px; }
.screen-title { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.15; }
.screen-sub { color: var(--text2); font-size: 13.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px; }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(13, 110, 84, 0.3);
  transition: transform 0.15s;
}
.avatar:active { transform: scale(0.9); }

.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px;
  animation: fadeUp 0.45s cubic-bezier(0.21, 0.61, 0.35, 1) both;
}
.screen .card:nth-of-type(2) { animation-delay: 0.05s; }
.screen .card:nth-of-type(3) { animation-delay: 0.10s; }
.screen .card:nth-of-type(4) { animation-delay: 0.15s; }
.screen .card:nth-of-type(5) { animation-delay: 0.20s; }
.card-title { font-size: 15px; font-weight: 750; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.card-title .icon {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}

.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.muted { color: var(--text2); font-size: 13px; }
.tiny { color: var(--text3); font-size: 12px; }
.spacer { height: 8px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #fff; font-weight: 650; font-size: 15.5px; letter-spacing: 0.1px;
  border-radius: 12px; padding: 14px 22px; width: 100%;
  transition: transform 0.13s, box-shadow 0.2s, opacity 0.2s, background 0.2s;
  box-shadow: 0 2px 8px rgba(13, 110, 84, 0.28);
}
.btn:active { transform: scale(0.98); background: var(--accent-deep); }
.btn:disabled { opacity: 0.55; box-shadow: none; }
.btn.secondary { background: var(--surface2); color: var(--text); box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; padding: 10px; }
.btn.small { padding: 10px 15px; font-size: 14px; width: auto; border-radius: 12px; }
.iconbtn {
  width: 42px; height: 42px; border-radius: 13px; background: var(--surface2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  transition: transform 0.12s; flex: none;
}
.iconbtn:active { transform: scale(0.88); }

/* ── Forms ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 650; color: var(--text2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface2); border: 1.5px solid transparent;
  border-radius: 14px; padding: 13px 15px; outline: none; transition: border 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft);
}
.grams-in {
  width: 62px; background: var(--surface2); border: none; border-radius: 10px;
  padding: 9px 6px; text-align: center; font-weight: 600;
}
.seg { display: flex; background: var(--surface2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; padding: 10px 4px; border-radius: 11px; font-size: 13px; font-weight: 650;
  color: var(--text2); transition: all 0.22s; white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px; border-radius: 999px; background: var(--surface);
  font-size: 13.5px; font-weight: 650; color: var(--text2); transition: all 0.2s;
  box-shadow: var(--shadow);
}
.chip.on {
  background: var(--accent);
  color: #fff; box-shadow: 0 2px 8px rgba(13, 110, 84, 0.28);
}

/* ── Auth ── */
.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  max-width: 420px; margin: 0 auto; padding: 24px;
}
.auth-hero { text-align: center; margin-bottom: 28px; animation: fadeUp 0.5s ease both; }
.auth-hero .logo { animation: floaty 3.4s ease-in-out infinite; }
.auth-hero h1 {
  font-size: 32px; font-weight: 800; margin-top: 16px; letter-spacing: -0.6px;
  color: var(--text);
}
.auth-hero p { color: var(--text2); margin-top: 8px; font-size: 15px; line-height: 1.55; }
.auth-toggle { text-align: center; margin-top: 18px; color: var(--text2); font-size: 14.5px; }
.auth-toggle b { color: var(--accent); cursor: pointer; }
.error-msg {
  background: var(--red-soft); color: var(--red); border-radius: 13px;
  padding: 11px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px;
  animation: popIn 0.25s ease both;
}

/* ── Onboarding ── */
.ob-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.ob-progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface2); transition: background 0.4s; }
.ob-progress span.done { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.ob-step h2 { font-size: 25px; font-weight: 800; letter-spacing: -0.4px; }
.ob-step .sub { color: var(--text2); margin: 6px 0 22px; font-size: 15px; line-height: 1.5; }

/* ── Bottom nav (floating pill) ── */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(430px, calc(100% - 24px)); z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 30px;
  display: flex; justify-content: space-around; align-items: center;
  height: 68px; padding: 0 8px;
  box-shadow: var(--shadow-lg);
}
.bottom-nav button[data-v] {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 650; color: var(--text3); width: 58px;
  padding: 6px 0; border-radius: 16px; position: relative;
  transition: color 0.2s, transform 0.15s;
}
.bottom-nav button[data-v] svg { width: 23px; height: 23px; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.bottom-nav button[data-v].on { color: var(--accent); }
.bottom-nav button[data-v].on svg { transform: translateY(-1px) scale(1.12); }
.bottom-nav button[data-v].on::after {
  content: ""; position: absolute; bottom: 1px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
}
.bottom-nav button[data-v]:active { transform: scale(0.9); }
.nav-fab {
  width: 52px; height: 52px; margin-top: -28px; border-radius: 50%;
  background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(13, 110, 84, 0.4);
  font-size: 26px; font-weight: 400; flex: none;
  border: 3px solid var(--bg);
  transition: transform 0.15s;
}
.nav-fab:active { transform: scale(0.92); }

/* ── Calorie hero ── */
.calorie-hero {
  background: linear-gradient(160deg, #0f5c46 0%, #0a4636 55%, #07352a 100%);
  color: #fff; border: none; text-align: center; padding: 26px 20px 20px;
  box-shadow: 0 12px 32px rgba(10, 70, 54, 0.32);
}
.calorie-hero.over {
  background: linear-gradient(160deg, #8a5a18 0%, #74471a 55%, #5c3813 100%);
  box-shadow: 0 12px 32px rgba(116, 71, 26, 0.32);
}
.calorie-hero .ring-center .big { color: #fff; font-size: 38px; }
.calorie-hero .ring-center .lbl { color: rgba(255, 255, 255, 0.85); }
.hero-stats { display: flex; justify-content: space-around; margin-top: 18px; }
.hero-stats b { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; display: block; }
.hero-stats span { font-size: 11.5px; color: rgba(255, 255, 255, 0.8); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Hero layout: ring + macros side by side ── */
.hero-flex { display: flex; align-items: center; gap: 18px; text-align: left; }
.hero-macros { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hmacro .row { justify-content: space-between; font-size: 12px; font-weight: 650; margin-bottom: 4px; gap: 6px; }
.hmacro .row em { font-style: normal; font-weight: 500; opacity: 0.75; font-size: 11px; }
.hbar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 3px; background: #fff; width: 0; transition: width 1s cubic-bezier(0.33, 1, 0.68, 1); }
.hero-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-foot > div > b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-foot > div > span { font-size: 11px; opacity: 0.75; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 5px; }
.hero-foot .score-pill { margin-top: 0; padding: 6px 12px; font-size: 12.5px; }

/* ── Quick actions ── */
.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--surface); border-radius: 14px;
  padding: 13px 4px; box-shadow: var(--shadow); color: var(--accent);
  transition: transform 0.13s, background 0.2s;
  animation: fadeUp 0.4s ease both; animation-delay: 0.05s;
}
.quick-btn span { font-size: 11.5px; font-weight: 650; color: var(--text2); white-space: nowrap; }
.quick-btn:active { transform: scale(0.93); background: var(--surface2); }

/* ── Status tiles ── */
.tile { padding: 15px 16px; margin-bottom: 0; cursor: pointer; }
.tile:active { transform: scale(0.98); }
.tile-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 7px; }
.tile-big { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; }
.tile .bar { height: 6px; }
.tile u { cursor: pointer; }
.screen > .grid2 { margin-bottom: 14px; }
.grid2 .card.tile { margin-bottom: 0; }

/* ── Progress rings ── */
.ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface2); }
.ring-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(0.33, 1, 0.68, 1); }
.ring-center { position: absolute; text-align: center; }
.ring-center .big { font-size: 31px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring-center .lbl { font-size: 12px; color: var(--text2); font-weight: 600; }

/* ── Macro bars ── */
.macro { margin-bottom: 13px; }
.macro:last-child { margin-bottom: 0; }
.macro .row { justify-content: space-between; font-size: 13.5px; font-weight: 650; margin-bottom: 6px; }
.macro .val { color: var(--text2); font-weight: 550; font-variant-numeric: tabular-nums; }
.bar { height: 9px; border-radius: 5px; background: var(--surface2); overflow: hidden; }
.bar i {
  display: block; height: 100%; border-radius: 5px;
  transition: width 1s cubic-bezier(0.33, 1, 0.68, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Stat tiles ── */
.stat-tile {
  background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow); padding: 15px 10px; text-align: center;
  animation: fadeUp 0.45s ease both;
}
.stat-tile:nth-child(2) { animation-delay: 0.06s; }
.stat-tile:nth-child(3) { animation-delay: 0.12s; }
.stat-tile .emoji { font-size: 23px; }
.stat-tile .v { font-size: 20px; font-weight: 800; margin-top: 5px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.stat-tile .k { font-size: 11px; color: var(--text2); font-weight: 650; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── Diary ── */
.meal-group { margin-bottom: 4px; }
.meal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.meal-head h3 { font-size: 15.5px; font-weight: 750; display: flex; gap: 8px; align-items: center; }
.meal-head .kc { font-size: 13px; color: var(--text2); font-weight: 650; font-variant-numeric: tabular-nums; }
.food-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--border); animation: fadeUp 0.3s ease both;
}
.food-row:last-child { border-bottom: none; }
.food-row .n { font-weight: 650; font-size: 14.5px; }
.food-row .d { font-size: 12px; color: var(--text2); margin-top: 2px; }
.food-row .kcal { font-weight: 750; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.del { color: var(--text3); font-size: 16px; padding: 6px; border-radius: 8px; transition: color 0.2s; }
.del:active { color: var(--red); background: var(--red-soft); }

/* ── Fasting ── */
.fast-stage {
  display: flex; gap: 11px; padding: 13px; border-radius: 15px;
  background: var(--surface2); margin-top: 10px; align-items: center;
  font-size: 13.5px; line-height: 1.5;
}
.fast-stage .em { font-size: 25px; flex: none; }

/* ── Lists (recipes / workouts) ── */
.list-item {
  display: flex; gap: 14px; align-items: center; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  transition: transform 0.15s; animation: fadeUp 0.35s ease both;
}
.list-item:nth-child(odd) { animation-delay: 0.04s; }
.list-item:active { transform: scale(0.98); }
.list-item .em {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center; font-size: 27px; flex: none;
}
.list-item h4 { font-size: 15px; font-weight: 750; }
.list-item .meta { font-size: 12.5px; color: var(--text2); margin-top: 3px; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 750; padding: 3.5px 9px;
  border-radius: 999px; margin-right: 5px; margin-top: 6px; letter-spacing: 0.2px;
}
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }

/* ── Charts ── */
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-tabs { display: flex; gap: 8px; margin-bottom: 12px; }

/* ── Modal / sheet ── */
.sheet-veil {
  position: fixed; inset: 0; background: rgba(6, 13, 22, 0.55); z-index: 100;
  animation: fadeIn 0.25s ease both; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  background: var(--surface); border-radius: 28px 28px 0 0;
  max-width: 560px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  padding: 10px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.4s cubic-bezier(0.32, 0.72, 0, 1) both;
  box-shadow: var(--shadow-lg);
}
.sheet-handle { width: 42px; height: 5px; border-radius: 3px; background: var(--text3); opacity: 0.35; margin: 8px auto 16px; }
.sheet h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.3px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 650;
  padding: 12px 22px; border-radius: 999px; z-index: 200; box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both; max-width: 85vw; text-align: center;
}

/* ── Photo / barcode scan ── */
.scan-drop {
  border: 2px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--radius); padding: 32px 16px;
  text-align: center; color: var(--text2); background: var(--accent-soft); cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.scan-drop:active { border-color: var(--accent); transform: scale(0.98); }
.scan-preview { width: 100%; border-radius: 16px; max-height: 260px; object-fit: cover; }
.scan-item { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.skeleton {
  height: 16px; border-radius: 8px; margin: 10px 0;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 800px 100%; animation: shimmer 1.2s infinite linear;
}

/* ── Plan hero (onboarding reveal) ── */
.hero-card {
  background: linear-gradient(160deg, #0f5c46, #07352a);
  color: #fff; border: none; position: relative; overflow: hidden;
  box-shadow: 0 12px 32px rgba(10, 70, 54, 0.32);
}
.hero-card .muted, .hero-card .tiny { color: rgba(255, 255, 255, 0.85); }
.hero-big { font-size: 36px; font-weight: 800; letter-spacing: -1px; }

/* ── Icon system ── */
.ic { vertical-align: -3px; flex: none; }
.card-title .icon .ic { vertical-align: 0; }
.n .ic { vertical-align: -2px; }
.kmark { color: var(--accent); }
.em.ico {
  color: var(--text2); background: var(--surface2);
}
.empty .em { color: var(--text3); }
.brandmark {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 22px;
  background: linear-gradient(160deg, #0f5c46, #07352a); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(10, 70, 54, 0.32);
}
.mini-act .ic { vertical-align: 0; }
.score-pill .ic { vertical-align: -2px; }
.meal-head h3 .ic { color: var(--text2); }

/* ── Noom-style density dots & split bar ── */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 1px; }
.dot-g { background: #2f9e63; }
.dot-y { background: #c9a227; }
.dot-o { background: #c96f2f; }
.split-bar {
  display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  background: var(--surface2); margin-top: 14px; gap: 2px;
}
.split-bar i { display: block; height: 100%; transition: width 0.8s cubic-bezier(0.33, 1, 0.68, 1); }
.split-bar .sb-g { background: #2f9e63; }
.split-bar .sb-y { background: #c9a227; }
.split-bar .sb-o { background: #c96f2f; }
.split-legend { font-size: 11.5px; color: var(--text2); margin-top: 7px; text-align: center; }

/* ── Diary week strip ── */
.day-strip { display: flex; gap: 6px; margin-bottom: 14px; }
.day-pill {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 9px 0; border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.day-pill span { font-size: 10.5px; color: var(--text3); font-weight: 650; text-transform: uppercase; }
.day-pill b { font-size: 15px; font-weight: 750; }
.day-pill.on {
  background: var(--accent);
  border-color: transparent; box-shadow: 0 2px 8px rgba(13, 110, 84, 0.28);
}
.day-pill.on span, .day-pill.on b { color: #fff; }
.day-pill:active { transform: scale(0.93); }

/* ── Meal mini actions ── */
.mini-act {
  width: 30px; height: 30px; border-radius: 9px; background: var(--surface2);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.mini-act:active { transform: scale(0.85); }

/* ── Health score pill ── */
.score-pill {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px; padding: 8px 16px; font-size: 13.5px; font-weight: 650;
  backdrop-filter: blur(4px);
}
.score-pill b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* ── Locked lessons ── */
.list-item.locked { opacity: 0.5; cursor: default; filter: saturate(0.4); }
.list-item.locked:active { transform: none; }

/* ── Misc ── */
.flame { animation: pulse 1.6s ease-in-out infinite; display: inline-block; }
.empty { text-align: center; padding: 32px 16px; color: var(--text2); }
.empty .em { font-size: 46px; margin-bottom: 8px; display: block; }

@media (min-width: 640px) {
  .screen { padding-top: 30px; }
}
