/* Start Today: design tokens, layout and components */

:root {
  color-scheme: light;
  --bg: #f3f4f8;
  --bg-2: #eceef4;
  --card: #ffffff;
  --card-2: #f6f7fb;
  --line: #e3e6ee;
  --track: #eceef4;
  --text: #0d1017;
  --text-2: #444c5c;
  --muted: #7a8295;
  --grid: #eceef3;
  --brand-1: #ff5a36;
  --brand-2: #ff9f1c;
  --brand-ink: #d63d1b;
  --mint: #0fae7e;
  --violet: #6d4fe0;
  --sky: #2287e6;
  --amber: #e59400;
  --rose: #e2457e;
  --s1: #2a78d6;
  --seq-0: #eceef3; --seq-1: #cde2fb; --seq-2: #86b6ef; --seq-3: #3987e5; --seq-4: #1c5cab;
  --tip-bg: #12151d; --tip-text: #f2f4f8;
  --shadow: 0 1px 2px rgba(16, 20, 30, .04), 0 8px 24px -12px rgba(16, 20, 30, .10);
  --shadow-lg: 0 30px 80px -20px rgba(10, 14, 25, .35);
  --r: 22px;
  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090b10; --bg-2: #0e1118; --card: #131722; --card-2: #191e2b; --line: #232a39; --track: #222938;
    --text: #eef1f7; --text-2: #b6bdcc; --muted: #7d8699; --grid: #1e2431;
    --brand-ink: #ff7a59; --mint: #2ed3a0; --violet: #9b87ff; --sky: #4aa8ff; --amber: #ffb547; --rose: #ff6fa8;
    --s1: #3987e5;
    --seq-0: #1b2130; --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #3987e5; --seq-4: #86b6ef;
    --tip-bg: #f2f4f8; --tip-text: #0d1017;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090b10; --bg-2: #0e1118; --card: #131722; --card-2: #191e2b; --line: #232a39; --track: #222938;
  --text: #eef1f7; --text-2: #b6bdcc; --muted: #7d8699; --grid: #1e2431;
  --brand-ink: #ff7a59; --mint: #2ed3a0; --violet: #9b87ff; --sky: #4aa8ff; --amber: #ffb547; --rose: #ff6fa8;
  --s1: #3987e5;
  --seq-0: #1b2130; --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #3987e5; --seq-4: #86b6ef;
  --tip-bg: #f2f4f8; --tip-text: #0d1017;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 0; }
body.modal-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
input, select, textarea { font: inherit; color: inherit; }
code { font-size: .9em; background: var(--card-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.good { color: var(--mint); }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.w100 { width: 100%; }
.center { text-align: center; justify-content: center; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 26px 16px; border-right: 1px solid var(--line); background: var(--bg-2); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 10px 24px -10px var(--brand-1); }
.brand-mark .ic { width: 22px; height: 22px; }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
#nav { display: flex; flex-direction: column; gap: 4px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14.5px; transition: background .2s, color .2s; }
#nav a:hover { background: var(--card); color: var(--text); }
#nav a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
#nav a.on .ic { color: var(--brand-1); }
.side-quote { margin-top: auto; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.side-quote p { font-family: var(--serif); font-size: 21px; line-height: 1.15; }
.side-quote span { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }
.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 80px; max-width: 1360px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.page-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--text-2); transition: transform .15s, color .15s; }
.icon-btn:hover { color: var(--text); transform: translateY(-1px); }
.icon-btn:disabled { opacity: .35; cursor: default; transform: none; }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c2 { grid-column: span 2; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > .card { flex: 1; }
@media (max-width: 1240px) {
  .c2 { grid-column: span 4; }
  .c4.why-card { grid-column: span 12; }
}
@media (max-width: 1080px) {
  .c4, .c5, .c7, .c8 { grid-column: span 12; }
  .c4 { grid-column: span 6; }
  .c4.why-card { grid-column: span 12; }
}
@media (max-width: 720px) {
  .grid { gap: 12px; }
  .c2 { grid-column: span 6; }
  .c4, .c6 { grid-column: span 12; }
}

/* ---------- cards ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h.wrap { flex-wrap: wrap; }
.card-t { font-size: 16px; font-weight: 750; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-s { color: var(--muted); font-size: 13px; margin-top: 3px; max-width: 64ch; }
.link { color: var(--brand-ink); font-weight: 650; font-size: 13.5px; white-space: nowrap; display: inline-block; }
.link:hover { text-decoration: underline; }
.section-h { margin: 14px 2px 14px; }
.section-h h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.section-h p { margin-top: 4px; font-size: 14px; max-width: 80ch; }
.hint { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; margin-top: 12px; }
.hint .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--brand-1); }
.mini-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 13px; font-weight: 700; font-size: 14.5px; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 10px 26px -12px var(--brand-1); }
.btn-primary:hover { box-shadow: 0 14px 30px -12px var(--brand-1); }
.btn-soft { background: var(--card-2); border-color: var(--line); color: var(--text); }
.btn-light { background: #fff; color: #10131a; }
.btn-glass { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); }
.btn-danger { background: #d03b3b; color: #fff; }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 15px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-row.center { justify-content: center; }
.mini-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; flex: none; }
.mini-icon:hover { background: var(--card-2); color: var(--text); }
.mini-icon .ic { width: 15px; height: 15px; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.ctrls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.sw-track { width: 38px; height: 22px; border-radius: 99px; background: var(--track); position: relative; transition: background .2s; border: 1px solid var(--line); }
.sw-thumb { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch.on .sw-track { background: var(--mint); border-color: var(--mint); }
.switch.on .sw-thumb { transform: translateX(16px); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line); color: var(--text-2); }
.tag-amber { background: color-mix(in oklab, var(--amber) 16%, transparent); border-color: color-mix(in oklab, var(--amber) 35%, transparent); color: color-mix(in oklab, var(--amber) 70%, var(--text)); }
.tag-mint { background: color-mix(in oklab, var(--mint) 16%, transparent); border-color: transparent; color: var(--mint); }
.tag-brand { background: color-mix(in oklab, var(--brand-1) 15%, transparent); border-color: transparent; color: var(--brand-ink); }

.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--s1); transform-origin: left; animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; }
.b-mint > i { background: linear-gradient(90deg, var(--mint), color-mix(in oklab, var(--mint) 60%, #fff)); }
.b-brand > i { background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); }
.b-blue > i { background: var(--s1); }
.b-violet > i { background: var(--violet); }
.b-amber > i { background: var(--amber); }
.b-rose > i { background: var(--rose); }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 30px; padding: clamp(24px, 4vw, 44px); margin-bottom: 16px; color: #fff; background: #0e1020; box-shadow: var(--shadow-lg); }
.hero-orbs { position: absolute; inset: 0; z-index: -1; }
.hero-orbs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .85; animation: float 16s ease-in-out infinite alternate; }
.hero-orbs i:nth-child(1) { width: 520px; height: 520px; right: -140px; top: -220px; background: radial-gradient(circle, #ff5a36, transparent 65%); }
.hero-orbs i:nth-child(2) { width: 460px; height: 460px; right: 22%; bottom: -300px; background: radial-gradient(circle, #ff9f1c, transparent 65%); animation-duration: 20s; }
.hero-orbs i:nth-child(3) { width: 420px; height: 420px; left: -180px; top: -120px; background: radial-gradient(circle, #6d4fe0, transparent 65%); animation-duration: 24s; opacity: .6; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 12, 24, .82) 0%, rgba(10, 12, 24, .45) 55%, rgba(10, 12, 24, .1) 100%); }
@keyframes float { to { transform: translate(-40px, 30px) scale(1.08); } }
.hero-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.chip .ic { width: 14px; height: 14px; }
.chip-glass { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 66px); line-height: 1.02; letter-spacing: -.015em; max-width: 24ch; }
.hero-title em { font-style: italic; background: linear-gradient(90deg, #ffd3a8, #ff9f1c 40%, #ff6a45); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-msg { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 16px; color: rgba(255, 255, 255, .86); max-width: 60ch; }
.hero-msg .ic { margin-top: 3px; color: #ffcf8a; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ---------- notices ---------- */
.notice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; margin-bottom: 16px; border: 1px solid; font-size: 14px; }
.notice > .ic { width: 22px; height: 22px; flex: none; }
.notice > div { flex: 1 1 220px; color: var(--text-2); }
.notice b { color: var(--text); }
.n-amber { background: color-mix(in oklab, var(--amber) 10%, var(--card)); border-color: color-mix(in oklab, var(--amber) 30%, var(--line)); }
.n-amber > .ic { color: var(--amber); }
.n-violet { background: color-mix(in oklab, var(--violet) 10%, var(--card)); border-color: color-mix(in oklab, var(--violet) 30%, var(--line)); }
.n-violet > .ic { color: var(--violet); }
.n-mint { background: color-mix(in oklab, var(--mint) 10%, var(--card)); border-color: color-mix(in oklab, var(--mint) 30%, var(--line)); }
.n-mint > .ic { color: var(--mint); }
.notice.in-card { margin: 16px 0 0; }
.demo-banner { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: -26px calc(-1 * clamp(16px, 3vw, 40px)) 20px; background: linear-gradient(90deg, #6d4fe0, #2287e6); color: #fff; font-size: 13.5px; }
.demo-banner > div { flex: 1; }
.demo-banner .ic { flex: none; }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat-top { display: flex; align-items: center; gap: 8px; }
.stat-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); color: var(--brand-1); }
.stat-ic .ic { width: 15px; height: 15px; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; flex: 1; }
.stat-val { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-val small { font-size: 14px; font-weight: 650; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-sub { font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- rings ---------- */
.fuel { display: flex; flex-direction: column; }
.fuel .rings { flex: 1; align-content: center; }
.rings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; } }
.ring-box { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring-bg { fill: none; stroke: var(--track); }
.ring-fg { fill: none; stroke-linecap: round; animation: ringIn 1.2s cubic-bezier(.2, .8, .2, 1) both; transition: stroke-dashoffset .9s linear; }
@keyframes ringIn { from { stroke-dashoffset: var(--c); } }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px; }
.ring-in b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ring-in b.sm { font-size: 14px; }
.ring-in span { font-size: 11px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.r-kcal .ring-fg { stroke: var(--brand-1); }
.r-protein .ring-fg { stroke: var(--violet); }
.r-water .ring-fg { stroke: var(--sky); }
.r-steps .ring-fg { stroke: var(--mint); }
.r-five .ring-fg { stroke: var(--brand-1); }
.ring-cap { font-size: 12px; color: var(--muted); text-align: center; min-height: 34px; }
.ring-ctrl { display: flex; gap: 6px; align-items: center; justify-content: center; min-height: 34px; }
.mini-btn { height: 32px; min-width: 32px; padding: 0 8px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.mini-btn .ic { width: 14px; height: 14px; }
.mini-btn.wide { color: var(--sky); }
.mini-input { width: 110px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); padding: 0 10px; font-size: 13px; text-align: center; }
.mini-input.xs { width: 64px; }
.sleep-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.sleep-row > .ic { color: var(--violet); }
.sleep-row label { display: inline-flex; align-items: center; gap: 8px; }
.sleep-row .muted { margin-left: auto; font-size: 12.5px; }

/* ---------- habits ---------- */
.habit-list { display: flex; flex-direction: column; gap: 8px; }
.habit { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); text-align: left; transition: background .2s, border-color .2s, transform .12s; }
.habit:hover { transform: translateX(2px); }
.habit.big { padding: 14px 16px; }
.habit.tiny { margin-bottom: 8px; }
.h-emoji { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--card); font-size: 17px; flex: none; }
.h-emoji.sm { width: 26px; height: 26px; font-size: 14px; display: inline-grid; margin-right: 8px; vertical-align: middle; }
.h-label { flex: 1; font-weight: 600; font-size: 14px; }
.tick { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; transition: all .2s; }
.tick .ic { width: 15px; height: 15px; stroke-width: 3; }
.habit.done { background: color-mix(in oklab, var(--mint) 12%, var(--card)); border-color: color-mix(in oklab, var(--mint) 40%, var(--line)); }
.habit.done .h-label { color: var(--text); }
.habit.done .tick { background: var(--mint); border-color: var(--mint); color: #fff; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.gentle-box { padding: 14px; border-radius: 16px; background: color-mix(in oklab, var(--mint) 8%, var(--card)); border: 1px dashed color-mix(in oklab, var(--mint) 45%, var(--line)); margin-bottom: 4px; }
.gentle-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 13px; }
.gentle-h .ic { color: var(--mint); margin-top: 2px; }
.gentle-h b { display: block; font-size: 14px; }
.gentle-h span { color: var(--text-2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.day-chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.day-chip { flex: none; width: 64px; padding: 10px 0 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.day-chip b { font-size: 18px; color: var(--text); }
.day-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--track); }
.day-chip i.on { background: var(--mint); }
.day-chip.on { background: var(--text); border-color: var(--text); color: color-mix(in oklab, var(--bg) 70%, transparent); }
.day-chip.on b { color: var(--bg); }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats div { padding: 12px; border-radius: 14px; background: var(--card-2); }
.mini-stats b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.encourage { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 14px; border-radius: 14px; background: color-mix(in oklab, var(--brand-1) 8%, var(--card)); font-size: 14px; }
.encourage .ic { color: var(--brand-1); margin-top: 2px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl thead th { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.row-act { text-align: right !important; }
.start-row td { background: var(--card-2); }
.hgrid th:first-child { font-weight: 600; font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--text); }
.hgrid thead th { text-align: center; }
.hgrid thead th small { display: block; font-size: 11px; font-weight: 600; }
.hgrid thead th.is-today { color: var(--brand-ink); }
.hgrid td { text-align: center; }
.hcell { width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); display: inline-grid; place-items: center; color: #fff; transition: all .15s; }
.hcell .ic { width: 16px; height: 16px; stroke-width: 3; }
.hcell.on { background: var(--mint); border-color: var(--mint); }
.hcell:hover { transform: scale(1.08); }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.badge { padding: 16px 10px 14px; border-radius: 18px; background: var(--card-2); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .2s; }
.badge:hover { transform: translateY(-3px); }
.medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 27px; margin-bottom: 6px; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 45%), linear-gradient(135deg, #ffcf6b, var(--brand-1)); box-shadow: 0 10px 22px -10px var(--brand-1), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.badge b { font-size: 13px; line-height: 1.25; }
.badge span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.badge.locked .medal { background: var(--track); box-shadow: none; filter: grayscale(1); opacity: .5; }
.badge.locked b { color: var(--muted); }

/* ---------- workout ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 750; }
.t-strength { --tc: var(--brand-1); }
.t-cardio { --tc: var(--sky); }
.t-active { --tc: var(--mint); }
.t-rest { --tc: var(--violet); }
.pill.t-strength, .pill.t-cardio, .pill.t-active, .pill.t-rest { background: color-mix(in oklab, var(--tc) 15%, transparent); color: color-mix(in oklab, var(--tc) 80%, var(--text)); }
.workout::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tc); border-radius: var(--r) var(--r) 0 0; }
.w-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: -4px; }
.ex-list { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 16px; }
.ex { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--text-2); }
.ex:hover { background: var(--card-2); }
.ex .tick { width: 22px; height: 22px; border-radius: 7px; }
.ex.done span:last-child { text-decoration: line-through; color: var(--muted); }
.ex.done .tick { background: var(--tc); border-color: var(--tc); color: #fff; }

/* ---------- summary ---------- */
.sum-rows { display: flex; flex-direction: column; gap: 7px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.sum-row b { color: var(--text); font-weight: 750; }
.sum-row small { color: var(--muted); font-weight: 600; }
.sum-rows .bar { height: 6px; margin-bottom: 6px; }
.why { font-family: var(--serif); font-size: 25px; line-height: 1.2; margin-bottom: 12px; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; }
.chart svg text { font-size: 11px; fill: var(--muted); font-family: var(--font); font-variant-numeric: tabular-nums; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.goal-line { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .6; }
.chart svg text.goal-label { fill: var(--text-2); font-weight: 700; }
.w-line { fill: none; stroke: var(--s1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.w-proj { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.w-dot { fill: var(--s1); stroke: var(--card); stroke-width: 2; }
.w-dot.faint { fill: color-mix(in oklab, var(--s1) 55%, var(--card)); }
.w-dot.est { fill: var(--card); stroke: var(--amber); stroke-width: 2; stroke-dasharray: 3 2; }
.chart svg text.est-label { fill: var(--amber); font-weight: 700; }
.low-mark circle { fill: none; stroke: var(--mint); stroke-width: 2; }
.chart svg .low-mark text { fill: var(--mint); font-weight: 800; }
.xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; transition: opacity .15s; }
.focus { fill: var(--s1); stroke: var(--card); stroke-width: 3; pointer-events: none; }
path.vbar { fill: var(--s1); transform-box: fill-box; transform-origin: bottom; animation: barIn .7s cubic-bezier(.2, .8, .2, 1) both; }
.vbar:hover { opacity: .85; }
@keyframes barIn { from { transform: scaleY(0); } }
.hm { fill: var(--seq-0); }
.hm.l1 { fill: var(--seq-1); } .hm.l2 { fill: var(--seq-2); } .hm.l3 { fill: var(--seq-3); } .hm.l4 { fill: var(--seq-4); }
.hm.today { stroke: var(--brand-1); stroke-width: 2; }
.hm-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--seq-0); }
.hm-key.l1 { background: var(--seq-1); } .hm-key.l2 { background: var(--seq-2); } .hm-key.l3 { background: var(--seq-3); } .hm-key.l4 { background: var(--seq-4); }
.chart.heat { overflow-x: auto; }
.chart-empty { display: grid; place-items: center; height: 180px; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: 16px; }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--tip-bg); color: var(--tip-text); padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.35; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; white-space: nowrap; }
.tip.show { opacity: 1; transform: none; }
.tip-d { opacity: .7; font-size: 11.5px; }
.tip-v { font-weight: 800; font-size: 15px; }
.tip-s { opacity: .8; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--s1); display: inline-block; }
.lg-line { width: 18px; height: 3px; border-radius: 3px; background: var(--s1); display: inline-block; }
.lg-dash { width: 18px; height: 0; border-top: 2px dashed var(--text-2); display: inline-block; opacity: .7; }
.lg-proj { width: 18px; height: 0; border-top: 2px dotted var(--muted); display: inline-block; }
.lg-star { font-style: normal; color: var(--mint); font-weight: 800; }
.scale-legend { justify-content: flex-end; gap: 4px; margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }
.scale-legend span { margin: 0 4px; }
.is-demo .chart::after { content: 'SAMPLE DATA'; position: absolute; top: -34px; right: 0; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--violet); background: color-mix(in oklab, var(--violet) 12%, var(--card)); padding: 3px 9px; border-radius: 99px; pointer-events: none; }

/* ---------- progress ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; padding: 6px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); }
.kpi:nth-last-child(2) { border-right: 0; }
.kpi > span:first-child { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 13px; color: var(--muted); font-weight: 650; }
.kpi .muted, .kpi .tag { font-size: 12px; align-self: flex-start; }
.kpi-edit { position: absolute; top: 10px; right: 10px; }
.ladder { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 14px; scrollbar-width: thin; }
.ms { flex: 1 0 74px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.ms::before { content: ''; position: absolute; top: 18px; left: -50%; width: 100%; height: 3px; background: var(--track); z-index: 0; }
.ms:first-child::before { display: none; }
.ms.done::before { background: var(--mint); }
.ms-dot { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 2px solid var(--line); color: #fff; font-size: 16px; }
.ms-dot .ic { width: 17px; height: 17px; stroke-width: 3; }
.ms.done .ms-dot { background: var(--mint); border-color: var(--mint); }
.ms.next .ms-dot { border-color: var(--brand-1); box-shadow: 0 0 0 0 color-mix(in oklab, var(--brand-1) 50%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ms-kg { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ms-l { font-size: 11.5px; color: var(--muted); }
.ms.next .ms-l { color: var(--brand-ink); font-weight: 700; }
.ms-health { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 720px) { .ms-health { grid-template-columns: 1fr; } }
.mh { padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 3px; }
.mh b { color: var(--text); font-size: 14px; }
.mh.done { border-color: var(--mint); background: color-mix(in oklab, var(--mint) 10%, var(--card)); }
.mh.done b::after { content: '  ✓ reached'; color: var(--mint); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 16px; color: var(--text-2); }
.empty > .ic { width: 34px; height: 34px; color: var(--brand-1); }
.empty p { max-width: 46ch; }

/* ---------- plan ---------- */
.timeline { position: relative; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 52px 18px 1fr; align-items: center; gap: 10px; padding: 8px 0; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 70px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.tl-time { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); position: relative; z-index: 1; justify-self: center; }
.tl-label { font-size: 14px; font-weight: 600; }
.timeline li.past .tl-label { color: var(--muted); }
.timeline li.past .tl-dot { background: var(--mint); border-color: var(--mint); }
.timeline li.now .tl-dot { background: var(--brand-1); border-color: var(--brand-1); box-shadow: 0 0 0 5px color-mix(in oklab, var(--brand-1) 22%, transparent); }
.targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tg { padding: 14px; border-radius: 16px; background: var(--card-2); display: flex; flex-direction: column; gap: 2px; }
.tg .ic { color: var(--brand-1); margin-bottom: 6px; }
.tg b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.tg span { font-size: 12.5px; color: var(--muted); }
.rem-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rem-int { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); }
.rem-int select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); padding: 0 10px; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.day-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); overflow: hidden; }
.day-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tc); }
.day-card.is-today { border-color: var(--tc); box-shadow: 0 0 0 3px color-mix(in oklab, var(--tc) 18%, transparent), var(--shadow); }
.dc-h { display: flex; justify-content: space-between; align-items: center; }
.dc-day { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.is-today .dc-day { color: var(--text); }
.day-card .pill { align-self: flex-start; }
.day-card h4 { font-size: 16px; font-weight: 750; }
.day-card ul { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.day-card li { padding-left: 14px; position: relative; }
.day-card li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--tc); }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tip-grid div { padding: 14px; border-radius: 14px; background: var(--card-2); display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.tip-grid b { color: var(--text); font-size: 14px; }

/* ---------- food ---------- */
.date-nav { display: flex; align-items: center; gap: 12px; margin: -6px 0 16px; }
.date-nav b { font-size: 16px; min-width: 120px; text-align: center; }
.food-sum { display: flex; gap: 28px; align-items: center; }
.fs-macros { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fs-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
@media (max-width: 720px) { .food-sum { flex-direction: column; align-items: stretch; } .fs-ring { align-self: center; } }
.macro-h { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; color: var(--text-2); }
.macro-h b { color: var(--text); }
.macro-h small { color: var(--muted); font-weight: 600; }
.macro-h span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.b-violet { background: var(--violet); } .dot.b-amber { background: var(--amber); } .dot.b-rose { background: var(--rose); }
.water-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; }
.wr-l { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.wr-l .ic { color: var(--sky); }
.glasses { display: flex; gap: 4px; flex-wrap: wrap; }
.glass { width: 30px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); transition: all .15s; }
.glass .ic { width: 16px; height: 16px; }
.glass.full { background: color-mix(in oklab, var(--sky) 18%, var(--card)); border-color: color-mix(in oklab, var(--sky) 50%, var(--line)); color: var(--sky); }
.glass.full .ic { fill: currentColor; }
.glass:hover { transform: translateY(-2px); }
.food-items { display: flex; flex-direction: column; }
.food-items li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.food-items li:last-child { border-bottom: 0; }
.food-items li > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.food-items li > div:first-child span { font-size: 12px; }
.fi-m { text-align: right; font-size: 12.5px; display: flex; flex-direction: column; }
.fi-m span.muted { font-size: 11.5px; }
.tbl.meal-plan th, .tbl.meal-plan td { padding: 6px 5px; }
.tbl.meal-plan tbody th { font-size: 13px; color: var(--muted); width: 48px; }
.tbl.meal-plan tr.is-today th { color: var(--brand-ink); }
.tbl.meal-plan tr.is-today .mp-in { border-color: color-mix(in oklab, var(--brand-1) 45%, var(--line)); }
.mp-in { width: 100%; min-width: 150px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); padding: 0 10px; font-size: 13.5px; }
.mp-in:focus, .mini-input:focus, .field input:focus, .field select:focus, .note:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-1) 18%, transparent); }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); transition: transform .2s; }
.idea:hover { transform: translateY(-3px); }
.idea-e { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 27px; background: var(--card-2); }
.idea h4 { font-size: 15.5px; font-weight: 750; line-height: 1.3; }
.idea-m { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-2); }
.idea-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.idea-a { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.food-tools { display: flex; gap: 10px; margin-bottom: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.search .ic { color: var(--muted); }
.search input { flex: 1; border: 0; background: none; outline: none; min-width: 0; }
.qty { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.qty input { width: 64px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); text-align: center; }
.food-list { max-height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px; }
.food-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: left; transition: background .15s; }
.food-row:hover { background: var(--card-2); }
.food-row > div:first-child { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.food-row > div:first-child span, .fr-m span { font-size: 12px; color: var(--muted); }
.fr-m .fr-k { font-size: 12.5px; color: var(--text); }
.fr-m { text-align: right; font-size: 12.5px; display: flex; flex-direction: column; }
.fr-add { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in oklab, var(--brand-1) 14%, transparent); color: var(--brand-ink); }
.fr-add .ic { width: 15px; height: 15px; }
.custom { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.custom summary, .more summary, .data-table summary { cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.custom summary::-webkit-details-marker, .more summary::-webkit-details-marker, .data-table summary::-webkit-details-marker { display: none; }
.custom[open] summary, .more[open] summary { margin-bottom: 12px; }
.data-table { margin-top: 12px; }
.data-table summary { font-size: 12.5px; color: var(--muted); }
.data-table .tbl { font-size: 13px; margin-top: 8px; }
.pad { padding: 14px; }

/* ---------- mind ---------- */
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px; border-radius: 16px; background: var(--card-2); border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.mood span { font-size: 32px; line-height: 1; transition: transform .2s; }
.mood b { font-size: 12.5px; color: var(--text-2); }
.mood:hover span { transform: scale(1.12); }
.mood.on { border-color: var(--brand-1); background: color-mix(in oklab, var(--brand-1) 9%, var(--card)); }
.mood.on span { transform: scale(1.15); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.tag-btn { padding: 6px 12px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tag-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.note { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--card-2); padding: 12px 14px; resize: vertical; font-size: 14px; line-height: 1.5; }
.note.big { font-family: var(--serif); font-size: 21px; line-height: 1.3; }
.restart-card { overflow: hidden; color: #fff; background: linear-gradient(150deg, #ff6a3d, #ff9f1c 55%, #ffc76b); border: 0; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.rs-glow { position: absolute; width: 300px; height: 300px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), transparent 65%); }
.rs-title { font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1; position: relative; }
.restart-card p { position: relative; color: rgba(255, 255, 255, .92); font-size: 14.5px; }
.restart-card .btn { align-self: flex-start; position: relative; box-shadow: 0 12px 30px -12px rgba(120, 40, 0, .6); }
.rs-foot { font-size: 13px !important; opacity: .9; }
.tiny-list { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.five-card p { color: var(--text-2); font-size: 14.5px; }
.win-form { display: flex; gap: 8px; margin-bottom: 12px; }
.win-form input { flex: 1; min-width: 0; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card-2); padding: 0 12px; }
.wins { display: flex; flex-direction: column; }
.wins li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.wins li:last-child { border-bottom: 0; }
.wins li > span:nth-child(2) { flex: 1; }
.w-d { font-size: 11.5px; font-weight: 700; color: var(--muted); width: 52px; flex: none; }
.truth-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); }
.truth-list li { padding-left: 18px; position: relative; }
.truth-list li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-1); }
.heavy .truth-list li::before { background: var(--violet); }
.truth-list b { color: var(--text); }
.mood-strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; }
.ms-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 6px; border-radius: 12px; background: var(--card-2); min-width: 0; }
.ms-day.is-today { outline: 2px solid var(--brand-1); }
.ms-e { font-size: 22px; line-height: 1.1; color: var(--muted); }
.ms-day small { font-size: 11px; color: var(--muted); }
.ms-day i { font-style: normal; font-size: 12px; height: 16px; }
@media (max-width: 720px) { .mood-strip { grid-template-columns: repeat(7, 1fr); } .moods span { font-size: 26px; } }

