:root {
  --dnevio-safe-top: calc(max(env(safe-area-inset-top, 0px), var(--dnevio-system-safe-top, 0px)) + var(--dnevio-content-safe-top, 0px));
  --dnevio-safe-bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--dnevio-system-safe-bottom, 0px)) + var(--dnevio-content-safe-bottom, 0px));
  --dnevio-safe-left: calc(max(env(safe-area-inset-left, 0px), var(--dnevio-system-safe-left, 0px)) + var(--dnevio-content-safe-left, 0px));
  --dnevio-safe-right: calc(max(env(safe-area-inset-right, 0px), var(--dnevio-system-safe-right, 0px)) + var(--dnevio-content-safe-right, 0px));
  --dnevio-dynamic-height: 100vh;
  --dnevio-screen-height: var(--dnevio-viewport-height, var(--tg-viewport-height, var(--dnevio-dynamic-height)));
  --dnevio-stable-height: var(--dnevio-viewport-stable-height, var(--tg-viewport-stable-height, var(--dnevio-dynamic-height)));
  color-scheme: light;
  --page: #f1f7f7;
  --surface: #ffffff;
  --text: #253333;
  --muted: #5d6b6b;
  --line: #d5e5e5;
  --violet: #6550bd;
  --violet-text: #6550bd;
  --violet-soft: color-mix(in srgb, var(--violet) 14%, var(--surface));
  --violet-ink: #fff;
  --coral: #b84f56;
  --mint: #c9dddc;
  --cream: #f7cbca;
  --progress-base: #6b57c8;
  --progress-near: #4f8f96;
  --progress-target: #3f9278;
  --progress-over: #ba5c64;
  --progress-track: #dfe9e8;
  --shadow: color-mix(in srgb, #536263 16%, transparent);
  font-family: Inter, ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (height: 100dvh) {
  :root { --dnevio-dynamic-height: 100dvh; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #172021;
  --surface: #202b2c;
  --text: #f1f7f7;
  --muted: #b2c0c0;
  --line: #354748;
  --violet-text: #b9adf2;
  --cream: #704f52;
  --mint: #34504f;
  --progress-base: #9585e8;
  --progress-near: #69b2b6;
  --progress-target: #66b99b;
  --progress-over: #de7b82;
  --progress-track: #314041;
  --shadow: color-mix(in srgb, #081010 32%, transparent);
}

:root[data-theme="dark"] .avatar {
  background: var(--violet);
  color: var(--violet-ink);
}

:root[data-theme="dark"] .avatar.has-photo,
:root[data-theme="dark"] .avatar:has(> img) {
  background: transparent;
}

:root[data-theme="dark"] .vio-face {
  background: #f1f7f7;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .5; }

/* Native pan and pinch stay available; manipulation excludes double-tap zoom. */
[data-screen="today"], .today-heading, .food-sheet, .meal-plan-sheet, .recipe-library-screen { touch-action: manipulation; }
[data-screen="today"] .food-entry-content, .food-sheet .saved-meal-card, .food-sheet .picker-product-swipe .product-button-row, .recipe-library-screen .recipe-library-swipe > .recipe-library-card { touch-action: pan-y pinch-zoom; }
.active-plan-row .food-entry-content { grid-template-columns: 1fr; }
.active-plan-row .food-entry-content > button { display: grid; gap: 4px; width: 100%; padding: 12px; border: 0; background: transparent; color: var(--text); text-align: left; }
.active-plan-row small { color: var(--muted); font-size: 11px; }
.food-signals { display: flex; gap: 4px; margin: 6px 0; }
.food-signal { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.food-signal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.food-signal.is-may-contain { opacity: .8; }
.food-signals-backdrop { z-index: 90; }
.food-signals-sheet { position: fixed; z-index: 91; bottom: 0; left: max(0px, calc((100vw - 520px) / 2)); width: min(100%, 520px); max-height: 65dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px 22px calc(22px + var(--dnevio-safe-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); color: var(--text); touch-action: manipulation; }
.food-signals-sheet > button { float: right; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--violet-soft); color: var(--text); }
.food-signals-sheet h3 { margin: 12px 44px 8px 0; font-size: 17px; }
.food-signals-sheet p { font-size: 14px; line-height: 1.5; }

.app-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: var(--dnevio-stable-height, 100vh);
  margin: 0 auto;
  padding: calc(12px + var(--dnevio-safe-top)) calc(16px + var(--dnevio-safe-right)) calc(94px + var(--dnevio-safe-bottom)) calc(16px + var(--dnevio-safe-left));
  overflow-x: hidden;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.wordmark { margin-right: auto; font-size: 16px; font-weight: 700; letter-spacing: .12em; }
.demo-badge { padding: 4px 8px; border-radius: 999px; color: var(--violet-text); background: var(--violet-soft); font-size: 11px; }
.admin-link, .coach-link { padding: 6px 9px; border-radius: 11px; background: var(--violet-soft); color: var(--violet-text); font-size: 11px; text-decoration: none; }
.coach-link { background: color-mix(in srgb, var(--mint) 55%, var(--surface)); color: var(--text); }
.avatar { width: 44px; height: 44px; overflow: hidden; padding: 0; border: 0; outline: none; box-shadow: none; border-radius: 50%; color: var(--violet-ink); background: var(--violet); font-size: 14px; font-weight: 700; }
.avatar.has-photo, .avatar:has(> img) { background: transparent; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 50%; }
.app-header.is-utility { position: relative; z-index: 21; justify-content: flex-end; min-height: 44px; margin-bottom: -44px; pointer-events: none; }
.app-header.is-utility .avatar { pointer-events: auto; }
.profile-menu-backdrop { position: fixed; z-index: 46; inset: 0; background: transparent; }
.profile-menu { position: fixed; z-index: 47; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%); height: var(--dnevio-screen-height); overflow-y: auto; overscroll-behavior: contain; padding: calc(20px + var(--dnevio-safe-top)) 20px calc(28px + var(--dnevio-safe-bottom)); background: var(--page); }
.profile-menu button, .profile-menu a { width: 100%; min-height: 59px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; text-decoration: none; }
.profile-menu > :last-child { border-bottom: 0; }
.profile-menu button:active, .profile-menu a:active { background: var(--violet-soft); }
.profile-menu span { min-width: 0; display: grid; gap: 3px; }
.profile-menu strong { font-size: 13px; }
.profile-menu small { overflow: hidden; color: var(--muted); font-size: 10.5px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu b { color: var(--violet-text); font-size: 20px; font-weight: 500; }
.profile-menu-backdrop { background: var(--page); }
.account-profile-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-profile-header h1 { margin: 0; font-size: 25px; }
.profile-menu .account-profile-header button { width: 44px; min-height: 44px; display: block; padding: 0; border: 1px solid var(--line); border-radius: 50%; font-size: 24px; text-align: center; }
.account-profile-hero { padding: 32px 0 26px; text-align: center; }
.account-profile-avatar { display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden; background: var(--violet-soft); color: var(--violet-text); font-size: 32px; font-weight: 700; }
.account-profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.account-profile-hero h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.account-profile-hero p { margin: 6px 0 20px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.profile-menu .account-profile-plan { border: 1px solid var(--line); border-radius: 16px; background: var(--violet-soft); }
.profile-menu > button strong, .profile-menu > a strong { font-size: 15px; }
.profile-menu > button small, .profile-menu > a small { font-size: 12px; white-space: normal; }
.account-profile-version { margin: 24px 13px 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.help-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 750; }

.screen { display: none; animation: enter .18s ease-out; }
.screen.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }

h1 { margin: 22px 0 14px; font-size: clamp(25px, 7vw, 31px); line-height: 1.06; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 18px; }
p { margin: 0; }


.vio-panel {
  position: relative;
  min-height: 80px;
  margin-top: 10px;
  padding: 10px 12px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--violet-soft), color-mix(in srgb, var(--cream) 80%, var(--surface)));
}

.rhythm { display: inline-flex; padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--surface) 90%, transparent); font-size: 9px; font-weight: 650; }
.vio-copy { position: relative; z-index: 2; display: grid; gap: 1px; width: calc(100% - 82px); margin-top: 6px; }
.vio-copy strong { font-size: 12px; }
.vio-copy span { color: color-mix(in srgb, var(--text) 78%, transparent); font-size: 10.5px; font-weight: 520; line-height: 1.25; }

.vio {
  position: absolute;
  right: 10px;
  bottom: -9px;
  width: 142px;
  height: 142px;
  border-radius: 46% 54% 46% 54% / 57% 47% 53% 43%;
  background: var(--violet);
  transform: rotate(-4deg) scale(.46);
  transform-origin: right bottom;
  box-shadow: inset -12px -14px 0 color-mix(in srgb, var(--violet) 78%, #26175c);
}

.vio::before, .vio::after { content: ""; position: absolute; top: -22px; width: 25px; height: 50px; border-radius: 100% 0 100% 0; background: var(--coral); }
.vio::before { left: 55px; transform: rotate(-24deg); }
.vio::after { left: 76px; transform: scaleX(-1) rotate(-18deg); }
.vio-face { position: absolute; left: 28px; top: 31px; width: 91px; height: 76px; border-radius: 45% 55% 48% 52%; background: var(--cream); transform: rotate(4deg); }
.vio-face i { position: absolute; top: 28px; width: 7px; height: 10px; border-radius: 50%; background: #251e31; }
.vio-face i:first-child { left: 25px; }
.vio-face i:nth-child(2) { right: 25px; }
.vio-face b { position: absolute; left: 42px; top: 43px; width: 12px; height: 7px; border-bottom: 2px solid #251e31; border-radius: 50%; }

.nutrition-card, .coach-goal {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  padding: 17px;
  text-align: left;
}

.nutrition-card { display: grid; margin-top: 10px; padding: 13px 14px; border-color: color-mix(in srgb, var(--nutrition-color, var(--line)) 32%, var(--line)); border-radius: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--nutrition-color, transparent) 5%, var(--surface)), var(--surface) 62%); cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.nutrition-card .card-title { font-size: 12px; }
.card-title { font-size: 14px; font-weight: 700; }
.calorie-line { margin-top: 4px; font-size: 20px; letter-spacing: -.025em; }
.calorie-line small { color: var(--muted); font-size: 10px; letter-spacing: 0; }
.progress { height: 6px; margin: 7px 0 9px; overflow: hidden; border-radius: 10px; background: var(--progress-track); }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--violet); transition: width .25s ease; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.macros span { display: grid; gap: 2px; }
.macros b { font-size: 12px; }
.macros small { color: var(--muted); font-size: 9.2px; }
.macros i { color: inherit; font-style: normal; }
.macros em { display: block; height: 3px; margin-top: 3px; overflow: hidden; border-radius: 8px; background: var(--progress-track); }
.macros em i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--progress-color); transition: width .25s ease; }
.open-label { margin-top: 13px; color: var(--violet-text); font-size: 12px; font-weight: 650; }

