/* =============================================================
   Excerly — warm paper
   Charcoal #24211F · paper #F2EADC · terracotta #B96D50
   Headings 800, body 400. Shadow only on the hero and the player.
   ============================================================= */
:root {
  --bg: #F2EADC;
  --bg-soft: #E7DFD0;
  --card: #F7F3EA;
  --card-2: #EFE8DC;
  --ink: #24211F;
  --text: #24211F;
  --muted: #5C564E;
  --line: #E0D5C6;
  --rule: #D5C9B8;
  --accent: #B96D50;
  --accent-ink: #7A4330; /* small text / icons, ≥4.5:1 on paper */
  --accent-2: #8C4E36;
  --on-accent: #FFF8F3;
  --hero: #24211F;
  --hero-text: #F6F0E6;
  --danger: #9C3B32;
  --ok: #3E6B45;
  --info: #3E5870;
  --sage: #6E7A52;
  --olive: #6B7052;
  --fig: #24211F;
  --shadow-hero: 8px 18px 32px rgba(36, 33, 31, .14), 1px 2px 0 rgba(36, 33, 31, .04);
  --radius: 22px;
  --radius-sm: 14px;
  --serif: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  --sans: "Heebo", "Assistant", system-ui, sans-serif;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 400; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-family: inherit; color: inherit; }
::selection { background: rgba(185, 109, 80, .28); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
[hidden] { display: none !important; }

.app {
  max-width: 460px;
  margin: 0 auto;
  padding: 8px 18px calc(128px + env(safe-area-inset-bottom));
}
@media (min-width: 820px) {
  body { background: #E7DFD0; }
  .app {
    min-height: 100vh;
    background: var(--bg);
    border-inline: 1px solid var(--line);
  }
}

/* ---------- masthead ---------- */
.app-header, .mast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 0 6px;
  border: 0;
}
.mast-tools, .app-header .lang-switch { justify-self: start; }
.mast-tools { display: flex; align-items: center; gap: 2px; }
.wordmark, .app-title {
  justify-self: center;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: none;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}
.brand-mark { width: 34px; height: 34px; display: block; flex: none; }
.brand-name {
  font-family: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1;
}
.app-sub { display: none; }
.logo { display: none; }
.mast-end { justify-self: end; display: flex; gap: 6px; align-items: center; }
.lang-switch {
  display: inline-flex; gap: 0; background: transparent; border: 0; padding: 0;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; padding: 4px 6px; cursor: pointer; border-radius: 8px;
}
.lang-switch button.on { color: var(--ink); font-weight: 700; }
.skin-toggle {
  flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--card-2); border: 1px solid var(--line); color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: color .15s, border-color .15s;
}
.skin-toggle:hover { color: var(--accent); border-color: var(--accent); }
.skin-toggle:active { transform: scale(.94); }

/* ---------- tabs ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; max-width: 460px; margin: 0 auto;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-top: 0;
  backdrop-filter: blur(8px);
}
.tab-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; color: #8A847C; cursor: pointer;
  font-size: 12px; font-weight: 500; padding: 6px 2px;
}
.tab-btn .ti { width: 26px; height: 26px; display: grid; place-items: center; }
.tab-btn .ti svg { width: 24px; height: 24px; }
.tab-btn.on { color: var(--accent-ink); font-weight: 700; }
.tab-btn.on::before { display: none; }
.tab-btn:active { transform: scale(.97); }

/* ---------- type ---------- */
.home-kicker, .screen-title {
  font-size: 64px; line-height: .9; font-weight: 800; letter-spacing: -0.04em;
  margin: 8px 0 10px; text-align: start;
}
.home-date, .today-date, .today-weekday {
  font-family: var(--sans); font-weight: 500; font-style: normal; font-size: 15px; color: var(--ink); margin: 0;
}
.home-date { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.home-greet { margin: 4px 0 16px; color: var(--muted); font-size: 15px; font-weight: 400; text-align: start; }

section.flat { background: transparent; border: 0; padding: 0; box-shadow: none; margin: 0 0 14px; }
body:not([data-home="journal"]) #home-journal { display: none; }
body[data-home="journal"] #home-dash { display: none; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: none;
}
.card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 8px;
}
.card-title .ico { width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--accent-ink); }
.card-title .ico svg { width: 20px; height: 20px; }
.section-hint, .ai-note, .cloud-note { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.5; }