/* ---------- reports ---------- */
.insight-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.insight-list li { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--card-2); font-size: 14px; color: var(--text-2); }
.insight-list .ic { color: var(--brand-1); margin-top: 2px; }
.insight-list b { color: var(--text); }
.goalbar { padding: 34px 6px 0; }
.gb-track { position: relative; height: 14px; border-radius: 99px; background: var(--track); }
.gb-track > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--s1)); animation: grow 1.4s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.gb-dot { position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 4px solid var(--s1); transform: translate(-50%, -50%); box-shadow: var(--shadow); }
.gb-dot b { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 800; background: var(--text); color: var(--bg); padding: 2px 8px; border-radius: 8px; }
.gb-labels { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; gap: 8px; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hb { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr 44px; align-items: center; gap: 12px; font-size: 13.5px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.month h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.m-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.m-stats div { display: flex; flex-direction: column; }
.m-stats b { font-size: 21px; font-weight: 800; }
.m-stats span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.m-badges { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; align-items: center; }
.m-b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: linear-gradient(135deg, #ffcf6b, var(--brand-1)); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field input, .field select { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--text); width: 100%; }
.field small { font-weight: 500; color: var(--muted); }
.field.check { flex-direction: row; align-items: center; gap: 10px; align-self: end; height: 44px; font-size: 13.5px; }
.field.check input { width: 20px; height: 20px; accent-color: var(--brand-1); }
.field.big-num input { height: 64px; font-size: 32px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.more { padding: 12px 14px; border-radius: 14px; background: var(--card-2); }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } .field.check { align-self: start; } }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 12, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .25s; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: var(--shadow-lg); animation: modalIn .35s cubic-bezier(.2, .9, .3, 1.1); }
.modal.m-onb { width: min(600px, 100%); }
.m-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.m-sub { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 600px) {
  .modal-root { place-items: end stretch; padding: 0; }
  .modal { width: 100%; border-radius: 26px 26px 0 0; max-height: 92vh; max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: sheetIn .35s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
.celebrate { text-align: center; padding: 8px 4px; }
.cel-emoji { font-size: 66px; line-height: 1; margin-bottom: 14px; animation: bounce 1s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bounce { 0% { transform: scale(.2) rotate(-20deg); } 100% { transform: none; } }
.celebrate h2 { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.05; margin-bottom: 12px; }
.celebrate p { color: var(--text-2); font-size: 15px; margin: 0 auto 22px; max-width: 42ch; }
.onb { text-align: left; }
.onb-mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 14px 30px -12px var(--brand-1); margin-bottom: 18px; }
.onb-mark .ic { width: 28px; height: 28px; }
.onb-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 6vw, 48px); line-height: 1; }
.onb-sub { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3.6vw, 28px); line-height: 1.15; color: var(--brand-ink); margin: 6px 0 14px; }
.five { text-align: center; }
.five-ring { display: grid; place-items: center; margin: 8px 0 6px; }
.five-t { font-size: 44px !important; }
.manage { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.manage li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); font-weight: 600; font-size: 14px; }
.manage li > span:nth-child(2) { flex: 1; }
.add-habit { display: flex; gap: 8px; }
.add-habit input { height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card-2); padding: 0 12px; min-width: 0; }
.add-habit input[name="emoji"] { width: 56px; text-align: center; }
.add-habit input[name="label"] { flex: 1; }

