:root {
  --primary: #111111;
  --accent: #C8A27C;
  --bg: #F7F5F2;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6e6a65;
  --line: #e9e4de;
  --track: #eee9e3;
  --grid: #efebe6;
  --good: #2e7d4f;
  --warn: #c2410c;
  --radius: 16px;
  --tabbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
h4 { font-size: 14px; margin: 14px 0 4px; }
p { margin: 0 0 8px; }
a { color: inherit; }
svg { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.pre { white-space: pre-line; }
.grow { flex: 1; min-width: 0; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.shell main { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 16px); }
.side { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; z-index: 20; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--primary); }
.tabbar a.on svg { stroke-width: 2.5; }
.page { max-width: 760px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.page-head p { margin: 4px 0 0; }
.back { display: block; margin-bottom: 6px; font-size: 14px; }
.section { margin: 22px 0 10px; font-size: 16px; }
.demobar { background: var(--primary); color: #fff; font-size: 12px; padding: 8px 16px; padding-top: calc(8px + var(--safe-t)); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.demobar button { background: var(--accent); color: var(--primary); border: 0; border-radius: 999px; padding: 4px 10px; font: 600 12px Inter, sans-serif; cursor: pointer; }
.demobar + .page { padding-top: 16px; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; padding: 20px 12px; background: var(--card); border-right: 1px solid var(--line); }
  .side .brand { display: flex; gap: 10px; align-items: center; margin: 0 8px 20px; }
  .side .brand img { width: 40px; height: 40px; border-radius: 10px; }
  .side .brand small { display: block; color: var(--muted); font-size: 12px; }
  .side a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .side a.on, .side a:hover { background: var(--bg); color: var(--primary); }
  .side .signout { margin-top: auto; justify-content: flex-start; padding: 10px 12px; }
  .tabbar { display: none; }
  .shell main { padding-bottom: 32px; }
  .page { padding-top: 28px; }
}

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.card.tap { cursor: pointer; transition: transform .08s; }
.card.tap:active { transform: scale(.985); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.card.alert { background: #fff7ed; border-color: #fed7aa; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card.alert p { margin: 0; flex: 1; }
.card.due { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card.hero { background: var(--primary); color: #fff; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card.hero h2 { font-size: 26px; margin: 4px 0; }
.card.hero small { opacity: .75; }
.card.hero svg { color: var(--accent); }
.card.hero.soft { background: #2a2320; }
.card.note-card { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border-color: color-mix(in srgb, var(--accent) 30%, var(--card)); }
.card.note-card p { margin: 0 0 8px; }
.card.pinned { border-color: var(--accent); }
.card.tip-card p { margin: 6px 0 0; }
.grid2, .grid3, .grid4 { display: grid; gap: 10px; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.grid2 > .card, .grid3 > .card, .grid4 > .card { margin-bottom: 0; }
.grid2, .grid3, .grid4 { margin-bottom: 12px; }
form .grid2, form .grid3, form .grid4, .card .grid2, .card .grid3, .card .grid4 { margin-bottom: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.li .row, .card-head .row { margin: 0; flex-wrap: nowrap; }

.kpis .card { display: flex; flex-direction: column; gap: 2px; }
.kpis svg { color: var(--accent); width: 20px; height: 20px; }
.kpis strong, .stats strong { font-size: 22px; font-weight: 700; display: block; }
.kpis small, .stats small { font-size: 12px; color: var(--muted); display: block; }
.stats > div, .stats > .card { display: flex; flex-direction: column; }

.stat { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.stat > svg { width: 26px; height: 26px; color: var(--accent); }
.stat strong { display: block; font-size: 17px; }
.stat small { color: var(--muted); font-size: 12px; }

/* ---------- list items ---------- */
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.tap { cursor: pointer; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-weight: 500; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.li-sub { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.card > .li:first-child { padding-top: 0; }
.ico { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; font-weight: 600; color: var(--primary); flex-shrink: 0; }
.ico svg { width: 18px; height: 18px; }
.check-li .box, .set .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; background: var(--card); cursor: pointer; padding: 0; color: #fff; }
.check-li.done .box, .set.done .box { background: var(--good); border-color: var(--good); }
.check-li.done .li-title { text-decoration: line-through; color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font: 600 15px Inter, sans-serif; cursor: pointer; text-decoration: none; transition: opacity .15s; white-space: nowrap; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: var(--card); color: var(--primary); border: 1px solid var(--line); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled, .btn.disabled { opacity: .5; cursor: default; }
.btn.wide { width: 100%; margin-top: 12px; }
form > .btn.primary, .card > .btn.primary, .page > .btn { width: 100%; }
.page > .btn { margin-bottom: 12px; }
.link { background: none; border: 0; color: var(--primary); font: 600 14px Inter, sans-serif; cursor: pointer; padding: 4px 0; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.link.danger, .danger { color: var(--warn); }
.link.liked { color: #e11d48; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn:disabled { opacity: .3; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 5px; }
.field small { display: block; margin-top: 4px; font-size: 12px; }
input, select, textarea { width: 100%; font: 16px Inter, sans-serif; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.card-head select { width: auto; padding: 6px 28px 6px 10px; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
textarea { resize: vertical; min-height: 44px; }
input[type=checkbox] { width: 20px; height: 20px; -webkit-appearance: auto; appearance: auto; accent-color: var(--primary); margin: 0; }
.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; font-size: 14px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.inline-form input { flex: 1; }
.inline-form input[type=date] { flex: 0 0 150px; }
.qty { width: 64px !important; flex: 0 0 64px; padding: 8px; text-align: center; }
.switch { position: relative; width: 44px; height: 26px; display: inline-block; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::before { transform: translateX(18px); }
.upload { width: 100%; cursor: pointer; }

.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); padding: 4px; border-radius: 12px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; white-space: nowrap; border: 0; background: none; padding: 8px 12px; border-radius: 9px; font: 600 13px Inter, sans-serif; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--primary); color: #fff; }
.tabs-scroll .tabs button { flex: 0 0 auto; }
.tabs-tight .tabs { gap: 2px; padding: 3px; }
.tabs-tight .tabs button { padding: 8px 4px; }
.seg { display: flex; gap: 2px; background: var(--bg); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; font: 600 12px Inter, sans-serif; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; min-height: 36px; font: 500 13px Inter, sans-serif; cursor: pointer; color: var(--text); -webkit-appearance: none; appearance: none; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.sub-tabs { margin-top: -4px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.pill.good { background: #e7f4ec; color: var(--good); }
.pill.accent { background: color-mix(in srgb, var(--accent) 25%, #fff); color: var(--primary); }

.avatar { border-radius: 50%; background: color-mix(in srgb, var(--accent) 30%, #fff); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- sheet (pop-up) ---------- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--bg); width: 100%; max-width: 620px; max-height: 92vh; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up .2s ease-out; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 8px; }
.sheet-body { padding: 8px 16px calc(24px + var(--safe-b)); overflow-y: auto; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + var(--safe-b) + 16px); transform: translateX(-50%); background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 100; animation: up .2s; max-width: 90vw; text-align: center; }
.toast.err { background: #b91c1c; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; }
.empty svg { color: var(--accent); margin-bottom: 8px; }
.loading { display: flex; gap: 6px; justify-content: center; padding: 40px; }
.loading span { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: bounce 1s infinite; }
.loading span:nth-child(2) { animation-delay: .15s; } .loading span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-8px); opacity: .5; } }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- progress visuals ---------- */
.nutri { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; flex-shrink: 0; }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-in strong { font-size: 24px; line-height: 1; }
.ring-in small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.bar { margin-bottom: 10px; }
.bar:last-child { margin-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bar-top span:first-child { color: var(--muted); }
.bar-track { height: 8px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.bar-fill.over { background: var(--warn); }
.chart { position: relative; width: 100%; touch-action: pan-y; }
.chart svg { display: block; }
.chart .axis { font-size: 11px; fill: var(--muted); }
.tip { position: absolute; top: 0; width: 100px; background: var(--primary); color: #fff; border-radius: 8px; padding: 4px 8px; font-size: 12px; text-align: center; pointer-events: none; }
.tip strong, .tip span { display: block; }
.minibars { display: flex; gap: 8px; align-items: flex-end; height: 130px; }
.mb { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.mb-col { flex: 1; width: 100%; max-width: 28px; display: flex; align-items: flex-end; }
.mb-fill { width: 100%; background: var(--track); border-radius: 4px 4px 0 0; min-height: 2px; }
.mb-fill.hit { background: var(--accent); }
.mb small { font-size: 11px; color: var(--muted); }

/* ---------- feature specifics ---------- */
.datenav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.datenav strong { font-size: 15px; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dow { font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.day { aspect-ratio: 1; border: 0; background: none; border-radius: 10px; font: 500 14px Inter, sans-serif; color: var(--text); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0; }
.day:disabled { cursor: default; }
.day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.day.sel { background: var(--primary); color: #fff; }
.day.flow { background: #fde2e4; color: #9f1239; }
.day.pred { background: repeating-linear-gradient(45deg, #fde2e4, #fde2e4 3px, #fff 3px, #fff 6px); }
.dots { display: flex; gap: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex-shrink: 0; }
.dots .dot { width: 5px; height: 5px; }
.dot.flow { background: #e11d48; } .dot.pred { background: #fda4af; } .dot.book { background: var(--accent); } .dot.train { background: #2563eb; }
.dot.check { background: var(--good); } .dot.comp, .dot.task { background: #7c3aed; } .dot.open { background: var(--line); border: 1px solid var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); margin: -4px 0 12px; }
.legend .dot { margin-right: 4px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 6px; cursor: pointer; font-family: Inter, sans-serif; color: var(--text); }
.slot strong { display: block; font-size: 15px; }
.slot small { color: var(--muted); font-size: 11px; }
.slot:hover { border-color: var(--primary); }
.qa { margin-bottom: 8px; }
.qa p { margin: 2px 0 0; }
.reply { background: var(--bg); border-radius: 12px; padding: 10px 12px; margin-top: 10px; border-left: 3px solid var(--accent); }
.reply small { font-weight: 600; color: var(--muted); }
.reply-form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.sets { margin-top: 8px; }
.set { display: grid; grid-template-columns: 34px 1fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.set.head { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
.set > span:first-child { text-align: center; font-weight: 600; color: var(--muted); }
.set input { padding: 9px; text-align: center; }
.set.done input { background: #f0f8f3; border-color: #cfe8d8; }
.last { color: var(--accent); filter: brightness(.7); font-weight: 500; }
.log-detail { padding-top: 8px; font-size: 14px; }
.log-detail p { margin: 0 0 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.gal-item small { display: block; text-align: center; color: var(--muted); font-size: 12px; margin-top: 2px; }
.photo { aspect-ratio: 3/4; background: var(--bg); border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet .photo { aspect-ratio: auto; min-height: 200px; margin-bottom: 12px; }
.sheet .photo img { object-fit: contain; max-height: 65vh; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare .photo { aspect-ratio: 3/4 !important; min-height: 0; }
.compare small { display: block; text-align: center; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
tr.total td { font-weight: 600; border-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; font-size: 13px; font-weight: 500; }
.tile svg { width: 24px; height: 24px; color: var(--accent); }
.chat { display: flex; flex-direction: column; height: calc(100vh - 190px - var(--tabbar)); min-height: 360px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 900px) { .chat { height: calc(100vh - 170px); } }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 18px; margin-bottom: 6px; }
.msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.msg small { font-size: 10px; opacity: .6; }
.msg.me { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; }
.msg.them { background: var(--bg); border-bottom-left-radius: 6px; }
.msg-day { text-align: center; font-size: 11px; color: var(--muted); margin: 10px 0; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 44px; max-height: 120px; }
.composer .btn { padding: 0 16px; width: auto; flex: 0 0 auto; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-head strong, .post-head small { display: block; }
.post-actions { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.post-actions .link { font-weight: 500; color: var(--muted); }
.comments { margin-top: 8px; }
.comment { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tip-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tip-head svg { color: var(--accent); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; }
.cover { width: calc(100% + 32px); margin: -16px -16px 12px; height: 160px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.cover.big { width: 100%; margin: 0 0 12px; height: 220px; border-radius: var(--radius); }
.article-body p { font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.client-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.client-head h1 { font-size: 22px; }
.client-head p { margin: 2px 0 4px; }
.copyline { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 10px; }
.copyline code { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-preview { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: 14px Inter, sans-serif; }
.builder-day .day-name { font-weight: 600; }
.inline-form .time { flex: 0 0 100px; }
.ex-row { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ex-main input { padding: 8px 10px; font-size: 15px; }
.ex-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ex-nums label { font-size: 11px; color: var(--muted); font-weight: 600; }
.ex-tools { display: flex; flex-direction: column; }
.totals strong, .totals small { display: block; }
.note { background: #ecfdf3; border-radius: 10px; padding: 10px; font-size: 14px; }

/* ---------- sign in ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; padding-top: calc(24px + var(--safe-t)); }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-card.wide { max-width: 520px; }
.auth-card form { text-align: left; margin-top: 20px; }
.auth-card form h2 { margin-bottom: 12px; }
.auth-logo { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 14px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; margin: 14px 0; }
.demo-box { background: var(--card); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 14px; margin: 18px 0 4px; text-align: left; }
.demo-box .row { margin: 8px 0 0; }
.demo-box .btn { flex: 1; }
.done { padding: 30px 0; }
form.inline-form > .btn, .inline-form .btn.sm { width: auto; flex: 0 0 auto; }
.inline-form input { min-width: 0; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; margin-bottom: 10px; color: var(--muted); }
.search input { border: 0; padding: 11px 0; box-shadow: none !important; }
.cues { color: var(--muted); margin: 4px 0 8px; }
.btn.demo { margin-bottom: 4px; }
.day-actions { margin: 10px 0 0; }
/* onboarding */
.auth.onboard { place-items: start center; }
.onboard .auth-card { text-align: left; }
.onboard .auth-logo { display: block; margin: 0 auto 8px; width: 64px; height: 64px; }
.onboard .ob-welcome { text-align: center; }
.ob-progress { margin: 8px 0 12px; }
.ob-progress .bar-track { margin: 6px 0 14px; }
.ob-progress h1 { font-size: 24px; }
.ob-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ob-fields > div { grid-column: span 2; min-width: 0; }
.ob-fields > div.half { grid-column: span 1; }
.ob-nav { display: flex; gap: 10px; margin-top: 8px; }
.ob-nav .btn { flex: 1; width: auto; }
.ob-done { width: 56px; height: 56px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.ob-done svg { width: 28px; height: 28px; }
form.composer > .btn { width: auto; flex: 0 0 auto; padding: 0 18px; }
form.composer > textarea { flex: 1 1 auto; min-width: 0; width: auto; }
.tabbar a, .side a { position: relative; }
.nav-badge { font-style: normal; background: #e11d48; color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }
.tabbar .nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); }
.side .nav-badge { margin-left: auto; }
/* bookings */
.left { text-align: left; }
.booking-flow { text-align: left; }
.bf-step { margin: 18px 0 10px; font-size: 15px; }
.bf-step small { font-weight: 400; }
.type-cards { display: grid; gap: 10px; }
.type-card { text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
.type-card strong { font-size: 16px; }
.type-card small { color: var(--muted); }
.type-card span { font-size: 14px; }
.type-card.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.chip svg { width: 14px; height: 14px; vertical-align: -2px; }
.day-pill { flex: 0 0 74px; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 4px; cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 1px; }
.day-pill strong { font-size: 20px; }
.day-pill small { font-size: 11px; color: var(--muted); }
.day-pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.slot.on { background: var(--primary); color: #fff; border-color: var(--primary); }
/* booking month calendar */
.mcal { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 8px; margin-bottom: 14px; }
.mcal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mcal-head strong { font-size: 16px; }
.mcal-head .icon-btn:disabled { opacity: .25; cursor: default; }
.mcal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.mcal-wd { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.mcal-day { position: relative; height: 42px; border: 0; border-radius: 12px; background: none; font: 500 15px Inter, sans-serif; color: var(--muted); opacity: .45; }
.mcal-day.open { opacity: 1; color: var(--text); font-weight: 700; background: color-mix(in srgb, var(--accent) 16%, var(--card)); cursor: pointer; }
.mcal-day.open i, .mcal-key i { position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--good); }
.mcal-day.today { box-shadow: inset 0 0 0 1.5px var(--line); }
.mcal-day.on { background: var(--primary); color: #fff; }
.mcal-day.on i { background: #fff; }
.mcal-key { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; }
.mcal-key i { position: static; margin: 0; display: inline-block; }
.slot-part { margin-bottom: 10px; }
.slot-part > small { display: block; margin: 0 0 6px 2px; font-weight: 600; }
.bf-details { margin-top: 16px; }
.avail-day { display: grid; grid-template-columns: 44px 1fr 32px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.avail-day > strong { padding-top: 9px; }
.avail-ranges { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.avail-ranges > .muted { padding-top: 9px; }
.avail-range { display: flex; align-items: center; gap: 6px; }
.avail-range input { padding: 8px; font-size: 15px; min-width: 0; flex: 1; }
.type-edit { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.rem-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rem-row .li-main { flex: 1 1 160px; }
.rem-controls { display: flex; gap: 8px; align-items: center; }
.rem-controls input[type=time] { width: 120px; padding: 8px; font-size: 15px; }
.rem-controls select { width: auto; padding: 8px 28px 8px 10px; font-size: 15px; }
.dot.gcal { background: #9ca3af; }
/* cycle */
.day.ph-m { background: #fde2e4; }
.day.ph-f { background: #e8f3ec; }
.day.ph-o { background: #fdf0d5; }
.day.ph-l { background: #ece8f6; }
.day.flow { background: #f43f5e !important; color: #fff !important; font-weight: 700; }
.day.pred { background: repeating-linear-gradient(45deg, #fde2e4, #fde2e4 3px, #fff 3px, #fff 6px) !important; color: #9f1239; }
.dot.ph-m { background: #fda4af; } .dot.ph-f { background: #6fbf8e; } .dot.ph-o { background: #f2b544; } .dot.ph-l { background: #9b8ad4; }
.dot.flow { background: #f43f5e; }
.cycle-bar { position: relative; display: flex; gap: 3px; height: 58px; margin: 22px 0 10px; }
.cycle-bar .seg { border-radius: 10px; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; min-width: 0; overflow: hidden; opacity: .75; }
.cycle-bar .seg span { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cycle-bar .seg small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.cycle-bar .seg.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--primary); }
.cycle-bar .seg.ph-m { background: #fde2e4; } .cycle-bar .seg.ph-f { background: #e3f1e8; } .cycle-bar .seg.ph-o { background: #fcecc8; } .cycle-bar .seg.ph-l { background: #e7e2f5; }
.cycle-bar .marker { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--primary); border-radius: 2px; }
.cycle-bar .marker::after { content: "Today"; position: absolute; top: -18px; left: 0; transform: translateX(-30%); font-size: 10px; font-style: normal; font-weight: 700; }
.cycle-hero h2 { font-size: 24px; }
.period-actions { display: grid; gap: 8px; }
.period-actions .btn { width: 100%; }
.phase-item { border-bottom: 1px solid var(--line); }
.phase-item:last-of-type { border-bottom: 0; }
.phase-head { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 12px 0; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.phase-head small { flex: 1; }
.phase-head .chev { transition: transform .2s; color: var(--muted); }
.phase-head .chev.up { transform: rotate(180deg); }
.phase-body { padding: 0 0 12px 16px; font-size: 14px; }
.phase-body p { margin-bottom: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--muted); margin: 4px 0 6px; }

/* ---------- wellbeing ---------- */
:root { --g1: #e8836b; --g2: #f1b48a; --g3: #e9d9a6; --g4: #a9d3b5; --g5: #5fae7d; }
.scale { margin-bottom: 14px; }
.scale-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.scale-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale-btns .sb { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font: 600 18px Inter, sans-serif; color: var(--text); cursor: pointer; transition: transform .1s, background .15s; }
.scale-btns .sb:active { transform: scale(.95); }
.scale-btns .sb.on { border-color: transparent; box-shadow: 0 0 0 2px var(--primary) inset; }
.scale-btns .sb.on.g1, .strip i.g1, .legend i.g1 { background: var(--g1); }
.scale-btns .sb.on.g2, .strip i.g2 { background: var(--g2); }
.scale-btns .sb.on.g3, .strip i.g3, .legend i.g3 { background: var(--g3); }
.scale-btns .sb.on.g4, .strip i.g4 { background: var(--g4); }
.scale-btns .sb.on.g5, .strip i.g5, .legend i.g5 { background: var(--g5); }
.mood-quick .scale-btns .sb { font-size: 24px; height: 52px; }
.scale-btns.ten { grid-template-columns: repeat(5, 1fr); }
.scale-btns.ten .sb { height: 40px; font-size: 16px; }
.datenav.mini { margin: 0; gap: 2px; }
.datenav.mini .icon-btn { font-size: 20px; width: 32px; height: 32px; }
.strips { display: grid; gap: 6px; }
.strip-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.strip i { display: block; height: 18px; border-radius: 4px; }
.strip i.none, .legend i.none { background: var(--track); }
.strip-dates { display: flex; justify-content: space-between; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: -6px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wb-avg { text-align: center; padding: 6px 0; }
.wb-avg strong { display: block; font-size: 20px; }
.wb-avg small { display: block; font-size: 11px; color: var(--muted); }
.wb-avg svg { width: 16px; height: 16px; margin-top: 2px; }
.phase-wb { display: grid; gap: 10px; margin-bottom: 8px; }
.pw-row { display: grid; grid-template-columns: 82px 1fr; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; }
.pw-bars { display: grid; gap: 3px; }
.pw-bar { position: relative; height: 16px; background: var(--track); border-radius: 4px; overflow: hidden; }
.pw-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.pw-bar small { position: relative; font-size: 10px; padding-left: 6px; line-height: 16px; color: var(--text); }
.pw-mood { background: var(--g4); } .pw-energy { background: color-mix(in srgb, var(--accent) 60%, var(--card)); } .pw-stress { background: var(--g2); }
.wb-face { font-size: 24px; width: 36px; text-align: center; flex-shrink: 0; }
.wb-face.big { font-size: 30px; }
.wb-li { align-items: flex-start; }
.support-card { border-color: color-mix(in srgb, var(--g4) 70%, var(--card)); background: color-mix(in srgb, var(--g4) 14%, var(--card)); }
.support-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.support-links .btn { width: auto; text-decoration: none; }

/* ---------- habits ---------- */
.habit-stats .card { text-align: center; padding: 12px 8px; }
.habit-stats strong { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 20px; }
.habit-stats small { font-size: 12px; color: var(--muted); }
.flame { color: #e8742c; }
.h-emoji { font-size: 22px; width: 28px; text-align: center; flex-shrink: 0; }
.habit-li .box { flex-shrink: 0; }
.streak { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 3px 8px; border-radius: 999px; background: var(--track); }
.streak svg { width: 14px; height: 14px; }
.streak.hot { color: #b4530f; background: #fde8d6; }
.habit-grid { display: grid; gap: 6px 4px; align-items: center; }
.hg-row { display: contents; }
.hg-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.hg-day { text-align: center; font-size: 10px; color: var(--muted); line-height: 1.2; }
.hg-cell { width: 32px; height: 32px; border-radius: 9px; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.hg-cell svg { width: 16px; height: 16px; }
.hg-cell.on { background: var(--good); }
.hg-cell.miss { background: var(--track); }
.hg-cell.off { background: transparent; border: 1px dashed var(--line); cursor: default; }
.hg-cell:disabled { cursor: default; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick button { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.emoji-pick button.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.day-chips { margin-top: -4px; }

/* ---------- barcode scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-shade { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scan-box { position: relative; width: min(84vw, 520px); height: min(30vh, 230px); border-radius: 18px; box-shadow: 0 0 0 200vmax rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.9); }
.scan-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { transform: translateY(-60px); } to { transform: translateY(60px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
.scan-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(var(--safe-t) + 12px) 14px 12px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.scan-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; }
.scan-btn.ghost { background: none; }
.scan-btn svg { width: 22px; height: 22px; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(var(--safe-b) + 18px); text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.75) 30%); }
.scan-bottom p { margin: 0 auto 12px; max-width: 420px; font-size: 14px; }
.scan-err { background: rgba(194,65,12,.9); padding: 10px 12px; border-radius: 12px; }
.scan-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.scan-actions .btn { width: auto; background: rgba(255,255,255,.95); color: #111; border: 0; cursor: pointer; }
.scan-type { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.scan-type input { flex: 1; font-size: 18px; letter-spacing: 1px; }
.scan-type .btn { width: auto; }
.btn.scan-cta { width: 100%; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- food search and product ---------- */
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--card); margin-bottom: 10px; }
.search-box svg { color: var(--muted); }
.search-box input { border: 0; padding: 12px 0; background: transparent; }
button.food-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.food-row img, .food-dot { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--track); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.food-row .li-title svg { width: 15px; height: 15px; margin-left: 4px; vertical-align: -2px; }
.pdetail .back, .pform .back { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.phead { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.phead img, .pimg-ph { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: var(--track); display: grid; place-items: center; flex-shrink: 0; }
.phead strong { display: block; font-size: 17px; line-height: 1.25; }
.phead small { display: block; }
.psrc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.psrc svg { width: 13px; height: 13px; color: var(--good); vertical-align: -2px; }
.amount-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.macro-box { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--bg); border-radius: 12px; padding: 12px 6px; margin: 4px 0 12px; text-align: center; }
.macro-box strong { display: block; font-size: 18px; }
.macro-box small { display: block; font-size: 11px; }
.nip { margin-top: 14px; font-size: 14px; }
.nip summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.nip table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.nip td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.nip td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.nip td.ind { padding-left: 14px; color: var(--muted); }
.pform h3 { margin-bottom: 6px; }
.energy-row { display: flex; gap: 8px; }
.energy-row input { flex: 1; }
.seg2 { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.seg2 button { border: 0; background: var(--card); padding: 0 14px; font: 600 14px Inter, sans-serif; cursor: pointer; color: var(--muted); }
.seg2 button.on { background: var(--primary); color: #fff; }
.center.pad { padding: 30px 0; }
h4.muted svg { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- meal photo ---------- */
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cta-row .btn.scan-cta { margin-bottom: 0; padding-left: 8px; padding-right: 8px; }
.quick-row { margin-top: -4px; }
.quick-row.one { grid-template-columns: 1fr; }
.quick-row .btn { margin: 0; width: 100%; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
/* onboarding payment step: give each choice room */
.pay-actions { margin-top: 24px; }
.pay-actions > .btn { width: 100%; }
.pay-note { text-align: center; margin: 12px 8px 0; line-height: 1.5; }
.pay-note svg { vertical-align: -2px; }
.pay-other { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pay-other .btn { width: 100%; margin: 0; }
.mealphoto .back { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.mp-intro { text-align: center; padding: 10px 6px 16px; }
.mp-intro > svg { width: 36px; height: 36px; color: var(--accent); }
.mp-intro h3 { margin: 6px 0; }
.mp-btns { display: grid; gap: 8px; }
.mp-btns .btn { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mp-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; display: block; }
.mp-title { margin-bottom: 4px; }
.mp-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mp-item .grow { min-width: 0; }
.mp-name { border: 0; padding: 2px 0; font-weight: 600; background: transparent; border-radius: 0; }
.mp-name:focus { border-bottom: 1px solid var(--accent); }
.mp-item small { display: block; font-size: 12px; }
.mp-grams { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.mp-grams input { width: 68px; padding: 8px; text-align: right; }
.mp-grams span { font-size: 13px; color: var(--muted); }
.mp-extra { background: var(--bg); padding: 10px; border-radius: 12px; margin: 10px 0; }
.mealphoto .macro-box { margin-top: 12px; }
.searching svg { width: 14px; height: 14px; vertical-align: -2px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- step sync ---------- */
.linkbox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; overflow-wrap: anywhere; font-size: 12px; }
.linkbox code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
ol.howto { padding-left: 20px; margin: 12px 0; display: grid; gap: 10px; font-size: 14px; }
ol.howto code { background: var(--track); padding: 1px 5px; border-radius: 5px; }
.card .stat + .btn { margin-top: 10px; }

/* ---------- simplicity pass ---------- */
.quick-log { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.quick-log button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font: 600 13px Inter, sans-serif; color: var(--text); cursor: pointer; }
.quick-log button svg { width: 20px; height: 20px; color: var(--accent); }
.water-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.water-btns button { padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font: 600 13px Inter, sans-serif; cursor: pointer; color: var(--text); }
.tap-hint { display: block; font-size: 11px; margin-top: 8px; }
.more-group .section { margin-top: 18px; }
.more-group:first-of-type .section { margin-top: 4px; }
.dot-status { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--track); color: var(--muted); margin-left: 4px; vertical-align: 1px; }
.dot-status.good { background: #e3f1e8; color: var(--good); }
.dot-status.warn { background: #fde8d6; color: var(--warn); }
.week-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.week-table th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.week-table th:first-child, .week-table td:first-child { text-align: left; }
.week-table td { text-align: right; padding: 7px 0; border-top: 1px solid var(--line); }
.week-table tr.empty td.muted { text-align: right; font-size: 12px; }
.week-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.week-table td.good { color: var(--good); font-weight: 600; } .week-table td.warn { color: var(--warn); font-weight: 600; }
.target-table { margin-bottom: 4px; }
.totals .btn { margin-top: 10px; }
.ing-list { margin-top: 8px; }
.ing-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ing-food { flex: 1; min-width: 0; border: 0; padding: 4px 0; background: transparent; border-radius: 0; font-size: 14px; }
.ing-food:focus { border-bottom: 1px solid var(--accent); }
.ing-k { width: 34px; text-align: right; font-size: 12px; }
.ing-list .field { margin-top: 10px; }

/* ---------- readable meal plans ---------- */
.plan-name { margin-top: 6px; }
.day-summary .ds-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.day-summary .btn { margin-top: 12px; }
.ds-note { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; font-size: 14px; }
.ds-note svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); width: 16px; height: 16px; }
.macro-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.macro-chips .mc { border-radius: 10px; padding: 7px 4px; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.25; }
.macro-chips .mc strong { display: block; font-size: 15px; color: var(--text); }
.macro-chips.big .mc strong { font-size: 19px; }
.macro-chips .kcal { background: #f3ece4; } .macro-chips .p { background: #e6f0ea; } .macro-chips .c { background: #f6eedc; } .macro-chips .f { background: #ece8f4; }
.meal-card { padding: 16px; }
.meal-card.logged { opacity: .75; }
.meal-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.meal-emoji { font-size: 26px; width: 44px; height: 44px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; }
.meal-type { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.meal-time { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.meal-time svg { width: 12px; height: 12px; }
.meal-title { font-size: 18px; line-height: 1.25; margin-top: 2px; }
.meal-top .btn { flex-shrink: 0; }
.ing-table { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ing-table li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ing-name small { font-size: 12px; }
.ing-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meal-steps { margin-top: 12px; }
.steps-toggle { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 4px 0; font: 600 14px Inter, sans-serif; color: var(--text); cursor: pointer; }
.steps-toggle svg { width: 16px; height: 16px; color: var(--accent); }
.steps-toggle svg:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; }
.steps-toggle svg.rot { transform: rotate(180deg); }
.meal-steps ol { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; color: var(--text); }
.logged-note { margin: 10px 0 0; display: flex; align-items: center; gap: 4px; }

/* ---------- progressive overload ---------- */
.block-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--card)); }
.block-card.deload { background: #eef5f0; border-color: #cfe3d6; }
.bc-top { display: flex; gap: 12px; align-items: center; }
.bc-ico { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 18%, var(--card)); display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.block-card.deload .bc-ico { background: #d9ecdf; color: var(--good); }
.bc-top small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bc-top strong { font-size: 18px; }
.bc-weeks { display: flex; gap: 5px; margin: 12px 0 10px; }
.bc-weeks .bcw { flex: 1; height: 7px; border-radius: 99px; background: var(--track); display: block; }
.bc-weeks .bcw.past { background: color-mix(in srgb, var(--accent) 55%, var(--card)); }
.bc-weeks .bcw.now { background: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.bc-weeks .bcw.dl { background: #bfdcc9; } .bc-weeks .bcw.dl.now { background: var(--good); }
.block-card p { margin: 0; font-size: 14px; }
.how-card .pre { margin: 8px 0 0; }
.overload-tip { border-radius: 10px; padding: 8px 10px; margin: 6px 0 8px; font-weight: 500; }
.overload-tip.up { background: #e3f1e8; color: #1f5e3a; }
.overload-tip.same { background: var(--bg); }
.overload-tip.start { background: #f6eedc; }
.overload-tip.deload { background: #eef5f0; color: #1f5e3a; }
.tpl-picker h4 { margin: 14px 0 6px; }
.tpl-picker h4:first-of-type { margin-top: 4px; }
.lib-head svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--accent); }
.tpl-picker .chips { margin-bottom: 6px; }

/* ---------- Leads CRM ---------- */
.pill.bad { background: #fdecec; color: #b42318; }
.accent-text { color: color-mix(in srgb, var(--accent) 60%, #000); font-weight: 600; }
.lead-list { display: flex; flex-direction: column; }
.lead-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.lead-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lead-row .grow strong { font-size: 15px; }
.lead-row .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.lead-row-right small { font-size: 12px; }
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.next-step.due { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.msg-edit { font-size: 15px; line-height: 1.45; margin-bottom: 10px; }
.send-row { display: flex; gap: 8px; flex-wrap: wrap; }
.fu-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fu-date input { width: auto; padding: 7px 10px; font-size: 14px; }
.fu-date .link { margin-left: auto; }
.status-chips .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.lead-dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; margin: 0; font-size: 14px; }
.lead-dl dt { color: var(--muted); }
.lead-dl dd { margin: 0; overflow-wrap: anywhere; }
.lead-msg { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.note-form .chips { margin-bottom: 0; }
.note-form .btn { align-self: flex-start; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline p { margin: 0 0 2px; font-size: 14px; }
.tl-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.del-lead { margin: 8px 0 24px; }
.lead-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; text-align: center; }
.lead-stats strong { display: block; font-size: 22px; }
.lead-stats small { color: var(--muted); font-size: 12px; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.seq-step { padding: 12px; }
.seq-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.seq-day { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.seq-day input { width: 64px; padding: 7px 8px; }
.seq-title { flex: 1; padding: 7px 10px; font-weight: 600; }
.sheet-body h3 { margin: 18px 0 8px; }
.sheet-body h3:first-child { margin-top: 0; }
.note-form .btn { width: auto; }
.lead-row-right .pill, .next-step .pill { text-transform: none; }

/* ---------- Packages & payments ---------- */
.pkg-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.pkg-card { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; padding: 16px 44px 16px 16px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; color: inherit; cursor: pointer; }
.pkg-card.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pkg-card.static { cursor: default; padding-right: 16px; margin-bottom: 16px; }
.pkg-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pkg-top strong { font-size: 16px; }
.pkg-price { font-weight: 700; white-space: nowrap; }
.pkg-desc { font-size: 14px; color: var(--muted); line-height: 1.4; }
.pkg-tick { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; }
.pkg-tick svg { width: 14px; height: 14px; }
.pkg-card.on .pkg-tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.pkg-chosen { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.sec-head { margin: 18px 0 8px; }
.pkg-edit.off { opacity: .75; }
.pkg-edit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.pay-list li:first-child { border-top: 0; }
.pay-list li.tap { cursor: pointer; }
.pay-list .grow { min-width: 0; display: flex; flex-direction: column; }
.pay-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.client-head .pill + .pill { margin-left: 4px; }
.onboard .auth-card > .btn { width: 100%; }
.btn.danger-btn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.icon-btn.danger { color: var(--warn); }

/* ---------- Training v2 ---------- */
.day-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.day-pills::-webkit-scrollbar { display: none; }
.day-pill { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font: 600 14px Inter, sans-serif; color: var(--text); cursor: pointer; }
.day-pill.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.day-pill .dp-done { color: var(--good); width: 16px; height: 16px; }
.day-pill.on .dp-done { color: #9fe0b5; }
.day-pill .dp-next { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 6px; }
.day-card h2 { margin: 2px 0 2px; font-size: 22px; }
.day-head { margin-bottom: 10px; }
.day-ex { list-style: none; margin: 0 0 14px; padding: 0; }
.day-ex li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; }
.day-ex li .grow, .wk-ex-head .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dx-n { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; color: var(--muted); }
.dx-n.ok { background: var(--good); color: #fff; }
.dx-n svg { width: 16px; height: 16px; }
.dx-last { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; flex-shrink: 0; text-align: right; }
.dx-last svg { width: 16px; height: 16px; }
.resume-card { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tp-stats { grid-template-columns: repeat(3, 1fr); }
.pr-row { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 0; text-align: left; font: inherit; color: inherit; }
.ex-hist { list-style: none; margin: 0; padding: 0; }
.ex-hist li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wk-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 8px 0 10px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wk-bar span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.wk-prog { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.wk-prog div { height: 100%; background: var(--good); border-radius: 999px; transition: width .3s; }
.wk-ex { padding: 0; overflow: hidden; }
.wk-ex-head { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.wk-ex-head strong { font-size: 16px; }
.wk-ex-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ex.complete:not(.open) { opacity: .8; }
.wk-ex.open { border-color: var(--primary); }
.wk-ex-body { padding: 0 16px 14px; }
.last-time { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; }
.set.pr input { border-color: var(--accent); }
.wk-ex-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.rot { transform: rotate(180deg); }
.rot90 { transform: rotate(90deg); }
.rest-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + var(--safe-b) + 10px); z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--primary); color: #fff; border-radius: 14px; padding: 12px 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.rest-bar .rest-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.12); transition: width 1s linear; }
.rest-bar > * { position: relative; }
.rest-bar span { display: inline-flex; gap: 6px; align-items: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.rest-bar small { flex: 1; opacity: .8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rest-bar .link { color: #fff; }
@media (min-width: 900px) { .rest-bar { left: auto; right: 24px; bottom: 24px; width: 420px; } }
.done-hero { text-align: center; }
.done-hero h2 { margin: 8px 0 14px; }
.done-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; margin: 4px auto 0; }
.done-badge svg { width: 30px; height: 30px; }
.wins { list-style: none; margin: 0; padding: 0; }
.wins li { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wins li:first-child { border-top: 0; }
.wins li strong { font-size: 15px; }
.wins li span { color: var(--good); font-weight: 500; }
.wins.plain li span { color: var(--muted); font-weight: 400; }
.wins li.pr { background: color-mix(in srgb, var(--accent) 14%, var(--card)); margin: 0 -16px; padding: 10px 16px; }
.feel-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.feel { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 2px; cursor: pointer; font: inherit; }
.feel span { font-size: 24px; }
.feel small { font-size: 11px; color: var(--muted); }
.feel.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.hist-card { padding: 0; }
.hist-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 14px 16px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hist-head .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hist-card .log-detail { padding: 0 16px 14px; }
.hist-ex { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); }
.hist-ex .link { padding: 0; }

/* ---------- Meal plan v2 ---------- */
.today-food { display: flex; gap: 16px; align-items: center; }
.today-food .grow { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.tf-left { font-size: 16px; }
.tf-bar { display: grid; grid-template-columns: 54px 1fr auto; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tf-bar small { font-variant-numeric: tabular-nums; }
.tf-track { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.tf-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.tf-fill.p { background: #6aa884; } .tf-fill.c { background: #d9b45f; } .tf-fill.f { background: #9b8cc4; }
.plan-head { display: flex; align-items: flex-end; gap: 10px; margin: 4px 0 10px; }
.plan-head h2 { margin: 0 0 2px; font-size: 20px; }
.meal-row { padding: 0; overflow: hidden; }
.meal-row.logged { background: color-mix(in srgb, var(--good) 6%, var(--card)); border-color: color-mix(in srgb, var(--good) 30%, var(--line)); }
.mr-head { display: flex; align-items: stretch; }
.mr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 14px 8px 14px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.mr-main .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mr-main strong { font-size: 16px; line-height: 1.25; }
.mr-type { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 65%, #000); }
.meal-row .meal-emoji { font-size: 26px; width: 44px; height: 44px; flex-shrink: 0; }
.log-btn { flex-shrink: 0; width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-left: 1px solid var(--line); background: var(--card); color: var(--primary); cursor: pointer; font: 600 12px Inter, sans-serif; }
.log-btn svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--primary); color: #fff; box-sizing: content-box; }
.log-btn.on { background: transparent; color: var(--good); }
.log-btn.on svg { background: var(--good); }
.mr-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.mr-sub { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 12px 0 6px; }
.mr-sub svg { color: var(--accent); }
.swaps .steps-toggle { width: 100%; }
.plan-actions { position: sticky; bottom: calc(var(--tabbar) + var(--safe-b) + 8px); z-index: 4; margin-top: 8px; }
.plan-actions .btn { width: 100%; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
@media (min-width: 900px) { .plan-actions { bottom: 16px; } }

/* ---------- Coaching feed / flags ---------- */
.pill.warn { background: #fff3e0; color: #8a4b08; }
.flag-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.flag-dot.at_risk { background: #c62828; } .flag-dot.slipping { background: #e8a33d; }
.av-wrap { position: relative; display: inline-flex; }
.flag-dot.on-av { position: absolute; right: -2px; top: -2px; border: 2px solid var(--card); width: 13px; height: 13px; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.feed-head h3 { margin: 0; }
.flag-card.at_risk { border-color: #e7a6a6; box-shadow: inset 3px 0 0 #c62828; }
.flag-card.slipping { box-shadow: inset 3px 0 0 #e8a33d; }
.flag-top { display: flex; align-items: center; gap: 12px; }
.flag-name { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; flex-wrap: wrap; }
.flag-name strong { font-size: 16px; }
.flag-reasons { margin: 10px 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.day-weekday { width: auto; padding: 8px 28px 8px 10px; font-size: 14px; }
.ex-nums select { padding: 9px 26px 9px 8px; font-size: 14px; }
.ex-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 420px) { .ex-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Make it work today ---------- */
.adapt-entry .stat svg:first-child { color: var(--accent); }
.adapt-entry .grow { flex: 1; }
.adapt-today { border-color: color-mix(in srgb, var(--good, #2E7D4F) 35%, var(--line)); }
.adapt-today .at-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.adapt-today h3 { margin: 6px 0 2px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.row-btns > * { flex: 1 1 auto; }
.chips.big .chip { padding: 11px 14px; font-size: 14px; min-height: 44px; border-radius: 12px; }
.adapt-q { margin: 6px 0 4px; }
.adapt-q strong { display: block; margin-bottom: 8px; font-size: 14px; }
.adapt-ask .btn, .adapt-plan .btn { min-height: 46px; }
.center { text-align: center; }
.adapt-plan .ap-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 4px; }
.adapt-plan .ap-card h3 { margin: 4px 0 6px; }
.ap-list { list-style: none; margin: 8px 0; padding: 0; counter-reset: ap; }
.ap-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); counter-increment: ap; }
.ap-list li::before { content: counter(ap); font-weight: 700; color: var(--muted); min-width: 16px; }
.ap-list small { display: block; }
.warn-text { color: #B26A00; }
.adapt-safety { text-align: left; }
.adapt-safety p { line-height: 1.5; }
.adapt-limit p { line-height: 1.5; }
.adapt-moved .stat svg:first-child { color: var(--accent); }
.adapt-moved .grow { flex: 1; }
.adapt-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; }
.adapt-links .muted { margin-left: auto; }
.feed-sub { margin-top: 22px; }
.handled-list { padding: 4px 0; }
.handled-row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 10px 14px; border-top: 1px solid var(--line); font: inherit; color: inherit; }
.handled-row:first-child { border-top: 0; }
.handled-row small { display: block; margin-top: 2px; }
.uses-left { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, var(--card)); white-space: nowrap; }
.uses-left.none { background: #FBEBD6; color: #8A5300; }
.flag-card .pill, .handled-row .pill, .adapt-today .pill { text-transform: none; }
.adapt-today .at-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.adapt-today .at-sec:first-of-type { border-top: 0; margin-top: 4px; padding-top: 0; }
.adapt-today .at-sec p { margin: 4px 0 8px; }
.adapt-today .at-sec svg { vertical-align: -2px; }
.adapt-plan .ap-card + .ap-card { margin-top: 10px; }
.adapt-plan .ap-card small svg { vertical-align: -2px; }
.food-opts { display: grid; gap: 8px; margin: 8px 0; }
.food-opt { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
.food-opt.on { border: 1.5px solid var(--primary); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.food-opt small { display: block; margin-top: 2px; }
.fo-num { text-align: right; white-space: nowrap; }
.fo-num small { display: block; font-size: 11px; color: var(--muted); }
.walks { margin: 6px 0; padding-left: 18px; }
.walks li { margin: 3px 0; }
.adapt-today > .link { display: block; margin-top: 8px; }
.tip-week .tw-top { display: flex; gap: 8px; align-items: center; }
.tip-week p { margin: 6px 0 8px; }
.pattern-card .pc-title { margin: 8px 0 4px; font-size: 15px; }
.pattern-card .pc-detail { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.flag-card.pattern-card { border-left: 3px solid var(--accent); }
.week-card .wc-top { display: flex; gap: 8px; align-items: center; }
.week-card h3 { margin: 6px 0 4px; }
.wc-wins { margin: 4px 0 8px; padding-left: 18px; font-size: 14px; }
.wc-wins li { margin: 2px 0; }
.week-full h2 { margin: 4px 0 10px; }
.week-full.latest { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.wk-wins { list-style: none; padding: 0; margin: 0 0 10px; }
.wk-wins li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); }
.wk-wins li:first-child { border-top: 0; }
.wk-wins svg { flex: none; margin-top: 2px; color: var(--accent); }
.wk-focus { display: flex; gap: 8px; align-items: flex-start; background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-radius: 12px; padding: 10px 12px; }
.wk-focus svg { flex: none; margin-top: 2px; }
.lead-stats strong small { font-size: 13px; color: var(--muted); font-weight: 500; }
/* ---------- Check-in intelligence ---------- */
.brief .brief-top { display: flex; gap: 10px; align-items: flex-start; }
.brief .brief-top p { margin: 2px 0 0; }
.brief-att, .brief-prev { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.rep-sec { padding: 0; overflow: hidden; }
.rep-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 14px 16px; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rep-head h3 { margin: 0; font-size: 15px; }
.rep-n { width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 25%, var(--card)); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.rep-sec .chev { transition: transform .2s; color: var(--muted); }
.rep-sec.open .chev { transform: rotate(180deg); }
.rep-body { padding: 0 16px 14px; }
.rep-body p { margin: 0 0 8px; line-height: 1.5; }
.rep-list { margin: 0 0 8px; padding-left: 18px; }
.rep-list li { margin: 4px 0; line-height: 1.45; }
.snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.snap-grid > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.snap-grid .wide { grid-column: 1 / -1; }
.snap-grid small { color: var(--muted); font-size: 12px; }
.snap-grid b { font-size: 17px; }
.snap-grid em { font-style: normal; font-size: 12px; color: var(--muted); }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.cmp td:first-child, .cmp th:first-child { text-align: left; color: var(--muted); }
.rec { border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.rec.green { border-left-color: var(--good, #2E7D4F); }
.rec.amber { border-left-color: #C98A1B; }
.rec.red { border-left-color: #B3261E; background: color-mix(in srgb, #B3261E 5%, var(--card)); }
.rec-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.rec p { margin: 4px 0; }
.rec-dec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.loom-pts { padding-left: 18px; margin: 0 0 12px; }
.loom-pts li { margin: 6px 0; line-height: 1.45; }
.qa-all { margin-top: 8px; }
.spin-slow { animation: spin 2.4s linear infinite; }
.send-card { border: 1.5px solid var(--primary); }
.rep-body h4 { margin: 12px 0 4px; }
.brief .pill, .rec .pill, .handled-row .pill { text-transform: none; }
/* ---------- Client profile ---------- */
.prof-intro .pi-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.prof-intro .pi-top small { display: block; margin-top: 2px; }
.prof-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.prof-item:first-of-type { border-top: 0; }
.prof-item p { margin: 0 0 4px; line-height: 1.45; }
.prof-item.pinned p { font-weight: 600; }
.prof-item .pi-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prof-item .pi-act { display: flex; gap: 2px; flex: none; }
.prof-item .pi-act .icon-btn { width: 32px; height: 32px; }
.prof-item.editing { display: block; }
.prof-pending { border: 1.5px dashed #C98A1B; }
.prof-sec .pill, .prof-item .pill, .prof-mini .pill { text-transform: none; }
.prof-mini { padding: 0; overflow: hidden; }
.prof-mini.card .rep-head svg:first-child { flex: none; }
.pm-row { margin-bottom: 6px; }
.mg-title { display: inline-flex; gap: 8px; align-items: center; }
.mg-item { display: flex; gap: 6px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); }
.mg-item:first-of-type { border-top: 0; }
.mg-item p { margin: 0; line-height: 1.45; }
.mg-form { margin-top: 8px; }
/* ---------- AI draft replies (coach chat) ---------- */
.draft-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px 0; }
.draft-bar .draft-go.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.draft-bar .chip svg { vertical-align: -2px; }
.draft-intent { flex: 1 1 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; background: var(--card); color: inherit; }
.draft-bar.has { display: block; }
.draft-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.draft-tools small { flex: 1 1 auto; }
.draft-warn { display: flex; gap: 8px; align-items: flex-start; background: #FBEBD6; color: #6B3F00; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.draft-warn svg { flex: none; margin-top: 2px; }
.draft-facts { display: block; margin-top: 4px; font-size: 12px; }
/* client home: message icon + check-in reply */
.head-icon { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: inherit; flex: none; }
.head-icon svg { width: 22px; height: 22px; }
.head-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #D93025; color: #fff; font: 700 11px/20px Inter, sans-serif; font-style: normal; text-align: center; border: 2px solid var(--bg); }
.msg-alert, .ci-reply { display: flex; gap: 10px; align-items: center; }
.msg-alert small, .ci-reply small { display: block; font-weight: 400; opacity: .85; margin-top: 2px; }
.ci-reply { border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.ci-reply svg { width: 24px; height: 24px; flex: none; }
.new-dot { width: 10px; height: 10px; border-radius: 50%; background: #D93025; flex: none; }
.head-msg { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--primary); color: #fff; font: 600 14px Inter, sans-serif; cursor: pointer; flex: none; white-space: nowrap; }
.head-msg svg { width: 20px; height: 20px; }
@media (max-width: 420px) { .head-msg span { display: none; } .head-msg { width: 44px; padding: 0; justify-content: center; } }
.head-msg .head-badge { border-color: var(--bg); }

/* ---- v41 simpler screens ---- */
.ci-due { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.ci-due small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ci-due > svg { width: 22px; height: 22px; flex: none; }
.ci-due > svg:last-child { color: var(--muted); width: 18px; height: 18px; }
.mini-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-tiles .mini-tile { padding: 12px 10px; }
.mini-tiles .mini-add { white-space: nowrap; }
.mini-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-align: left; font: inherit; color: var(--text); cursor: pointer; min-width: 0; }
.mini-tile > svg { width: 18px; height: 18px; color: var(--accent); margin-bottom: 4px; }
.mini-tile strong { font-size: 15px; line-height: 1.2; }
.mini-tile small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.mini-bar { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--track); margin-top: 6px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.mini-add { margin-top: 6px; display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 3px 8px; font: 600 11px Inter, sans-serif; color: var(--text); cursor: pointer; }
.mini-add svg { width: 12px; height: 12px; }
.adapt-link { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: 500 13px Inter, sans-serif; color: var(--text); cursor: pointer; text-align: left; }
.adapt-link svg { width: 16px; height: 16px; color: var(--accent); }
.adapt-link small { color: var(--muted); font-size: 12px; }
.meal-kcal { font-weight: 400; font-size: 13px; margin-left: 4px; }

.show-more { display: block; margin: 8px 0 4px; font-size: 13px; }
.center-link { display: block; margin: 8px auto 16px; font-size: 14px; }
.day-card > .btn { width: 100%; margin: 12px 0 4px; }
.period-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 12px; font-size: 13px; }
.period-links .link { display: inline-flex; align-items: center; gap: 4px; }
.period-links svg { width: 14px; height: 14px; }
.coach-kpis { grid-template-columns: repeat(4, 1fr); } .coach-kpis .mini-tile strong { font-size: 18px; }
.page-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.page-brand img { width: 28px; height: 28px; border-radius: 50%; }
.page-brand small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---- v43 set-up guide ---- */
.setup-card { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.setup-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.setup-ring { position: relative; width: 40px; height: 40px; flex: none; }
.setup-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.setup-ring circle { fill: none; stroke: var(--track); stroke-width: 4; }
.setup-ring circle.fill { stroke: var(--accent); stroke-linecap: round; }
.setup-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; }
.setup-step { padding: 0; overflow: hidden; }
.setup-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.setup-head small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; font-weight: 400; }
.setup-head > svg:first-child { width: 26px; height: 26px; flex: none; }
.setup-n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.setup-head .chev { color: var(--muted); transition: transform .15s; }
.setup-head .chev.down { transform: rotate(90deg); }
.setup-step.done .setup-head b { color: var(--muted); }
.setup-body { padding: 0 16px 16px; }
.setup-body > .card { box-shadow: none; }
.howto.visual { list-style: none; padding: 0; margin: 4px 0 12px; counter-reset: s; }
.howto.visual li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: s; }
.howto.visual li:last-child { border-bottom: 0; }
.hs-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.hs-ico svg { width: 20px; height: 20px; color: #0a84ff; }
.hs-ico img { width: 30px; height: 30px; border-radius: 7px; }
.device-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.device-pick .chip { padding: 4px 10px; font-size: 12px; }
.install-steps .linkbox { margin: 8px 0; }
.pending-setup { margin: 18px 0 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.pending-setup h3 { font-size: 15px; margin: 0 0 6px; }
.setup-all h3 { margin: 6px 0 2px; }

/* ---- v44 simpler step sync ---- */
.howto.visual li .btn { display: flex; width: fit-content; margin-top: 8px; }
.sync-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--good) 12%, var(--card)); color: var(--good); font-weight: 600; font-size: 14px; }
.sync-ok svg { width: 18px; height: 18px; flex: none; }
.sync-wait { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.step-more { margin-top: 14px; }
.step-more summary { cursor: pointer; padding: 6px 0; }

/* check-in schedule banner */
.ci-when { display: flex; gap: 12px; align-items: flex-start; }
.ci-when svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.ci-when .grow { display: flex; flex-direction: column; gap: 3px; }
.ci-when.open { box-shadow: inset 3px 0 0 var(--accent); }

/* check-in open: big button on Home */
.ci-open { border: 1.5px solid var(--primary); }
.ci-open-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ci-open-top svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.ci-open-top .grow { display: flex; flex-direction: column; gap: 2px; }
.ci-open-top small { color: var(--muted); }
.ci-open .btn { width: 100%; margin: 0; }
.tile.hot { background: var(--primary); color: #fff; border-color: var(--primary); }
.tile.hot svg { color: #fff; }

/* daily check-in */
.daily-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 1px solid var(--line); }
.daily-cta .daily-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; flex-shrink: 0; }
.daily-cta .daily-ico svg { width: 20px; height: 20px; }
.daily-cta .grow { display: flex; flex-direction: column; gap: 2px; }
.daily-cta small { color: var(--muted); font-style: italic; }
.daily-cta > svg { color: var(--muted); }
.daily-cta.done .daily-ico { background: var(--good); }
.daily-cta.done small { font-style: normal; }
.daily-steps { width: 100%; font: 700 28px Inter, sans-serif; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); margin-bottom: 8px; }
.daily-water { display: flex; align-items: center; gap: 12px; }
.daily-water strong { display: block; font-size: 26px; }
.icon-btn.big { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); }
.icon-btn.big svg { width: 22px; height: 22px; }
.daily-ticks { display: flex; flex-direction: column; gap: 8px; }
.daily-tick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: var(--text); cursor: pointer; }
.daily-tick .grow { display: flex; flex-direction: column; }
.daily-tick .tick-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.daily-tick.on .tick-box { background: var(--good); border-color: var(--good); color: #fff; }
.daily-chips .chip { padding: 9px 14px; font-size: 14px; }
.daily-table { display: flex; flex-direction: column; }
.daily-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.daily-row:last-child { border-bottom: 0; }
.daily-row span { color: var(--muted); }

.daily-note-btn { display: inline-block; margin-top: 10px; color: var(--muted); }
.daily-note { width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: 15px Inter, sans-serif; resize: vertical; }
.daily-row-notes { color: var(--text) !important; font-style: italic; }

/* food ideas: "What should I eat?" */
.ideas-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 1px solid var(--line); }
.ideas-cta .ideas-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--text); flex-shrink: 0; }
.ideas-cta .ideas-ico svg { width: 20px; height: 20px; }
.ideas-cta .grow { display: flex; flex-direction: column; gap: 2px; }
.ideas-cta small { color: var(--muted); }
.ideas-cta > svg { color: var(--muted); }
.ideas-link { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 2px 0; border: 0; border-top: 1px solid var(--line); background: none; font: 14px Inter, sans-serif; color: var(--muted); cursor: pointer; text-align: left; }
.ideas-link b { color: var(--text); }
.ideas-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.ideas-left { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 12px; }
.ideas-left strong { font-size: 24px; }
.ideas-meals { justify-content: center; margin-bottom: 14px; }
.ideas-list { display: flex; flex-direction: column; gap: 12px; }
.idea-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--card); }
.idea-card ul { list-style: none; margin: 0 0 8px; padding: 0; }
.idea-card li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.idea-card li:last-child { border-bottom: 0; }
.idea-card li b { white-space: nowrap; }
.idea-tot { margin: 4px 0 2px; font-size: 14px; }
.idea-card .btn { width: 100%; margin: 10px 0 0; }
.ideas-more { display: flex; align-items: center; gap: 6px; margin: 14px auto 6px; }

/* meal photo: make it more accurate */
.mp-refine-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0; padding: 12px 14px; border: 1.5px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.mp-refine-btn:disabled { opacity: .5; }
.mp-refine-btn svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.mp-refine-btn .grow { display: flex; flex-direction: column; gap: 2px; }
.mp-refine-btn small { color: var(--muted); }
.mp-refine { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.mp-refine h4 { margin: 0 0 2px; }
.mp-q { margin: 12px 0; }
.mp-q > small { display: block; font-weight: 600; margin-bottom: 6px; }
.mp-refine .btn { width: 100%; margin: 8px 0 6px; }
.mp-refine .link { display: block; margin: 0 auto; }

/* polish (v58) */
.set { grid-template-columns: 34px 1fr 1fr 46px; gap: 10px; margin-bottom: 8px; }
.set input { padding: 12px 8px; min-height: 46px; font-size: 17px; }
.set .box { width: 46px; height: 46px; border-radius: 12px; }
.set .box svg { width: 22px; height: 22px; }
.wk-ex-actions .link { padding: 8px 4px; }
.cal-legend { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 16px; color: var(--muted); margin: -4px 0 12px; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ex-sum { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ex-sum .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-sum small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-sum .ex-n { width: 24px; height: 24px; border-radius: 50%; background: var(--track, #eee); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.ex-sum > svg { color: var(--muted); flex-shrink: 0; }
.show-more { display: block; margin: 10px auto 0; }

/* challenges */
.ch-row, .ch-home { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border: 1px solid var(--line); }
.ch-row .grow, .ch-home .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ch-row > svg, .ch-home > svg { color: var(--muted); flex-shrink: 0; }
.ch-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 22%, var(--card)); flex-shrink: 0; }
.ch-ico svg { width: 20px; height: 20px; }
.ch-hero-top { display: flex; gap: 12px; align-items: center; }
.ch-hero-top > svg { width: 28px; height: 28px; color: var(--accent); }
.ch-hero-top .grow { display: flex; flex-direction: column; gap: 2px; }
.ch-hero-top b { font-size: 18px; }
.ch-hero-top small { color: var(--muted); }
.ch-progress { height: 8px; border-radius: 999px; background: var(--track, #eee); margin: 12px 0 4px; overflow: hidden; }
.ch-progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.ch-hero .btn { width: 100%; margin: 12px 0 0; }
.ch-board { list-style: none; margin: 0; padding: 0; }
.ch-board li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ch-board li:last-child { border-bottom: 0; }
.ch-board li.me { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border-radius: 10px; font-weight: 600; }
.ch-rank { width: 30px; text-align: center; font-weight: 700; color: var(--muted); font-size: 15px; }
.ch-kinds { display: grid; gap: 8px; margin: 6px 0 14px; }
.ch-kind { text-align: left; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ch-kind small { color: var(--muted); }
.ch-kind.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.ch-tasks { margin: 4px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.ch-task-edit { display: grid; grid-template-columns: 1fr 64px 40px; gap: 8px; align-items: center; }
.ch-task-edit input { padding: 10px; }
.center-link { display: block; margin: 8px auto 20px; }
.daily-tick + .daily-tick { margin-top: 8px; }
/* videos */
.vid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vid-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.vid-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; background: #222; cursor: pointer; overflow: hidden; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-thumb.instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d 60%, #fcb045); }
.vid-thumb.link, .vid-thumb.vimeo { background: linear-gradient(135deg, #2b2b2b, #6b5f55); }
.vid-src { position: absolute; left: 10px; top: 8px; color: #fff; font: 600 12px Inter, sans-serif; opacity: .9; }
.vid-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.vid-play svg { width: 20px; height: 20px; }
.vid-meta { position: relative; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.vid-meta b { font-size: 14px; line-height: 1.3; padding-right: 26px; }
.vid-meta .icon-btn { position: absolute; right: 4px; top: 4px; }
.vid-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 10px; }
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-preview { width: 100%; border-radius: 10px; margin: 0 0 10px; }
.link.danger { color: #c0392b; display: block; margin: 12px auto 0; }
