:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:#090b08; color:#f5f7f0; }
* { box-sizing:border-box; }
.honeypot { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }
[hidden] { display:none !important; }
body { margin:0; min-height:100vh; background:radial-gradient(circle at 15% 12%,#2a361d 0,#11150e 31%,#090b08 72%); }
body.portal-modal-open { overflow:hidden; }
.portal-help { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; max-width:860px; min-width:0; }
.portal-help > *, .portal-help button { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.portal-help a { color:#c7ef75; overflow-wrap:anywhere; }
.portal-install-hint { margin-top:24px; padding:12px 16px; border-top:1px solid #30372a; color:#adb7a2; font-size:14px; }
.portal-install-hint p { margin:0; }.portal-install-hint .button-row { margin-top:8px; }
.modal { min-width:0; }
.modal > * { min-width:0; overflow-wrap:anywhere; }
.modal :focus-visible,button:focus-visible,a:focus-visible { outline:3px solid #b8e55c; outline-offset:3px; }
button,input,textarea,select { font:inherit; }
button { border:0; border-radius:12px; padding:13px 17px; background:#a4d936; color:#11150b; font-weight:850; cursor:pointer; }
button:disabled { opacity:.55; cursor:wait; }
.secondary { background:#2a3024; color:#f3f6ed; border:1px solid #3c4632; }
.text-button,.logout-button,.text-danger { background:transparent; color:#bddb82; padding-inline:0; }
.text-danger { color:#ffaca2; }
.eyebrow { margin:0 0 8px; color:#a8db39; font-size:12px; font-weight:850; letter-spacing:.14em; text-transform:uppercase; }
.login-shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,510px); align-items:center; gap:clamp(36px,8vw,120px); max-width:1220px; margin:auto; padding:clamp(28px,6vw,82px); }
.brand-copy img { width:88px; height:88px; }
.brand-copy h1 { margin:10px 0 20px; max-width:700px; font-size:clamp(44px,7vw,82px); line-height:.96; letter-spacing:-.045em; }
.brand-copy>p:last-child { max-width:620px; color:#c5cbbb; font-size:19px; line-height:1.65; }
.login-card,.card,.hero-card { border:1px solid #30372a; background:rgba(20,24,17,.95); box-shadow:0 26px 80px rgba(0,0,0,.3); }
.login-card { display:grid; gap:17px; padding:clamp(26px,5vw,48px); border-radius:28px; }
.login-card h2 { margin:0 0 8px; font-size:32px; }
.password-hint { margin:0; color:#b9c4af; font-size:13px; line-height:1.45; }
label { display:grid; gap:8px; color:#d9decf; font-weight:700; }
input,textarea,select { width:100%; padding:13px 15px; border:1px solid #414a39; border-radius:11px; outline:none; background:#0c0f0a; color:#fff; }
textarea { min-height:120px; resize:vertical; }
input:focus,textarea:focus,select:focus { border-color:#9ed333; box-shadow:0 0 0 3px rgba(158,211,51,.18); }
.privacy-note { color:#9fa796; font-size:13px; line-height:1.5; }
.portal-legal-links { margin:20px 0 0; color:#aeb8a6; font-size:13px; line-height:1.5; }
.portal-legal-links a { color:#c7ef75; text-decoration:underline; text-underline-offset:3px; }
.portal-main>.portal-legal-links { padding-top:20px; border-top:1px solid #30372a; }
.status,.portal-status { min-height:22px; color:#bddb82; }
.portal-status.show { position:fixed; z-index:40; right:18px; bottom:18px; width:min(440px,calc(100vw - 36px)); padding:14px 16px; border:1px solid #78a936; border-radius:14px; background:#1d2a16; box-shadow:0 18px 55px rgba(0,0,0,.48); color:#e9ffd0; font-weight:800; pointer-events:none; }
.portal-status.show.error { border-color:#c95d54; background:#321b18; color:#ffd5cf; }
.error { color:#ffaca2; }
.portal-shell { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.portal-sidebar { position:sticky; top:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column; padding:28px 20px; background:#11140f; border-right:1px solid #293024; }
.portal-brand { display:flex; align-items:center; gap:12px; margin:0 8px 38px; }
.portal-brand img { width:46px; height:46px; }
.portal-brand span { display:grid; }.portal-brand strong { font-size:20px; }.portal-brand small { color:#8f9987; }
.portal-sidebar nav { display:grid; gap:7px; }
.portal-sidebar nav button { display:flex; justify-content:space-between; background:transparent; color:#bdc5b6; text-align:left; }
.portal-sidebar nav button:hover,.portal-sidebar nav button.active { color:#fff; background:#293221; }
.nav-count { min-width:22px; text-align:center; color:#10130b; background:#a4d936; border-radius:20px; }
.nav-count:empty { display:none; }
.pill.status-pending { color:#ffe0a1; background:#45341b; }.pill.status-cancelled { color:#e2c8c4; background:#3b2a28; }.pill.status-completed { color:#d4ded0; background:#303a2e; }
.portal-subnav { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 18px; }
.portal-subnav button { width:auto; min-height:42px; padding:9px 14px; }
.portal-subnav button.active { background:#a4d936; color:#11150b; }
.message-shortcut { display:inline-flex; align-items:center; gap:6px; }
.message-shortcut.active { color:#c7ef75; }
.overview-modules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:22px; }
.overview-modules > article:first-child { grid-column:1/-1; }
[data-knowledge-navigation][hidden] { display:none !important; }
.knowledge-controls { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:14px; margin-bottom:18px; }
.knowledge-controls .button-row { grid-column:1 / -1; margin:0; }
.knowledge-card .eyebrow { display:flex; align-items:center; gap:8px; }
.knowledge-card .button-row { margin-top:14px; }
.portal-document-search { max-width:420px; margin:0 0 18px; }
.knowledge-article { margin-top:16px; max-width:850px; }
.knowledge-article h3 { font-size:clamp(25px,4vw,38px); line-height:1.15; }
.knowledge-teaser { font-size:1.08em; color:#e4eccf; }
.knowledge-body { line-height:1.7; }
.knowledge-body p { margin:0 0 1.1em; }
.knowledge-article ul { padding-left:22px; overflow-wrap:anywhere; }
@media (max-width:780px) { .knowledge-controls { grid-template-columns:1fr; }.knowledge-controls .button-row { grid-column:1; flex-wrap:wrap; } }
.install-sidebar { margin-top:auto; text-align:left; }.install-sidebar+.logout-button { margin-top:8px; }.logout-button { margin-top:auto; text-align:left; }
.portal-main { width:min(1120px,100%); margin:0 auto; padding:clamp(26px,5vw,64px); }
.portal-main>header,.section-head { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.portal-main>header h1 { margin:0; font-size:clamp(30px,4vw,48px); }
.portal-main>header { min-width:0; }.portal-heading { min-width:0; }.portal-heading h1 { overflow-wrap:anywhere; }.portal-back { padding:3px 0; color:#c7ef75; }
.header-actions,.challenge-head-actions { display:flex; align-items:center; gap:10px; }
.mobile-install { display:none; padding:8px 10px; color:#c7ef75; }
.secure-chip,.pill { display:inline-flex; width:max-content; padding:7px 11px; border-radius:999px; color:#cce993; background:#25321b; font-size:12px; font-weight:800; }
.hero-card { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:22px; padding:clamp(25px,5vw,45px); border-radius:26px; background:linear-gradient(135deg,rgba(38,49,28,.98),rgba(18,22,15,.98)); }
.hero-card h2 { margin:4px 0 8px; font-size:clamp(26px,4vw,44px); }
.hero-card p:last-child { color:#bdc5b7; }
.stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin:18px 0; }
.stats-grid.compact { grid-template-columns:repeat(2,minmax(0,300px)); }
.stats-grid>div { display:grid; padding:20px; border:1px solid #2c3327; border-radius:18px; background:#151912; }
.stats-grid small,.stats-grid span { color:#929d8b; }.stats-grid strong { margin:5px 0 0; font-size:36px; }
.content-grid,.card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.card { padding:22px; border-radius:18px; box-shadow:none; }.card h3 { margin-top:0; }.card time { color:#98a18f; font-size:13px; }
.quick-actions,.button-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
dl { display:grid; gap:10px; margin:0; } dl div { display:flex; justify-content:space-between; gap:15px; } dt { color:#929d8b; } dd { margin:0; font-weight:750; }
.section-head { margin:26px 0 18px; }.section-head h2 { margin:0; font-size:30px; }.section-head p { margin:5px 0 0; color:#aeb6a7; }
.appointment-card p,.card p { color:#c2c9bb; line-height:1.55; }
.gps-proof { display:grid; gap:5px; margin-top:14px; padding:12px; border:1px solid #455238; border-radius:12px; background:#11160e; }
.gps-proof strong { color:#cce993; }
.gps-proof span { color:#bdc5b7; font-size:13px; }
.gps-proof a { width:max-content; max-width:100%; color:#b8e55c; font-weight:800; overflow-wrap:anywhere; }
.timeline { display:grid; gap:0; }.timeline>div { display:grid; grid-template-columns:110px 18px 1fr; gap:14px; min-height:76px; }.timeline time { color:#98a18f; }.timeline-dot { width:12px; height:12px; margin-top:4px; border-radius:50%; background:#82907a; box-shadow:0 0 0 5px #151a12; }.timeline-dot.homestrong { background:#a8db39; }.timeline-dot.customer { background:#ff9f91; }.timeline p { margin:0; display:grid; gap:5px; }.timeline small { color:#a8db39; }
.privacy-box,.empty { padding:22px; border:1px dashed #3a4234; border-radius:16px; color:#a6afa0; }
.nutrition-reminder { margin:18px 0; border-color:#7c9f44; background:#182215; }
.nutrition-reminder strong { color:#d4f49a; }.nutrition-reminder p { margin:8px 0; }
.nutrition-tabs { margin:18px 0 22px; }.nutrition-preview { color:#cce993; font-weight:750; }
.protein-list { display:grid; gap:10px; }.protein-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; gap:10px; align-items:center; padding:14px; border:1px solid #34402b; border-radius:14px; background:#151b11; }.protein-row div { display:grid; gap:3px; }.protein-row small { color:#aeb9a6; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }.full { grid-column:1/-1; }
.modal-backdrop { position:fixed; inset:0; z-index:20; display:flex; align-items:flex-start; justify-content:center; overflow-y:auto; overscroll-behavior:contain; padding:20px; background:rgba(0,0,0,.72); }
.modal { width:min(720px,100%); max-height:none; display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:auto 0; padding:25px; border:1px solid #3c4535; border-radius:22px; background:#171b14; box-shadow:0 30px 100px #000; }.modal-head { grid-column:1/-1; position:sticky; top:-25px; z-index:2; display:flex; justify-content:space-between; align-items:center; padding:10px 0; background:#171b14; }.modal-head h2 { margin:0; }.modal-head button { padding:5px 10px; background:transparent; color:#fff; font-size:25px; }.modal .privacy-note,.modal .button-row { grid-column:1/-1; }
.booking-slot-calendar { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-top:12px; }
.booking-slot-day { display:grid; align-content:start; gap:8px; padding:12px; border:1px solid #3c4535; border-radius:14px; background:#11170e; }
.booking-slot-day h3 { margin:0 0 4px; font-size:15px; }
.booking-slot-option { display:grid; gap:2px; width:100%; padding:12px; text-align:left; border:1px solid #79af39; border-radius:12px; color:#e8f7d0; background:#29451d; }
.booking-slot-option small { color:#cde8b4; }
.booking-slot-option.selected { border-color:#e0ff87; box-shadow:0 0 0 2px #b8e55c; background:#376322; }
.mobile-nav { display:none; }
.progress-hero { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin:22px 0 18px; }
.progress-hero>div { display:grid; gap:5px; min-height:130px; align-content:end; padding:22px; border:1px solid #38432f; border-radius:22px; background:linear-gradient(145deg,#27351d,#12170f); }
.progress-hero span { color:#aeb9a6; }.progress-hero strong { font-size:clamp(24px,3vw,38px); color:#c7ef75; }
.challenge-progress { width:100%; height:10px; overflow:hidden; margin:16px 0; border:0; border-radius:99px; background:#30362a; }.challenge-progress::-webkit-progress-bar { background:#30362a; }.challenge-progress::-webkit-progress-value { background:linear-gradient(90deg,#78b927,#d4f484); }.challenge-progress::-moz-progress-bar { background:linear-gradient(90deg,#78b927,#d4f484); }
.challenge-image { width:100%; max-height:50vh; object-fit:contain; border-radius:16px; background:#080b07; }
.challenge-clock { display:grid; place-items:center; min-height:120px; border:1px solid #435336; border-radius:18px; background:#10160c; }.challenge-clock strong { font-size:clamp(46px,9vw,84px); line-height:1; }.challenge-clock span { color:#b9c4af; }
.challenge-modal { max-height:none; }.challenge-modal .modal-head>div:first-child { min-width:0; }.challenge-head-actions { flex:0 0 auto; }.challenge-fullscreen-button { flex:0 0 auto; white-space:nowrap; padding:8px 11px !important; font-size:13px !important; }.exercise-list { padding-left:20px; color:#bec7b7; }.pending-note { color:#e4ca7b !important; }
.challenge-modal:fullscreen,.challenge-fullscreen-fallback .challenge-modal { width:100vw; height:100vh; max-height:none; margin:0; padding:clamp(12px,2vw,24px); border:0; border-radius:0; overflow:hidden; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); grid-template-rows:auto 1fr auto auto; align-items:center; background:#11150f; }
.challenge-modal:fullscreen .modal-head,.challenge-fullscreen-fallback .modal-head { position:static; grid-column:1/-1; }
.challenge-modal:fullscreen .challenge-image,.challenge-fullscreen-fallback .challenge-image { grid-column:1; grid-row:2/5; width:100%; height:100%; max-height:calc(100vh - 100px); object-fit:contain; }
.challenge-modal:fullscreen .challenge-instruction,.challenge-fullscreen-fallback .challenge-instruction { grid-column:2; align-self:end; }
.challenge-modal:fullscreen .challenge-clock,.challenge-fullscreen-fallback .challenge-clock { grid-column:2; min-height:150px; }
.challenge-modal:fullscreen .button-row,.challenge-fullscreen-fallback .button-row { grid-column:2; align-self:start; }
.challenge-fullscreen-fallback { padding:0; overflow:hidden; align-items:stretch; }
/* Keep image and controls together on wide screens, also before fullscreen. */
@media (min-width:781px) {
  .challenge-modal { width:min(1040px,100%); height:min(720px,calc(100dvh - 40px)); max-height:calc(100dvh - 40px); grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto auto; }
  .challenge-modal .modal-head { position:static; }
  .challenge-modal .challenge-image { grid-column:1; grid-row:2/5; height:100%; min-height:0; max-height:100%; }
  .challenge-modal .challenge-instruction { grid-column:2; align-self:end; margin:0; }
  .challenge-modal .challenge-clock { grid-column:2; }
  .challenge-modal .button-row { grid-column:2; align-self:start; }
}
@media (max-width:780px) {
  .challenge-modal { display:flex; flex-direction:column; height:min(800px,calc(100dvh - 16px)); max-height:calc(100dvh - 16px); gap:12px; }
  .challenge-modal .modal-head { position:static; flex-shrink:0; }
  .challenge-modal .challenge-image { flex:1; min-height:0; }
  .challenge-modal .challenge-instruction { flex-shrink:0; margin:8px 0; }
  .challenge-modal .challenge-clock { flex-shrink:0; min-height:105px; }
  .challenge-modal .button-row { flex-shrink:0; }
}
.evidence-grid { display:grid; gap:14px; }.evidence-card { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; padding:18px; border:1px solid #313b2b; border-radius:17px; background:#141912; }.evidence-card div:first-child { display:grid; gap:4px; }.evidence-card small { color:#9ba694; }.screenshot-target { grid-column:1/-1; }.screenshot-target img { width:100%; max-height:680px; object-fit:contain; border-radius:14px; }
.referral-qr { display:block; width:min(320px,100%); margin:18px auto; padding:10px; border-radius:16px; background:#fff; }
.recommendation-choices button { flex:1 1 180px; }
.recommendation-content { max-width:860px; }
.recommendation-content .referral-qr { height:auto; }
.guest-details { min-width:0; margin:0; padding:16px; border:1px solid #414a39; border-radius:14px; }
.guest-details legend { padding:0 8px; font-weight:850; }
.public-shell { width:min(860px,100%); margin:auto; padding:clamp(24px,6vw,70px); }.public-hero { display:flex; flex-wrap:wrap; align-items:center; gap:22px; margin-bottom:24px; }.public-hero > div { flex:1 1 240px; min-width:0; overflow-wrap:anywhere; }.public-hero img { width:78px; height:78px; flex-shrink:0; }.public-hero h1 { margin:0; font-size:clamp(34px,7vw,58px); }.public-hero p:last-child { color:#c1cab8; }
.check-field { grid-template-columns:auto 1fr; align-items:start; }.check-field input,.health-check input { width:auto; margin-top:3px; }.health-check { display:grid; gap:10px; padding:18px; border:1px solid #414a39; border-radius:14px; }.health-check legend { padding:0 8px; font-weight:850; }.health-check label { grid-template-columns:auto 1fr; font-weight:500; }.success-panel { padding:28px; border:1px solid #719f3d; border-radius:18px; background:#1e2b17; }.public-action { display:inline-flex; padding:13px 17px; border-radius:12px; background:#a4d936; color:#11150b; font-weight:850; text-decoration:none; }
.public-choice-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin:18px 0; }.public-choice-grid > * { justify-content:center; text-align:center; }
.size-guide { grid-column:1/-1; overflow-x:auto; padding:14px; border:1px solid #3a4631; border-radius:14px; background:#10150d; }.size-guide summary { cursor:pointer; color:#c7ef75; font-weight:850; }.size-guide table { width:100%; min-width:520px; margin-top:12px; border-collapse:collapse; font-size:13px; }.size-guide th,.size-guide td { padding:8px; border-bottom:1px solid #2e3828; text-align:left; }.reference-note { margin-top:28px; color:#8f9987; font-size:12px; }
@media (max-width:780px) { .login-shell { grid-template-columns:1fr; }.brand-copy h1 { font-size:clamp(42px,13vw,62px); }.portal-shell { grid-template-columns:1fr; padding-bottom:75px; }.portal-sidebar { display:none; }.portal-main { padding:24px 18px; }.mobile-install { display:inline-flex; }.stats-grid,.content-grid,.card-grid { grid-template-columns:1fr; }.stats-grid.compact { grid-template-columns:1fr 1fr; }.hero-card { align-items:flex-start; flex-direction:column; }.form-grid,.modal { grid-template-columns:1fr; }.full,.modal-head,.modal .privacy-note,.modal .button-row { grid-column:1; }.modal-backdrop { padding:8px; }.modal { padding:18px; border-radius:16px; }.modal-head { top:-18px; }.mobile-nav { position:fixed; z-index:15; left:0; right:0; bottom:0; display:flex; overflow-x:auto; background:#11150f; border-top:1px solid #30372a; }.mobile-nav button { flex:1 0 76px; padding:14px 5px; border-radius:0; background:transparent; color:#aeb6a7; font-size:11px; }.mobile-nav button.active { color:#b8e55c; }.timeline>div { grid-template-columns:82px 16px 1fr; } }
@media (max-width:780px) and (orientation:portrait) { .challenge-modal:fullscreen,.challenge-fullscreen-fallback .challenge-modal { display:flex; flex-direction:column; width:100vw; height:100vh; padding:10px; overflow:hidden; }.challenge-modal:fullscreen .challenge-image,.challenge-fullscreen-fallback .challenge-image { min-height:0; flex:1; max-height:42vh; }.challenge-modal:fullscreen .challenge-instruction,.challenge-fullscreen-fallback .challenge-instruction { margin:4px 0; font-size:13px; }.challenge-modal:fullscreen .challenge-clock,.challenge-fullscreen-fallback .challenge-clock { width:100%; min-height:105px; }.challenge-modal:fullscreen .button-row,.challenge-fullscreen-fallback .button-row { width:100%; margin-top:5px; } }
@media (max-width:780px) { .progress-hero { grid-template-columns:1fr; }.evidence-card { grid-template-columns:1fr; }.screenshot-target { grid-column:1; }.public-hero { align-items:flex-start; }.public-hero img { width:58px; height:58px; } }
@media (max-width:780px) { .portal-main>header { align-items:flex-start; }.header-actions { flex-wrap:wrap; justify-content:flex-end; }.message-shortcut { font-size:12px; }.mobile-nav button { flex:1 1 20%; min-width:0; }.portal-subnav { margin-top:16px; }.portal-subnav button { flex:1 1 auto; } }
@media (max-width:780px) { .portal-shell { grid-template-columns:minmax(0,1fr); }.portal-main,.portal-main>header,.portal-subnav { min-width:0; }.portal-subnav button,.header-actions button { min-width:0; overflow-wrap:anywhere; } }
@media (max-width:430px) { .portal-main>header { gap:8px; }.portal-main>header h1 { font-size:clamp(22px,7vw,32px); }.header-actions { max-width:48%; }.secure-chip { display:none; }.portal-back { font-size:12px; } }
@media (max-width:780px) { .overview-modules { grid-template-columns:1fr; }.overview-modules > article:first-child { grid-column:auto; } }
@media (max-width:780px) { .protein-row { grid-template-columns:1fr auto; }.protein-row button { width:100%; } }
/* Portal patch: existing theme, category-first navigation and concise motivators. */
.motivation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:0 0 24px; }
.motivation-card { min-width:0; padding:clamp(22px,3vw,36px); border:1px solid #526b33; border-radius:22px; background:linear-gradient(135deg,#25351b,#11190e); box-shadow:0 14px 35px #0003; }
.motivation-card h3 { margin:0 0 18px; font-size:clamp(15px,2vw,19px); color:#d6e5c3; line-height:1.4; }
.motivation-card strong { display:block; font-size:clamp(28px,3.7vw,46px); letter-spacing:-.03em; line-height:1.15; color:#c7ef75; overflow-wrap:anywhere; }
.motivation-reference { line-height:1.65; }
.knowledge-topic { display:grid; gap:12px; padding:24px; text-align:left; min-width:0; }
.knowledge-topic strong { font-size:20px; overflow-wrap:anywhere; }.knowledge-topic span { font-size:14px; color:#b6c3a6; }
.protein-reference { margin:16px 0; padding:16px; border:1px solid #445735; border-radius:14px; }
.protein-reference p { margin:8px 0; }.protein-reference dl { margin:8px 0; }
.stats-grid .protein-total { font-size:clamp(26px,5.7vw,34px); color:#c7ef75; }
.stats-grid.protein-counter-summary { grid-template-columns:minmax(0,1fr); }
.protein-counter-summary>div { min-width:0; }
.protein-counter-summary>div:last-child { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 20px; }
.protein-counter-summary>div:last-child strong { font-size:24px; }.protein-progress { width:100%; accent-color:#a4d936; }
.energy-goals .selected-goal { border-color:#a4d936; }.energy-goals strong { font-size:28px; color:#c7ef75; }
@media (max-width:780px) {
  .progress-section-head { flex-wrap:wrap; }
  .progress-section-head>div { flex:1 1 100%; min-width:0; }
  .progress-section-head>button { max-width:100%; white-space:normal; }
  .portal-shell { padding-bottom:124px; }
  .mobile-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding-bottom:env(safe-area-inset-bottom); overflow:visible; }
  .mobile-nav button { min-height:50px; padding:9px 6px; line-height:1.3; overflow-wrap:anywhere; }
  .portal-status.show { bottom:124px; }
  .portal-heading { min-width:0; }
  .header-actions { flex-shrink:0; }
  .header-actions .message-shortcut { white-space:nowrap; overflow-wrap:normal; }
  .motivation-grid { grid-template-columns:minmax(0,1fr); gap:12px; }.motivation-card { padding:22px; }.motivation-card h3 { margin-bottom:10px; }
}

/* Person-bound body measurements, neutral comparisons and responsive charts. */
.body-development-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px;margin:16px 0}
.body-development-metric,.body-development-history>article{padding:14px;border:1px solid var(--border,#454b40);border-radius:12px;min-width:0}
.body-development-metric h4{margin:0 0 12px}.body-development-metric dl{margin:0;display:grid;gap:5px}.body-development-metric dt{font-size:.85em;opacity:.75}.body-development-metric dd{margin:0 0 8px;overflow-wrap:anywhere}
.body-development-chart{display:block;width:100%;height:110px;color:var(--gold,#c8aa4a)}.body-development-dates{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.body-development-note{font-size:.9em;line-height:1.5}.body-development-history{display:grid;gap:10px}.body-development-history small{display:block;margin-top:5px}.body-development-history p{margin-bottom:0;overflow-wrap:anywhere}
:root { --diary-gap: 12px; }
.food-tracker-mode .portal-sidebar,.food-tracker-mode .mobile-nav,.food-tracker-mode .portal-main>header,.food-tracker-mode .portal-main>.portal-legal-links { display:none; }
.food-tracker-mode .portal-shell { display:block; padding-bottom:0; }
.food-tracker-mode .portal-main { width:min(1280px,100%); padding:20px 24px; }
.food-tracker-mode .diary-section { margin-top:0; }
.food-tracker-mode .portal-status:not(.show),.diary-feedback:empty { display:none; }
.tracker-toolbar { display:flex; align-items:center; gap:12px; padding-bottom:16px; border-bottom:1px solid #38412f; margin-bottom:16px; }
.tracker-toolbar h2 { flex:1; margin:0; font-size:clamp(20px,3vw,30px); overflow-wrap:anywhere; }
.tracker-date { display:flex; align-items:end; gap:8px; margin:12px 0; }
.tracker-date label { flex:1; max-width:220px; min-width:0; }
.tracker-energy { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:18px; margin:12px 0; background:#202819; border-radius:16px; }
.tracker-energy div { min-width:0; }.tracker-energy small,.tracker-energy span { display:block; color:#b3b9aa; }
.tracker-energy strong { display:block; font-size:clamp(23px,4vw,36px); color:#c7ef75; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.tracker-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:16px 0; }
.tracker-actions button { padding:14px 10px; }
.tracker-meal .section-head h3 { margin:0; flex:1; }.tracker-meal .section-head>span { white-space:nowrap; }
.diary-feedback { color:#c7ef75; margin:6px 0; }.diary-section [data-diary-status] { font-size:12px; margin:4px 0 12px; }
.diary-trend { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:12px; text-align:center; }.diary-trend svg { display:block; width:100%; max-width:32px; height:100px; margin:10px auto; }
.trend-track { fill:#38412f; }.trend-bar { fill:#a3e329; }.diary-trend strong,.diary-trend small { display:block; font-size:13px; }
@media(max-width:780px) {
 .food-tracker-mode .portal-main { padding:12px; }.food-tracker-mode .portal-status.show { bottom:18px; }
 .tracker-toolbar { flex-wrap:wrap; gap:8px; padding-bottom:12px; }.tracker-toolbar h2 { order:-1; flex:1 0 100%; font-size:22px; }.tracker-toolbar>button { flex:1; }
 .tracker-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.tracker-actions button { min-height:52px; font-size:14px; }
 .tracker-energy { gap:8px; padding:12px; }.tracker-energy small { font-size:12px; }.tracker-date button { padding:10px; }
 .diary-section .diary-nutrients { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }.diary-section .diary-nutrients small { font-size:11px; }.diary-section .diary-nutrients strong { font-size:18px; }
 .diary-edit .diary-nutrients { grid-template-columns:repeat(2,minmax(0,1fr)); }.diary-trend { gap:5px; }
}
.diary-section { min-width:0; margin-top:20px; }
.diary-section .section-head { flex-wrap:wrap; gap:12px; }
.diary-section .section-head>div { flex:1 1 260px; min-width:0; }
.diary-section .section-head>button { flex:0 0 auto; }
.diary-budgets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:18px; padding-top:14px; border-top:1px solid #38412f; }
.diary-budgets strong,.diary-budgets span { display:block; margin-top:4px; }
.diary-budgets small,.diary-budgets span { color:#b3b9aa; }
.diary-protein-note { padding:12px; border-radius:12px; background:#26321b; line-height:1.5; }
.diary-section .card { margin-bottom:16px; min-width:0; }
.diary-section button { min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.diary-nutrients { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--diary-gap); }
.diary-nutrients div { min-width:0; }
.diary-nutrients small,.diary-food small,.diary-entry small { display:block; color:var(--muted,#b3b9aa); font-size:.85rem; }
.diary-nutrients strong { display:block; margin-top:4px; font-size:1.25rem; }
.diary-nutrients strong span { font-size:.8rem; font-weight:normal; }
.diary-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 12px; }
.diary-tabs button { padding:10px 14px; }
.diary-actions { margin-bottom:12px; }
.diary-day { display:block; max-width:220px; margin:16px 0; }
.diary-barcode,.diary-search,.diary-save-meal { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:12px 0 20px; }
.diary-barcode label,.diary-search label,.diary-save-meal label { flex:1; min-width:160px; }
.diary-food-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:24px; }
.diary-food { display:flex; flex-direction:column; min-width:0; gap:8px; }
.diary-food>button { text-align:left; width:100%; }
.diary-food strong { display:block; font-size:1rem; }
.diary-recipe-details { padding:12px; border:1px solid #38412f; border-radius:12px; }
.diary-recipe-details summary { min-height:44px; display:flex; align-items:center; cursor:pointer; }
.diary-recipe-details h4 { margin:16px 0 8px; }
.diary-recipe-details .diary-nutrients { grid-template-columns:repeat(2,minmax(0,1fr)); }
.diary-meals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:16px; }
.diary-entry { display:flex; flex-wrap:wrap; align-items:center; gap:12px; border-bottom:1px solid #38412f; padding:14px 0; }
.diary-entry>div:first-child { flex:1 1 180px; overflow-wrap:anywhere; }
.diary-entry .button-row { margin:0; gap:8px; }
.diary-preview { padding:12px; border:1px solid #455132; border-radius:12px; }
.diary-video { width:100%; max-height:340px; object-fit:contain; background:#080b07; border-radius:12px; display:block; margin:12px 0; }
.diary-edit { scroll-margin-top:20px; }
.diary-edit .full { grid-column:1/-1; }
@media(max-width:620px){
 .diary-nutrients { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .diary-food-list,.diary-meals { grid-template-columns:1fr; }
 .diary-section .section-head { align-items:start; flex-wrap:wrap; gap:12px; }
 .diary-section .form-grid { grid-template-columns:1fr; }
 .diary-barcode button,.diary-search button { width:100%; }
}
/* Conversation actions stay usable without horizontal scrolling. */
#portal-content:has([data-portal-conversation-reply]) .section-head { flex-wrap: wrap; gap: 12px; }
#portal-content:has([data-portal-conversation-reply]) .section-head h2 { min-width: 0; overflow-wrap: anywhere; }
#portal-content [data-portal-conversation-reply] { display: grid; gap: 12px; margin-top: 20px; }
#portal-content [data-portal-conversation-reply] textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; }
.portal-conversation-timeline { display: grid; gap: 12px; max-height: min(52vh,650px); overflow: auto; margin-top: 12px; }
@media (max-width:600px) { .portal-conversation-timeline { max-height: 40vh; } }
@media (max-width:780px) {
  html:has([data-portal-conversation-reply]) { scroll-padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
  [data-portal-conversation-reply] button { scroll-margin-bottom: calc(124px + env(safe-area-inset-bottom)); }
}
/* Compact meal navigation and scoped tracker pickers. */
.tracker-meal { min-width: 0; }
.tracker-meal summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; }
.tracker-meal summary h3 { margin: 0; }
.tracker-meal summary::after { content: '⌄'; }
.tracker-meal details[open] summary { margin-bottom: 12px; }
.tracker-meal > button { margin-top: 12px; width: 100%; }
.tracker-dialog-shade { position: fixed; inset: 0; z-index: 1000; background: rgb(0 0 0 / 65%); display: grid; place-items: center; padding: 20px; }
.tracker-dialog { box-sizing: border-box; width: min(960px, 100%); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; background: var(--surface, #18231f); border: 1px solid #52654b; border-radius: 18px; padding: 20px; }
.tracker-dialog-close { display: block; margin-left: auto; margin-bottom: 12px; }
.tracker-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tracker-choices h3 { grid-column: 1 / -1; }
.tracker-choices button { min-height: 52px; }
.tracker-frequent { display: grid; gap: 10px; margin-bottom: 16px; }
.tracker-frequent label { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px; border: 1px solid #52654b; border-radius: 12px; cursor: pointer; }
.tracker-frequent input { width: 24px; height: 24px; flex: 0 0 24px; }
.tracker-frequent span, .diary-food button { min-width: 0; overflow-wrap: anywhere; }
.tracker-frequent small, .tracker-frequent strong { display: block; }
.tracker-dialog [data-diary-apply-checked] { position: sticky; bottom: 0; z-index: 1; width: 100%; min-height: 48px; margin-block: 12px; box-shadow: 0 0 0 8px #18231f; }
.tracker-ingredient { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(80px, 120px) 50px auto; align-items: center; gap: 12px; margin-bottom: 12px; }
.tracker-ingredient input { min-width: 0; width: 100%; }
body.tracker-picker-open { overflow: hidden; }
.nutrition-home-widgets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 14px}
.nutrition-home-widget{min-width:0;margin:0;display:flex;flex-direction:column;padding:16px}
.nutrition-home-widget>a{display:grid;grid-template-columns:44px minmax(0,1fr);gap:10px;color:inherit;text-decoration:none;flex:1;min-height:112px;align-content:start}
.nutrition-home-widget h2{font-size:1.05rem;line-height:1.35;margin:6px 0;overflow-wrap:anywhere}
.nutrition-home-widget p{grid-column:1/-1;font-size:.9rem;line-height:1.5;overflow-wrap:anywhere;margin:0 0 8px}
.nutrition-home-widget button{min-height:44px;white-space:normal}
.nutrition-workspace-page #portal-title{font-size:clamp(1.5rem,4vw,2rem)}
.nutrition-workspace-page .portal-header{margin-bottom:10px}
.nutrition-workspace-page [data-preview-feedback]:empty,.nutrition-workspace-page [data-diary-message]:empty,.nutrition-workspace-page [data-diary-status]:empty{display:none}
.workspace-shortcuts summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:700}
.workspace-shortcuts .button-row>a{display:inline-flex;align-items:center;min-height:44px;padding:8px;color:#b4e52a}
@media(max-width:700px){.nutrition-home-widgets{grid-template-columns:1fr;gap:10px}.nutrition-home-widget{padding:12px}.nutrition-home-widget>a{min-height:78px;grid-template-columns:38px minmax(0,1fr);gap:6px 10px}.nutrition-home-widget>a>img{width:36px;height:36px}.nutrition-home-widget p{grid-column:2;margin:0}.nutrition-home-widget button{margin-top:8px}.nutrition-workspace-page .portal-main{padding-top:10px}}
@media (max-width: 600px) {
  .tracker-dialog-shade { padding: 0; }
  .tracker-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; padding: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .tracker-choices { grid-template-columns: 1fr; }
  .tracker-ingredient { grid-template-columns: minmax(0, 1fr) 100px 40px; gap: 8px; }
  .tracker-ingredient button { grid-column: 1 / -1; }
}