/* ---------- toasts & confetti ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--tip-bg); color: var(--tip-text); padding: 12px 16px; border-radius: 16px; font-size: 14px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5); animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); max-width: 520px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
.t-emoji { font-size: 20px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }

/* ---------- view entrance ---------- */
.view.anim > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.view.anim > .grid > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.view.anim > .grid > *:nth-child(2) { animation-delay: .04s; } .view.anim > .grid > *:nth-child(3) { animation-delay: .08s; }
.view.anim > .grid > *:nth-child(4) { animation-delay: .12s; } .view.anim > .grid > *:nth-child(5) { animation-delay: .16s; }
.view.anim > .grid > *:nth-child(6) { animation-delay: .2s; } .view.anim > .grid > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: .35; transform: translateY(14px); } }

/* ---------- mobile shell ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 60; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: color-mix(in oklab, var(--bg-2) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .brand, .side-quote { display: none; }
  #nav { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1px; }
  #nav a { flex-direction: column; gap: 3px; padding: 7px 0 5px; font-size: 10px; border-radius: 12px; letter-spacing: -.01em; }
  #nav a .ic { width: 20px; height: 20px; }
  #nav a.on { box-shadow: none; }
  .main { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .demo-banner { margin: -18px -16px 16px; }
}
@media (max-width: 600px) {
  .page-head { align-items: flex-start; }
  .hide-sm { display: none; }
  .hero { border-radius: 24px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .stat-val { font-size: 25px; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  .notice { flex-wrap: wrap; }
  .notice .btn { margin-left: 36px; }
  .sleep-row .muted { margin-left: 0; width: 100%; }
  .hb { grid-template-columns: 1fr 1fr 40px; }
  .m-stats b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- sync status ---------- */