/* ---------- home ---------- */
.hero-card {
  background: var(--hero); color: var(--hero-text);
  border-radius: 28px; padding: 18px 18px 16px;
  display: grid; grid-template-columns: 118px 1fr; gap: 8px 12px; align-items: center;
  box-shadow: var(--shadow-hero); border: 0; margin-bottom: 14px;
}
.hero-ring {
  width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--pct, 35) * 1%), #3a342f 0);
  position: relative;
}
.hero-ring::after {
  content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--hero);
}
.hero-ring img, .hero-fig {
  position: relative; z-index: 1; width: 72px; height: 72px; object-fit: cover; border-radius: 50%;
}
.hero-copy { min-width: 0; }
.hero-kicker { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.hero-meta { display: flex; align-items: center; gap: 6px; color: #E7D7CC; font-size: 14px; font-weight: 400; margin-bottom: 12px; }
.hero-card .btn-primary { justify-self: start; }

.paper-block { margin-bottom: 14px; }
.nutri-home-head, .week-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.nutri-home-head h2, .week-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.kcal-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; margin: 8px 0 12px; }
.kcal-split b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kcal-split .ate b { color: var(--accent); }
.kcal-split span { color: var(--muted); font-size: 13px; font-weight: 500; }
.meal-shortcuts { display: flex; justify-content: space-between; gap: 8px; }
.meal-shortcuts button {
  flex: 1; background: none; border: 0; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
}
.sc-ico {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--olive);
  display: grid; place-items: center; color: var(--olive); background: transparent;
}
.sc-ico svg { width: 22px; height: 22px; }
.week-strip { display: flex; justify-content: space-between; gap: 4px; }
.week-day {
  flex: 1; background: none; border: 0; cursor: pointer; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; padding: 4px 0;
}
.week-day .n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
}
.week-day.on .n { background: var(--accent); color: var(--on-accent); }
.linkish { background: none; border: 0; color: var(--ink); font-weight: 700; cursor: pointer; font-size: 15px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer;
}
html { color-scheme: light; }
html[data-skin="classic"] { color-scheme: dark; }
html[data-skin="classic"] {
  --bg: #0e1116; --bg-soft: #161b22; --card: #1b2230; --card-2: #222c3c;
  --ink: #eaf0f7; --text: #eaf0f7; --muted: #9aa7b8; --line: #2b3648; --rule: #2b3648;
  --accent: #35d0a5; --accent-ink: #35d0a5; --accent-2: #4aa3ff; --on-accent: #06231c;
  --hero: #121820; --hero-text: #eaf0f7; --danger: #ef5f6b; --ok: #2ecc71; --info: #4aa3ff;
  --olive: #35d0a5; --sage: #9aa86a;
  --shadow-hero: 0 14px 40px rgba(0,0,0,.45);
}
html[data-skin="classic"] .home-kicker { font-size: 40px; }
html[data-skin="classic"] .btn-primary { color: var(--on-accent); }
html[data-skin="classic"] .back-link, html[data-skin="classic"] .sec-text { background: var(--card); color: var(--ink); }

.streak-inline { margin-top: 8px; color: var(--muted); font-size: 13px; }
.streak-inline b { color: var(--ink); font-weight: 800; }