.water-card { display: grid; gap: 10px; margin-top: 10px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.water-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.water-heading > span:first-child { display: grid; gap: 3px; min-width: 0; }
.water-heading small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.water-heading strong { flex: 0 0 auto; font-size: 18px; white-space: nowrap; }
.water-heading strong b { font: inherit; }
.water-heading > span.water-title { display: flex; align-items: center; gap: 6px; }
.water-label { display: grid; gap: 3px; }
.water-glass { flex: 0 0 26px; width: 26px; height: 34px; color: #5aa7d9; }
.water-glass-fill { fill: currentColor; opacity: .7; transform-box: fill-box; transform-origin: center bottom; transform: scaleY(var(--water-fill, 0)); transition: transform .25s ease; }
@media (prefers-reduced-motion: reduce) { .water-glass-fill { transition: none; } }
@media (max-width: 360px) {
  .water-heading { flex-wrap: wrap; }
  .water-actions { width: 100%; }
}
.water-drop { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: color-mix(in srgb, #5aa7d9 17%, var(--surface)); color: #3b8bbb; }
.water-drop svg { display: block; width: 16px; height: 16px; opacity: .85; }
:root[data-theme="dark"] .water-drop { background: color-mix(in srgb, #5aa7d9 20%, var(--surface)); color: #8ec6e6; }
:root[data-theme="dark"] .water-drop svg { opacity: .9; }
.water-progress { height: 6px; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, #5aa7d9 12%, var(--surface)); }
.water-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #5aa7d9; transition: width .25s ease; }
.water-actions { display: grid; grid-template-columns: repeat(3, minmax(44px, 1fr)) 44px; gap: 3px; flex: 0 0 auto; }
.water-actions button { min-width: 44px; min-height: 44px; padding: 0 2px; border: 0; border-radius: 13px; background: color-mix(in srgb, #5aa7d9 12%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 650; }
.water-actions button:last-child { color: var(--muted); font-size: 17px; }
.water-actions button:disabled { opacity: .35; }
.diary-water-card { margin-top: 10px; }

.coach-goal { display: grid; margin-top: 10px; text-decoration: none; }
.coach-goal p { margin: 6px 0 11px; font-size: 13px; line-height: 1.35; }
.coach-goal small { color: var(--muted); }
.school-promo-line { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; border: 1px solid color-mix(in srgb, var(--coral) 42%, var(--line)); border-radius: 15px; padding: 0 13px; background: color-mix(in srgb, var(--coral) 5%, var(--surface)); color: var(--text); text-align: left; }
.school-promo-line span { overflow: hidden; font-size: 11.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.school-promo-line i { flex: 0 0 auto; color: var(--coral); font-size: 15px; font-style: normal; }

.screen-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.screen-heading h1 { margin-bottom: 5px; }
.screen-heading p { color: var(--muted); font-size: 13px; }
.round-action { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--violet); color: var(--violet-ink); font-size: 20px; }

.day-navigation { display: grid; grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 3px; align-items: center; margin: 11px 0 9px; }
.day-navigation > button { width: 24px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 19px; font-weight: 650; }
.day-navigation > button:active { background: var(--violet-soft); color: var(--violet-text); }
.day-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; min-width: 0; }
.day-button { border: 0; border-radius: 14px; padding: 8px 2px; background: transparent; color: var(--muted); font-size: 10px; }
.day-button strong { display: block; margin-top: 3px; font-size: 14px; }
.day-button[aria-pressed="true"] { background: var(--violet); color: var(--violet-ink); }
.saved-meals { margin: 13px 0 4px; }
.saved-meals-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.saved-meals-heading strong { color: var(--text); font-size: 12px; }
.saved-meals-heading button { min-height: 30px; padding: 0 2px; border: 0; background: transparent; color: var(--violet-text); font-size: 10px; font-weight: 700; }
.saved-meals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.saved-meal-swipe { position: relative; min-width: 0; min-height: 58px; overflow: hidden; border-radius: 14px; isolation: isolate; }
.saved-meal-card { position: relative; z-index: 1; width: 100%; height: 100%; min-width: 0; min-height: 58px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; gap: 7px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); touch-action: pan-y; transition: transform .2s ease; will-change: transform; }
.saved-meal-swipe.is-open .saved-meal-card { transform: translateX(-74px); }
.saved-meal-swipe.is-dragging .saved-meal-card { transition: none; }
.saved-meal-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 74px; padding: 0 5px; border: 0; background: #d95050; color: #fff; font-size: 10px; font-weight: 750; }
.saved-meal-delete:disabled { opacity: .7; }
.saved-meal-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--violet-soft); font-size: 16px; }
.saved-meal-copy { min-width: 0; display: grid; gap: 2px; }
.saved-meal-copy strong { display: -webkit-box; overflow: hidden; color: var(--text); font-size: 10.5px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-meal-copy small { overflow: hidden; color: var(--muted); font-size: 8.5px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.saved-meal-card > button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 11px; background: var(--violet-soft); color: var(--violet-text); font-size: 19px; font-weight: 700; }
.saved-meal-card > button.is-added { background: color-mix(in srgb, #43865a 20%, var(--surface)); color: #78c68e; }

.meal-list { --meal-columns: minmax(0, 1fr) repeat(3, 38px) 48px 29px 29px; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); padding: 0 13px; }
.meal-metric-grid { display: grid; grid-template-columns: var(--meal-columns); gap: 2px; align-items: center; font-variant-numeric: tabular-nums; text-align: right; }
.meal-global-labels { min-height: 30px; padding-top: 4px; border-bottom: 1px solid var(--line); color: color-mix(in srgb, var(--text) 88%, transparent); font-size: 9.5px; font-weight: 800; }
.meal-global-labels span:nth-child(5) { font-size: 11px; letter-spacing: -.02em; }
.meal-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.meal-section:last-child { border-bottom: 0; }
.meal-heading-row { min-height: 33px; }
.meal-heading-main { min-width: 0; grid-column: 1; display: flex; align-items: center; gap: 6px; text-align: left; }
.meal-section:not(.has-entries) .meal-heading-main { grid-column: 1 / 7; }
.meal-title { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.meal-summary-value { color: color-mix(in srgb, var(--text) 84%, transparent); font-size: 10.5px; font-weight: 650; text-align: right; white-space: nowrap; }
.meal-add { grid-column: 7; width: 29px; height: 29px; border: 0; border-radius: 50%; background: var(--violet-soft); color: var(--violet-text); font-size: 17px; }
.meal-section.has-entries .meal-add { grid-column: 6; }
.meal-heading-row .meal-collapse { grid-column: 7; justify-self: end; }
.meal-footer-actions { display: flex; gap: 6px; padding-top: 8px; overflow-x: auto; scrollbar-width: none; }
.meal-footer-actions::-webkit-scrollbar { display: none; }
.meal-footer-actions button { flex: 0 0 auto; min-height: 30px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.meal-collapse { width: 28px; height: 28px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; transition: transform .2s ease; }
.meal-section.is-collapsed .meal-collapse { transform: rotate(180deg); }
.food-entry-row { position: relative; overflow: hidden; }
.food-entry-content { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 29px 29px; gap: 2px; align-items: center; background: var(--surface); touch-action: pan-y; transition: transform .2s ease; will-change: transform; }
.food-entry-row.is-swiped .food-entry-content { transform: translateX(-78px); }
.food-entry-row.is-dragging .food-entry-content { transition: none; }
.food-swipe-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 78px; border: 0; background: #d95050; color: #fff; font-size: 11px; font-weight: 700; }
.food-swipe-delete:disabled { opacity: .7; }
.food-entry { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 38px) 48px; grid-template-rows: auto auto; gap: 5px 2px; align-items: center; padding: 9px 0; border: 0; background: transparent; color: var(--text); text-align: left; }
.food-entry-details { min-width: 0; grid-column: 1 / 6; grid-row: 1; display: grid; gap: 2px; padding-right: 2px; }
.food-entry-details b { overflow-wrap: anywhere; font-size: 13.5px; font-weight: 600; line-height: 1.22; white-space: normal; }
.food-entry-details small, .empty-meal { color: var(--muted); font-size: 10.5px; }
.food-nutrient-value { color: color-mix(in srgb, var(--text) 78%, transparent); font-size: 10.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.food-nutrient-value.is-calories { grid-column: 5; grid-row: 2; color: var(--text); font-weight: 700; }
.food-nutrient-value.is-protein { grid-column: 2; grid-row: 2; }
.food-nutrient-value.is-fat { grid-column: 3; grid-row: 2; }
.food-nutrient-value.is-carbs { grid-column: 4; grid-row: 2; }
.food-repeat { grid-column: 3; width: 28px; height: 30px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 15px; }
.food-repeat:disabled, .meal-add:disabled { opacity: .45; }
.meal-section.is-collapsed { padding-bottom: 10px; }
.meal-section.is-collapsed .food-entry-row, .meal-section.is-collapsed .meal-footer-actions { display: none; }

@media (max-width: 340px) {
  .meal-list { --meal-columns: minmax(0, 1fr) repeat(3, 28px) 38px 24px 24px; }
  .meal-metric-grid, .food-entry-content, .food-entry { gap: 1px; }
  .food-entry-content { grid-template-columns: minmax(0, 1fr) 24px 24px; }
  .food-entry { grid-template-columns: minmax(0, 1fr) repeat(3, 28px) 38px; }
  .meal-add { width: 25px; height: 25px; }
  .meal-collapse, .food-repeat { width: 24px; }
}

.notice { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--mint); color: #214432; font-size: 12px; }

.training-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; padding: 4px; border-radius: 17px; background: color-mix(in srgb, var(--line) 66%, transparent); }
.training-tabs button { min-height: 40px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }
.training-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 4px 16px var(--shadow); }
.plan-heading-card { display: grid; gap: 5px; margin-top: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.plan-heading-card > span { color: var(--violet-text); font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.plan-heading-card > strong { margin-top: 2px; color: var(--text); font-size: 21px; letter-spacing: -.025em; }
.plan-heading-card > p { color: var(--muted); font-size: 12px; line-height: 1.4; }
.plan-heading-card > small { margin-top: 5px; color: var(--text); font-size: 11px; font-weight: 650; }
.plan-day-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.plan-day-selector button { min-height: 52px; display: grid; grid-template-columns: auto auto; place-content: center; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); }
.plan-day-selector strong { font-size: 13px; }
.plan-day-selector small { padding: 3px 6px; border-radius: 7px; background: color-mix(in srgb, var(--line) 72%, transparent); font-size: 9px; }
.plan-day-selector button[aria-pressed="true"] { border-color: var(--violet); color: var(--text); box-shadow: inset 0 0 0 1px var(--violet); }
.plan-day-selector button[aria-pressed="true"] small { background: var(--violet-soft); color: var(--violet-text); }
.plan-day-heading { display: grid; gap: 3px; margin-top: 17px; }
.plan-day-heading strong { font-size: 16px; }
.plan-day-heading span { color: var(--muted); font-size: 10px; }
.training-plan-list { display: grid; gap: 8px; margin-top: 10px; }
.plan-exercise { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); color: var(--text); text-align: left; }
.plan-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 750; }
.plan-exercise > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.plan-exercise strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.plan-exercise small { color: var(--muted); font-size: 10px; }
.plan-exercise em { color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.35; }
.plan-exercise > b { padding: 7px 9px; border-radius: 10px; background: color-mix(in srgb, var(--line) 72%, transparent); color: var(--text); font-size: 9px; }
.plan-exercise[aria-pressed="true"] { border-color: color-mix(in srgb, var(--mint) 70%, var(--line)); }
.plan-exercise[aria-pressed="true"] .plan-number, .plan-exercise[aria-pressed="true"] > b { background: var(--mint); color: var(--text); }
.training-total { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 17px; }
.training-total span { display: grid; gap: 5px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); }
.training-total small { color: var(--muted); font-size: 9px; }
.training-total strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.workout-history { display: grid; gap: 14px; margin-top: 18px; }
.workout-day { display: grid; gap: 7px; }
.workout-day > h2 { color: var(--muted); font-size: 11px; font-weight: 650; }
.workout-day-list { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.workout-row { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.workout-row:last-child { border-bottom: 0; }
.workout-row > span { display: grid; gap: 3px; min-width: 0; }
.workout-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workout-row small { color: var(--muted); font-size: 10px; }
.workout-row p { grid-column: 1 / -1; color: var(--muted); font-size: 10px; line-height: 1.4; }
.workout-delete { width: 34px; height: 34px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--coral) 11%, transparent); color: var(--coral); }

.progress-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-top: 16px; padding: 4px; border-radius: 16px; background: color-mix(in srgb, var(--line) 62%, transparent); }
.progress-tabs button { min-width: 0; min-height: 38px; padding: 0 3px; border: 0; border-radius: 12px; overflow: hidden; background: transparent; color: var(--muted); font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.progress-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 4px 16px var(--shadow); }
.progress-panel { min-width: 0; padding-bottom: 18px; }
.progress-panel-heading { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; }
.progress-panel-heading h2 { min-width: 0; font-size: 16px; font-weight: 720; }
.progress-panel-heading > div { display: flex; min-width: 0; align-items: center; gap: 7px; }
.progress-panel-heading select { flex: 0 0 auto; min-height: 36px; max-width: min(50vw, 168px); border: 1px solid color-mix(in srgb, var(--violet) 32%, var(--line)); border-radius: 13px; padding: 0 22px 0 11px; outline: 0; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 650; }
.progress-panel-heading .round-action { width: 34px; height: 34px; }
.progress-hero-card { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 14px; padding: 19px; overflow: hidden; border: 1px solid color-mix(in srgb, #a692ff 42%, transparent); border-radius: 23px; background: linear-gradient(135deg, #7055db 0%, #443282 62%, #30275d 100%); color: #fff; box-shadow: 0 16px 38px color-mix(in srgb, var(--violet) 23%, transparent); }
.progress-hero-card::after { content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; right: -72px; top: -96px; border-radius: 50%; background: rgba(202,190,255,.2); filter: blur(4px); }
.progress-hero-card > div { min-width: 0; display: grid; align-content: start; gap: 5px; }
.progress-hero-card span { color: rgba(255,255,255,.76); font-size: 10.5px; }
.progress-hero-card > div:first-child > strong { margin-top: 4px; font-size: clamp(34px, 10vw, 43px); line-height: 1; letter-spacing: -.045em; }
.progress-hero-card strong small { font-size: 13px; letter-spacing: 0; opacity: .72; }
.progress-hero-card p, .progress-hero-card small { color: rgba(255,255,255,.72); font-size: 10.5px; line-height: 1.35; }
.weight-current p.is-positive { color: #87f0c8; font-weight: 720; }
.weight-current p.is-negative { color: #ffb0b7; font-weight: 720; }
.weight-goal { padding-left: 14px; border-left: 1px solid rgba(255,255,255,.16); }
.weight-goal > strong { margin-top: 4px; font-size: 17px; }
.weight-plan { display: grid; gap: 3px; margin-top: 8px; }
.weight-plan small { color: rgba(255,255,255,.72); font-size: 11px; }
.weight-plan b { color: #fff; font-size: 11px; }
.goal-track { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.16); }
.goal-track i { display: block; height: 100%; border-radius: inherit; background: #78cba7; }
.progress-chart-card { min-width: 0; margin-top: 12px; padding: 16px 14px 13px; border: 1px solid var(--line); border-radius: 21px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 95%, var(--violet)), var(--surface)); box-shadow: 0 12px 30px color-mix(in srgb, var(--shadow) 52%, transparent); }
.progress-chart-card > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: center; }
.progress-chart-card > header > div { display: grid; gap: 3px; }
.progress-chart-card header strong { font-size: 14px; }
.progress-chart-card header small { color: var(--muted); font-size: 11px; }
.progress-line-chart { width: 100%; height: auto; margin-top: 8px; overflow: visible; border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, color-mix(in srgb, var(--line) 52%, transparent) 32px), repeating-linear-gradient(to right, transparent 0, transparent 60px, color-mix(in srgb, var(--line) 38%, transparent) 61px); }
.progress-line-chart line { stroke: var(--line); stroke-width: 1; }
.progress-line-chart polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.progress-line-chart .actual-line { stroke: var(--violet); stroke-width: 3.5; }
.progress-line-chart .trend-line { stroke: color-mix(in srgb, var(--violet) 46%, var(--muted)); stroke-width: 2; stroke-dasharray: 5 6; }
.progress-line-chart circle { fill: var(--surface); stroke: var(--violet); stroke-width: 2.5; }
.progress-chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 3px; color: var(--muted); font-size: 10px; }
.progress-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.progress-chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }
.progress-chart-legend span:last-child i { width: 16px; height: 0; border-top: 1px dashed var(--muted); border-radius: 0; background: transparent; }
.progress-chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.progress-chart-stats > span { min-width: 0; display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 7px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.progress-chart-stats > span > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--violet) 12%, var(--surface)); color: var(--violet-text); font-size: 13px; font-style: normal; }
.progress-chart-stats > span.is-change > i { background: color-mix(in srgb, #45d8a8 16%, var(--surface)); color: #31a980; }
.progress-chart-stats b { min-width: 0; display: grid; gap: 1px; font-weight: inherit; }
.progress-chart-stats strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.progress-chart-stats small { color: var(--muted); font-size: 10px; line-height: 1.25; }
.progress-insight { min-height: 40px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 10px; padding: 4px 10px; overflow: hidden; border-radius: 16px; background: color-mix(in srgb, var(--violet) 9%, var(--surface)); }
.progress-insight-lead { margin-top: 0; }
.progress-insight p { min-width: 0; color: var(--text); font-size: 10.5px; line-height: 1.25; }
.progress-history, .progress-section { margin-top: 19px; }
.progress-history > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.progress-history h2, .progress-section h2 { font-size: 15px; }
.progress-history header button { min-height: 30px; border: 0; background: transparent; color: var(--violet-text); font-size: 10.5px; font-weight: 680; }
.progress-history > div { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow) 42%, transparent); }
.weight-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.weight-row:last-child { border-bottom: 0; }
.weight-row span { display: grid; gap: 2px; }
.weight-row strong { font-size: 14px; }
.weight-row small { color: var(--muted); font-size: 11px; }
.weight-row > b { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.weight-row > b::after { content: "›"; color: var(--muted); font-size: 20px; font-weight: 400; }
.weight-empty { padding: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.measurement-summary { display: grid; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow) 42%, transparent); }
.measurement-summary > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.measurement-summary > header strong { font-size: 14px; }
.measurement-summary > header small { text-align: right; }
.measurement-summary > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.measurement-summary > div span { min-width: 0; display: grid; gap: 4px; padding: 11px; border: 1px solid color-mix(in srgb, var(--violet) 13%, var(--line)); border-radius: 15px; background: color-mix(in srgb, var(--violet) 5%, var(--surface)); }
.measurement-summary small { color: var(--muted); font-size: 11px; }
.measurement-summary > div strong { color: var(--muted); font-size: 16px; }
.measurement-summary > div b { font-size: 12px; }
.measurement-summary > div .is-down strong { color: #35bb91; }
.measurement-summary > div .is-up strong { color: var(--coral); }
.measurement-metrics { overflow: hidden; margin-top: 9px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.measurement-metric-row { width: 100%; min-height: 57px; display: grid; grid-template-columns: minmax(0, 1fr) auto 12px; gap: 12px; align-items: center; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.measurement-metric-row:last-child { border-bottom: 0; }
.measurement-metric-row[aria-pressed="true"] { background: color-mix(in srgb, var(--violet) 8%, transparent); }
.measurement-metric-row span { display: grid; gap: 3px; }
.measurement-metric-row strong { font-size: 12.5px; }
.measurement-metric-row small { color: var(--muted); font-size: 11.5px; }
.measurement-metric-row > b { display: grid; grid-template-columns: auto minmax(38px, auto); align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.measurement-metric-row > b em { color: var(--muted); font-size: 11px; font-style: normal; text-align: right; }
.measurement-metric-row.is-down > b em { color: #35bb91; }
.measurement-metric-row.is-up > b em { color: var(--coral); }
.measurement-metric-row > i { color: var(--muted); font-size: 18px; font-style: normal; }
.progress-photo-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 15px; border: 1px dashed var(--line); border-radius: 19px; background: var(--surface); }
.progress-photo-card > div { display: grid; gap: 4px; }
.progress-photo-card strong { font-size: 12px; }
.progress-photo-card small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.progress-photo-card > span { color: var(--muted); font-size: 11px; }
.nutrition-overview { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(0, .66fr); gap: 9px; margin-top: 12px; }
.nutrition-overview[hidden] { display: none; }
.nutrition-overview > div { min-width: 0; min-height: 130px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow) 42%, transparent); }
.nutrition-adherence-card { display: grid; grid-template-columns: 1fr; align-content: start; gap: 10px; }
.nutrition-ring { --nutrition-adherence: 0%; width: 58px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at center, var(--surface) 57%, transparent 59%), conic-gradient(#53d9ae var(--nutrition-adherence), var(--progress-track) 0); }
.nutrition-ring strong { font-size: 16px; }
.nutrition-adherence-card p { display: grid; gap: 4px; }
.nutrition-adherence-card p b { color: var(--text); font-size: 12px; font-weight: 700; }
.nutrition-overview small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.nutrition-calorie-card { display: grid; align-content: center; gap: 6px; }
.nutrition-calorie-card > span { color: var(--muted); font-size: 11px; }
.nutrition-calorie-card > strong { overflow-wrap: anywhere; font-size: clamp(24px, 7vw, 33px); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; }
.nutrition-calorie-card > i { height: 7px; overflow: hidden; border-radius: 99px; background: var(--progress-track); }
.nutrition-calorie-card > i b { display: block; height: 100%; border-radius: inherit; background: #50d9ad; }
.progress-macro-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
.progress-macro-list > div { min-width: 0; display: grid; gap: 9px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.progress-macro-list span { min-width: 0; display: grid; gap: 4px; }
.progress-macro-list strong { display: grid; min-width: 0; gap: 1px; }
.progress-macro-list strong b { color: var(--text); font-size: 15px; font-weight: 750; white-space: nowrap; }
.progress-macro-list .macro-goal { color: var(--muted); font-size: 10.5px; font-style: normal; white-space: nowrap; }
.progress-macro-list small { color: var(--muted); font-size: 11px; }
.progress-macro-list .macro-track { height: 5px; overflow: hidden; border-radius: 99px; background: var(--progress-track); }
.progress-macro-list .macro-track > .macro-fill { display: block; height: 100%; border-radius: inherit; background: #579fef; }
.progress-macro-list .macro-fat .macro-track > .macro-fill { background: #efb936; }
.progress-macro-list .macro-carbs .macro-track > .macro-fill { background: #be63e8; }
.nutrition-chart { overflow: hidden; }
.nutrition-chart-target { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.nutrition-chart-target[hidden] { display: none; }
.nutrition-chart-target::before { content: ""; width: 14px; border-top: 1px dashed color-mix(in srgb, var(--muted) 68%, transparent); }
.nutrition-bars { min-height: 146px; display: flex; gap: 4px; align-items: stretch; overflow-x: auto; padding: 18px 1px 0; scrollbar-width: none; }
.nutrition-bars::-webkit-scrollbar { display: none; }
.nutrition-bar-column { position: relative; min-width: 14px; flex: 1 0 14px; display: flex; align-items: end; justify-content: center; padding-bottom: 22px; }
.nutrition-bar-column > i { width: min(14px, 80%); display: block; border-radius: 5px 5px 2px 2px; background: var(--violet); }
.nutrition-bar-column > i.is-empty { background: var(--progress-track); opacity: .55; }
.nutrition-bar-column > b { position: absolute; left: 0; right: 0; height: 1px; border-top: 1px dashed color-mix(in srgb, var(--muted) 68%, transparent); }
.nutrition-bar-column > small { position: absolute; left: 50%; bottom: 0; color: var(--muted); font-size: 7px; white-space: nowrap; transform: translateX(-50%); }
.nutrition-popular > div { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr); gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.nutrition-popular > div::-webkit-scrollbar { display: none; }
.nutrition-popular article { min-width: 0; display: grid; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.nutrition-popular article > span { min-height: 52px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--violet) 8%, var(--page)); font-size: 28px; }
.nutrition-popular article strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.nutrition-popular article small { color: var(--muted); font-size: 10px; }
.progress-empty-inline { padding: 24px 8px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.activity-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.activity-card { min-width: 0; display: grid; align-content: start; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 10px 26px color-mix(in srgb, var(--shadow) 42%, transparent); }
.activity-card header > span { color: var(--text); font-size: 13px; font-weight: 750; }
.activity-primary-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.activity-primary-stats span { min-width: 0; display: grid; align-content: start; gap: 3px; }
.activity-primary-stats span + span { padding-left: 8px; border-left: 1px solid var(--line); }
.activity-primary-stats strong { font-size: 22px; }
.activity-primary-stats small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.activity-calendar { height: 72px; display: flex; align-items: end; gap: 5px; }
.activity-calendar span { min-width: 7px; flex: 1; border-radius: 5px 5px 2px 2px; background: var(--violet); }
.activity-calendar span.is-empty { background: var(--progress-track); }
.activity-card > p { color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.steps-card { place-items: center; align-content: center; text-align: center; background: color-mix(in srgb, var(--surface) 88%, var(--page)); }
.steps-card header { width: 100%; text-align: left; }
.steps-empty-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, #45d8c0 14%, var(--surface)); color: #42bfa8; font-size: 24px; }
.steps-card > strong { font-size: 15px; }
.activity-details-card { display: grid; gap: 12px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
.activity-details-card h2 { font-size: 15px; }
.activity-details-card > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.activity-details-card span { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px; border-radius: 15px; background: color-mix(in srgb, var(--violet) 6%, var(--page)); }
.activity-details-card i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--violet) 14%, var(--surface)); color: var(--violet-text); font-style: normal; }
.activity-details-card b { min-width: 0; display: grid; gap: 2px; font-weight: inherit; }
.activity-details-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.activity-details-card small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.activity-details-card .is-unavailable { opacity: .72; }

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: max(calc(12px + var(--dnevio-safe-left)), calc((100vw - 496px) / 2));
  right: max(calc(12px + var(--dnevio-safe-right)), calc((100vw - 496px) / 2));
  bottom: calc(10px + var(--dnevio-safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 12px 34px var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-nav button, .bottom-nav a { border: 0; border-radius: 15px; padding: 7px 2px; background: transparent; color: var(--muted); display: grid; justify-items: center; gap: 3px; font-size: 12px; text-decoration: none; }
.bottom-nav button span, .bottom-nav a span { font-size: 16px; }
.bottom-nav button[aria-pressed="true"] { color: var(--violet-text); background: var(--violet-soft); }
.bottom-nav .bottom-nav-voice { color: var(--violet-text); }
.bottom-nav-voice svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.food-sheet-open .bottom-nav { visibility: hidden; pointer-events: none; }
.vio-screen-open .bottom-nav { visibility: hidden; pointer-events: none; }
.vio-screen-open .app-shell { padding: 0; }

.sheet-backdrop { position: fixed; z-index: 30; inset: 0; background: rgba(23, 18, 31, .38); }
.food-sheet { position: fixed; z-index: 31; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(92dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(20px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
[data-recipe-backdrop] { z-index: 32; }
[data-recipe-sheet] { z-index: 33; }
.food-sheet[data-food-sheet] { top: max(var(--food-sheet-top, 8dvh), var(--dnevio-safe-top)); bottom: 0; display: flex; flex-direction: column; height: auto; max-height: none; overflow: hidden; padding-bottom: 0; isolation: isolate; }
.food-sheet[data-food-sheet] > .sheet-handle,
.food-sheet[data-food-sheet] > header { flex: 0 0 auto; }
.food-sheet[data-food-sheet] > header { background: var(--page); }
.food-sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(20px + var(--dnevio-safe-bottom)); scroll-padding-block: 12px 112px; }
.food-sheet[data-mode="details"] .food-sheet-scroll { scroll-padding-bottom: calc(24px + var(--dnevio-safe-bottom)); }
.food-sheet[data-mode="details"] [data-food-form] { padding: 24px 0 8px; }
.food-sheet[data-mode="details"] [data-pending-bar] { display: none; }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: var(--line); }
.food-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.food-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.product-picker-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; padding: 3px; border-radius: 14px; background: color-mix(in srgb, var(--line) 58%, transparent); }
.product-picker-tabs button { min-height: 34px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.product-picker-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 3px 12px var(--shadow); }
.product-picker-tabs small { display: inline-grid; min-width: 18px; height: 18px; margin-left: 3px; place-items: center; border-radius: 8px; background: var(--violet-soft); color: var(--violet-text); font-size: 9px; }
.product-picker-viewport { overflow: hidden; touch-action: pan-y; }
.product-picker-track { display: flex; align-items: flex-start; transition: transform .22s ease; will-change: transform; }
.product-picker-track[data-page="favorites"] { transform: translateX(-100%); }
.product-picker-track[data-page="dishes"] { transform: translateX(-200%); }
.product-picker-page { flex: 0 0 100%; min-width: 0; }

.product-search-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px 48px; gap: 8px; align-items: end; margin-top: 15px; }
.search-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); }
.search-field input { width: 100%; min-height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.database-search { width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--text); font-size: 13px; font-weight: 650; }
.database-search:disabled { border-color: var(--line); background: var(--surface); color: var(--muted); }
.voice-toggle, .barcode-toggle { width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
.voice-toggle[aria-pressed="true"] { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 14%, var(--surface)); color: var(--coral); }
.voice-toggle svg, .barcode-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.barcode-toggle[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); }
.voice-panel { margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.voice-status-row { display: grid; grid-template-columns: 10px 1fr; gap: 8px; align-items: center; }
.voice-status-row p { font-size: 12px; font-weight: 700; line-height: 1.35; }
.voice-meal { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 7px 9px; border-radius: 11px; background: var(--page); color: var(--muted); font-size: 10.5px; }
.voice-meal select { min-height: 30px; padding: 0 24px 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--surface); color: var(--text); font: inherit; font-weight: 750; }
.voice-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.voice-panel.is-recording .voice-pulse { background: var(--coral); box-shadow: 0 0 0 5px color-mix(in srgb, var(--coral) 16%, transparent); animation: voice-pulse 1.25s ease-in-out infinite; }
@keyframes voice-pulse { 50% { transform: scale(.72); opacity: .65; } }
.voice-example, .voice-transcript, .voice-error { margin-top: 7px; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.voice-transcript { padding: 8px 9px; border-radius: 11px; background: var(--page); color: var(--text); }
.voice-error { color: var(--coral); }
.voice-review-list { display: grid; gap: 6px; margin-top: 9px; }
.voice-review-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) 82px; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--page); }
.voice-review-item > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--violet); }
.voice-review-item span { min-width: 0; display: grid; gap: 2px; }
.voice-review-item b { overflow-wrap: anywhere; font-size: 11px; }
.voice-review-item small { color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.voice-review-item label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px; padding: 0 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 9px; }
.voice-review-item input[type="number"] { width: 100%; min-height: 34px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.voice-review-item.is-unmatched { grid-template-columns: 22px 1fr; }
.voice-review-item.is-unmatched > input { visibility: hidden; }
.voice-actions { display: grid; grid-template-columns: .8fr 1.5fr; gap: 7px; margin-top: 9px; }
.voice-actions button { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font-size: 11px; font-weight: 700; }
.voice-actions button:last-child { border-color: var(--violet); background: var(--violet); color: var(--violet-ink); }
.voice-actions button:disabled { opacity: .5; }
.barcode-panel { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.barcode-panel-heading { display: grid; grid-template-columns: 1fr 28px; gap: 8px; align-items: center; margin-bottom: 6px; padding-left: 2px; }
.barcode-panel-heading strong { font-size: 12px; }
.barcode-panel-heading button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--violet-soft); color: var(--violet-text); font-size: 18px; }
.barcode-reader { height: 156px; min-height: 0; overflow: hidden; border-radius: 12px; background: #111; }
.barcode-reader video { width: 100% !important; height: 156px !important; min-height: 0 !important; object-fit: cover; }
.barcode-reader img { max-width: 100%; }
.is-smart-camera .barcode-reader, .is-smart-camera .barcode-reader video { height: min(45dvh, 360px) !important; }
.is-smart-camera .barcode-create-fallback, .is-smart-camera .barcode-link-confirm, .is-smart-camera .barcode-camera-status { display: none; }
.is-smart-review .barcode-reader, .is-smart-review .smart-actions, .is-smart-review .smart-privacy, .is-smart-review [data-smart-check] { display: none; }
.smart-content { padding: 8px; color: var(--text); }
.smart-content p { margin: 8px 0; font-size: 13px; line-height: 1.5; }
.smart-actions, .smart-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.is-smart-match .barcode-reader, .is-smart-match .smart-privacy { display: none; }
.smart-choices [data-smart-product] { display: grid; gap: 5px; width: 100%; text-align: left; min-height: 56px; }
.smart-choices [data-smart-product] span { color: var(--muted); font-size: 12px; }
.smart-photo-actions { display: grid; gap: 8px; margin-bottom: 12px; }
.smart-photo-actions[hidden] { display: none; }
.smart-photo-actions [data-smart-step] { color: var(--muted); margin: 0; }
.smart-photo-notice { color: var(--muted); font-size: 11px; line-height: 1.4; }
.smart-photo-actions [data-smart-shoot] { background: var(--violet-soft); color: var(--violet-text); border-color: var(--violet-text); min-height: 44px; }
.smart-photo-actions button:disabled { opacity: .6; }
.smart-content button { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.smart-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.smart-review > p, .smart-review > strong, .smart-review > button, .smart-review [data-capture-field="name"], .smart-review [data-capture-field="brand"], .smart-review [data-capture-field="code"], .smart-review [data-capture-field="unit"] { grid-column: 1 / -1; }
.smart-review[hidden] { display: none; }
.smart-review label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.smart-review input, .smart-review select { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 16px; }
.smart-review button:last-child { background: var(--violet-soft); color: var(--violet-text); }
.smart-content [data-smart-status] { min-height: 42px; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--muted); display: flex; align-items: center; gap: 10px; }
.smart-content [data-smart-status][data-state="busy"], .smart-content [data-smart-status][data-state="scanning"] { color: var(--violet-text); background: var(--violet-soft); }
.smart-content [data-smart-status][data-state="warning"] { color: var(--text); border: 1px solid var(--line); }
.smart-content [data-smart-status][data-state="success"] { color: var(--text); border: 1px solid #39866b; }
.smart-content [data-smart-status][data-state="success"]::before { content: '✓'; color: #39866b; font-size: 20px; }
.is-smart-match .smart-choices [data-smart-product] { border-color: #39866b; }
.smart-content [data-smart-status][data-state="busy"]::before { content: ''; flex: 0 0 16px; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: smart-capture-spin 1s linear infinite; }
.smart-content [data-smart-status][data-state="scanning"]::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: smart-capture-pulse 1.4s ease-in-out infinite; }
.smart-content .smart-summary, .smart-content .smart-focus-status { color: var(--muted); font-size: 12px; }
.smart-content .smart-summary:empty, .smart-content .smart-focus-status:empty { display: none; }
.is-smart-review .smart-summary { display: none; }
.smart-review .smart-submit-option { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--violet-soft); color: var(--text); font-size: 14px; }
.smart-review .smart-submit-option input { width: 20px; height: 20px; flex: 0 0 20px; margin: 1px 0 0; accent-color: var(--violet-text); }
.smart-submit-option small { display: block; color: var(--muted); line-height: 1.4; margin-top: 5px; }
.smart-review textarea { grid-column: 1 / -1; min-height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font: inherit; font-size: 16px; }
.smart-review textarea[hidden] { display: none; }
@keyframes smart-capture-spin { to { transform: rotate(360deg); } }
@keyframes smart-capture-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .smart-content [data-smart-status]::before { animation: none !important; } }
.barcode-camera-status { margin: 6px 2px 0; min-height: 14px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.barcode-manual-details { margin-top: 4px; }
.barcode-manual-details summary { width: max-content; color: var(--violet-text); font-size: 11px; cursor: pointer; list-style: none; }
.barcode-manual-details summary::-webkit-details-marker { display: none; }
.barcode-manual-details summary::after { content: '⌄'; margin-left: 5px; }
.barcode-manual-details[open] summary::after { content: '⌃'; }
.barcode-manual { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 6px; margin-top: 6px; }
.barcode-manual input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--text); font-size: 16px; }
.barcode-manual button { min-height: 38px; border: 0; border-radius: 12px; background: var(--violet); color: var(--violet-ink); font-size: 12px; font-weight: 650; }
.barcode-create-fallback { display: grid; gap: 8px; margin-top: 9px; padding: 10px; border: 1px dashed color-mix(in srgb, var(--violet) 32%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--violet) 5%, var(--surface)); }
.barcode-create-fallback p { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.barcode-create-fallback button { min-height: 38px; border: 0; border-radius: 11px; background: var(--violet-soft); color: var(--violet-text); font-size: 11px; font-weight: 750; }
.catalog-status { margin-top: 8px; padding: 10px 12px; border-radius: 13px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.4; }
.section-label, fieldset legend { margin: 14px 0 7px; color: var(--muted); font-size: 11px; }
.recent-products-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-list { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 0 14px; }
.product-button { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 11px; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.product-button:last-child { border-bottom: 0; }
.product-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--violet-soft); font-size: 20px; }
.product-button span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.product-button b { font-size: 13px; }
.product-identity { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; min-width: 0; }
.product-identity[hidden] { display: none; }
.product-identity-separator { flex: 0 0 auto; color: var(--muted); font-size: 10.5px; }
.product-identity-separator[hidden] { display: none; }
.product-manufacturer { min-width: 0; color: color-mix(in srgb, var(--violet-text) 68%, var(--muted)); font-size: 9.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.product-manufacturer[hidden] { display: none; }
.product-brand-badge { justify-self: start; max-width: 100%; display: inline-block; margin: 0 0 1px; padding: 1px 7px; border-radius: 999px; background: var(--violet-soft); color: var(--violet-text); font-size: 10.5px; font-weight: 650; line-height: 1.35; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-brand-badge[hidden] { display: none; }
.product-brand-badge[data-match="true"] { background: color-mix(in srgb, var(--violet) 26%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 42%, transparent); }
.product-button .product-copy:has(.product-identity:not([hidden])) { gap: 1px; }
.product-button small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.product-moderation-status { width: max-content; margin-top: 2px; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, #c77a22 15%, transparent); color: #a85c08; font-size: 9px; font-style: normal; font-weight: 750; line-height: 1.2; }
.product-moderation-status[data-status="approved"] { background: color-mix(in srgb, #43865a 15%, transparent); color: #347346; }
.product-moderation-status[data-status="rejected"] { background: color-mix(in srgb, var(--coral) 13%, transparent); color: var(--coral); }
:root[data-theme="dark"] .product-moderation-status { color: #f2ad5f; }
:root[data-theme="dark"] .product-moderation-status[data-status="approved"] { color: #78c68e; }
.product-button-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.product-button-row .product-button { border-bottom: 0; }
.picker-product-swipe { position: relative; min-width: 0; overflow: hidden; isolation: isolate; }
.picker-product-swipe .product-button-row { position: relative; z-index: 1; width: 100%; background: var(--surface); touch-action: pan-y; transition: transform .2s ease; will-change: transform; }
.picker-product-swipe.is-open .product-button-row { transform: translateX(-74px); }
.picker-product-swipe.is-dragging .product-button-row { transition: none; }
.picker-product-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 74px; padding: 0 5px; border: 0; background: #d95050; color: #fff; font-size: 10px; font-weight: 750; }
.picker-product-delete:disabled { opacity: .7; }
.product-quick-add { min-width: 82px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--violet) 12%, var(--surface)); color: var(--violet-text); font-size: 10px; font-weight: 750; }
.product-quick-add:disabled { opacity: .5; }
.favorite-products-page { padding-top: 15px; }
.favorite-page-heading { display: grid; gap: 3px; margin-bottom: 9px; }
.favorite-page-heading strong { font-size: 15px; }
.favorite-page-heading span, .favorite-products-empty { color: var(--muted); font-size: 10.5px; }
.favorite-products-empty { padding: 22px 16px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; line-height: 1.45; }
.dishes-page { padding-top: 15px; }
.create-dish-button { width: 100%; min-height: 44px; margin-bottom: 10px; border: 1px dashed var(--violet); border-radius: 15px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 750; }
.dish-product-list { margin-bottom: 10px; }
.catalog-attribution, .food-source-note { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.catalog-attribution a { color: var(--violet-text); }
.food-source-note { padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.custom-product-toggle { width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid var(--violet); border-radius: 15px; background: var(--violet); color: var(--violet-ink); font-size: 13px; font-weight: 650; }
.custom-product-form { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.food-metadata-suggestions { display: grid; margin: 6px 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.food-metadata-suggestions[hidden] { display: none; }
.food-metadata-suggestions button { min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; font: inherit; }
.food-metadata-suggestions button:last-child { border-bottom: 0; }
.food-metadata-suggestions button:is(:hover, :focus-visible, [aria-selected="true"]) { background: var(--violet-soft); }
.custom-product-form > p:first-child { color: var(--muted); font-size: 12px; }
.custom-product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.custom-nutrition-basis { color: var(--text); font-size: 15px; font-weight: 700; margin: 18px 0 12px; }
.custom-product-help { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 6px 0 12px; }
.custom-energy-check { margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); font-size: 13px; line-height: 1.5; }
.custom-energy-check button { margin-top: 8px; padding: 9px 12px; border: 1px solid var(--violet); border-radius: 12px; background: var(--violet-soft); color: var(--violet-text); }
.unit-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.unit-choices label { position: relative; }
.unit-choices input { position: absolute; opacity: 0; pointer-events: none; }
.unit-choices span { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 12px; }
.unit-choices input:checked + span { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); }
.catalog-share-option { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--violet-soft); }
.catalog-share-option input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--violet); }
.catalog-share-option span { display: grid; gap: 4px; }
.catalog-share-option strong { color: var(--text); font-size: 12px; }
.catalog-share-option small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.label-photo-input input { min-height: 0; padding: 10px; font-size: 12px; }
.custom-product-error { margin-top: 10px; color: var(--coral); font-size: 12px; }
.custom-product-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 7px; margin-top: 12px; }
.custom-product-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--text); }
.custom-product-actions button:last-child { border-color: var(--violet); background: var(--violet); color: var(--violet-ink); }
.recipe-intro { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.recipe-ingredients { display: grid; gap: 7px; margin-top: 10px; }
.recipe-ingredient { display: grid; grid-template-columns: minmax(0, 1fr) 88px 34px; gap: 7px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.recipe-ingredient > span { min-width: 0; display: grid; gap: 2px; }
.recipe-ingredient b { overflow-wrap: anywhere; font-size: 11px; }
.recipe-ingredient small { color: var(--muted); font-size: 9px; }
.recipe-ingredient label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px; padding: 0 7px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 9px; }
.recipe-ingredient input { width: 100%; min-height: 36px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.recipe-ingredient button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--coral) 11%, var(--surface)); color: var(--coral); }
.recipe-ingredient-picker { display: grid; gap: 8px; margin-top: 10px; }
.recipe-ingredient-picker .search-field { position: relative; display: block; margin: 0; padding: 0; }
.recipe-ingredient-picker .search-field > span { position: absolute; z-index: 1; left: 13px; top: 50%; width: 20px; transform: translateY(-50%); color: var(--muted); font-size: 20px; line-height: 1; text-align: center; pointer-events: none; }
.recipe-ingredient-picker .search-field input { padding: 0 13px 0 44px; }
.recipe-ingredient-results { max-height: 230px; overflow-y: auto; }
.recipe-ingredients-compact { margin-top: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; }
.recipe-sheet.is-keyboard-open { top: max(var(--recipe-sheet-top, 8dvh), var(--dnevio-safe-top)); bottom: auto; height: var(--recipe-sheet-visible-height, 60dvh); max-height: calc(var(--dnevio-screen-height) - var(--dnevio-safe-top)); }
.recipe-sheet.is-keyboard-open.is-ingredient-searching { display: flex; flex-direction: column; overflow: hidden; }
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .sheet-handle,
.recipe-sheet.is-keyboard-open.is-ingredient-searching > header,
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .recipe-ingredients-compact { flex: 0 0 auto; }
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .recipe-intro,
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .recipe-ingredients,
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .recipe-add-ingredient,
.recipe-sheet.is-keyboard-open.is-ingredient-searching > form { display: none; }
.recipe-sheet.is-keyboard-open.is-ingredient-searching > .recipe-ingredient-picker { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.recipe-sheet.is-keyboard-open.is-ingredient-searching .recipe-ingredient-results { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.recipe-add-ingredient { width: 100%; min-height: 42px; margin-top: 10px; border: 1px dashed var(--violet); border-radius: 14px; background: transparent; color: var(--violet-text); font-size: 12px; font-weight: 700; }
.recipe-summary { display: grid; gap: 2px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.45; }
.recipe-summary p:first-child { color: var(--text); font-weight: 700; }
.recipe-summary-macros { color: var(--violet-text); font-weight: 650; }
.recipe-numbers { display: grid; grid-template-columns: 1.3fr .9fr; gap: 8px; }
.recipe-weight-toggle { width: 100%; min-height: 40px; margin-top: 10px; border: 1px dashed var(--line); border-radius: 13px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; }

.change-product { display: block; margin: 0 0 16px auto; padding: 5px 0; border: 0; background: transparent; color: var(--text); font-size: 11px; text-align: right; }
.selected-food { display: grid; gap: 4px; margin-top: 0; padding: 0; border: 0; background: transparent; }
.selected-food span { color: var(--muted); font-size: 12px; }
.selected-food > div { display: flex; flex-wrap: wrap; gap: 9px; }
.selected-food button { justify-self: start; margin-top: 5px; padding: 0; border: 0; background: transparent; color: var(--violet-text); font-size: 11px; }
.food-sheet[data-mode="details"] [data-food-form] { padding-top: 12px; }
.food-sheet[data-mode="details"] .selected-food { position: relative; padding-right: 48px; margin-top: 18px; }
.food-sheet[data-mode="details"] .selected-food > strong { font-size: 22px; line-height: 1.25; }
.food-sheet[data-mode="details"] [data-selected-calories] { display: none; }
.food-sheet[data-mode="details"] [data-toggle-favorite] { position: absolute; top: 0; right: 0; width: 44px; height: 44px; font-size: 0; margin: 0; }
.food-sheet[data-mode="details"] [data-toggle-favorite]::before { content: '☆'; font-size: 30px; }
.food-sheet[data-mode="details"] [data-toggle-favorite][aria-pressed="true"]::before { content: '★'; }
.product-brand { margin: 8px 0 18px; color: var(--muted); font-size: 14px; }
.product-portion-caption { color: var(--muted); font-size: 12px; margin: 20px 0 10px; }
.product-macro-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.product-macro-grid > div { display: grid; gap: 7px; padding: 15px 3px; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.product-macro-grid > div:first-child { border-color: var(--violet); background: var(--violet-soft); }
.product-macro-grid strong { font-size: clamp(16px, 4.6vw, 22px); white-space: nowrap; }
.product-macro-grid small { color: var(--muted); font-size: 10px; }
.product-nutrition-section { margin-top: 25px; }
.product-nutrition-section > header { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; text-align: left; }
.product-nutrition-section h3 { margin: 0; font-size: 17px; }
.product-nutrition-basis { color: var(--muted); font-size: 12px; white-space: nowrap; }
.product-nutrition-section dl { margin: 12px 0; padding: 0 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.product-nutrition-section dl > div { display: flex; gap: 15px; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.product-nutrition-section dl > div:last-child { border: 0; }
.product-nutrition-section dt { color: var(--muted); }
.product-nutrition-section dd { margin: 0; white-space: nowrap; }
.product-missing-note { color: var(--muted); font-size: 11px; line-height: 1.5; }
.product-data-footer { display: flex; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 16px 0; margin-top: 18px; }
.product-data-footer small { color: var(--muted); font-size: 10px; }
.product-data-footer button { border: 0; background: transparent; color: var(--muted); text-decoration: underline; font-size: 10px; min-height: 44px; }
.product-action-footer { flex: 0 0 auto; padding: 10px 0 calc(14px + var(--dnevio-safe-bottom)); border-top: 1px solid var(--line); background: var(--page); z-index: 2; }
.product-action-footer[hidden] { display: none; }
.product-action-footer small { display: block; text-align: center; font-size: 10px; color: var(--muted); }
.product-action-footer .primary-action { margin-top: 7px; min-height: 52px; }
.food-sheet[data-mode="details"].is-keyboard-open { bottom: auto; height: var(--product-details-visible-height); }
.food-sheet.is-keyboard-open .product-action-footer { padding-bottom: 8px; }
.selected-recipe-details { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.selected-recipe-details > p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.selected-recipe-meta { display: flex; gap: 7px; }
.selected-recipe-meta span { padding: 5px 9px; border-radius: 999px; background: var(--violet-soft); color: var(--violet-text); font-size: 10px; font-weight: 700; }
.selected-recipe-details details { border-top: 1px solid var(--line); padding-top: 10px; }
.selected-recipe-details summary { cursor: pointer; color: var(--text); font-size: 12px; font-weight: 750; }
.selected-recipe-details ul, .selected-recipe-details ol { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.selected-recipe-details ol { padding-left: 20px; list-style: decimal; }
.selected-recipe-details li { color: var(--muted); font-size: 11px; line-height: 1.4; }
.selected-recipe-details ul li { display: flex; justify-content: space-between; gap: 12px; }
.selected-recipe-details li b { color: var(--text); font-weight: 700; white-space: nowrap; }
.amount-presets { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.amount-presets::-webkit-scrollbar { display: none; }
.amount-presets button { flex: 0 0 auto; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 11px; }
.amount-presets button[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); }
.field-label { display: grid; gap: 6px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.field-label input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 15px; padding: 0 13px; background: var(--surface); color: var(--text); font-size: 16px; }
.amount-input-row { display: block; }
.field-label select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 15px; padding: 0 38px 0 13px; background: var(--surface); color: var(--text); font-size: 16px; }
fieldset { margin: 0; padding: 0; border: 0; }
.meal-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meal-choice { min-height: 42px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); font-size: 11px; }
.meal-choice[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); }
.meal-context { display: flex; align-items: center; gap: 8px; margin-top: 12px; position: relative; }
.meal-context-label { color: var(--muted); font-size: 12px; }
.meal-context-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.meal-context-toggle strong { color: var(--text); font-size: 14px; font-weight: 700; }
.meal-context-chevron { color: var(--muted); font-size: 11px; }
.meal-context-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; display: grid; gap: 3px; min-width: 176px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 12px 32px var(--shadow); }
.meal-context-menu .meal-choice { min-height: 40px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; text-align: left; font-size: 13px; }
.meal-context-menu .meal-choice[aria-pressed="true"] { background: var(--violet-soft); }
.recipe-ingredient-edit-banner { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 8px; align-items: center; margin-top: 10px; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--violet) 52%, var(--line)); border-radius: 14px; background: var(--violet-soft); }
.recipe-ingredient-edit-banner > span { min-width: 0; display: grid; gap: 2px; }
.recipe-ingredient-edit-banner small { color: var(--violet-text); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.recipe-ingredient-edit-banner strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.recipe-ingredient-edit-banner button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--muted) 13%, transparent); color: var(--muted); font-size: 18px; }
.pending-food-bar { position: sticky; bottom: 0; z-index: 2; margin-top: 14px; padding: 10px; border: 1px solid var(--violet); border-radius: 20px; background: var(--surface); box-shadow: 0 -8px 24px var(--shadow); }
.pending-summary { width: 100%; display: flex; align-items: center; gap: 9px; padding: 2px 4px; border: 0; background: transparent; color: var(--text); text-align: left; }
.pending-thumbs { display: flex; align-items: center; }
.pending-thumb { width: 32px; height: 32px; display: grid; place-items: center; margin-left: -7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--violet-soft); font-size: 15px; }
.pending-thumb:first-child { margin-left: 0; }
.pending-thumb-more { background: var(--page); color: var(--muted); font-size: 10px; font-weight: 750; }
.pending-summary-text { display: grid; gap: 1px; }
.pending-summary-text strong { font-size: 13px; font-weight: 700; }
.pending-summary-text small { color: var(--muted); font-size: 11px; }
.pending-summary-chevron { margin-left: auto; color: var(--muted); font-size: 11px; transition: transform .18s ease; }
.pending-summary[aria-expanded="true"] .pending-summary-chevron { transform: rotate(180deg); }
.pending-food-list { display: grid; gap: 6px; max-height: 40dvh; overflow-y: auto; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pending-food-item { display: grid; grid-template-columns: minmax(0, 1fr) 56px auto 28px; gap: 6px; align-items: center; padding: 3px 0; }
.pending-food-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pending-food-item input { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; background: var(--page); color: var(--text); font-size: 16px; text-align: center; }
.pending-food-unit { color: var(--muted); font-size: 11px; }
.pending-food-remove { width: 28px; height: 28px; border: 0; border-radius: 9px; background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); font-size: 15px; line-height: 1; }
.pending-food-remove:disabled { opacity: .3; }
.pending-recipe-item { display: block; padding: 0; border: 1px solid color-mix(in srgb, var(--violet) 30%, var(--line)); border-radius: 15px; background: color-mix(in srgb, var(--violet) 4%, var(--page)); overflow: hidden; }
.pending-recipe-header { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 6px; align-items: center; padding: 7px; }
.pending-recipe-toggle { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 7px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; }
.pending-recipe-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--violet-soft); font-size: 17px; }
.pending-recipe-copy { min-width: 0; display: grid; gap: 2px; }
.pending-recipe-copy strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.pending-recipe-copy small { color: var(--muted); font-size: 10px; line-height: 1.25; }
.pending-recipe-chevron { color: var(--muted); font-size: 14px; transition: transform .18s ease; }
.pending-recipe-toggle[aria-expanded="true"] .pending-recipe-chevron { transform: rotate(180deg); }
.pending-recipe-body { display: grid; gap: 2px; padding: 3px 7px 8px; border-top: 1px solid var(--line); }
.pending-recipe-ingredient { display: grid; grid-template-columns: minmax(0, 1fr) 56px auto 28px; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.pending-recipe-ingredient-name { min-width: 0; display: grid; gap: 1px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; }
.pending-recipe-ingredient-name span { overflow: hidden; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.pending-recipe-ingredient-name small { color: var(--violet-text); font-size: 9px; }
.pending-recipe-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.pending-recipe-actions button { min-height: 32px; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--violet) 40%, var(--line)); border-radius: 10px; background: transparent; color: var(--violet-text); font-size: 10px; font-weight: 700; }
.food-entry-composition-status { color: var(--violet-text) !important; font-size: 9px !important; font-weight: 700; }
.pending-food-bar .primary-action { margin-top: 10px; }
.pending-recipe-action { width: 100%; min-height: 40px; margin-top: 8px; border: 1px dashed var(--violet); border-radius: 13px; background: transparent; color: var(--violet-text); font-size: 12px; font-weight: 700; }
.product-details-pending { display: grid; gap: 8px; margin: 14px 0 0; padding: 11px 12px; border-radius: 14px; background: var(--violet-soft); color: var(--text); font-size: 13px; }
.details-pending-heading { font-weight: 700; }
.details-pending-items { display: grid; gap: 4px; }
.details-pending-item, .details-pending-more { overflow-wrap: anywhere; color: var(--text); font-size: 12px; line-height: 1.35; }
.details-pending-more { color: var(--muted); font-weight: 650; }
.food-sheet.is-keyboard-open:not(.is-pending-amount-editing) .pending-food-list { display: none !important; }
.food-sheet.is-keyboard-open:not(.is-pending-amount-editing) .pending-recipe-action { display: none !important; }
.food-sheet.is-keyboard-open .pending-summary { min-width: 0; }
.food-sheet.is-keyboard-open .pending-thumbs { display: none; }
.food-sheet.is-keyboard-open .pending-food-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 16px; }
.food-sheet.is-keyboard-open .pending-food-bar .primary-action { width: auto; min-height: 40px; margin: 0; padding: 0 14px; white-space: nowrap; }
.food-sheet.is-keyboard-open.is-pending-amount-editing .pending-food-bar { display: flex; flex-direction: column; align-items: stretch; max-height: min(52dvh, 320px); padding: 8px; }
.food-sheet.is-keyboard-open.is-pending-amount-editing .pending-summary,
.food-sheet.is-keyboard-open.is-pending-amount-editing .pending-recipe-action,
.food-sheet.is-keyboard-open.is-pending-amount-editing .pending-food-bar .primary-action { display: none !important; }
.food-sheet.is-keyboard-open.is-pending-amount-editing .pending-food-list { width: 100%; min-height: 0; max-height: none; flex: 1 1 auto; margin-top: 0; overflow-y: auto; }
.food-sheet.is-voice-review .pending-food-list,
.food-sheet.is-voice-review .pending-food-bar .primary-action,
.food-sheet.is-voice-review .pending-summary-chevron { display: none !important; }
.food-sheet.is-voice-review .pending-food-bar { padding: 7px 9px; border-color: var(--line); box-shadow: none; }
.food-sheet.is-voice-review .pending-summary { pointer-events: none; }
.product-quick-add.is-added { background: color-mix(in srgb, #43865a 20%, var(--surface)); color: #78c68e; }
.primary-action, .delete-action { width: 100%; min-height: 48px; margin-top: 15px; border-radius: 16px; font-weight: 650; }
.primary-action { border: 0; background: var(--violet); color: var(--violet-ink); }
.delete-action { border: 1px solid var(--coral); background: transparent; color: var(--coral); }
.delete-confirm { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.delete-confirm p { margin-bottom: 12px; font-size: 13px; }
.delete-confirm div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.delete-confirm button { min-height: 42px; border: 1px solid var(--line); border-radius: 13px; background: transparent; color: var(--text); }
.delete-confirm button:last-child { border-color: var(--coral); color: var(--coral); }

.profile-backdrop { position: fixed; z-index: 38; inset: 0; background: rgba(23, 18, 31, .54); backdrop-filter: blur(4px); }
.profile-sheet { position: fixed; z-index: 39; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(96dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 30px 30px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -24px 70px var(--shadow); }
.profile-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.profile-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.profile-sheet header h2 { margin-top: 2px; font-size: 20px; letter-spacing: -.02em; }
.profile-sheet.is-settings-only [data-profile-form] > :not(.theme-settings) { display: none !important; }
.profile-sheet:not(.is-settings-only) .theme-settings { display: none; }
.compact-profile-sheet { display: grid; gap: 14px; }
.compact-profile-sheet header > div { min-width: 0; }
.coach-empty-card { display: grid; justify-items: center; gap: 9px; padding: 24px 18px; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); text-align: center; }
.coach-empty-card h3 { margin: 0; font-size: 18px; }
.coach-empty-card p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.coach-empty-card .primary { width: 100%; margin-top: 5px; }
.coach-empty-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 18px; background: var(--violet-soft); color: var(--violet-text); font-size: 23px; }
.coach-empty-icon.is-active { background: color-mix(in srgb, var(--mint) 70%, var(--surface)); color: #278466; }
.coach-connect-inline { display: grid; gap: 12px; margin-top: 12px; }
.coach-connect-inline > label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.coach-connect-inline fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.coach-connect-inline legend { margin-bottom: 2px; font-size: 12px; font-weight: 750; }
.coach-invite-preview { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(159, 119, 255, .32); border-radius: 18px; background: rgba(116, 74, 220, .1); }
.coach-invite-preview > span:last-child { display: grid; gap: 3px; }
.coach-invite-preview small { color: var(--muted); }
.permission-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.permission-row input { width: 20px; min-height: 20px; accent-color: var(--violet); }
.permission-row span { display: grid; gap: 2px; }
.permission-row strong { font-size: 12px; }
.permission-row small { color: var(--muted); font-size: 9.5px; }
.connected-trainer-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.connected-trainer-card > span:last-child { display: grid; gap: 3px; }
.connected-trainer-card strong { font-size: 16px; }
.connected-trainer-card small { color: var(--muted); font-size: 10px; }
[data-trainer-invite-body] { display: grid; gap: 12px; }
[data-trainer-invite-lead] { color: var(--text); font-size: 14px; line-height: 1.45; }
[data-trainer-invite-intro] { display: grid; gap: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
[data-trainer-invite-body] .primary-action { margin-top: 2px; }
.trainer-invite-list { display: grid; gap: 6px; margin: 0; padding-left: 20px; color: var(--text); font-size: 13px; }
.trainer-invite-later { width: 100%; min-height: 46px; margin-top: 9px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font-weight: 650; }
.profile-action-row { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between; margin-top: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font-weight: 700; }
.profile-action-row b { color: var(--violet-text); font-size: 20px; }
.coach-permissions-summary { display: grid; gap: 6px; margin-top: 8px; padding: 13px; border-radius: 16px; background: var(--surface); }
.coach-permissions-summary span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.coach-permissions-summary b { color: var(--text); }
.profile-kicker { color: var(--violet-text); font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.profile-intro { max-width: 410px; margin: 15px auto 4px; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: center; }
.profile-group { margin-top: 16px; }
.profile-group legend { margin-top: 0; }
.profile-section { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.profile-section > legend { padding: 0 5px; color: var(--text); font-size: 14px; font-weight: 750; }
.profile-section > p { margin: 0 0 10px; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--muted); font-size: 12px; }
.segmented input:checked + span { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); font-weight: 700; }
.segmented input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.profile-numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-numbers .field-label small { min-height: 26px; color: var(--muted); font-size: 9px; line-height: 1.25; }
.profile-numbers input:read-only { background: color-mix(in srgb, var(--page) 78%, var(--surface)); color: var(--muted); }
.profile-current-weight-field { grid-column: 1 / -1; }
.profile-activity-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.profile-activity-grid .field-label { margin: 0; }
.target-weight-field[hidden] { display: none; }
.weight-projection { margin-top: 12px; padding: 15px; border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-radius: 20px; background: linear-gradient(145deg, var(--violet-soft), color-mix(in srgb, var(--surface) 82%, var(--page))); }
.weight-projection > header { display: flex; justify-content: space-between; align-items: baseline; }
.weight-projection > header span { font-size: 14px; font-weight: 750; }
.weight-projection > header small { color: var(--violet-text); font-size: 9px; font-weight: 700; }
.weight-projection > p { margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.weight-projection > div > strong { display: block; margin-top: 13px; font-size: 23px; letter-spacing: -.03em; }
.projection-primary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.projection-primary > span { display: grid; gap: 4px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.projection-primary small { color: var(--muted); font-size: 9px; line-height: 1.25; }
.projection-primary b { font-size: 12px; }
.weight-projection details, .calculation-details { margin-top: 11px; border-top: 1px solid var(--line); padding-top: 10px; }
.weight-projection summary, .calculation-details summary { color: var(--violet-text); font-size: 11px; font-weight: 700; cursor: pointer; }
.weight-projection dl { display: grid; gap: 7px; margin: 10px 0; }
.weight-projection dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; }
.weight-projection dt { color: var(--muted); }
.weight-projection dd { margin: 0; font-weight: 700; }
.weight-projection details p, .calculation-details p { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.weight-projection footer { margin-top: 11px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.manual-goals { margin-top: 12px; }
.manual-goals > p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.manual-goals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.goal-recommendation { min-height: 14px; color: var(--violet-text); font-size: 9.5px; font-weight: 650; line-height: 1.3; }
.theme-settings { padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.calculation-details { padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.theme-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.theme-selector label { position: relative; }
.theme-selector input { position: absolute; opacity: 0; pointer-events: none; }
.theme-selector span { min-height: 54px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 5px 3px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); color: var(--muted); font-size: 10px; text-align: center; }
.theme-selector i { color: inherit; font-size: 15px; font-style: normal; }
.theme-selector input:checked + span { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-text); font-weight: 700; }
.theme-selector input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.theme-note { margin: 8px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.profile-result { display: grid; gap: 5px; margin-top: 15px; padding: 16px; border-radius: 20px; background: linear-gradient(145deg, var(--violet-soft), color-mix(in srgb, var(--cream) 65%, var(--surface))); }
.profile-result > span { color: var(--violet-text); font-size: 11px; font-weight: 700; }
.profile-result > strong { font-size: 22px; letter-spacing: -.025em; }
.profile-result > strong b { font-size: 29px; }
.profile-result div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 5px; }
.profile-result small { display: grid; gap: 2px; color: var(--muted); font-size: 10px; }
.profile-result small b { color: var(--text); font-size: 12px; }
.profile-result p { margin-top: 7px; color: var(--coral); font-size: 11px; line-height: 1.4; }
.profile-error { margin-top: 12px; padding: 11px 13px; border-radius: 14px; background: color-mix(in srgb, var(--coral) 14%, var(--surface)); color: var(--coral); font-size: 12px; }
.calculation-note { margin: 10px 6px 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }

.weight-backdrop { position: fixed; z-index: 34; inset: 0; background: rgba(23, 18, 31, .44); backdrop-filter: blur(3px); }
.weight-sheet { position: fixed; z-index: 35; left: 50%; bottom: 0; width: min(100%, 520px); transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.weight-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.weight-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.weight-intro { margin: 14px 4px 3px; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.weight-input { display: grid; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.weight-input input { width: 100%; min-height: 72px; border: 1px solid var(--line); border-radius: 20px; padding: 0 16px; background: var(--surface); color: var(--text); font-size: 32px; font-weight: 750; letter-spacing: -.03em; text-align: center; }

.measurement-backdrop { position: fixed; z-index: 36; inset: 0; background: rgba(23, 18, 31, .44); backdrop-filter: blur(3px); }
.measurement-sheet { position: fixed; z-index: 37; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(94dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.measurement-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.measurement-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.measurement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.measurement-grid .field-label:first-child { grid-column: auto; }

.workout-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(23, 18, 31, .48); backdrop-filter: blur(3px); }
.workout-sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(94dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.workout-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.workout-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.workout-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.field-label textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 15px; padding: 12px 13px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 1.45; }
.workout-hint { margin: 8px 4px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }

.today-activity-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.today-activity-card header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.today-activity-card header div { display: grid; gap: 2px; }
.today-activity-card header h2 { margin: 0; color: var(--text); font-size: 16px; font-weight: 700; }
.today-activity-card header button { min-height: 38px; border: 0; border-radius: 14px; padding: 0 13px; background: var(--violet-soft); color: var(--violet-text); font-size: 13px; font-weight: 700; }
.today-activity-list { display: grid; gap: 8px; margin-top: 12px; }
.today-activity-list p { color: var(--muted); font-size: 12px; }
.today-activity-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--line); padding: 11px 0 0; background: transparent; color: var(--text); text-align: left; }
.today-activity-item span { display: grid; gap: 3px; }
.today-activity-item small { color: var(--muted); font-size: 10px; }
.today-activity-item b { color: var(--violet-text); }
.activity-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(23, 18, 31, .48); backdrop-filter: blur(3px); }
.activity-sheet { position: fixed; z-index: 41; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(94dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.activity-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.activity-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.activity-delete { width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid color-mix(in srgb, var(--coral) 55%, var(--line)); border-radius: 15px; background: transparent; color: var(--coral); font-weight: 700; }

.help-backdrop { position: fixed; z-index: 42; inset: 0; background: rgba(23, 18, 31, .5); backdrop-filter: blur(3px); }
.help-sheet { position: fixed; z-index: 43; left: 50%; bottom: 0; width: min(100%, 520px); max-height: min(94dvh, calc(var(--dnevio-screen-height) - var(--dnevio-safe-top))); overflow-y: auto; transform: translateX(-50%); border-radius: 28px 28px 0 0; padding: 9px 16px calc(24px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.help-sheet header { position: sticky; z-index: 2; top: -9px; display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; padding: 9px 0 8px; background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(10px); text-align: center; }
.help-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.help-sheet header span { color: var(--violet-text); font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.help-sheet header h2 { margin-top: 2px; font-size: 19px; letter-spacing: -.02em; }
.help-intro { margin: 9px 4px 14px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.help-sheet h3 { margin: 0 0 10px; font-size: 15px; }
.help-start { padding: 15px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); }
.help-start ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: help-step; }
.help-start li { position: relative; display: grid; gap: 3px; min-height: 34px; padding-left: 43px; counter-increment: help-step; }
.help-start li::before { content: counter(help-step); position: absolute; left: 0; top: 0; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 11px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 750; }
.help-start b { font-size: 12px; }
.help-start span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.help-faq { margin-top: 18px; }
.help-faq details { border-bottom: 1px solid var(--line); }
.help-faq details:first-of-type { border-top: 1px solid var(--line); }
.help-faq summary { position: relative; padding: 15px 28px 15px 2px; color: var(--text); font-size: 13px; font-weight: 650; list-style: none; cursor: pointer; }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary::after { content: '＋'; position: absolute; right: 3px; top: 14px; color: var(--muted); font-size: 16px; font-weight: 400; }
.help-faq details[open] summary::after { content: '−'; }
.help-faq details p { padding: 0 28px 15px 2px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.school-backdrop { position: fixed; z-index: 44; inset: 0; background: rgba(23, 18, 31, .46); backdrop-filter: blur(3px); }
.school-sheet { position: fixed; z-index: 45; left: 50%; bottom: 0; width: min(100%, 520px); transform: translateX(-50%); border-radius: 26px 26px 0 0; padding: 9px 16px calc(22px + var(--dnevio-safe-bottom)); background: var(--page); box-shadow: 0 -20px 60px var(--shadow); }
.school-sheet header { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; text-align: center; }
.school-sheet header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.school-sheet header span { color: var(--coral); font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.school-sheet header h2 { margin-top: 2px; font-size: 19px; letter-spacing: -.02em; }
.school-sheet > p { max-width: 390px; margin: 14px auto 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.school-action { min-height: 48px; display: grid; place-items: center; margin-top: 15px; border-radius: 16px; background: var(--coral); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }

/* Today screen */
.app-header { position: relative; min-height: 46px; align-items: center; }
.app-header:not(.is-utility) { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: start; }
.app-header:not(.is-utility) .today-heading { grid-column: 1 / -1; grid-row: 1; }
.app-header:not(.is-utility) > .avatar { grid-column: 2; grid-row: 1; align-self: start; }
.app-header:not(.is-utility) > .demo-badge { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
.today-heading { min-width: 0; width: 100%; }
.today-heading .today-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 42px; padding-right: 52px; flex-wrap: nowrap; }
.today-heading .today-title-row h1, .today-heading .rhythm-chip { flex-shrink: 0; white-space: nowrap; }
.today-meta-row { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 4px; }
.today-heading .today-meta-row p { margin: 0; color: var(--muted); font-size: 12px; }
.today-meta-row > button { flex-shrink: 0; }
.today-heading h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.today-heading p { color: #71849a; font-size: 14px; text-transform: capitalize; white-space: nowrap; }
.avatar { width: 42px; height: 42px; font-size: 16px; }

.day-navigation { grid-template-columns: 24px minmax(0, 1fr) 24px; margin: 7px 0 10px; padding: 3px 5px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 18px; background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: 0 5px 16px color-mix(in srgb, var(--shadow) 35%, transparent); }
.day-navigation > button { color: #29445d; }
.day-strip { grid-template-columns: repeat(7, 1fr); gap: 2px; }
.day-button { min-width: 0; min-height: 54px; display: grid; place-content: center; gap: 2px; border-radius: 14px; padding: 5px 1px; color: #63778d; }
.day-button span { font-size: 9px; text-transform: capitalize; }
.day-button strong { margin: 0; color: #34495e; font-size: 14px; }
.day-button[aria-pressed="true"] { color: #fff; background: linear-gradient(145deg, #7b5bea, #5c3dcc); box-shadow: 0 6px 14px color-mix(in srgb, var(--violet) 34%, transparent); }
.day-button[aria-pressed="true"] strong { color: #fff; }

.nutrition-card { margin: 0; padding: 12px 15px; border-color: color-mix(in srgb, var(--violet) 15%, var(--line)); border-radius: 20px; background: color-mix(in srgb, var(--violet-soft) 38%, var(--surface)); cursor: default; box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow) 28%, transparent); }
.calorie-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.remaining-calories { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 7px; row-gap: 1px; }
.remaining-calories > small { color: var(--violet-text); font-size: 14px; font-weight: 700; }
.remaining-calories strong { color: var(--violet-text); font-size: clamp(20px, 6.2vw, 27px); line-height: 1; letter-spacing: -.04em; }
.remaining-calories strong b { font: inherit; }
.remaining-calories > i { grid-column: 1 / -1; color: #40556c; font-size: 13px; font-style: normal; }
.daily-percent { display: grid; justify-items: center; gap: 1px; min-width: 64px; }
.daily-percent strong { display: flex; align-items: center; gap: 4px; font-size: 20px; }
.daily-percent strong i { font-size: 18px; font-style: normal; }
.goal-flame-slot { display: inline-flex; width: 22px; height: 24px; align-items: center; justify-content: center; }
[data-goal-flame] { display: inline-block; transform: scale(var(--goal-flame-scale, .22)); transform-origin: center bottom; transition: transform .25s ease; }
.rhythm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: transparent; color: var(--text); font-size: 12px; min-height: 36px; }
.rhythm-chip svg { width: 22px; height: 22px; color: var(--text); opacity: .85; flex-shrink: 0; }
.rhythm-chip b { font-variant-numeric: tabular-nums; }
.rhythm-screen { padding-bottom: 30px; }
.rhythm-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rhythm-header h1 { margin: 0; font-size: 26px; }
.rhythm-header button { border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 44px; height: 44px; border-radius: 50%; font-size: 24px; }
.rhythm-hero { display: grid; justify-items: center; padding: 18px 0 24px; }
.rhythm-hero > strong { font-size: 72px; line-height: 1.1; letter-spacing: -.06em; }
.rhythm-hero > span { color: var(--muted); }
.rhythm-card { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 18px; margin: 12px 0; }
.rhythm-card h2 { margin: 0 0 16px; font-size: 16px; }
.rhythm-card p, .rhythm-note, [data-rhythm-status] { color: var(--muted); font-size: 13px; line-height: 1.5; }
.rhythm-week { list-style: none; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; margin: 0; padding: 0; }
.rhythm-week li { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); border-radius: 12px; padding: 8px 0; }
.rhythm-week li.is-today { background: var(--violet-soft); }
.rhythm-week li.is-completed { color: var(--text); }
.rhythm-day-dot { font-size: 21px; line-height: 27px; }
.rhythm-plant { display: grid; place-items: center; color: var(--text); padding: 20px 0 8px; }
.rhythm-plant svg { width: 110px; height: 110px; }
.rhythm-plant.is-flowering svg { width: 130px; height: 130px; }
.rhythm-plant-caption { text-align: center; max-width: 290px; margin: 8px auto; }
.rhythm-note { font-size: 11px; }
.rhythm-retry { border: 0; background: transparent; color: var(--muted); padding: 10px 0; font-size: 12px; }
.rhythm-screen-open .bottom-nav { display: none; }
@media (prefers-reduced-motion: reduce) { [data-goal-flame] { transition: none; } }
.daily-percent strong b { font: inherit; }
.daily-percent small { color: #71849a; font-size: 11px; }
.nutrition-card .progress { height: 7px; margin: 8px 0 9px; }
.macros { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.macros > span { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; padding: 0 6px; overflow: hidden; border-left: 1px solid var(--line); }
.macros > span:first-child { padding-left: 0; border-left: 0; }
.macros > span:last-child { padding-right: 0; }
.macros label { color: #52677d; font-size: 11px; font-weight: 750; }
.macros b { color: var(--text); font-size: 14px; }
.macros small { overflow: visible; color: #71849a; font-size: 12px; text-overflow: clip; white-space: nowrap; }
.macros em { flex-basis: 100%; display: block; height: 3px; margin-top: 2px; }

.vio-insight { width: 100%; min-height: 44px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 16px; gap: 8px; align-items: center; margin: 9px 0 10px; padding: 5px 10px; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--violet) 9%, var(--surface)); color: var(--text); text-align: left; }
.vio-insight .vio-mini, .progress-insight .vio-mini { width: 34px; height: 34px; display: block; overflow: hidden; border: 1px solid color-mix(in srgb, var(--violet) 20%, var(--line)); border-radius: 10px; background-color: color-mix(in srgb, var(--violet) 11%, var(--surface)); background-image: url('/assets/vio/vio-mini-v3.png'); background-position: center; background-size: 94%; background-repeat: no-repeat; animation: none; box-shadow: 0 2px 7px color-mix(in srgb, #4f35ad 22%, transparent); }
.vio-insight .vio-mini-face, .progress-insight .vio-mini-face { display: none; }
.vio-insight > span:nth-child(2) { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vio-insight strong { color: var(--violet-text); }
.vio-insight i { font-style: normal; }
.vio-insight > b { color: var(--violet-text); font-size: 22px; }

.meal-list { --meal-columns: minmax(0, 1fr) repeat(3, 34px) 45px 27px; display: grid; gap: 8px; overflow: visible; border: 0; border-radius: 0; background: transparent; padding: 0; }
.meal-section { position: relative; padding: 8px 11px 9px; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 18px; background: var(--surface); box-shadow: 0 5px 15px color-mix(in srgb, var(--shadow) 25%, transparent); }
.meal-heading-row { min-height: 34px; }
.meal-heading-main { grid-column: 1; }
.meal-section:not(.has-entries) .meal-heading-main { grid-column: 1; }
.meal-title { color: #111827; font-size: 18px; letter-spacing: -.02em; }
:root[data-theme="dark"] .meal-title { color: var(--text); }
.meal-summary-value { display: grid; justify-items: end; gap: 1px; color: var(--text); }
.meal-summary-value small { color: #71849a; font-size: 11px; font-weight: 700; }
.meal-summary-value b { font-size: 13px; }
.meal-heading-row .meal-collapse { grid-column: 6; }
.meal-heading-row.meal-heading-empty { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 44px; }
.meal-heading-empty .meal-add { width: auto; min-height: 44px; padding: 0 10px; font-size: 12px; }
.meal-heading-row.meal-heading-empty:has(.meal-collapse) { grid-template-columns: minmax(0, 1fr) auto 27px; }
.meal-heading-row.meal-heading-empty .meal-collapse { grid-column: 3; }
.meal-collapse { width: 27px; height: 27px; color: #29445d; font-size: 13px; }
.meal-add { width: 100%; min-height: 34px; border: 0; border-radius: 13px; background: color-mix(in srgb, var(--violet) 11%, var(--surface)); color: var(--violet-text); font-size: 13px; font-weight: 750; }
.meal-footer { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; margin-top: 4px; }
.meal-more, .food-actions { position: relative; }
.meal-more summary, .food-actions summary { list-style: none; cursor: pointer; }
.meal-more summary::-webkit-details-marker, .food-actions summary::-webkit-details-marker { display: none; }
.meal-more > summary { width: 34px; min-height: 34px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: var(--page); font-size: 11px; letter-spacing: 1px; }
.meal-more > div, .food-actions > div { position: absolute; z-index: 8; right: 0; bottom: calc(100% + 5px); min-width: 150px; display: grid; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 28px var(--shadow); }
.meal-more > .context-menu-popover.is-positioned, .food-actions > .context-menu-popover.is-positioned { position: fixed; z-index: 60; right: auto; bottom: auto; min-width: min(168px, calc(100vw - 16px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.meal-more button, .food-actions button { min-height: 34px; border: 0; border-radius: 9px; padding: 0 10px; background: transparent; color: var(--text); font-size: 10.5px; text-align: left; }
.meal-more button:active, .food-actions button:active { background: var(--violet-soft); }
.empty-meal { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(112px, .75fr); gap: 7px; align-items: center; margin-top: 3px; }
.empty-meal > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--page); color: #71849a; font-size: 15px; }
.empty-meal > span:nth-child(2) { min-width: 0; color: #71849a; font-size: 14px; line-height: 1.25; white-space: nowrap; text-overflow: clip; overflow: hidden; }
:root[data-theme="dark"] .empty-meal > span:first-child,
:root[data-theme="dark"] .empty-meal > span:nth-child(2) { color: var(--muted); }

.food-entry-row { border-top: 1px solid color-mix(in srgb, var(--line) 68%, transparent); }
.food-entry-content { grid-template-columns: minmax(0, 1fr) 27px; }
.food-entry { grid-template-columns: minmax(0, 1fr) repeat(3, 34px) 45px; grid-template-rows: auto; gap: 2px; padding: 6px 0; }
.food-entry-details { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 37px minmax(0, 1fr); gap: 7px; align-items: center; }
.food-thumbnail { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--page); font-size: 20px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 65%, transparent); }
.food-entry-copy { min-width: 0; display: grid; gap: 1px; }
.food-entry-details b { overflow: hidden; font-size: 14px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.food-entry-details small { color: #71849a; font-size: 12px; }
.food-nutrient-value { grid-row: 1; color: #63778d; font-size: 12px; }
.food-nutrient-value.is-protein { grid-column: 2; grid-row: 1; }
.food-nutrient-value.is-fat { grid-column: 3; grid-row: 1; }
.food-nutrient-value.is-carbs { grid-column: 4; grid-row: 1; }
.food-nutrient-value.is-calories { grid-column: 5; grid-row: 1; font-size: 12.5px; }
.food-actions > summary { width: 27px; height: 35px; display: grid; place-items: center; color: #29445d; font-size: 18px; }
.food-actions > div { z-index: 32; bottom: auto; top: calc(100% + 2px); }
.food-entry-row.has-open-actions { z-index: 30; overflow: visible; }
.food-entry-row.has-open-actions .food-entry-content { z-index: 31; transform: none; will-change: auto; }
:root[data-theme="dark"] .nutrition-card :is(.remaining-calories > small, .remaining-calories strong, .remaining-calories > i, .daily-percent strong, .daily-percent small, .macros label, .macros b, .macros small) { color: #fff; }
:root[data-theme="dark"] .food-actions > summary, :root[data-theme="dark"] .meal-collapse { color: #f1f7f7; }
.meal-section.is-collapsed .food-entry-row, .meal-section.is-collapsed .meal-footer, .meal-section.is-collapsed .empty-meal { display: none; }
.meal-section.is-collapsed .planned-meal, .meal-section.is-collapsed .meal-additional-label { display: none; }
.meal-plan-chip { min-height: 28px; max-width: 170px; padding: 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.meal-plan-chip.is-active { border-color: color-mix(in srgb, var(--violet) 45%, var(--line)); background: var(--violet-soft); color: var(--violet-text); }
.meal-plan-sheet { gap: 12px; }
.meal-plan-lead { color: var(--muted); font-size: 12px; line-height: 1.45; }
.meal-plan-options { display: grid; gap: 8px; }
.meal-plan-option { width: 100%; min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--text); text-align: left; }
.meal-plan-option[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); }
.meal-plan-option span { min-width: 0; display: grid; gap: 4px; }
.meal-plan-option strong { font-size: 14px; }
.meal-plan-option small { color: var(--muted); font-size: 10.5px; line-height: 1.35; }
.meal-plan-option > b { color: var(--violet-text); font-size: 18px; text-align: center; }
.adaptive-plan-goals, .adaptive-plan-meal { padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--text); min-width: 0; }
.adaptive-plan-goals p { margin: 8px 0; font-size: 15px; }
.adaptive-plan-goals small, .adaptive-plan-meal small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.adaptive-plan-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.adaptive-plan-day, .adaptive-plan-back { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 4px; font: inherit; }
.adaptive-plan-day[aria-pressed="true"] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-text); }
.adaptive-plan-back { padding: 8px 12px; justify-self: start; }
.adaptive-plan-meal h4 { margin: 0 0 8px; }
.adaptive-plan-meal details { margin: 8px 0; font-size: 14px; }
.adaptive-plan-meal summary { cursor: pointer; min-height: 32px; }
.adaptive-plan-meal details img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; }
.adaptive-plan-meal details ul { padding-left: 18px; }
.adaptive-plan-meal details li { margin-bottom: 6px; }
.adaptive-plan-add { width: 100%; min-height: 44px; margin-top: 10px; white-space: normal; }
.meal-plan-sheet { gap: 8px; }
.meal-plan-options { gap: 10px; }
.meal-plan-options > h3 { margin: 0; font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.adaptive-plan-goals { background: linear-gradient(125deg, color-mix(in srgb, var(--violet) 13%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--violet) 24%, var(--line)); }
.adaptive-plan-goals .adaptive-target-calories { margin: 5px 0; font-size: 26px; font-weight: 750; letter-spacing: -.025em; }
.adaptive-plan-goals > small { margin-top: 8px; }
.adaptive-plan-goals-compact { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 12px; align-items: center; }
.adaptive-plan-goals-compact .adaptive-target-calories { margin: 0; font-size: 23px; }
.adaptive-plan-goals-compact .adaptive-macro-chips { grid-column: 1 / -1; }
.adaptive-plan-goals-compact > small { grid-column: 1 / -1; margin: 0; font-size: 11px; line-height: 1.35; }
.meal-heading-row[role="button"] { cursor: pointer; }
.meal-heading-row[role="button"]:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 12px; }
.pending-recipe-actions .is-choosing-ingredient, .recipe-ingredient-edit-banner { border-color: #49bd91; }
.pending-recipe-actions .is-choosing-ingredient { color: #72ddb2; background: color-mix(in srgb, #49bd91 12%, var(--surface)); }
.logged-recipe-catalog-warning { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.4; }
:root[data-theme="light"] .pending-recipe-actions .is-choosing-ingredient { color: #177747; }
.adaptive-macro-chips, .meal-plan-option .adaptive-macro-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.adaptive-macro-chip, .meal-plan-option .adaptive-macro-chip { display: inline-block; padding: 3px 6px; border-radius: 7px; background: color-mix(in srgb, var(--page) 65%, transparent); color: var(--muted); font-size: 11px; white-space: nowrap; }
.adaptive-macro-chip.is-calories { color: var(--text); font-weight: 650; }
.meal-plan-option { grid-template-columns: 72px minmax(0, 1fr) 14px; gap: 10px; padding: 12px; border-radius: 20px; box-shadow: 0 5px 18px color-mix(in srgb, var(--shadow) 35%, transparent); }
.adaptive-plan-copy { gap: 7px; }
.meal-plan-option strong { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.meal-plan-option:active, .adaptive-plan-add:active { transform: scale(.99); }
.adaptive-food-thumbnail { position: relative; width: 72px; height: 72px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; overflow: hidden; background: color-mix(in srgb, var(--violet) 7%, var(--page)); }
.adaptive-food-fallback { font-size: 27px; }
.adaptive-food-thumbnail img, .adaptive-plan-meal details .adaptive-food-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.adaptive-plan-meal { padding: 12px; border-radius: 20px; box-shadow: 0 5px 18px color-mix(in srgb, var(--shadow) 28%, transparent); }
.adaptive-plan-meal .adaptive-meal-heading { display: flex; min-height: 28px; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.meal-plan-sheet.is-detail > header .profile-kicker { display: none; }
.adaptive-meal-heading h4 { margin: 0; font-size: 17px; }
.adaptive-plan-meal details { margin: 0; padding: 9px 0; }
.adaptive-plan-meal details + details { border-top: 1px solid var(--line); }
.adaptive-food-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 12px; gap: 10px; align-items: center; list-style: none; }
.adaptive-food-row::-webkit-details-marker { display: none; }
.adaptive-food-copy { min-width: 0; display: grid; gap: 7px; }
.adaptive-food-copy strong { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.adaptive-food-row > b { color: var(--violet-text); }
.adaptive-plan-meal details[open] .adaptive-food-row > b { transform: rotate(90deg); }
.adaptive-plan-add { border: 1px solid color-mix(in srgb, var(--violet) 25%, var(--line)); border-radius: 12px; padding: 9px; background: color-mix(in srgb, var(--violet) 7%, var(--surface)); color: var(--violet-text); font: inherit; font-size: 13px; font-weight: 650; }
.adaptive-plan-day[aria-pressed="true"] { background: var(--violet); color: #fff; box-shadow: 0 3px 12px color-mix(in srgb, var(--violet) 22%, transparent); }
.meal-plan-option:focus-visible, .adaptive-food-row:focus-visible, .adaptive-plan-add:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
@media (max-width: 360px) {
  .meal-plan-option, .adaptive-food-row { grid-template-columns: 64px minmax(0, 1fr) 10px; gap: 7px; }
  .adaptive-food-thumbnail { width: 64px; height: 64px; }
}
.planned-meal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin: 5px 0; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--violet) 28%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--violet) 7%, var(--surface)); }
.planned-meal > span:first-child { min-width: 0; display: grid; gap: 2px; }
.planned-meal small { color: var(--violet-text); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.planned-meal strong { overflow: hidden; color: var(--text); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.planned-meal em { color: var(--muted); font-size: 10px; font-style: normal; }
.planned-meal > span:last-child { display: grid; gap: 4px; }
.planned-meal button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 9px; background: var(--violet); color: #fff; font-size: 9.5px; font-weight: 750; }
.planned-meal button + button { background: transparent; color: var(--violet-text); }
.planned-meal.is-logged { border-color: color-mix(in srgb, #43a96b 35%, var(--line)); background: color-mix(in srgb, #43a96b 8%, var(--surface)); }
.meal-additional-label { margin: 8px 0 2px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.bottom-nav { grid-template-columns: repeat(3, 1fr); }
.bottom-nav.has-training { grid-template-columns: repeat(4, 1fr); }
.training-import-cta { margin-top: 4px; }
.training-import-field { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.training-import-field textarea { width: 100%; min-height: 160px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; line-height: 1.4; resize: vertical; }
.training-import-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.diary-day-status { margin: 4px 2px 0; color: var(--muted); font-size: 12px; }
.training-review-meta { display: grid; gap: 8px; margin-top: 12px; }
.training-review-meta label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.training-review-meta input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.training-plan-targets label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 12px; }
[data-screen="training-plan-editor"] .training-plan-targets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-plan-target="targetWeightKg"] { grid-column: 1 / -1; }
[data-screen="training-plan-editor"] { padding-top: 12px; }
[data-screen="training-plan-editor"] input { font-size: 16px; }
.profile-menu [data-trainer-mode-state] { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.profile-menu [data-trainer-mode-toggle][aria-checked="true"] b { background: var(--violet-soft); color: var(--violet-text); border-color: var(--violet); }
.training-review-warnings { margin-top: 8px; color: var(--coral); font-size: 12px; }
.training-review-list { display: grid; gap: 10px; margin-top: 10px; }
.training-review-card { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.training-review-card-head { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 6px; align-items: center; }
.training-review-card-head input { min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--text); font: inherit; font-size: 14px; font-weight: 650; }
.training-review-sets { display: grid; gap: 5px; margin-top: 8px; }
.training-review-set { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 4px; align-items: center; }
.training-review-set input { min-height: 34px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--page); color: var(--text); font: inherit; font-size: 13px; text-align: center; }
.training-review-side { grid-column: span 4; color: var(--muted); font-size: 11px; }
.training-review-remove { width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--violet-soft); color: var(--violet-text); font-size: 16px; }
.training-review-add { justify-self: start; min-height: 32px; margin-top: 4px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 650; }
.training-review-note { margin-top: 6px; color: var(--coral); font-size: 11.5px; }
/* iOS Safari/WebView zooms on focus when a control renders below 16px.
   Keep every Training control at >= 16px (no viewport zoom disabling). */
.training-import-field textarea,
.training-review-meta input,
.training-review-card-head input,
.training-review-set input,
.training-plan-editor-card input,
.training-plan-targets input { font-size: 16px; }
.training-v2-list { display: grid; gap: 8px; margin-top: 10px; }
.training-v2-card { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.training-v2-card { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.training-v2-card:active { background: var(--violet-soft); }
.training-history-title { margin: 16px 0 0; font-size: 18px; }
.training-metrics-card { margin-top: 12px; }
.training-metrics-period { margin-top: 4px; color: var(--muted); font-size: 12px; }
.training-metrics-summary { display: grid; gap: 3px; margin-top: 8px; }
.training-metrics-summary span { font-size: 13.5px; }
.training-metrics-exercises { display: grid; gap: 6px; margin-top: 10px; }
.training-metrics-row { width: 100%; display: grid; gap: 2px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.training-metrics-row:active { background: var(--violet-soft); }
.training-metrics-row strong { font-size: 13.5px; }
.training-metrics-row small { color: var(--muted); font-size: 11.5px; }

.training-detail-actions { display: grid; gap: 6px; margin-top: 12px; }
.training-detail-action { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; text-align: left; cursor: pointer; }
.training-detail-action:active { background: var(--violet-soft); }
.training-detail-action.is-danger { color: var(--coral); }
.training-detail-status { margin-top: 12px; color: var(--muted); font-size: 13px; }
.training-detail-head { display: grid; gap: 2px; margin-top: 12px; }
.training-detail-head strong { font-size: 18px; }
.training-detail-head small { color: var(--muted); font-size: 12px; }
.training-detail-list { display: grid; gap: 10px; margin-top: 12px; }
.training-detail-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.training-detail-card.is-linkable { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.training-detail-card.is-linkable:active { background: var(--violet-soft); }
.training-detail-chevron { color: var(--muted); font-size: 18px; line-height: 1; }
.training-detail-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.training-detail-card header strong { font-size: 15px; }
.training-detail-card header small { color: var(--muted); font-size: 11.5px; }
.training-detail-sets { display: grid; gap: 4px; margin-top: 8px; }
.training-detail-set { font-size: 14px; }
.training-detail-set.is-warmup { color: var(--muted); font-size: 13px; }
.training-v2-card strong { font-size: 13px; }
.training-v2-card span { font-size: 14px; font-weight: 650; }
.training-v2-card small { color: var(--muted); font-size: 11.5px; }
@media (max-width: 360px) {
  .training-review-set { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
}

@media (max-width: 360px) {
  .meal-list { --meal-columns: minmax(0, 1fr) repeat(3, 28px) 39px 24px; }
  .food-entry { grid-template-columns: minmax(0, 1fr) repeat(3, 28px) 39px; }
  .food-entry-details { grid-template-columns: 31px minmax(0, 1fr); gap: 5px; }
  .food-thumbnail { width: 29px; height: 29px; font-size: 16px; }
  .food-entry-details b { font-size: 13px; }
  .meal-summary-value b, .food-nutrient-value { font-size: 11px; }
  .empty-meal { grid-template-columns: 28px minmax(0, 1fr) 112px; }
  .macros > span { padding-inline: 3px; }
  .macros label { font-size: 10px; }
  .macros b { font-size: 13px; }
  .macros small { font-size: 11px; }
  .bottom-nav.has-training button { padding: 7px 1px; font-size: 10.5px; }
  .bottom-nav.has-training button span { font-size: 15px; }
}

/* Vio V1 */
.vio-screen.is-active {
  display: flex;
  height: var(--dnevio-screen-height, 100vh);
  padding-top: var(--dnevio-safe-top);
  padding-left: var(--dnevio-safe-left);
  padding-right: var(--dnevio-safe-right);
  min-height: 0;
  overflow: hidden;
  animation: vio-screen-enter .22s cubic-bezier(.2, .72, .25, 1);
}
@keyframes vio-screen-enter { from { opacity: .58; transform: translateY(10px) scale(.985); } }
.vio-screen-shell { --vio-screen-bg: var(--page); --vio-screen-panel: var(--surface); --vio-screen-text: var(--text); --vio-screen-muted: var(--muted); width: 100%; min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: hidden; background: var(--vio-screen-bg); color: var(--vio-screen-text); }
.vio-screen-header { position: relative; z-index: 3; min-height: 47px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; border-bottom: 1px solid rgba(181, 191, 214, .14); background: color-mix(in srgb, var(--vio-screen-bg) 92%, transparent); backdrop-filter: blur(18px); }
.vio-header-action { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--vio-screen-text); font-size: 21px; }
.vio-header-action:last-child { justify-self: end; font-size: 15px; letter-spacing: 1px; }
.vio-header-title { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.vio-header-title h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.vio-header-mini { width: 29px; overflow: hidden; opacity: 1; }
.vio-header-mini .vio-mini { width: 29px; height: 29px; display: block; overflow: hidden; border: 1px solid rgba(174, 145, 255, .2); border-radius: 9px; background-color: rgba(116, 74, 220, .14); background-image: url('/assets/vio/vio-mini-v3.png'); background-position: center; background-size: 96%; background-repeat: no-repeat; box-shadow: 0 2px 7px rgba(79, 53, 173, .22); }
.vio-header-mini .vio-mini-face { display: none; }
.vio-screen-shell.is-hero-collapsed .vio-header-mini { width: 29px; opacity: 1; transform: scale(1); }
.vio-chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 2px 20px; scroll-padding-bottom: 22px; }
.vio-hero { max-height: 154px; display: grid; justify-items: center; gap: 1px; overflow: hidden; opacity: 1; transition: max-height .3s ease, opacity .2s ease, transform .3s ease, margin .3s ease; }
.vio-character { position: relative; width: min(100%, 430px); height: 142px; display: grid; place-items: center; overflow: hidden; border-radius: 0 0 28px 28px; background: var(--vio-screen-bg); isolation: isolate; }
.vio-character::before { content: ''; position: absolute; z-index: 0; inset: -12px; background: linear-gradient(rgba(5, 8, 20, .28), rgba(9, 13, 25, .48)), url('/assets/vio/vio-hero-v1.webp') center 57% / cover no-repeat; filter: blur(8px) saturate(.82); opacity: .78; transform: scale(1.08); pointer-events: none; }
.vio-character::after { content: ''; position: absolute; z-index: 2; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, var(--vio-screen-bg)); pointer-events: none; }
.vio-hero-art { position: relative; z-index: 1; width: 142px; height: 142px; display: block; object-fit: contain; object-position: center; transform-origin: center 72%; animation: none; }
.vio-screen-shell.is-hero-collapsed .vio-hero { max-height: 0; margin-bottom: -2px; opacity: 0; transform: translateY(-16px); pointer-events: none; }
.vio-conversation { display: grid; gap: 11px; align-content: start; padding: 0 7px; }
.vio-message { min-width: 0; max-width: 88%; display: grid; gap: 5px; }
.vio-message[data-role="vio"] { justify-self: start; }
.vio-message[data-role="user"] { justify-self: end; }
.vio-message-author { display: flex; align-items: center; gap: 6px; padding-left: 2px; color: #b58aff; font-size: 10.5px; }
.vio-message-author > b { font-weight: 650; }
.vio-message-avatar { width: 24px; height: 24px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(174, 145, 255, .18); border-radius: 8px; background-color: rgba(116, 74, 220, .13); background-image: url('/assets/vio/vio-mini-v3.png'); background-position: center; background-size: 97%; background-repeat: no-repeat; box-shadow: 0 2px 6px rgba(79, 53, 173, .2); }
.vio-message-avatar .vio-mini-face { display: none; }
.vio-message-bubble { padding: 9px 11px; border-radius: 14px 14px 14px 5px; background: var(--vio-screen-panel); color: var(--vio-screen-text); box-shadow: 0 7px 22px rgba(0, 0, 0, .18); font-size: 13px; line-height: 1.43; }
.vio-message[data-role="user"] .vio-message-bubble { border-radius: 14px 14px 5px 14px; background: var(--violet); color: #fff; }
.vio-suggestions { display: flex; flex-wrap: nowrap; gap: 6px; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 3px; }
.vio-suggestions button { flex: 0 0 auto; min-height: 44px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--violet) 45%, var(--line)); border-radius: 999px; background: transparent; color: var(--violet-text); font-size: 12px; font-weight: 550; white-space: nowrap; }
.vio-food-recommendation { display: grid; gap: 8px; padding: 11px; border: 1px solid rgba(165, 112, 255, .28); border-radius: 14px; background: color-mix(in srgb, var(--vio-screen-panel) 88%, var(--violet) 12%); box-shadow: 0 7px 22px rgba(0, 0, 0, .12); }
.vio-food-recommendation > strong { color: var(--vio-screen-text); font-size: 12px; font-weight: 650; }
.vio-food-recommendation-items { display: grid; gap: 3px; }
.vio-food-recommendation-items span { color: var(--vio-screen-text); font-size: 11px; line-height: 1.35; }
.vio-food-recommendation > small { color: var(--vio-screen-muted); font-size: 10px; line-height: 1.35; }
.vio-food-recommendation > button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 11px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 650; }
.vio-photo-result { display: grid; gap: 8px; padding: 11px; border: 1px solid rgba(165, 112, 255, .28); border-radius: 14px; background: color-mix(in srgb, var(--vio-screen-panel) 88%, var(--violet) 12%); box-shadow: 0 7px 22px rgba(0, 0, 0, .12); }
.vio-photo-result > strong { color: var(--vio-screen-text); font-size: 12px; font-weight: 650; }
.vio-photo-result > p, .vio-photo-result > small { margin: 0; color: var(--vio-screen-muted); font-size: 10px; line-height: 1.4; }
.vio-photo-result-items { display: grid; gap: 4px; }
.vio-photo-result-items span { color: var(--vio-screen-text); font-size: 11px; line-height: 1.4; }
.vio-photo-result-items .is-unmatched { color: var(--vio-screen-muted); }
.vio-photo-result > button { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 11px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 650; }
.photo-food-review { display: grid; gap: 12px; padding: 16px; margin: 12px 0; border: 1px solid color-mix(in srgb, var(--violet) 45%, var(--line)); border-radius: 20px; background: var(--surface); }
.photo-food-review p { margin: 0; line-height: 1.5; font-size: 13px; }
.photo-food-review .muted { color: var(--muted); }
.photo-food-review-row { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.photo-food-review label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.photo-food-review input:not([type="checkbox"]) { width: 100%; min-width: 0; box-sizing: border-box; min-height: 48px; padding: 10px 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.photo-food-review button { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 650; white-space: normal; }
.photo-food-review button.primary-button { background: var(--violet); border-color: var(--violet); color: var(--violet-ink); }
.photo-food-review button:disabled { opacity: .6; }
.photo-food-review-actions, .photo-food-review-results { display: grid; gap: 8px; }
.photo-food-review-ingredient { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin-bottom: 10px; }
.photo-food-review .photo-food-review-confirm { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.photo-food-review-confirm input { flex: 0 0 auto; width: 22px; height: 22px; }
.photo-food-review-error { color: var(--danger, #df7777); }
.food-sheet[data-mode="details"] .photo-food-review { display: none; }
.vio-feedback { display: flex; gap: 3px; margin-top: -2px; padding-left: 5px; }
.vio-feedback button { width: 27px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--vio-screen-muted); font-size: 13px; opacity: .62; }
.vio-feedback button[aria-pressed="true"] { background: rgba(135, 88, 235, .2); opacity: 1; }
.vio-feedback button:disabled { cursor: wait; }
.vio-composer { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 38px 38px; gap: 6px; align-items: center; padding: 8px 2px calc(8px + var(--dnevio-safe-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--vio-screen-bg) 93%, transparent); backdrop-filter: blur(16px); }
.vio-composer input[type="text"] { min-width: 0; height: 39px; border: 1px solid var(--line); border-radius: 16px; padding: 0 12px; outline: 0; background: var(--vio-screen-panel); color: var(--vio-screen-text); font-size: 16px; }
.vio-composer input[type="text"]:focus { border-color: var(--violet); box-shadow: 0 0 0 2px color-mix(in srgb, var(--violet) 14%, transparent); }
.vio-composer button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--vio-screen-panel); color: var(--vio-screen-text); }
.vio-composer button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vio-composer .vio-send { background: var(--violet); color: #fff; }
.vio-composer .vio-send svg { width: 18px; height: 18px; stroke-width: 2; }
.vio-composer.is-loading .vio-send { opacity: .62; }
.vio-composer :disabled { cursor: wait; }
:root[data-theme="dark"] .vio-header-title h1,
:root[data-theme="dark"] .vio-message-bubble { color: #f7fbfb; }
:root[data-theme="dark"] .vio-screen-shell { background: var(--vio-screen-bg); }
:root[data-theme="dark"] .vio-screen-header,
:root[data-theme="dark"] .vio-composer { background: color-mix(in srgb, var(--vio-screen-bg) 93%, transparent); }
:root[data-theme="dark"] .vio-message-bubble { background: var(--vio-screen-panel); }
:root[data-theme="dark"] .vio-message[data-role="user"] .vio-message-bubble { background: var(--violet); }
:root[data-theme="dark"] .vio-composer input[type="text"],
:root[data-theme="dark"] .vio-composer button:not(.vio-send) { background: var(--vio-screen-panel); }
:root[data-theme="dark"] .vio-message-author { color: #b58aff; }

@media (max-height: 650px) {
  .vio-character { height: 108px; }
  .vio-hero { max-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .vio-hero-art,
  .vio-character[data-state] .vio-hero-art { animation: none; }
  .vio-hero,
  .vio-header-mini { transition: none; }
}

.loading { position: fixed; z-index: 50; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--page); }
.loading[hidden] { display: none; }
.loading p { color: var(--muted); font-size: 12px; }
.vio-mini { width: 52px; height: 52px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--violet) 20%, var(--line)); border-radius: 15px; background-color: color-mix(in srgb, var(--violet) 11%, var(--surface)); background-image: url('/assets/vio/vio-mini-v3.png'); background-position: center; background-size: 94%; background-repeat: no-repeat; animation: bounce .8s ease-in-out infinite alternate; box-shadow: 0 5px 14px rgba(79, 53, 173, .2); }
@keyframes bounce { to { transform: translateY(-6px) rotate(5deg); } }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 360px) {
  .app-shell { padding-inline: 12px; }
  .progress-tabs button { font-size: 11px; }
  .progress-hero-card { gap: 10px; padding: 15px; }
  .weight-goal { padding-left: 10px; }
  .vio-panel { min-height: 112px; }
  .vio { right: 7px; transform: rotate(-4deg) scale(.61); }
  .vio-copy { width: calc(100% - 84px); }
  .meal-choices { grid-template-columns: repeat(2, 1fr); }
}
*[hidden] { display: none !important; }

/* Training plans (templates) and trainer-assigned plans.
   All colors come from the shared theme tokens so light/dark both work. */
.training-plans { display: grid; gap: 10px; margin: 14px 0 6px; }
.training-plans-head { display: flex; align-items: center; justify-content: space-between; }
.training-plans-head h2 { margin: 0; font-size: 15px; }
.training-plans-create { border: 0; background: none; color: var(--violet-text); font-weight: 650; padding: 6px 0; font-size: 13px; }
.training-plans-empty { margin: 0; color: var(--muted); font-size: 13px; }
.training-plans-list { display: grid; gap: 8px; }
.training-plan-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--violet) 40%, var(--line)); border-radius: 14px; background: var(--surface); }
.training-plan-card .training-plan-start { background: var(--violet); color: #fff; border-color: var(--violet); }
.training-card-exercises { grid-column: 1 / -1; display: grid; gap: 5px; min-width: 0; text-align: left; }
.training-card-exercises small { font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.training-plan-card div strong { display: block; color: var(--text); }
.training-plan-card div small { color: var(--muted); }
.training-plan-card-actions { display: flex; gap: 6px; }
.assigned-plan-card { display: grid; gap: 8px; padding: 14px; border: 1px solid color-mix(in srgb, var(--violet) 40%, var(--line)); border-radius: 16px; background: var(--violet-soft); }
.assigned-plan-card strong { font-size: 15px; color: var(--text); }
.assigned-plan-card small { color: var(--muted); }
.assigned-plan-exercises { display: grid; gap: 6px; }
.assigned-plan-exercise { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text); }
.assigned-plan-exercise span { color: var(--muted); }
.assigned-plan-adherence { font-size: 12px; }
.training-plan-editor-list { display: grid; gap: 10px; margin: 12px 0; }
.training-plan-editor-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.training-plan-targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.training-plan-editor-card input,
.training-plan-targets input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--text); font: inherit; font-size: 16px; }
.training-plan-editor-card input::placeholder,
.training-plan-targets input::placeholder { color: var(--muted); }
.training-plan-editor-card input:focus,
.training-plan-targets input:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 2px color-mix(in srgb, var(--violet) 16%, transparent); }
.training-review-plan-target { margin: 4px 0 0; font-size: 12px; color: var(--violet-text); }
.client-plans { display: grid; gap: 8px; margin: 12px 0; }
.client-plans-form { display: flex; gap: 8px; }
.client-plans-form select { flex: 1; min-height: 40px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--page); color: var(--text); font-size: 16px; }

/* Back navigation control. Deliberately separate from the violet primary
   round-action: transparent until pressed, theme-aware foreground, same tap size. */
.round-action[data-back-action] { background: transparent; color: var(--text); font-weight: 600; }
.round-action[data-back-action]:active { background: var(--violet-soft); color: var(--violet-text); }

/* Training History: swipe-left reveals a destructive delete action. The card
   stays a normal button; the delete control is only reachable when revealed. */
.training-workout-swipe { position: relative; min-width: 0; overflow: hidden; border-radius: 14px; isolation: isolate; }
.training-workout-swipe .training-v2-card { padding-right: 40px; }
.training-workout-more { position: absolute; z-index: 2; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; }
.training-workout-more:active { background: var(--violet-soft); color: var(--violet-text); }
.training-workout-swipe.is-open .training-workout-more { display: none; }
.training-v2-swipe-card { position: relative; z-index: 1; touch-action: pan-y; transition: transform .2s ease; will-change: transform; }
.training-workout-swipe.is-open .training-v2-swipe-card { transform: translateX(-84px); }
.training-workout-swipe.is-dragging .training-v2-swipe-card { transition: none; }
.training-swipe-delete { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 84px; border: 0; border-radius: 0 14px 14px 0; background: var(--coral); color: #fff; font-size: 12px; font-weight: 750; }
.training-swipe-delete:disabled { opacity: .7; }

/* Product review: attention badge, notifications list, moderation extras */
.avatar { position: relative; }
.avatar-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border-radius: 9px; background: var(--violet); color: var(--violet-ink); font-size: 9.5px; font-weight: 760; line-height: 1; box-shadow: 0 0 0 2px var(--page); }
.menu-count { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--violet-soft); color: var(--violet-text); font-size: 11px; font-weight: 760; }
.notifications-list { display: grid; gap: 8px; margin-top: 12px; }
.notification-card { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; font: inherit; color: var(--text); }
.notification-card strong { font-size: 13px; }
.notification-card span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.notification-card small { color: var(--muted); font-size: 10.5px; }
.notification-card.is-unread { border-color: color-mix(in srgb, var(--violet) 42%, var(--line)); background: var(--violet-soft); }
.product-moderation-fix { margin-top: 6px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--violet-soft); color: var(--violet-text); font-size: 11px; font-weight: 700; }
.submission-meta { margin: 6px 0; color: var(--muted); font-size: 11px; }
.submission-matches { margin: 8px 0; }
.submission-matches h3 { margin: 0 0 6px; font-size: 13px; }
.match-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.match-row b { display: block; font-size: 12px; }
.match-row small { color: var(--muted); font-size: 10.5px; }
.submission-reasons { display: grid; gap: 8px; margin: 8px 0; }
.submission-reasons label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.submission-reasons select, .submission-reasons input { min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--text); font-size: 16px; }

/* Team invite deep-link toast */
.team-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: 0 10px 26px var(--shadow); font-size: 12.5px; max-width: calc(100% - 32px); text-align: center; }

/* Micronutrients (Progress → Питание) */
.micronutrients-entry header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.micronutrients-entry h2 { margin: 0; font-size: 15px; }
.micronutrients-entry small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.micronutrients-entry button { border: 0; background: none; color: var(--violet-text); font-size: 12.5px; font-weight: 700; padding: 6px 0; }
.micronutrients-tabs { display: flex; gap: 6px; margin: 10px 0 4px; }
.micronutrients-tabs button { flex: 1; min-height: 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 650; }
.micronutrients-tabs button[aria-selected="true"] { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 34%, var(--line)); color: var(--violet-text); }
.micronutrients-coverage { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.micronutrients-groups { display: grid; gap: 16px; margin-top: 10px; }
.micronutrients-group h2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.micronutrient-row { display: grid; gap: 5px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 8px; }
.micronutrient-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.micronutrient-head strong { font-size: 13.5px; color: var(--text); }
.micronutrient-value { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.micronutrient-row.is-unknown .micronutrient-value { color: var(--muted); }
.micronutrient-percent { color: var(--text); font-size: 12.5px; font-weight: 700; }
.micronutrient-bar { display: block; height: 6px; border-radius: 4px; background: var(--violet-soft); overflow: hidden; }
.micronutrient-bar i { display: block; height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--violet) 62%, var(--surface)); }
.micronutrient-days, .micronutrient-coverage { color: var(--muted); font-size: 11.5px; }
:root[data-theme="dark"] .micronutrient-bar { background: color-mix(in srgb, var(--violet) 22%, var(--surface)); }
:root[data-theme="dark"] .micronutrient-bar i { background: color-mix(in srgb, #b9adf2 70%, var(--surface)); }

.report-export-entry header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-export-entry header > div { display: grid; gap: 2px; }
.report-export-entry small { color: var(--muted); font-size: 10.5px; }
.report-export-entry button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 13px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 750; white-space: nowrap; }
.report-sheet { display: grid; gap: 12px; }
.report-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.report-periods button { min-height: 38px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--muted); font-size: 12px; }
.report-periods button[aria-selected="true"] { border-color: color-mix(in srgb, var(--violet) 40%, var(--line)); background: var(--violet-soft); color: var(--violet-text); font-weight: 750; }
.report-custom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-custom label { display: grid; gap: 4px; color: var(--muted); font-size: 10.5px; }
.report-custom input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 14px; }
.report-status { color: var(--violet-text); font-size: 11.5px; }
.trainer-report-export { display: flex; justify-content: flex-end; }
.trainer-report-export button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--violet-soft); color: var(--violet-text); font-size: 12px; font-weight: 750; }

.coach-connect-hint { padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--violet) 8%, var(--surface)); color: var(--violet-text); font-size: 11px; line-height: 1.45; }
.profile-menu button[data-profile-menu-training-enable] b { color: var(--violet-text); font-size: 14px; font-weight: 750; }

.training-review-plan-added { color: var(--muted); font-size: 10.5px; font-weight: 700; }
.profile-menu button[data-profile-menu-trainer-tools] b { color: var(--violet-text); font-size: 14px; font-weight: 750; }

.vio-photo-result-row { display: grid; gap: 2px; padding: 9px 10px; border-radius: 14px; background: var(--surface); }
.vio-photo-result-row b { font-size: 12.5px; }
.vio-photo-result-row span { color: var(--violet-text); font-size: 11.5px; font-weight: 700; }
.vio-photo-result-row small { color: var(--muted); font-size: 10px; }
.vio-photo-result-row.is-unmatched { background: color-mix(in srgb, var(--line) 45%, var(--surface)); }
.vio-photo-result-row.is-unmatched small { color: var(--text); opacity: .75; }
.vio-photo-result-note { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.vio-photo-result-hint { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.vio-photo-result-items { display: grid; gap: 6px; }

.pending-food-error { margin: 8px 0 0; text-align: left; }

/* Barcode unknown → link/new contribution flow */
.barcode-create-hint { color: var(--muted, #6b7280); font-size: 0.85rem; margin: 0.15rem 0 0.5rem; }
.barcode-create-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.barcode-create-actions button { flex: 1 1 auto; }
.barcode-create-actions .barcode-secondary { opacity: 0.85; }
.barcode-link-candidate { display: flex; flex-direction: column; gap: 0.15rem; margin: 0.4rem 0 0.6rem; }
.barcode-link-candidate b { font-weight: 600; }
.barcode-link-candidate small { color: var(--muted, #6b7280); font-size: 0.85rem; }

/* Full-screen recipe library. The shell keeps Dnevio's theme tokens while the
   generated food photography supplies the richer visual hierarchy. */
body.recipe-library-open .bottom-nav { display: none; }
body.recipe-library-open .app-shell { padding-bottom: 0; }
.recipe-library-screen { padding-bottom: calc(28px + var(--dnevio-safe-bottom)); }

/* Fixed sheets keep their keyboard geometry while respecting Telegram controls. */
.food-sheet, .profile-sheet, .weight-sheet, .measurement-sheet, .workout-sheet,
.activity-sheet, .help-sheet, .school-sheet, .vio-level-sheet {
  padding-left: calc(16px + var(--dnevio-safe-left));
  padding-right: calc(16px + var(--dnevio-safe-right));
}
.weight-sheet, .school-sheet, .vio-level-sheet { max-height: calc(var(--dnevio-screen-height) - var(--dnevio-safe-top)); overflow-y: auto; }
.team-sheet { padding-left: calc(16px + var(--dnevio-safe-left)); padding-right: calc(16px + var(--dnevio-safe-right)); }
.recipe-library-header { position: sticky; z-index: 8; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 14px; background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(16px); }
.recipe-library-header div { display: grid; gap: 2px; }
.recipe-library-header span, .recipe-library-heading span, .recipe-substitutions > span { color: var(--violet-text); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.recipe-library-header h1 { margin: 0; color: var(--text); font-size: 28px; line-height: 1.05; }
.recipe-library-header > button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); font: inherit; font-size: 20px; }
.recipe-library-search { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 4px 0 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.recipe-library-search span { color: var(--muted); font-size: 20px; }
.recipe-library-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.recipe-library-search input::placeholder { color: var(--muted); }
.recipe-library-mode { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 15px; background: var(--surface-muted); }
.recipe-library-mode button { min-height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; }
.recipe-library-mode button[aria-selected="true"] { background: var(--violet-soft); color: var(--violet-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--violet) 24%, transparent); }
.recipe-filter-row { display: flex; gap: 7px; margin: 12px -20px 4px; padding: 0 20px 8px; overflow-x: auto; scrollbar-width: none; }
.recipe-filter-row::-webkit-scrollbar { display: none; }
.recipe-filter-row button { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; font-weight: 650; }
.recipe-filter-row button[aria-pressed="true"] { border-color: var(--violet); background: var(--violet); color: #fff; }
.recipe-library-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 16px 0 10px; }
.recipe-library-heading div { display: grid; gap: 3px; }
.recipe-library-heading h2 { margin: 0; color: var(--text); font-size: 22px; line-height: 1.05; }
.recipe-library-heading > b { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--violet-soft); color: var(--violet-text); font-size: 13px; }
.recipe-library-create { width: 100%; min-height: 46px; margin-bottom: 10px; border: 1px dashed color-mix(in srgb, var(--violet) 55%, var(--line)); border-radius: 16px; background: var(--violet-soft); color: var(--violet-text); font: inherit; font-size: 13px; font-weight: 750; }
.recipe-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recipe-library-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow) 55%, transparent); }
.recipe-card-open { width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; }
.recipe-card-media { display: grid; width: 100%; aspect-ratio: 1.13; overflow: hidden; place-items: center; background: var(--violet-soft); }
.recipe-card-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.recipe-card-media.is-placeholder { font-size: 40px; }
.recipe-card-favorite { position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--violet-text); font: inherit; font-size: 21px; box-shadow: 0 5px 14px rgba(0, 0, 0, .13); }
.recipe-card-copy { min-height: 104px; display: grid; align-content: start; gap: 5px; padding: 10px 11px 12px; }
.recipe-card-copy small { color: var(--muted); font-size: 8.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.recipe-card-copy strong { display: -webkit-box; overflow: hidden; color: var(--text); font-size: 13px; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.recipe-card-copy em { color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.35; }
.recipe-library-empty { margin: 24px 10px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.45; }
.recipe-library-swipe { border-radius: 18px; }
.recipe-library-swipe > .recipe-library-card { position: relative; z-index: 1; transition: transform .2s ease; touch-action: pan-y; }
.recipe-library-swipe.is-open > .recipe-library-card { transform: translateX(-74px); }
.recipe-library-swipe.is-dragging > .recipe-library-card { transition: none; }
.recipe-library-swipe > .picker-product-delete { width: 74px; border-radius: 0 18px 18px 0; }
.recipe-library-detail { display: grid; gap: 14px; padding-bottom: 20px; }
.recipe-detail-back { justify-self: start; padding: 8px 0; border: 0; background: none; color: var(--violet-text); font: inherit; font-size: 13px; font-weight: 750; }
.recipe-library-detail > img { width: 100%; max-height: 360px; aspect-ratio: 1.2; border-radius: 22px; object-fit: cover; border: 1px solid var(--line); }
.recipe-detail-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.recipe-detail-title > div { min-width: 0; }
.recipe-detail-title span { color: var(--violet-text); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.recipe-detail-title h2 { margin: 4px 0 6px; color: var(--text); font-size: 28px; line-height: 1.04; }
.recipe-detail-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.recipe-detail-title > button { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--violet-text); font: inherit; font-size: 25px; }
.recipe-detail-nutrition { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.recipe-detail-nutrition span { min-width: 0; display: grid; gap: 2px; padding: 9px 3px; border-radius: 13px; text-align: center; }
.recipe-detail-nutrition span:first-child { background: var(--violet); color: #fff; }
.recipe-detail-nutrition b { font-size: 15px; }
.recipe-detail-nutrition small { color: inherit; opacity: .74; font-size: 8px; }
.recipe-detail-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 4px; border-radius: 15px; background: var(--surface-muted); }
.recipe-detail-tabs button { min-height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; }
.recipe-detail-tabs button[aria-selected="true"] { background: var(--violet); color: #fff; }
.recipe-library-detail > section { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.recipe-library-detail > section > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.recipe-library-detail h3 { margin: 0; font-size: 16px; }
.recipe-library-detail section header span { color: var(--muted); font-size: 11px; }
.recipe-library-detail section ul, .recipe-library-detail section ol { margin: 10px 0 0; padding: 0; list-style: none; }
.recipe-library-detail section > ul li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.recipe-library-detail section > ul li:last-child { border-bottom: 0; }
.recipe-library-detail section > ul li b { color: var(--text); white-space: nowrap; }
.recipe-library-detail section > ol { counter-reset: recipe-step; display: grid; gap: 10px; }
.recipe-library-detail section > ol li { position: relative; padding: 11px 12px 11px 42px; border-radius: 14px; background: var(--surface-muted); color: var(--text); font-size: 13px; line-height: 1.45; counter-increment: recipe-step; }
.recipe-library-detail section > ol li::before { content: counter(recipe-step); position: absolute; left: 11px; top: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--violet-soft); color: var(--violet-text); font-size: 10px; font-weight: 800; }
.recipe-substitutions { margin-top: 14px; padding: 13px; border-radius: 15px; background: var(--violet-soft); }
.recipe-substitutions ul { display: grid; gap: 6px; }
.recipe-substitutions li { color: var(--text); font-size: 11px; line-height: 1.4; }
.recipe-detail-add { position: sticky; bottom: 12px; z-index: 4; box-shadow: 0 10px 24px var(--shadow); }
.recipe-community-sort { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.recipe-community-sort select { min-height: 38px; border: 1px solid var(--line); border-radius: 13px; padding: 0 12px; background: var(--surface); color: var(--text); }
.recipe-public-toggle { display: flex; gap: 11px; align-items: flex-start; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.recipe-public-toggle input { width: 22px; height: 22px; accent-color: var(--violet); }
.recipe-public-toggle span { display: grid; gap: 4px; }
.recipe-public-toggle small, .recipe-public-fields > small { color: var(--muted); line-height: 1.4; }
.recipe-public-fields { display: grid; gap: 11px; margin-top: 10px; padding: 14px; border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--violet) 5%, var(--surface)); }
.recipe-public-fields textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--page); color: var(--text); font: inherit; }
.recipe-photo-picker { display: grid; gap: 7px; color: var(--text); font-weight: 650; }
.recipe-photo-picker input { color: var(--muted); font-weight: 400; }
.recipe-photo-preview { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.recipe-community-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.recipe-community-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font-weight: 700; }
.recipe-publication-status { color: var(--violet-text) !important; font-weight: 700; }

@media (max-width: 360px) {
  .recipe-card-grid { gap: 8px; }
  .recipe-card-copy { min-height: 112px; padding-inline: 9px; }
  .recipe-detail-title h2 { font-size: 24px; }
}
/* Owner-scoped history transfer; native modal keeps taps above the diary. */
.diary-import-dialog { box-sizing: border-box; width: min(100% - 24px, 496px); max-height: calc(90dvh - var(--dnevio-safe-top, 0px) - var(--dnevio-safe-bottom, 0px)); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); padding: 22px; font-size: 16px; }
.diary-import-dialog::backdrop { background: rgb(0 0 0 / .6); }
.diary-import-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.diary-import-dialog h2 { font-size: 22px; margin: 0; }
.diary-import-dialog button { min-height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); color: var(--text); padding: 10px 14px; font: inherit; cursor: pointer; }
.diary-import-dialog button.primary-button { width: 100%; background: var(--violet); color: var(--violet-ink); margin: 12px 0; }
.diary-import-dialog input[type=file] { width: 100%; font: inherit; margin-top: 12px; }
.diary-import-dialog p { overflow-wrap: anywhere; line-height: 1.45; }
.diary-import-dialog .diary-import-hint { color: var(--muted); font-size: 14px; }
.diary-import-dialog [data-import-error] { color: #ed7987; }
.diary-import-dialog article { border-top: 1px solid var(--line); padding: 12px 0; }
.diary-import-dialog button:disabled { opacity: .55; cursor: wait; }
.diary-import-dialog [hidden] { display: none !important; }
.food-sheet .product-picker-viewport { touch-action: pan-y pinch-zoom; }
/* Ephemeral manual rest utility; shared theme tokens include Monochrome. */
.training-rest-timer { position: sticky; top: 0; z-index: 2; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.training-rest-timer strong { color: var(--text); font-variant-numeric: tabular-nums; }
.training-rest-presets, .training-rest-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.training-rest-timer button { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font: inherit; }
.training-rest-timer[data-rest-state="complete"] { border-color: var(--violet); }
.training-rest-timer > span { display: block; font-weight: 700; margin-bottom: 5px; }
.plans-dialog { max-height: calc(var(--dnevio-screen-height, 100dvh) - var(--dnevio-safe-top, 0px) - var(--dnevio-safe-bottom, 0px) - 24px); overflow-y: auto; color: var(--text); }
.plans-dialog[open] { top: calc(var(--dnevio-safe-top, 0px) + 12px); bottom: auto; margin: 0 auto; }
.plans-dialog header { display: flex; align-items: center; justify-content: space-between; }
.plans-beta { padding: 14px; border: 1px solid var(--violet); border-radius: 16px; }
.plans-note, .training-review-previous { color: var(--muted); font-size: 13px; line-height: 1.5; }
.profile-monetization { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-align: left; font: inherit; }
.profile-monetization span, .profile-monetization small { display: block; }
.profile-monetization small { margin-top: 4px; color: var(--muted); }
.profile-monetization b { white-space: nowrap; font-size: 13px; }
.profile-sheet.is-settings-only .profile-monetization { display: none; }
.plans-cards { display: grid; gap: 12px; }
.plans-card, .training-library-card { padding: 16px; margin: 12px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.plans-card h3 { margin: 0 0 8px; }
.plans-dialog details { padding: 12px 0; }
.plans-dialog summary, .training-library-card summary { cursor: pointer; font-weight: 700; }

/* Approved tariff and workout concepts. Theme colors remain token-driven. */
.plans-dialog { width: min(440px, calc(100vw - 24px)); padding: 22px 18px; border-radius: 28px; background: var(--page); }
.plans-dialog header h2 { margin: 0; font-size: 28px; letter-spacing: -.8px; }
.plans-current { display: inline-block; margin: 16px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); font-size: 13px; }
.plans-beta { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--violet); border-radius: 18px; background: var(--violet-soft); }
.plans-beta-icon { color: var(--violet-text); font-size: 30px; }
.plans-beta-copy strong { font-size: 17px; }
.plans-beta-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.plans-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.plans-tabs button { min-height: 42px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font: inherit; font-weight: 650; }
.plans-tabs button[aria-selected="true"] { background: var(--violet); color: var(--violet-ink); }
.plans-dialog .plans-featured { position: relative; isolation: isolate; overflow: hidden; margin: 14px 0; padding: 24px 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.plans-featured[data-plan="plus"], .plans-featured[data-plan="pro"] { border-color: var(--violet); background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--violet) 45%, var(--surface)), transparent 80%), var(--surface); }
.plans-featured::before { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; right: -100px; top: -140px; border: 1px solid var(--line); border-radius: 50%; }
.plans-featured h3 { font-size: 29px; letter-spacing: -.8px; margin: 0; }
.plans-subtitle { margin: 6px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.plans-price { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.plans-price strong { font-size: 42px; line-height: 1.2; letter-spacing: -1px; }
.plans-price span, .plans-price-note { color: var(--muted); font-size: 12px; }
.plans-benefits { display: grid; gap: 12px; padding: 0; margin: 24px 0; list-style: none; }
.plans-benefits li { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.45; }
.plans-feature-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--violet-soft); color: var(--violet-text); font-size: 22px; }
.plans-included { display: inline-block; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--violet-text); background: var(--violet-soft); font-size: 12px; }
.plans-dialog .plans-comparison { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.plans-usage-title { font-size: 16px; margin: 22px 0 4px; }
.plans-usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.plans-usage-item { display: grid; gap: 5px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.plans-usage-item strong { font-size: 25px; }
.plans-usage-item span, .plans-usage-item small { font-size: 12px; color: var(--muted); }
.plans-footnote { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
[data-screen="training-review"] .screen-heading h1 { font-size: 28px; letter-spacing: -.7px; }
[data-screen="training-review"] .screen-heading p { display: none; }
[data-screen="training-review"] .training-review-meta { gap: 8px; }
[data-screen="training-review"] .training-review-meta label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[data-screen="training-review"] .training-title-field input { font-size: 18px; font-weight: 650; min-height: 48px; border-radius: 16px; }
[data-screen="training-review"] .training-date-field { justify-self: start; max-width: 190px; }
[data-screen="training-review"] .training-date-field input { border-radius: 12px; }
.training-rest-timer { position: relative; top: auto; padding: 16px; border-radius: 24px; }
.training-rest-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.training-rest-heading button { border: 0; padding: 0; font-size: 24px; }
.training-rest-dial { display: grid; place-items: center; width: 114px; height: 114px; margin: -12px auto 6px; border-radius: 50%; background: conic-gradient(var(--violet) calc(var(--rest-progress, 1) * 1turn), var(--line) 0); }
.training-rest-dial strong { display: grid; place-items: center; width: 101px; height: 101px; border-radius: 50%; background: var(--surface); font-size: 29px; letter-spacing: -.8px; }
[data-rest-caption] { display: block; text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.training-rest-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.training-rest-presets button { padding: 6px 2px; font-size: 12px; min-height: 36px; }
.training-rest-presets button[aria-pressed="true"] { background: var(--violet); color: var(--violet-ink); border-color: var(--violet); }
.training-rest-actions { display: flex; gap: 8px; margin-top: 10px; }
.training-rest-actions button { flex: 1; min-height: 40px; font-weight: 650; }
.training-rest-actions [data-rest-pause] { background: var(--violet); border-color: var(--violet); color: var(--violet-ink); }
.training-review-card { border-radius: 22px; padding: 16px; }
.training-review-card-head input { font-size: 17px; padding: 6px 0; border-color: transparent; background: transparent; }
.training-review-card-head input:focus { border-color: var(--violet); }
.training-plan-editor-card .training-review-card-head input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.training-plan-editor-card .training-review-card-head input:focus { border-color: var(--violet); }
.training-review-previous { margin: 6px 0; font-size: 12px; }
.training-review-columns, .training-review-set { display: grid; grid-template-columns: 42px repeat(var(--set-fields, 2), minmax(0, 1fr)) 30px; gap: 7px; align-items: center; }
.training-review-columns { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.training-review-columns > span { text-align: center; padding-bottom: 5px; }
.training-review-set { padding: 5px 0; border-bottom: 1px solid var(--line); }
.training-review-set-number { text-align: center; color: var(--muted); font-size: 14px; }
.training-review-set input { min-height: 42px; background: var(--page); border-color: var(--line); border-radius: 12px; font-size: 16px; }
.training-review-remove { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; }
.training-review-remove:active { color: var(--coral); border-color: var(--coral); }
.training-review-side { grid-column: 2 / -2; }
.training-review-add { width: 100%; min-height: 40px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font-size: 13px; }
.training-library-card summary small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; }
.training-library-tabs { display: flex; gap: 5px; margin: 14px 0; padding: 5px; border-radius: 18px; background: var(--surface); }
.training-library-tabs button { flex: 1; min-height: 44px; color: var(--muted); background: transparent; border: 0; border-radius: 14px; font: inherit; }
.training-library-tabs button[aria-selected="true"] { background: var(--page); color: var(--text); }
.training-library-action { display: inline-block; margin: 6px 8px 6px 0; min-height: 42px; border: 1px solid var(--violet); border-radius: 12px; padding: 8px 12px; color: var(--text); background: transparent; font: inherit; }
.training-library-card a { color: var(--text); text-decoration: none; }
.training-library-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.training-library-filters { display: flex; gap: 8px; }
.training-library-filters [aria-pressed="true"] { background: var(--violet-soft); }
.training-program-cover { display: flex; align-items: end; padding: 18px; height: 110px; margin: -16px -16px 16px; border-radius: 18px 18px 0 0; letter-spacing: .14em; font-size: 12px; color: var(--text); background: linear-gradient(130deg, var(--violet-soft), var(--page)); }
.training-program-cover.is-gym { background: linear-gradient(90deg, #08161bdd, transparent), url('/assets/training/equipment-v1.jpg') center / cover; color: #fff; }
.training-program-cover.is-home { background: linear-gradient(90deg, #08161bdd, transparent), url('/assets/training/home-v1.jpg') center / cover; color: #fff; }
.training-library-card summary { list-style: none; }
.training-library-card summary::-webkit-details-marker { display: none; }
.training-library-card summary strong { display: block; font-size: 20px; line-height: 1.25; }
.training-video-player { display: block; width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }
.training-video-card > button { display: grid; width: 100%; margin: 0; padding: 0; text-align: left; border: 0; gap: 8px; }
.training-video-card small { color: var(--muted); }
.training-plan-card-actions button { width: auto; min-width: 44px; min-height: 44px; text-align: center; }
.activity-overview-grid { grid-template-columns: 1fr; }
.activity-primary-stats { grid-template-columns: 1fr; }
.activity-calendar { gap: 3px; }
.activity-calendar span { min-width: 1px; }
.steps-card { place-items: stretch; text-align: left; }
.steps-card > strong { font-size: 28px; }
:root[data-theme="monochrome"] .training-program-cover { filter: grayscale(1); }
.training-exercise-trend { display: block; width: 100%; height: 60px; }
.training-exercise-trend polyline { fill: none; stroke: var(--violet); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.steps-daily-chart, .activity-calendar { position: relative; margin-bottom: 20px; }
.steps-daily-chart::before, .activity-calendar::before { content: attr(data-from); position: absolute; left: 0; bottom: -18px; font-size: 10px; color: var(--muted); }
.steps-daily-chart::after, .activity-calendar::after { content: attr(data-to); position: absolute; right: 0; bottom: -18px; font-size: 10px; color: var(--muted); }
.training-import-cta { background: var(--violet-soft); border: 1px solid color-mix(in srgb, var(--violet) 55%, var(--line)); color: var(--violet-text); font-size: 14px; }
.steps-daily-chart { display: flex; align-items: end; gap: 4px; height: 90px; margin: 18px 0; }
.steps-daily-chart span { flex: 1; min-width: 1px; border-radius: 5px 5px 0 0; background: var(--violet); }
.steps-daily-chart .is-missing { background: transparent; border-bottom: 2px dashed var(--muted); }
.steps-card > small { color: var(--muted); font-size: 11px; }

.vio-insight:has(.vio-chat-label) { grid-template-columns: 36px minmax(0, 1fr) auto; }
.vio-chat-label { white-space: nowrap; font-size: 12px; color: var(--violet-text); }
.vio-chat-label b { margin-left: 3px; font-size: 19px; vertical-align: -1px; }
.coach-disconnect-block .danger, .coach-disconnect-confirm .danger { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--coral); border-radius: 16px; color: var(--coral); background: color-mix(in srgb, var(--coral) 7%, var(--surface)); font-weight: 700; }
.coach-disconnect-confirm { width: min(420px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); }
.coach-disconnect-confirm::backdrop { background: #0008; backdrop-filter: blur(5px); }
.coach-disconnect-confirm h2 { font-size: 21px; margin: 0 0 12px; }
.coach-disconnect-confirm p { color: var(--muted); line-height: 1.5; font-size: 14px; }
.coach-disconnect-confirm button { width: 100%; margin-top: 12px; }
.coach-disconnect-confirm .secondary { min-height: 48px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--surface); font-weight: 700; }
[data-screen="progress"] { padding-top: 12px; }
.tonnage-chart-card { display: grid; gap: 12px; }
.tonnage-chart-card label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.tonnage-chart-card select { width: 100%; min-width: 0; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font: inherit; font-size: 16px; }
.tonnage-chart-card .tonnage-total { font-size: 24px; }
.tonnage-chart-card svg { display: block; width: 100%; max-height: 180px; }
.tonnage-chart-card rect { fill: var(--violet); }
.tonnage-chart-card small, .tonnage-chart-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