.sync-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.sync-pill i, .sync-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.sync-pill.ok i, .sync-line.ok i { background: var(--mint); }
.sync-pill.busy i, .sync-line.busy i { background: var(--amber); }
.sync-pill.warn i, .sync-line.warn i { background: #d03b3b; }
.sync-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
@media (max-width: 900px) { .sync-pill { display: none; } }
.sync-pill:empty { display: none; }

/* ---------- journal ---------- */
.btn-pair { display: flex; gap: 6px; }
.fi-photo img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.jstrip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.jd { flex: none; width: 116px; display: flex; flex-direction: column; gap: 8px; padding: 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; scroll-snap-align: center; transition: transform .25s cubic-bezier(.2, .9, .3, 1.3), box-shadow .25s, border-color .2s; }
.jd:hover { transform: translateY(-3px); }
.jd.on { border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-1) 22%, transparent), 0 14px 30px -16px var(--brand-1); transform: translateY(-3px); }
.jd.quiet { opacity: .62; }
.jd-img { position: relative; height: 82px; border-radius: 13px; background: linear-gradient(135deg, color-mix(in oklab, var(--brand-2) 22%, var(--card-2)), color-mix(in oklab, var(--violet) 18%, var(--card-2))); background-size: cover; background-position: center; display: grid; place-items: center; overflow: hidden; }
.jd-ph { font-size: 20px; font-weight: 800; color: color-mix(in oklab, var(--mint) 80%, var(--text)); }
.jd-n { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(10, 12, 18, .72); color: #fff; font-size: 11px; display: grid; place-items: center; }
.jd-icons { position: absolute; left: 6px; bottom: 5px; display: flex; gap: 2px; font-size: 13px; }
.jd-icons i { font-style: normal; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.jd-t { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; gap: 4px; }
.jd-t b { font-size: 13px; font-weight: 800; }
.jd-t small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.jd-bar { height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 0 4px 4px; }
.jd-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); }