/* ---------- buttons, fields ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 12px 16px; cursor: pointer;
  font-weight: 700; font-size: 16px; line-height: 1.1;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(.97); }
.btn-ghost { background: transparent; color: var(--accent-ink); border: 1.5px solid var(--line); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; }
.btn-google { background: #fff; color: #24211F; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; }
.g-ico { width: 18px; height: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field label, .ai-toggle { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, textarea, input[type="text"], input[type="number"], input[type="url"], input[type="password"], input[type="time"], select {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 12px; font-size: 16px; font-weight: 400;
}
textarea { min-height: 72px; resize: vertical; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.profile-grid .wide { grid-column: 1 / -1; }

/* ---------- nutrition ---------- */
.nutri-hero {
  background: var(--hero); color: var(--hero-text); border-radius: 28px;
  box-shadow: var(--shadow-hero); padding: 16px; display: grid;
  grid-template-columns: 112px 1fr; gap: 10px; align-items: center; margin-bottom: 16px;
}
.nutri-pair { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.pair-item { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pair-item .iso-num { font-size: clamp(26px, 7vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.pair-item span { color: #E7D7CC; font-size: 13px; font-weight: 600; }
.nutri-pair.light .pair-item span { color: var(--muted); }
.nutri-pair.light .iso-num { color: var(--ink); font-size: 22px; }
.iso-num { unicode-bidi: isolate; direction: ltr; display: inline-block; }
.nutri-hero .unit, .nutri-hero .section-hint { color: #E7D7CC; font-size: 14px; font-weight: 500; margin-top: 4px; }
.ask { font-size: 20px; font-weight: 700; margin: 8px 0; }
.food-row { display: flex; gap: 8px; align-items: center; }
.food-row textarea { flex: 1; min-height: 52px; }
.icon-btn {
  width: 52px; height: 52px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 24px; height: 24px; }
.photo-preview { position: relative; margin: 10px 0; }
.photo-preview img { width: 100%; border-radius: 16px; display: block; max-height: 220px; object-fit: cover; }
.photo-clear {
  position: absolute; top: 8px; inset-inline-start: 8px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: var(--hero); color: #fff; cursor: pointer;
}
.day-meals.show, .nutri-result.show, .menu-result.show { margin-top: 12px; }
.dm-list, .nutri-items { list-style: none; padding: 0; margin: 0; }
.dm-row, .menu-item, .nutri-items li {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 10px; margin-bottom: 8px;
}
.dm-name, .menu-name, .ni-main, .cand span, .confirm-card h3, .section-hint, .menu-slot {
  flex: 1 1 120px; min-width: 0; font-weight: 700; overflow-wrap: anywhere;
}
.section-hint, .menu-slot, .cand small { font-weight: 400; }
.dm-kcal, .menu-kcal, .micro-val, .dm-mac {
  display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-weight: 800;
}
.dm-row, .menu-item, .nutri-items li, .btn-row, .food-row { flex-wrap: wrap; }
.screen-title, .home-kicker { font-size: clamp(40px, 14vw, 64px); overflow-wrap: anywhere; }
.dm-del, .dm-edit, .dm-save, .add-item {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.dm-macros { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; color: var(--muted); font-size: 13px; }
.dm-mac b { color: var(--ink); }
.log-card {
  display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 12px; margin: 0 0 12px;
}
.log-card.pending { border-style: dashed; }
.log-photo, .log-ph {
  width: 92px; height: 92px; border-radius: 16px; object-fit: cover; background: var(--card-2);
  display: grid; place-items: center; color: var(--olive);
}
.log-ph svg { width: 42px; height: 42px; }
.log-cap { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.log-slot { font-size: 12px; font-weight: 800; color: var(--accent-ink); }
.log-name { font-weight: 800; overflow-wrap: anywhere; margin: 2px 0 6px; }
.log-comp { border-top: 1px solid var(--line); padding: 8px 0; }
.edit-items { margin: 10px 0 4px; border-top: 1px solid var(--line); }
.edit-items > summary { cursor: pointer; font-weight: 650; padding: 12px 2px; list-style: none; }
.edit-items > summary::-webkit-details-marker { display: none; }
.edit-items[open] > summary { color: var(--accent); }
.log-q { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.log-q input { flex: 1 1 120px; min-width: 0; }
.log-actions { display: flex; gap: 8px; justify-content: flex-end; }
.meal-card { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; }
.meal-card .ph {
  width: 84px; height: 72px; border-radius: 14px; background: var(--card-2);
  display: grid; place-items: center; color: var(--olive); overflow: hidden;
}
.meal-card img { width: 84px; height: 72px; object-fit: cover; border-radius: 14px; }
.confirm-card { border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin: 10px 0; background: var(--card); }
.confirm-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.cand { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cand small { color: var(--muted); display: block; font-weight: 400; }
.micro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 8px; }
.micro-item { background: var(--card-2); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.micro-name { display: block; color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.micro-val { margin-top: 2px; direction: ltr; }
.micro-unit { font-weight: 700; }
@media (max-width: 520px) {
  .micro-list { grid-template-columns: 1fr; }
  .nutri-hero { grid-template-columns: 1fr; justify-items: stretch; }
  .nutri-hero .hero-ring { width: 92px; height: 92px; margin-inline: auto; }
  .nutri-pair { width: 100%; justify-content: space-between; }
  .confirm-card .btn-row input { min-width: 0; flex: 1 1 140px; }
}
.tag { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--accent-ink); }
.tag.warn { background: #F3E1D4; }
.tag.miss { background: transparent; color: var(--muted); border: 1px dashed var(--rule); }
.empty, .nutri-empty, .chart-empty, .nutri-need-profile {
  color: var(--muted); background: var(--card-2); border-radius: 14px; padding: 12px; font-size: 14px;
}
.err { color: var(--danger); font-size: 14px; }
.busy { color: var(--muted); font-size: 14px; }
.ai-settings, .ai-advanced { margin-top: 12px; }
.ai-badge { font-size: 12px; background: #F3E1D4; color: var(--accent-ink); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.nutri-bar { height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.nutri-bar span { display: block; height: 100%; }
.nutri-verdict { display: inline-block; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.ni-name-edit, .ni-kcal-input, .dm-name-edit, .dm-kcal-edit { width: 100%; }

/* ---------- calendar / journal ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-month { font-size: 28px; font-weight: 800; }
.cal-nav button, #cal-prev, #cal-next {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 10px; width: 100%;
}
.cal-dow, .cal-cell { min-width: 0; width: 100%; box-sizing: border-box; overflow: hidden; }
.cal-dow {
  height: 28px; display: grid; place-items: center; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1; white-space: nowrap; padding: 0;
}
.cal-cell {
  height: 48px; border-radius: 12px; background: transparent; border: 0;
  display: grid; place-items: center; cursor: pointer; position: relative; padding: 0; gap: 0;
}
.cal-cell.empty { pointer-events: none; }
.cal-cell .d-num { font-weight: 700; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; line-height: 1; }
.cal-cell.today .d-num { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.selected .d-num { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.cal-cell.today.selected .d-num { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.cal-cell .dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.cal-cell .dot.gym { background: var(--accent); }
.cal-cell .dot.done { background: var(--ok); }
.cal-cell .dot.rest { background: var(--rule); }
.cal-cell .dot.missed { background: transparent; box-shadow: inset 0 0 0 1.5px #8A847C; }
.cal-cell.moved .dot.gym { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
#home-journal, #journal-day { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.drag-ghost {
  position: fixed; z-index: 90; width: 36px; height: 36px; margin: -18px 0 0 -18px; pointer-events: none;
  color: var(--accent); background: #fff; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(36, 33, 31, .18);
}
.drag-ghost svg { width: 18px; height: 18px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--olive); }
.dot.done { background: var(--ok); }
.dot.rest { background: var(--rule); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.journal-agenda { margin-top: 12px; }
.tl { border-inline-start: 2px solid var(--line); margin-inline-start: 18px; padding-inline-start: 12px; }
.tl-item { margin: 0 0 12px; }
.tl-time { font-weight: 800; }
.pill-note { display: inline-block; margin-top: 8px; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }

/* ---------- training ---------- */
.seg { display: inline-flex; background: var(--card-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--olive); color: #fff; }
.fig-pref { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.fig-pref > span { font-weight: 700; font-size: 14px; }
.train-hero {
  margin-top: 12px; border-radius: 28px; overflow: hidden; background: var(--hero); color: var(--hero-text);
  display: grid; grid-template-columns: 1.15fr 0.85fr; min-height: 248px; box-shadow: var(--shadow-hero);
}
.train-hero img, .train-hero-missing { width: 100%; height: 100%; min-height: 248px; object-fit: cover; background: #2a2623; }
.train-hero .pad { padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.train-hero h3 { margin: 0; font-size: 26px; font-weight: 800; }
.train-count { color: #E7D7CC; font-size: 14px; }
.train-hero .btn { margin-top: 8px; }
.train-progress { margin-top: 16px; }
.train-progress h3 { margin: 0 0 8px; font-size: 18px; }
.train-row {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: start; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; cursor: default;
}
button.train-row { cursor: pointer; }
.train-check {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 800; flex: none;
}
.train-check.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.ex-missing {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 54px; padding: 4px;
  text-align: center; font-size: 11px; line-height: 1.25; font-weight: 700; color: #E7D7CC; background: #2a2623;
}
.ex-missing-icon { width: 26px; height: 26px; display: block; }
.ex-thumb .ex-missing-label, .player-anim .ex-missing-label { display: none; }
.ex-missing-label { margin-top: 6px; font-size: 13px; font-weight: 700; }
.train-hero-missing .ex-missing { min-height: 248px; color: #E7D7CC; background: #2a2623; font-size: 14px; }
.train-hero-missing .ex-missing-icon { width: 48px; height: 48px; }
.gym-hero .ex-missing, .detail-stage .ex-missing { min-height: 120px; color: #E7D7CC; background: #2a2623; }
.gym-hero .ex-missing-icon, .detail-stage .ex-missing-icon { width: 40px; height: 40px; }
.ex-list { display: flex; flex-direction: column; gap: 8px; }
.ex-item, .gym-ex {
  display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
}
.ex-open { flex: 1; display: flex; gap: 8px; align-items: center; background: none; border: 0; text-align: start; cursor: pointer; color: inherit; }
.ex-thumb, .ex-photo { width: 54px; height: 54px; border-radius: 12px; background: #2a2623; overflow: hidden; display: grid; place-items: center; }
.ex-thumb img, .ex-photo { width: 100%; height: 100%; object-fit: cover; }
.player-anim { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: #2a2623; }
.player-anim img, .detail-stage img, .sheet-hero { width: 100%; height: 100%; object-fit: cover; }
.detail-stage img, .sheet-hero { max-height: 220px; border-radius: 18px; }
.gym-ex { flex: 1; min-width: 0; }
.ex-info { display: flex; flex-direction: column; min-width: 0; }
.ex-name, .pex-name { font-weight: 800; }
.ex-area, .ex-reps, .pex-meta, .pex-note { color: var(--muted); font-size: 13px; font-weight: 400; }
.ex-finish { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.ex-finish.on { background: var(--ok); color: #fff; border-color: var(--ok); }
.plan-day, .saved-plan, .pex { border-top: 1px solid var(--line); padding: 8px 0; }
.pex { display: flex; gap: 8px; align-items: center; }
.pex .pex-name { flex: 1; }
.sheet-hero, .detail-stage, .gym-hero {
  background: #2a2623; border-radius: 18px; min-height: 120px; display: grid; place-items: center; margin-bottom: 8px;
}
img.sheet-hero, .detail-stage img { width: 100%; height: 180px; object-fit: cover; }

/* ---------- profile ---------- */
.profile-hero { text-align: center; padding-top: 8px; }
.avatar {
  width: 92px; height: 92px; margin: 0 auto 8px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 40%, var(--olive) 0 46%, transparent 47%),
    radial-gradient(circle at 68% 58%, var(--accent) 0 48%, transparent 49%),
    var(--card);
  border: 0;
}
.profile-hero h2 { font-size: 56px; font-weight: 800; margin: 0; letter-spacing: -0.04em; }
.who { color: var(--muted); margin-bottom: 12px; }
.stat-slab {
  background: var(--hero); color: var(--hero-text); border-radius: 22px; text-align: center; padding: 16px;
  box-shadow: none; margin-bottom: 14px;
}
.stat-slab b { font-size: 18px; font-weight: 800; }
.me-links { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 14px; }
.me-links a, .me-links button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 12px; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; font-weight: 650; font-size: 16px; cursor: pointer; text-align: start;
}
.me-links :last-child { border-bottom: 0; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 6px 0; }
.check { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; }

/* ---------- sheets, player, camera, help ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(36, 33, 31, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; max-width: 460px; margin: 0 auto; z-index: 51;
  background: var(--bg); border-radius: 22px 22px 0 0; max-height: 92vh; overflow: auto;
  transform: translateY(104%); transition: transform .28s ease; padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: none; }
.sheet-grip { width: 42px; height: 4px; border-radius: 99px; background: var(--rule); margin: 8px auto; }
.sheet-head, .sheet-body, .detail-name { padding: 0 16px 12px; }
.sheet-title, .detail-name { font-size: 24px; font-weight: 800; }
.sheet-close, .detail-back, .p-icon, .help-close {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card-2); cursor: pointer;
}
.chip, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; background: var(--card-2); font-size: 12px; font-weight: 700; }
.done-banner { display: none; background: #E5EFE4; color: var(--ok); border-radius: 12px; padding: 8px; font-weight: 700; }
.done-banner.show { display: block; }
.player {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  max-width: 460px; margin: 0 auto;
}
.player-top { display: flex; justify-content: space-between; align-items: center; }
.player-bar { height: 8px; border-radius: 99px; background: rgba(42, 38, 35, .12); overflow: hidden; margin: 0 0 14px; }
.player-bar > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.player-card {
  margin-top: 12px; background: var(--hero); color: var(--hero-text); border-radius: 28px;
  box-shadow: var(--shadow-hero); padding: 22px 16px 16px; text-align: center;
}
.player-stage { position: relative; width: min(78vw, 280px); aspect-ratio: 1; margin: 0 auto; }
.p-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.p-track { fill: none; stroke: #3a342f; stroke-width: 8; }
.p-prog { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.player-core { position: absolute; inset: 16%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.player-anim { width: 96px; height: 96px; border-radius: 16px; overflow: hidden; background: #2a2623; }
.player-time { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; color: var(--hero-text); margin: 0; font-variant-numeric: tabular-nums; }
.player-name { font-size: 22px; font-weight: 800; margin: 8px 0 0; }
.player-help { background: none; border: 0; color: #E7D7CC; cursor: pointer; margin-top: 4px; }
.p-main.wide, #p-play.as-bar {
  width: 100%; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent);
  font-weight: 800; font-size: 18px; padding: 12px; cursor: pointer; margin-top: 12px;
}
.player-time-cap, .player-hold, .player-clock-note { font-size: 13px; font-weight: 500; color: #E7D7CC; margin-top: 4px; overflow-wrap: anywhere; }
.player-clock-note { font-size: 12px; }
.player-controls { display: flex; direction: ltr; justify-content: center; gap: 10px; margin-top: 12px; }
.p-ctrl {
  flex: 1; min-height: 48px; border-radius: 14px; border: 2px solid #F6F0E6;
  background: #F6F0E6; color: #24211F; cursor: pointer;
  font-weight: 800; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.p-ctrl svg { width: 18px; height: 18px; flex: none; }
.p-ctrl:focus-visible, .p-main:focus-visible, .p-icon:focus-visible {
  outline: 3px solid #7A4330; outline-offset: 3px;
}
.player-card .p-ctrl:focus-visible, .player-card .p-main:focus-visible {
  outline-color: #F6F0E6;
}
.next-ex {
  margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.player-done { flex: 1; display: grid; place-items: center; text-align: center; gap: 10px; }
.help-pop { position: absolute; inset: 0; background: rgba(36,33,31,.4); display: grid; place-items: end center; padding: 12px; }
.help-card { background: var(--bg); border-radius: 18px; padding: 14px; width: min(100%, 420px); }
.cam { position: fixed; inset: 0; z-index: 90; background: #000; }
#cam-video { width: 100%; height: 100%; object-fit: cover; }
.cam-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom));
}
.cam-side { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.cam-shot { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: var(--accent); cursor: pointer; }

/* ---------- history, bmi, reminders ---------- */
.hist-stats, .hstat { display: flex; gap: 8px; }
.hstat { flex: 1; background: var(--card-2); border-radius: 14px; padding: 8px; }
.hstat-val { font-weight: 800; font-size: 18px; }
.hstat-lbl { color: var(--muted); font-size: 12px; }
.hist-range { display: flex; gap: 6px; margin: 8px 0; }
.hist-range button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.hist-range button.on { background: var(--ink); color: var(--on-accent); border-color: var(--ink); }
.hist-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.trend-svg { width: 100%; height: auto; }
.bmi-result { margin-top: 8px; }
.bmi-badge, .bmi-cat { font-weight: 800; }
.target-weight, .calorie-box { background: var(--card-2); border-radius: 14px; padding: 10px; margin-top: 8px; }
.reminder-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.switch { position: relative; width: 48px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--rule); border-radius: 99px; cursor: pointer; }
.slider::before { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; inset-inline-start: 3px; background: #fff; border-radius: 50%; transition: inset-inline-start .15s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { inset-inline-start: calc(100% - 25px); }
.install-banner { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-bottom: 10px; }
.ib-close { border: 0; background: none; cursor: pointer; }
.toast {
  position: fixed; bottom: 84px; inset-inline: 0; margin: 0 auto; width: max-content; max-width: 90%;
  background: var(--hero); color: var(--hero-text); padding: 10px 14px; border-radius: 12px; z-index: 80;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.app-footer, .app-footer-privacy { text-align: center; color: var(--muted); font-size: 12px; }
.app-footer-privacy a { color: var(--accent-ink); }
.sch-editor, .macros, .plan-head { margin-top: 8px; }
.link-btn { background: none; border: 0; color: var(--accent-ink); cursor: pointer; font-weight: 700; }
.cell-check { position: absolute; top: 2px; inset-inline-end: 1px; color: var(--ok); font-size: 10px; font-weight: 800; line-height: 1; }

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

/* Light theme only. A saved classic/dark flag is cleared on startup. */

/* =============================================================
   דמויות התרגילים – סגנון + אנימציות
   ============================================================= */
/* צבעי הדמות (זהים בכל ערכת נושא) */
.ex-anim { --work: #ff9a3d; }
/* צל רך מתחת לדמות – מוסיף עומק */
.fig-shadow { fill: rgba(20, 30, 50, .10); }
.fig-male .hair-female { display: none; }
.fig-female .hair-male { display: none; }
.floor { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }

/* הדגשת האזור שעליו עובד התרגיל */
.work-zone { fill: var(--work); opacity: 0; animation: workPulse 2.4s ease-in-out infinite; }
@keyframes workPulse { 0%, 100% { opacity: .16; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .work-zone { opacity: .32; } }

.ex-anim g { transform-box: view-box; }
.player-anim .ex-anim, .hero-ring .ex-anim, .ex-thumb .ex-anim, .detail-stage .ex-anim { width: 100%; height: 100%; }
.ex-anim { --work: #B96D50; }
/* צוואר */
.anim-neck .j-neck-head { transform-origin: 110px 76px; animation: neckTilt 3.4s ease-in-out infinite; }
@keyframes neckTilt {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(16deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-16deg); }
}

/* סיבובי כתפיים */
.anim-shoulders .j-shoulder-l { transform-origin: 110px 82px; animation: rollL 2.6s linear infinite; }
.anim-shoulders .j-shoulder-r { transform-origin: 110px 82px; animation: rollR 2.6s linear infinite; }
@keyframes rollL {
  0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); }
}
@keyframes rollR {
  0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}

/* מעגלי זרועות */
.anim-arms .j-arm-l { transform-origin: 110px 84px; animation: rollR 3s linear infinite; }
.anim-arms .j-arm-r { transform-origin: 110px 84px; animation: rollL 3s linear infinite; }

/* הטיית גו לצד */
.anim-sidebend .j-upper { transform-origin: 110px 120px; animation: sideBend 4s ease-in-out infinite; }
@keyframes sideBend {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-18deg); }
}

/* סיבוב גו */
.anim-twist .j-twist { transform-origin: 110px 120px; animation: twist 3.6s ease-in-out infinite; }
@keyframes twist {
  0%, 100% { transform: scaleX(1) rotate(0deg); }
  25% { transform: scaleX(.55) rotate(4deg); }
  50% { transform: scaleX(1) rotate(0deg); }
  75% { transform: scaleX(.55) rotate(-4deg); }
}

/* כפיפה קדימה */
.anim-forwardfold .j-fold { transform-origin: 118px 120px; animation: fold 4s ease-in-out infinite; }
@keyframes fold {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(58deg); }
}

/* מתיחת ירך אחורית */
.anim-hamstring .j-hamstring { transform-origin: 72px 164px; animation: reach 4s ease-in-out infinite; }
@keyframes reach {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(34deg); }
}

/* פרפר */
.anim-butterfly .j-knee-l { transform-origin: 110px 150px; animation: flapL 2.2s ease-in-out infinite; }
.anim-butterfly .j-knee-r { transform-origin: 110px 150px; animation: flapR 2.2s ease-in-out infinite; }
@keyframes flapL {
  0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-16deg); }
}
@keyframes flapR {
  0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(16deg); }
}

/* ירך קדמית */
.anim-quad .j-quad-shin { transform-origin: 118px 150px; animation: quadPull 3.6s ease-in-out infinite; }
@keyframes quadPull {
  0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(60deg); }
}

/* מכופף ירך */
.anim-hipflexor .j-hip { transform-origin: 100px 120px; animation: hipPush 3.4s ease-in-out infinite; }
@keyframes hipPush {
  0%, 100% { transform: translateX(0); } 50% { transform: translateX(-12px); }
}

/* שוק */
.anim-calf .j-calf { transform-origin: 118px 118px; animation: calfLean 3.6s ease-in-out infinite; }
@keyframes calfLean {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(-8px) rotate(-5deg); }
}

/* חתול-פרה */
.anim-catcow .j-spine { transform-origin: 110px 168px; animation: catcow 3.8s ease-in-out infinite; }
@keyframes catcow {
  0%, 100% { transform: translateY(0) scaleY(1); }
  30% { transform: translateY(6px) scaleY(.82); }
  70% { transform: translateY(-8px) scaleY(1.16); }
}

/* קוברה */
.anim-cobra .j-cobra { transform-origin: 150px 170px; animation: cobra 4s ease-in-out infinite; }
@keyframes cobra {
  0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-22deg); }
}

/* תנוחת הילד – נשימה */
.anim-child .j-breath { transform-origin: 120px 165px; animation: breath 4.2s ease-in-out infinite; }
@keyframes breath {
  0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .ex-anim * { animation: none !important; }
}

/* ---------- nutrition screen (mockup Nov 11): ring card, input, add button, meal tiles ---------- */
.nutri-screen .screen-title { margin-bottom: 14px; }
.nutri-screen .nutri-hero {
  grid-template-columns: 1fr 132px; gap: 12px; padding: 16px 20px 16px 16px; border-radius: 16px;
  min-height: 166px; margin-bottom: 22px;
}
.nutri-screen .nh-copy { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.nutri-screen .nh-nums .iso-num { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; color: var(--hero-text); line-height: 1.1; white-space: nowrap; }
.nutri-screen .nutri-hero .unit { font-size: 19px; font-weight: 400; color: #E7D7CC; margin-top: 10px; }
.nutri-screen .nh-ring { width: 132px; height: 132px; }
.nutri-screen .nh-ring::after { inset: 10px; }
.nutri-screen .nh-fig { position: relative; z-index: 1; width: 62px; height: 62px; color: var(--accent); }
.nutri-screen .ask { font-size: 21px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.nutri-screen .food-field { position: relative; display: block; margin-bottom: 10px; }
.nutri-screen .food-field textarea {
  display: block; width: 100%; box-sizing: border-box; min-height: 54px; height: 54px; resize: none;
  border: 1px solid #B9B1A6; border-radius: 8px; background: #fff; padding: 14px 14px 14px 60px; font-size: 16px; line-height: 1.5;
}
.nutri-screen .food-field textarea::placeholder { color: transparent; }
.nutri-screen .food-field textarea:focus::placeholder { color: var(--muted); }
.nutri-screen .food-field .icon-btn {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink);
}
.btn-mic-main {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border-radius: 14px; font-size: 18px; margin: 0 0 10px;
}
.nutri-screen .btn-add-meal { background: transparent; color: var(--accent-ink); border: 1.5px solid var(--line); box-shadow: none; }
.nutri-goal { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.empty-meal { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.meal-sec { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-top: 12px; }
.my-menu { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 14px 2px; }
.my-menu summary { cursor: pointer; font-weight: 800; font-size: 18px; padding: 14px 0; }
.my-menu .profile-menu { padding-bottom: 12px; }
#health-profile .card-title { font-size: 22px; line-height: 1.25; }
.meal-sec.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sec-head h3 { margin: 0; font-size: 18px; }
.sec-sub { color: var(--accent-ink); font-weight: 700; white-space: nowrap; }
.sec-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; width: 100%; text-align: start; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 10px 0; font: inherit; color: inherit; cursor: pointer; }
.sec-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-amt, .sec-kcal { color: var(--muted); font-variant-numeric: tabular-nums; }
.sec-empty { color: var(--muted); margin: 8px 0 0; }
.sec-add { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sec-mic { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.sec-mic.recording { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--accent); animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 50% { filter: brightness(1.15); } }
.sec-type { display: flex; gap: 8px; }
.sec-text { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
.voice-draft { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 10px 0; }
.chip-estimate { display: inline-block; background: var(--card-2); color: var(--accent-ink); border-radius: 6px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
.nutri-screen .food-field .icon-btn svg { width: 30px; height: 30px; }
.nutri-screen .btn-add-meal {
  display: block; width: 100%; height: 44px; border-radius: 10px; font-size: 18px; font-weight: 500;
  box-shadow: 0 2px 4px rgba(122, 67, 48, .25); margin-bottom: 18px;
}
.meal-tile {
  display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: center; cursor: pointer;
  background: var(--card); border: 1.5px solid #3A342F; border-radius: 14px; padding: 10px 14px 10px 10px; margin: 0 0 12px; min-height: 112px;
}
.meal-tile:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.mt-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mt-title { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.chip-review { display: inline-block; background: var(--accent); color: var(--on-accent); border-radius: 6px; padding: 2px 10px; font-size: 15px; font-weight: 500; }
.mt-kcal { font-size: 15px; font-weight: 700; color: var(--ink); }
.mt-kcal span { font-weight: 400; color: var(--muted); }
.mc-macros { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); }
.mt-img { width: 150px; height: 96px; object-fit: cover; border-radius: 12px; display: block; background: var(--card-2); }
.mt-img.log-ph, .ms-img.log-ph { display: grid; place-items: center; color: var(--olive); background: var(--card-2); }
.mt-img.log-ph svg { width: 44px; height: 44px; }
.ms-img.log-ph { height: 120px; }
.ms-img.log-ph svg { width: 56px; height: 56px; }
.nutri-more { margin-top: 18px; display: grid; gap: 10px; }
.nutri-more .ai-badge { justify-self: start; }
/* meal detail sheet */
.meal-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(36, 33, 31, .45); display: flex; align-items: flex-end; justify-content: center; }
.meal-sheet[hidden] { display: none; }
.ms-panel {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-sizing: border-box;
  border-radius: 22px 22px 0 0; padding: 14px 16px 28px;
}
.ms-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ms-slot { font-size: 20px; font-weight: 800; flex: 1; }
.ms-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.ms-img { width: 100%; height: 190px; object-fit: cover; border-radius: 14px; display: block; }
.ms-name { font-size: 16px; font-weight: 700; margin: 10px 0 4px; overflow-wrap: anywhere; }
.ms-kcal .iso-num { font-size: 30px; font-weight: 800; }
.ms-panel h4 { font-size: 15px; font-weight: 800; margin: 16px 0 6px; color: var(--accent-ink); }
.ms-panel .micro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ms-panel .micro-item { display: flex; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ms-panel .micro-miss { color: var(--muted); font-size: 12px; }
.ms-panel .lc-head { display: flex; justify-content: space-between; gap: 8px; }
.ms-panel .log-cap.src { font-weight: 400; }
.lq-l { font-size: 13px; color: var(--muted); align-self: center; }