.jday { display: flex; flex-direction: column; gap: 16px; }
.jday.from-right { animation: slideR .55s cubic-bezier(.2, .9, .3, 1) both; }
.jday.from-left { animation: slideL .55s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes slideR { from { opacity: .2; transform: translateX(46px); } }
@keyframes slideL { from { opacity: .2; transform: translateX(-46px); } }
.jh { display: flex; align-items: center; gap: 14px; }
.jh-t { flex: 1; text-align: center; }
.jh-eyebrow { font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
.jh h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 80px); line-height: .95; letter-spacing: -.02em; }
.jh-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

.jstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1.4fr)) repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .jstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.js-tile, .js-mini { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; animation: tileIn .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.jstats > :nth-child(2) { animation-delay: .06s; } .jstats > :nth-child(3) { animation-delay: .12s; } .jstats > :nth-child(4) { animation-delay: .18s; } .jstats > :nth-child(5) { animation-delay: .24s; } .jstats > :nth-child(6) { animation-delay: .3s; }
@keyframes tileIn { from { opacity: .3; transform: translateY(12px) scale(.97); } }
.js-tile { display: flex; align-items: center; gap: 16px; }
.js-tile > div:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.js-tile .ring-in b { font-size: 17px; }
.js-l { font-size: 11.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.js-v { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.js-mini { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.js-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.js-big small { font-size: 13px; color: var(--muted); font-weight: 650; margin-left: 4px; letter-spacing: 0; }

.jsec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.jsec-h h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.meals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.meal { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: mealIn .7s cubic-bezier(.2, .9, .3, 1.1) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
@keyframes mealIn { from { opacity: .25; transform: translateY(22px) scale(.95); filter: blur(4px); } }
.meal.is-new { animation: mealNew 1.1s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes mealNew { 0% { opacity: .2; transform: scale(.7) rotate(-2deg); } 60% { transform: scale(1.03) rotate(.5deg); box-shadow: 0 0 0 6px color-mix(in oklab, var(--brand-1) 30%, transparent); } 100% { transform: none; } }
.meal-ph { position: relative; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--card-2); }
.meal-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); animation: photoIn 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
@keyframes photoIn { from { transform: scale(1.12); filter: saturate(.4) blur(6px); } }
.meal:hover .meal-ph img { transform: scale(1.06); }
.meal-noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; }
.meal-slot, .meal-kcal { position: absolute; padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(10, 12, 18, .58); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.meal-slot { top: 10px; left: 10px; }
.meal-kcal { right: 10px; bottom: 10px; font-size: 13px; }
.meal-kcal b { font-size: 17px; }
.meal-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.meal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.meal-h h4 { font-size: 16px; font-weight: 750; line-height: 1.3; }
.meal-a { display: flex; gap: 2px; flex: none; }
.meal-items { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.meal-items li { display: flex; justify-content: space-between; gap: 10px; }
.meal-items small { color: var(--muted); }
.meal-items b { font-variant-numeric: tabular-nums; color: var(--text); }
.meal-mac { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-2); align-items: center; }
.meal-mac span { display: inline-flex; align-items: center; gap: 5px; }
.ai-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: color-mix(in oklab, var(--violet) 14%, transparent); color: color-mix(in oklab, var(--violet) 85%, var(--text)); }
.ai-chip .ic { width: 12px; height: 12px; }
.meal-note { font-size: 12.5px; color: var(--muted); }
.meal-add { min-height: 260px; border-radius: 22px; border: 2px dashed var(--line); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; color: var(--text-2); transition: border-color .2s, background .2s, transform .2s; animation: mealIn .7s both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
.meal-add:hover { border-color: var(--brand-1); background: color-mix(in oklab, var(--brand-1) 6%, transparent); transform: translateY(-3px); }
.meal-add b { font-size: 15px; color: var(--text); }
.meal-add span:last-child { font-size: 13px; max-width: 26ch; }
.ma-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 12px 26px -12px var(--brand-1); animation: breathe 2.6s ease-in-out infinite; }
.ma-ic .ic { width: 26px; height: 26px; }
@keyframes breathe { 50% { transform: scale(1.07); } }
.also { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--text-2); padding: 12px 14px; border-radius: 14px; background: var(--card-2); }
.also .ic { color: var(--muted); }
.jgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .jgrid { grid-template-columns: minmax(0, 1fr); } }
.jdid-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px; }
.mini-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.mini-field > .ic { color: var(--muted); }
.jtl { display: flex; flex-direction: column; position: relative; }
.jtl li { display: grid; grid-template-columns: 46px 30px 1fr; align-items: center; gap: 8px; padding: 7px 0; position: relative; animation: tlIn .5s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i) * 60ms + 200ms); }
@keyframes tlIn { from { opacity: .2; transform: translateX(-10px); } }
.jtl li::before { content: ''; position: absolute; left: 68px; top: 0; bottom: 0; width: 2px; background: var(--line); z-index: 0; }
.jtl li:first-child::before { top: 50%; } .jtl li:last-child::before { bottom: 50%; }
.jtl-t { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.jtl-e { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 2px solid var(--card); font-size: 15px; }
.jtl-l { font-size: 14px; color: var(--text-2); }
.jtl-l b { color: var(--text); }
.small-empty { padding: 16px 8px; }

/* meal photo modal */
.modal.m-meal { width: min(620px, 100%); }
.slot-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 34px 16px; border-radius: 20px; border: 2px dashed color-mix(in oklab, var(--brand-1) 40%, var(--line)); background: color-mix(in oklab, var(--brand-1) 5%, var(--card)); text-align: center; cursor: pointer; transition: background .2s, transform .2s; }
.drop:hover, .drop.over { background: color-mix(in oklab, var(--brand-1) 11%, var(--card)); transform: scale(1.01); }
.drop b { font-size: 16px; }
.drop > span:last-child { font-size: 13px; color: var(--muted); }
.drop-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); margin-bottom: 6px; animation: breathe 2.6s ease-in-out infinite; }
.drop-ic .ic { width: 28px; height: 28px; }
.pm-photo { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; background: var(--card-2); }
.pm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-photo.small { aspect-ratio: 16 / 9; }
.pm-photo.scanning img { animation: scanImg 2.4s ease-in-out infinite; }
@keyframes scanImg { 50% { filter: saturate(1.3) brightness(1.05); transform: scale(1.03); } }
.scan-line { position: absolute; left: -10%; right: -10%; height: 90px; top: -90px; background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--brand-2) 55%, transparent) 85%, #fff 100%); mix-blend-mode: screen; animation: scan 1.9s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes scan { to { top: 100%; } }
.scan-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 28px 28px; animation: gridPulse 1.9s ease-in-out infinite; }
@keyframes gridPulse { 50% { opacity: .25; } }
.scan-glow { position: absolute; inset: 0; box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--brand-1) 70%, transparent), inset 0 0 60px color-mix(in oklab, var(--brand-1) 35%, transparent); border-radius: inherit; animation: gridPulse 1.9s ease-in-out infinite; }
.pm-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-weight: 700; color: var(--text-2); }
.pm-status .ic { color: var(--brand-1); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#pmLine.swap { animation: lineIn .45s ease both; }
@keyframes lineIn { from { opacity: 0; transform: translateY(8px); } }
.pm-res { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
@media (max-width: 560px) { .pm-res { grid-template-columns: minmax(0, 1fr); } }
.pm-photo.done { animation: photoIn .8s cubic-bezier(.2, .8, .2, 1) both; }
.pm-side { display: flex; flex-direction: column; gap: 12px; }
.pm-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.pm-total b { font-size: 54px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pm-total > span:not(.ai-chip) { font-size: 16px; font-weight: 700; color: var(--muted); }
.pm-total b.bump { animation: bump .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.12); color: var(--brand-1); } }
.pm-mac { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.pm-mac span { display: inline-flex; align-items: center; gap: 7px; }
.pm-mac b { color: var(--text); }
.pm-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.pm-items li { display: grid; grid-template-columns: minmax(0, 1fr) 76px auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--card-2); animation: chipIn .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 80ms + 150ms); }
@keyframes chipIn { from { opacity: .2; transform: translateY(8px) scale(.95); } }
.pm-items li > span:first-child { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.pm-items small { color: var(--muted); font-size: 12px; }
.pm-items input { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); text-align: right; padding: 0 8px; font-weight: 700; width: 100%; }
.pm-q { margin-bottom: 4px; }
.pm-q button { min-width: 42px; }
.pm-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in oklab, var(--mint) 9%, var(--card)); font-size: 13.5px; color: var(--text-2); }
.pm-note .ic { color: var(--mint); margin-top: 2px; }
@media (max-width: 600px) {
  .jd { width: 100px; } .jd-img { height: 72px; }
  .js-tile { gap: 12px; padding: 12px; }
  .jh { gap: 8px; }
  .meal-add { min-height: 180px; }
}
@media (max-width: 600px) {
  .page-actions .btn-primary { width: 42px; padding: 0; }
  .page-actions .btn-primary span { display: none; }
  .js-tile { grid-column: span 2; }
}
.connect-banner { margin-bottom: 16px; }
