@font-face {
  font-family: Manrope;
  src: url("/fonts/manrope.woff") format("woff");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff9f4;
  --surface: #fffefa;
  --white: #fff;
  --ink: #1d2035;
  --muted: #565966;
  --line: #e7ddd5;
  --red: #c81931;
  --red-dark: #a01429;
  --red-light: #ffe8e3;
  --tan: #f9eee3;
  --green: #135740;
  --green-light: #c8f4dc;
  --radius: 20px;
  --shadow: 0 4px 18px #2527450c;
  --poppy: #e11935;
  --mint: #a9edcb;
  --yellow: #ffdb60;
  --blue: #9ecbff;
  font-family: "Manrope", "Inter", "Aptos", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 0; min-height: 100dvh; margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a62530; outline-offset: 3px; }
svg { display: inline-block; flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.04em; line-height: 1.08; }
h1 { font-size: clamp(2.15rem, 4vw, 3.25rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { line-height: 1.5; }
.icon-defs, .screen-reader { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; top: 12px; left: 12px; z-index: 99; padding: 10px 14px; transform: translateY(-150%); border-radius: 8px; background: var(--white); color: var(--red-dark); }
.skip-link:focus { transform: translateY(0); }
.status { color: var(--red-dark); font-size: .86rem; line-height: 1.4; }
.status:empty { display: none; }
.muted, .subhead { color: var(--muted); }
.subhead { margin-top: 8px; font-size: 1rem; }
.compact { font-size: .82rem; }
.button, .icon-button, .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.25;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.button-primary { background: var(--red); color: var(--white); box-shadow: 0 2px 5px #8d151b1a; }
.button-primary:hover { background: var(--red-dark); }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--red-dark); }
.button-secondary:hover, .icon-button:hover, .avatar:hover { background: var(--red-light); border-color: #edd0ca; }
.button-quiet { justify-content: flex-start; background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--tan); color: var(--ink); }
.button-full { justify-content: center; width: 100%; }
.icon-button, .avatar { width: 44px; padding: 0; border-color: var(--line); }
.avatar { border-radius: 50%; color: var(--red-dark); }
.inline-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: flex-start; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--red-dark); text-align: left; font-size: .86rem; font-weight: 700; }
.inline-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.inline-button .icon { width: 15px; }
.square-icon { flex: 0 0 42px; display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--red-light); color: var(--red-dark); }
.square-icon .icon { width: 20px; height: 20px; }
.meals-icon { background: var(--yellow); color: #5c3703; }
.club-icon { background: var(--mint); color: #185347; }
.progress-icon { background: #e7defe; color: #482578; }
.fitness-icon { background: #ffc7cd; color: #83182f; }
.learn-icon { background: #dfd1f8; color: #542880; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-align: left; text-decoration: none; }
.brand-button { width: fit-content; padding: 0; border: 0; border-radius: 8px; background: transparent; }
.brand-mark { max-width: 48px; object-fit: contain; }
span.brand-mark { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; padding: 7px; border-radius: 10px; background: var(--poppy); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-name, .brand-line { display: block; }
.brand-name { font-family: "Times New Roman", Times, serif; font-weight: 700; font-size: 1.78rem; letter-spacing: -.04em; line-height: .92; }
.brand-line { margin-top: 5px; color: var(--red-dark); font-weight: 760; font-size: .72rem; line-height: 1; }

.gateway { max-width: 1280px; min-height: 100dvh; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) clamp(20px, 5vw, 74px) 42px; }
.gateway-brand { min-height: 52px; }
.gateway-content { display: grid; align-items: stretch; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .82fr); gap: clamp(22px, 5.5vw, 76px); max-width: 1120px; margin: clamp(46px, 10vh, 104px) auto 0; }
.welcome { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.welcome h1 { position: relative; max-width: 700px; font-size: clamp(3.5rem, 7.3vw, 6.8rem); font-weight: 800; line-height: .91; letter-spacing: -.08em; }
.welcome h1 em { color: #ffdfd0; font-family: Georgia, serif; font-weight: 700; letter-spacing: -.08em; }
.welcome p { position: relative; max-width: 440px; margin: 18px 0 0; color: #fff4ec; font-size: clamp(.98rem, 1.5vw, 1.18rem); }
.welcome-learn { display: flex; width: fit-content; min-height: 44px; align-items: center; gap: 8px; margin-top: 14px; color: #fff5f0; font-size: .89rem; font-weight: 700; text-underline-offset: 4px; }
.welcome-learn:focus-visible { outline-color: #fff; }
.gateway .welcome { padding: clamp(25px, 4.2vw, 48px); overflow: hidden; border-radius: 24px; background: linear-gradient(106deg, #52192cea 10%, #7e2641bd 56%, #92355645 110%), url("/images/iwin-lifestyle.webp") 63% center / cover no-repeat, #882640; color: #fff9f5; }
.gateway-card { align-self: center; width: 100%; margin: 0; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 17px 36px #6b423310, var(--shadow); }
.gateway-card h1, .gateway-card h2 { margin-top: 16px; font-size: clamp(1.58rem, 3vw, 2rem); }
.gateway-card > p { margin: 9px 0 24px; color: var(--muted); font-size: .94rem; }
.gateway-card .button { min-height: 47px; }
.demo-button { margin-top: 10px; }
.onboard-wrap { max-width: 580px; margin: clamp(26px, 8vh, 86px) auto 0; }

.app-shell { display: grid; grid-template-columns: 173px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; min-height: 100dvh; max-height: 100dvh; flex-direction: column; padding: 24px 12px 20px; overflow: auto; border-right: 1px solid #2a2c4a; background: #1e2039; }
.sidebar .brand { margin-inline: 7px; }
.sidebar .brand-name { color: #fff7f4; }
.sidebar .brand-line { color: #ffd3c4; }
.sidebar span.brand-mark { flex-basis: 43px; width: 43px; height: 43px; }
.sidebar :focus-visible { outline-color: #ffc1b6; }
.main-nav { display: grid; gap: 5px; margin-top: 33px; }
.nav-item { display: flex; min-height: 46px; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #f0edf9; text-align: left; font-size: .89rem; font-weight: 630; }
.nav-item:hover { background: #34365b; color: var(--white); }
.nav-item.is-active, .nav-item[aria-current="page"] { border-color: #ffb0b9; background: #ffe5e9; color: var(--red-dark); font-weight: 760; }
.nav-item .icon { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.sidebar-install { display: flex; min-height: 44px; width: 100%; align-items: center; gap: 11px; padding: 0 10px; color: #eadde4; font-size: .85rem; font-weight: 650; }
.sidebar-install:hover { background: #34365b; }
.app-body { min-width: 0; }
.topbar { display: flex; min-height: 60px; align-items: center; justify-content: flex-end; gap: 13px; padding: 5px clamp(18px, 3vw, 48px); border-bottom: 1px solid var(--line); background: #fffdfa; }
.header-date { color: var(--muted); font-size: .84rem; font-weight: 620; }
.membership { padding: 5px 8px; border-radius: 10px; background: var(--red-light); color: var(--red-dark); font-size: .72rem; font-weight: 650; white-space: nowrap; }
.mobile-brand, .mobile-date { display: none; }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 22px clamp(18px, 3vw, 48px) 40px; }
.app-status:not(:empty) { margin-bottom: 16px; padding: 10px 13px; border: 1px solid #efd2cb; border-radius: 10px; background: #f8ebe7; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.heading-row > * { min-width: 0; }
.heading-row > .button { flex: none; }
.greeting-name:not(:empty) { margin-top: 5px; color: #fff0e8; font-size: 1rem; font-weight: 690; }
.lifestyle-hero { min-height: 205px; padding: clamp(21px, 3vw, 43px); overflow: hidden; border-radius: 24px; background: linear-gradient(90deg, #a8122e 0%, #c81931 39%, #dc2d3bde 53%, #dc2d3b00 78%), url("/images/iwin-lifestyle.webp") right 46% / 66% auto no-repeat, var(--poppy); color: #fff8f5; }
.lifestyle-hero-content { width: min(59%, 38rem); }
.lifestyle-hero h1 { color: var(--white); font-size: clamp(2.8rem, 5.1vw, 4.9rem); font-weight: 810; letter-spacing: -.075em; line-height: .94; }
.lifestyle-hero .subhead { max-width: 22rem; margin-top: 5px; color: #fff3eb; }
.lifestyle-hero .add-shift { margin-top: 16px; border-color: #ffdcd1; background: #fff4eb; color: #811b31; }
.lifestyle-hero .add-shift:hover { background: #ffe3d6; }
.lifestyle-hero .add-shift:focus-visible { outline-color: #fff; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-bottom: 17px; }
.quick-actions button { display: flex; align-items: center; gap: 9px; min-height: 56px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-align: left; font-size: .86rem; font-weight: 700; }
.quick-actions button:hover { border-color: #cbaaaf; background: #fff6f1; }
.quick-actions .square-icon { flex: 0 0 33px; width: 33px; height: 33px; border-radius: 10px; }
.quick-actions .square-icon .icon { width: 17px; height: 17px; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 17px; }
.dashboard-main, .dashboard-side { display: flex; min-width: 0; flex-direction: column; gap: 17px; }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.planner-header { display: flex; min-height: 79px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 19px; background: #272c55; color: var(--white); }
.planner-header h2 { color: var(--white); font-size: clamp(1.15rem, 2.6vw, 1.66rem); letter-spacing: -.055em; }
.planner-header p { margin-top: 4px; color: #fff1e7; font-size: .82rem; }
.week-controls { display: flex; flex: none; gap: 6px; }
.week-controls .icon-button { width: 39px; min-height: 39px; border-color: #fff7ed66; background: #fff5ed10; color: #fff; }
.week-controls .icon-button:hover { background: #fff5ed2b; }
.week-controls .icon-button:focus-visible { outline-color: #fff; }
.week-grid { display: grid; min-height: 67px; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.week-grid > * { display: grid; min-width: 0; min-height: 48px; place-content: center; gap: 2px; padding: 4px 2px; overflow-wrap: anywhere; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: center; font-size: .73rem; font-weight: 650; }
.week-grid button:hover, .week-grid .today, .week-grid .is-today, .week-grid .selected, .week-grid .is-selected, .week-grid [aria-current="date"], .week-grid [aria-pressed="true"] { border-color: #eed0ca; background: var(--red-light); color: var(--red-dark); }
.week-grid strong, .week-grid b, .day-number { color: var(--ink); font-size: .99rem; }
.week-grid small { font-size: .72rem; }
.planner-body { padding: 12px 20px 20px; }
.section-row { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; }
.item-list { display: grid; gap: 8px; margin-top: 10px; }
.item-list:empty { margin: 0; }
.empty { padding: 12px 13px; border: 1px dashed #e7d9cb; border-radius: 12px; background: #fcf7f0; color: var(--muted); font-size: .87rem; }
.item-list > li, .recipe-grid > li { list-style: none; }
.item-list > article, .item-row, .item, .recipe-card { min-width: 0; padding: 12px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.item-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.item-list h3, .recipe-grid h3 { letter-spacing: -.02em; }
.item-list p, .recipe-grid p { margin-top: 4px; }
.item-list .empty { margin: 0; }
.item-list .button, .recipe-grid .button { min-height: 36px; }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.overview-card { display: flex; flex-direction: column; align-items: flex-start; padding: 18px; }
.overview-card h2 { margin: 12px 0 6px; }
.overview-card p { margin-bottom: 5px; color: var(--muted); font-size: .86rem; }
.overview-card .inline-button { margin-top: auto; }
.assistant-card { padding: 18px; }
.assistant-header { display: flex; align-items: center; gap: 10px; }
.assistant-header p { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.assistant-reply { display: grid; gap: 10px; margin: 16px 0 12px; overflow-wrap: anywhere; color: var(--ink); font-size: .89rem; }
.assistant-reply > p { padding: 12px; border-radius: 12px; background: var(--red-light); }
.assistant-reply ul { padding-left: 22px; }
.prompt-list { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 12px; }
.prompt-list button { min-height: 44px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); text-align: left; font-size: .77rem; font-weight: 650; }
.prompt-list button:hover { background: var(--tan); color: var(--ink); }
.assistant-form { display: flex; align-items: flex-end; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.assistant-form textarea { min-height: 54px; flex: 1; padding: 7px; border: 0; background: transparent; resize: vertical; }
.assistant-form .button { flex: 0 0 44px; width: 44px; padding: 0; }
.assistant-card .status:not(:empty) { margin-top: 9px; }
.side-progress { display: flex; align-items: center; gap: 10px; padding: 15px; }
.side-progress h2 { font-size: .98rem; }
.side-progress p { margin-top: 3px; color: var(--muted); font-size: .81rem; }
.side-progress .icon-button { flex: 0 0 44px; margin-left: auto; }
.weekly-insight { padding: 12px; border: 1px solid #cddccd; border-radius: var(--radius); background: var(--green-light); color: var(--green); font-size: .89rem; }

.daily-affirmation { display: flex; align-items: flex-start; gap: 10px; margin: -8px 0 16px; padding: 11px 14px; border: 1px solid #f0d7c6; border-left: 3px solid #cf805f; border-radius: 12px; background: #fff0e4; color: var(--muted); font-size: .88rem; }
.daily-affirmation .icon { margin-top: 2px; color: var(--red-dark); }
#affirmation-text { color: var(--ink); font-weight: 680; }
#affirmation-message:not(:empty) { margin-top: 2px; }
.motivation-settings { display: grid; min-width: 0; gap: 7px; margin: 0; padding: 0 0 10px; border: 0; }
.motivation-settings legend { padding: 0; color: var(--ink); font-size: .9rem; font-weight: 700; }

.hydration-glance { padding: 15px; }
.hydration-card { margin-bottom: 17px; scroll-margin-top: 16px; }
.hydration-heading { display: flex; align-items: center; gap: 10px; }
.hydration-glance h2 { font-size: 1.05rem; }
.hydration-icon { background: var(--blue); color: #153d66; }
.hydration-caption { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.hydration-total { margin-left: auto; color: #285b6f; white-space: nowrap; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.hydration-meter { display: block; width: 100%; height: 8px; margin-top: 12px; overflow: hidden; appearance: none; border: 0; border-radius: 999px; background: #e2edf0; accent-color: #326e80; }
.hydration-meter::-webkit-progress-bar { background: #e2edf0; }
.hydration-meter::-webkit-progress-value { border-radius: inherit; background: #326e80; }
.hydration-meter::-moz-progress-bar { border-radius: inherit; background: #326e80; }
.hydration-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hydration-actions .button { padding-inline: 9px; border-color: #c8dce2; background: #f3f9fa; color: #285b6f; font-variant-numeric: tabular-nums; }
.hydration-actions .button:hover { background: #e2edf0; }
.hydration-glance .inline-button { margin-bottom: -8px; }
.hydration-glance .status:not(:empty), .hydration-card > .status:not(:empty) { margin-top: 9px; }
.hydration-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 18px; }
.hydration-form, .hydration-history { margin-top: 9px; }
.hydration-history-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.hydration-day { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .87rem; font-variant-numeric: tabular-nums; }
.hydration-day .hydration-meter { flex: 1 1 50px; max-width: 130px; margin: 0; }
.hydration-recent-editor .item-list { margin-top: 0; }

.recommendations-card { padding: 15px; background: #fff6e8; }
.recommendations-card .item-list > article, .recommendations-card .empty { background: #fffaf1; }
.recommendations-card .icon-button { color: #874721; }
.fitness-overview-panel { margin-bottom: 17px; background: #fff2f2; }
.fitness-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 10px; margin: 8px 0 0; }
.fitness-overview:empty { margin: 0; }
.fitness-overview > * { min-width: 0; padding: 13px; border: 1px solid #f0d8da; border-radius: 12px; background: #fffdfa; }
.fitness-overview strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.fitness-overview progress { width: 100%; height: 9px; accent-color: #b52361; }
.fitness-routine-panel { background: #f0f7ee; }
.exercise-fields { min-width: 0; margin: 0; padding: 9px 12px 12px; border: 1px solid var(--line); border-radius: 12px; }
.exercise-fields legend { padding: 0 5px; font-size: .85rem; font-weight: 700; }
.exercise-fields legend small { color: var(--muted); font-weight: 470; }
.fitness-exercises { display: grid; gap: 10px; }
.fitness-exercises:not(:empty) { margin-bottom: 10px; }
.fitness-exercises > * { min-width: 0; padding: 8px; border-radius: 9px; background: var(--tan); }
.learn-index { background: #f5edfa; }
.learn-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.learn-categories:empty { margin: 0; }
.learn-categories button { min-height: 44px; padding: 6px 11px; border: 1px solid #ddcbea; border-radius: 999px; background: #fffaff; color: #562b70; font-weight: 680; }
.learn-categories button:hover, .learn-categories button[aria-pressed="true"] { background: #ead8f7; }
.learn-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; margin-top: 17px; }
.learn-list > * { min-width: 0; padding: 15px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.learn-list p, .learn-detail p { margin-top: 8px; color: var(--muted); }
.learn-detail { scroll-margin-top: 16px; }
.learn-detail :is(ul, ol) { padding-left: 22px; line-height: 1.6; }
.learn-detail h3:not(:first-child) { margin-top: 18px; }
.app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 16px; padding: 8px 16px 30px; font-size: .79rem; }
.app-footer a { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.app-footer a:hover { color: var(--red-dark); }
.gateway-footer { margin-top: 20px; padding-bottom: 10px; }
.signup-legal { padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff9f2; }
.signup-legal .check { min-height: 44px; gap: 10px; color: var(--ink); }
.signup-legal p { margin: 5px 0 3px 27px; color: var(--muted); font-size: .84rem; }
.signup-legal a, #health-consent-card a { color: var(--red-dark); text-underline-offset: 2px; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; align-items: start; }
.profile-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); }
.panel { padding: clamp(16px, 2.2vw, 24px); }
.panel > .form-stack { margin-top: 14px; }
.panel > p.muted { margin-top: 5px; }
.below-grid { margin-top: 17px; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 9px; margin-top: 12px; }
.activity-search { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto auto; align-items: end; gap: 12px; margin: 12px 0 0; }
.location-search { margin-top: 2px; }
.friend-code { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; color: var(--muted); font-size: .88rem; }
.friend-code output { padding: 3px 7px; border-radius: 7px; background: var(--red-light); color: var(--red-dark); font-family: ui-monospace, monospace; font-weight: 700; overflow-wrap: anywhere; }
.friend-code-row { flex-wrap: wrap; margin-bottom: 8px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
.inline-form > label { flex: 1 1 180px; max-width: 330px; }
.settings-column { display: grid; gap: 11px; }
.setting { display: flex; gap: 11px; margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--line); }
.setting p { margin: 5px 0 8px; color: var(--muted); font-size: .86rem; }
.setting .button { min-height: 40px; }
.settings-column .status:not(:empty) { margin-top: 12px; }
.sign-out { width: fit-content; color: var(--red-dark); }

.form-stack { display: grid; align-items: start; gap: 13px; }
.form-stack > button:not(.button-full) { justify-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
label { display: block; min-width: 0; color: var(--ink); font-size: .85rem; font-weight: 650; }
label small { color: var(--muted); font-size: .76rem; font-weight: 470; }
label input + small { display: block; margin-top: 4px; }
input:not([type=checkbox]), textarea, select { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 5px; padding: 9px 10px; border: 1px solid #ded4c8; border-radius: 10px; background: var(--white); color: var(--ink); font-size: 1rem; font-weight: 490; line-height: 1.28; }
textarea { min-height: 65px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #766a61; opacity: 1; font-size: .9em; }
input:focus, textarea:focus, select:focus { border-color: #b9252d; }
.check { display: flex; min-height: 42px; align-items: center; gap: 8px; color: var(--muted); }
.check input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: var(--red-dark); }
.editor, .optional, .tip { border-top: 1px solid var(--line); }
.editor { margin-top: 13px; }
.optional { padding-bottom: 3px; }
.editor summary, .optional summary, .tip summary { min-height: 44px; padding: 12px 0; color: var(--red-dark); cursor: pointer; font-size: .86rem; font-weight: 700; }
.editor form, .optional .form-stack { padding: 2px 0 5px; }
.tip { margin-top: 7px; }
.tip p { padding: 0 3px 9px; color: var(--muted); font-size: .88rem; }

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 179px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar .brand { margin-inline: 0; }
  .dashboard { grid-template-columns: minmax(0, 1.5fr) minmax(265px, 1fr); }
  .main-content { padding-inline: 22px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 5; top: auto; right: 0; bottom: 0; left: 0; min-height: 0; max-height: none; padding: 5px max(5px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--line); background: #fffdfa; }
  .sidebar > .brand, .sidebar-bottom, .nav-item.nav-profile { display: none; }
  .sidebar :focus-visible { outline-color: #a62530; }
  .main-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; width: min(100%, 550px); margin: 0 auto; }
  .nav-item { min-height: 50px; flex-direction: column; justify-content: center; gap: 3px; padding: 3px; color: var(--muted); text-align: center; font-size: .7rem; }
  .nav-item:hover { background: var(--tan); color: var(--ink); }
  .nav-item .icon { width: 20px; height: 20px; }
  .mobile-brand { display: inline-flex; margin-right: auto; }
  .topbar { min-height: 64px; padding-top: max(6px, env(safe-area-inset-top)); }
  .main-content { padding-bottom: 24px; }
  .app-body > .app-footer { padding-bottom: calc(75px + env(safe-area-inset-bottom)); }
}

@media (max-width: 690px) {
  .gateway { padding-bottom: 22px; }
  .gateway-content { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 17px; }
  .gateway .welcome { padding: 22px; }
  .welcome h1 { max-width: 12ch; font-size: clamp(2.6rem, 9.3vw, 4rem); line-height: .96; }
  .welcome p { margin-top: 11px; }
  .gateway-card { border-radius: var(--radius); }
  .dashboard, .content-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-main { display: contents; }
  .dashboard-side { display: contents; }
  .hydration-glance { grid-row: 1; }
  .planner-card { grid-row: 2; }
  .assistant-card { grid-row: 3; }
  .recommendations-card { grid-row: 4; }
  .overview-grid { grid-row: 5; }
  .side-progress, .weekly-insight { grid-row: auto; }
  .hydration-layout { grid-template-columns: minmax(0, 1fr); }
  .hydration-card { margin-bottom: 12px; }
  .topbar { gap: 7px; padding-inline: max(15px, env(safe-area-inset-left)); }
  .topbar .header-date { display: none; }
  .main-content { padding-top: 23px; padding-inline: 15px; }
  .heading-row { align-items: center; margin-bottom: 17px; }
  .heading-row .button { padding-inline: 9px; font-size: .78rem; }
  .heading-row .button .icon { width: 15px; }
  .heading-row .subhead { font-size: .87rem; }
  .lifestyle-hero { min-height: 178px; padding: 20px; background-position: center, 65% center; }
  .lifestyle-hero .subhead { max-width: 22ch; }
  .lifestyle-hero .add-shift { margin-top: 13px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
  .quick-actions button { min-height: 52px; padding-inline: 7px; font-size: .79rem; }
  .fitness-overview-panel { margin-bottom: 12px; }
  .overview-grid, .dashboard, .content-grid { gap: 12px; }
  .overview-card { padding: 13px; }
  .overview-card h2 { font-size: 1.04rem; }
  .overview-card .inline-button { font-size: .79rem; }
  .planner-header { min-height: 86px; padding-inline: 14px; }
  .planner-body { padding-inline: 14px; }
  .week-grid { padding-inline: 8px; }
  .week-controls .icon-button { width: 44px; min-height: 44px; }
  .item-list .button, .recipe-grid .button { min-height: 44px; }
  .activity-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  .nav-item { font-size: .64rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .week-grid { gap: 2px; }
  .heading-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

input[type=hidden] { display: none; }
.status:not(.is-error) { color: var(--green); }
.app-status:not(:empty):not(.is-error) { border-color: #d7e2d5; background: var(--green-light); }
.device-setup { display: flex; align-items: center; justify-content: space-between; gap: 11px 16px; margin-bottom: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.device-setup h2 { font-size: .98rem; }
.device-setup p { margin-top: 4px; color: var(--muted); font-size: .83rem; }
.device-actions, .account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.device-actions .button { padding-inline: 9px; font-size: .78rem; }
.device-actions .icon { width: 15px; }
.list-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.list-item-body { flex: 1 1 175px; min-width: 0; }
.list-item-body h3 { line-height: 1.22; }
.list-item-body p, .recipe-content { color: var(--muted); font-size: .86rem; }
.item-kind { display: inline-flex; align-items: center; margin: 0 0 5px; padding: 3px 7px; border-radius: 20px; background: var(--tan); color: var(--muted); font-size: .7rem; font-weight: 670; }
.kind-shift .item-kind { background: var(--red-light); color: var(--red-dark); }
.kind-activity .item-kind { background: var(--green-light); color: var(--green); }
.item-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.item-actions .button { padding-inline: 9px; }
.recipe-card { overflow: hidden; }
.recipe-card summary { cursor: pointer; color: var(--ink); font-weight: 700; line-height: 1.5; }
.recipe-content { margin-top: 7px; overflow-wrap: anywhere; }
.recipe-content ul, .recipe-content ol { padding-left: 20px; }
.recipe-content li { margin-bottom: 4px; line-height: 1.45; }
.day-has-plans { color: var(--red-dark); font-weight: 680; }

@media (max-width: 690px) {
  .device-setup { flex-wrap: wrap; }
}

.weekly-insight > h2 { margin-bottom: 5px; font-size: 1.05rem; }
.weekly-insight > h3 { margin-top: 9px; font-size: .9rem; }
.groceries { margin: 0; padding-left: 20px; color: var(--ink); font-size: .9rem; line-height: 1.6; }
@media (max-width: 690px) {
  .mobile-date:not(:empty) { display: block; margin-bottom: 4px; color: #ffe3d7; font-size: .76rem; font-weight: 650; }
}

/* Public entry and the member workspace share the same wordmark and color palette. */
.landing-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; }
.landing-top nav { display: flex; align-items: center; gap: 5px; }
#auth-screen { max-width: 1470px; }
#auth-screen .gateway-content { max-width: none; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .82fr); gap: 20px; margin-top: clamp(18px, 4vw, 48px); }
#auth-screen .welcome { min-height: 400px; justify-content: center; padding: clamp(23px, 4.1vw, 58px); border-radius: 26px; background: linear-gradient(92deg, #11182eea 2%, #17243bce 42%, #1a253b3b 73%, #1b253b14 100%), url("/images/iwin-lifestyle.webp") right 34% / cover no-repeat, #212f42; }
.welcome h1 { max-width: 12ch; color: #fff; font-size: clamp(3rem, 5.9vw, 6.4rem); letter-spacing: -.077em; }
.welcome h1 em { color: #ffd768; font-family: inherit; font-weight: inherit; letter-spacing: inherit; }
.welcome p { max-width: 29ch; color: #fff; }
.welcome-learn { min-height: 44px; margin-top: 20px; padding: 7px 12px; border-radius: 11px; background: #fff8f0; color: #192339; text-decoration: none; }
.welcome-learn:hover { background: #ffedbb; }
.landing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.landing-feature { min-width: 0; overflow: hidden; border: 1px solid #d8e5d6; border-radius: 18px; background: #dff7e3; }
.landing-feature img { display: block; width: 100%; height: clamp(95px, 13vw, 175px); object-fit: cover; object-position: center 42%; }
.landing-feature > div { padding: 14px 17px 17px; }
.landing-feature h2 { font-size: clamp(1.08rem, 1.65vw, 1.45rem); }
.landing-feature p { max-width: 33ch; margin-top: 5px; color: #3e4954; font-size: .875rem; }
.feature-meals { border-color: #ead7ab; background: #fff0bc; }
.feature-community { border-color: #dcd5ef; background: #eee5fb; }
.feature-community img { object-position: center 37%; }
.gateway-card { border-color: #e5d5cb; box-shadow: 0 8px 25px #34223912; }
.gateway-card .square-icon { background: #ffe0e4; color: #a01429; }

.main-nav .nav-item .icon { color: #cdd0fa; }
.main-nav .nav-item[data-view="fitness"] .icon { color: #ffbfc7; }
.main-nav .nav-item[data-view="meals"] .icon { color: #ffdb60; }
.main-nav .nav-item[data-view="activities"] .icon { color: #a9edcb; }
.main-nav .nav-item[data-view="progress"] .icon { color: #9ecbff; }
.main-nav .nav-item[data-view="learn"] .icon { color: #e0c5fc; }
.main-nav .nav-item[aria-current="page"] .icon { color: var(--red-dark); }
.topbar .avatar { border-color: #efd8ce; background: #fff0e8; }
.heading-row { margin-bottom: 18px; }
.heading-row > :is(.button, a.button) { flex: none; }
.lifestyle-hero { background-position: center, right 31%; }
.daily-affirmation { gap: 10px; margin: -5px 0 14px; padding: 12px 14px; border: 1px solid #b5e8cc; border-left: 4px solid #35a477; border-radius: 14px; background: #dcf7e8; color: #31564d; }
.daily-affirmation .icon { color: #13633d; }
.quick-actions { gap: 9px; margin-bottom: 17px; }
.quick-actions button { min-height: 62px; border-color: #efcccf; background: #ffe4e4; box-shadow: none; }
.quick-actions button:nth-child(2) { border-color: #c7defb; background: #e1efff; }
.quick-actions button:nth-child(3) { border-color: #eece86; background: #fff1bc; }
.quick-actions button:nth-child(4) { border-color: #ddd0f2; background: #eee4ff; }
.quick-actions button:hover { border-color: #af8994; filter: saturate(1.12); }
.quick-actions .square-icon { flex-basis: 36px; width: 36px; height: 36px; }
.dashboard { grid-template-columns: minmax(0, 1.62fr) minmax(245px, 1fr); gap: 14px; }
.dashboard-main, .dashboard-side { gap: 14px; }
.overview-grid { gap: 10px; }
.overview-card { background: #fff3d1; border-color: #eeddab; }
.overview-card:nth-child(2) { background: #e2f8ec; border-color: #ccebd9; }
.hydration-glance { border-color: #cadff4; background: #eaf5ff; }
.hydration-total { color: #194f8d; }
.hydration-actions .button { border-color: #b9d8fa; background: #f9fcff; color: #194f8d; }
.hydration-actions .button:hover { background: #d9ecff; }
.assistant-card { border-color: #dcd5f2; background: #f3ecfe; }
.assistant-card .square-icon { background: #cdb9f5; color: #4e286a; }
.assistant-reply > p { background: #e9dcfa; }
.recommendations-card { border-color: #ead6a6; background: #fff5d8; }
.recommendations-card .item-list > article, .recommendations-card .empty { background: #fff9e9; }
.side-progress { border-color: #e6d2e9; background: #f8ebf5; }
.weekly-insight { border-color: #b3e4d1; background: #e1f6ed; }
.week-grid .is-today, .week-grid [aria-current="date"] { border-color: #ffc1c5; background: #ffe5e5; }
.week-grid .is-today .day-number { color: #af1230; }

.view-banner {
  --banner-color: #d9f3e5;
  --banner-solid: #d9f3e5f7;
  --banner-art: none;
  --banner-position: 43%;
  display: grid;
  min-height: 170px;
  align-content: center;
  justify-items: start;
  gap: 12px;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #1820341c;
  border-radius: 22px;
  background: linear-gradient(90deg, var(--banner-color) 0%, var(--banner-color) 37%, var(--banner-solid) 51%, transparent 74%),
    var(--banner-art) right var(--banner-position) / 56% auto no-repeat, var(--banner-color);
}
.view-banner > div { width: min(54%, 35rem); }
.view-banner h1 { font-size: clamp(2.35rem, 5vw, 4.2rem); font-weight: 790; letter-spacing: -.07em; }
.view-banner .subhead { max-width: 31ch; color: #2f3a4a; }
.view-banner > .button { margin-top: 1px; }
.fitness-banner { --banner-color: #b3edcf; --banner-solid: #b3edcfe8; --banner-art: url("/media/health/movement.webp"); --banner-position: 31%; }
.meals-banner { --banner-color: #ffe07b; --banner-solid: #ffe07bf7; --banner-art: url("/media/health/meals.webp"); }
.club-banner { --banner-color: #d6c9fa; --banner-solid: #d6c9faec; --banner-art: url("/media/health/community.webp"); --banner-position: 35%; }
.learn-banner { --banner-color: #fdbfbb; --banner-solid: #fdbfbbe8; --banner-art: url("/media/health/routines.webp"); --banner-position: 39%; }
.progress-banner { --banner-color: #a9cfff; --banner-solid: #a9cfffee; --banner-art: url("/media/health/hydration.webp"); }
.view-banner .button-secondary { border-color: #19244035; color: #253555; }

.recipe-discovery { border-color: #ead8aa; background: #fff8e8; }
.meal-navigation { display: flex; flex-wrap: wrap; gap: 6px; margin: -7px 0 11px; }
.meal-navigation .button { border-color: #e9d39a; background: #fff2cb; color: #4d3813; }
.meal-navigation .button:hover { background: #ffe495; }
#meal-plan-panel, #grocery-panel { scroll-margin-top: 15px; }
#meal-plan-panel:target, #grocery-panel:target { border-color: #d39544; }
.recipe-discovery .section-row, .discover-panel .section-row { min-height: 33px; }
.result-count { color: var(--muted); font-size: .84rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.result-count:empty { display: none; }
.discovery-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 730px; margin-top: 12px; }
.search-field { position: relative; }
.search-field .icon { position: absolute; top: 50%; left: 12px; color: #485975; transform: translateY(-50%); pointer-events: none; }
.search-field input { height: 46px; margin: 0; padding-left: 36px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.filter-chips button { min-height: 44px; padding: 5px 11px; border: 1px solid #decda8; border-radius: 40px; background: #fffefa; color: #50401c; font-size: .84rem; font-weight: 720; }
.filter-chips button:hover, .filter-chips button[aria-pressed="true"] { border-color: #d8af4e; background: #ffdf75; color: #332609; }
.recipe-discovery .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(min(225px, 100%), 1fr)); gap: 10px; margin-top: 15px; }
.meal-recipe-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid #e9d9bc; border-radius: 14px; background: #fffefa; }
.recipe-image { display: block; width: 100%; height: clamp(120px, 13vw, 175px); object-fit: cover; }
.meal-recipe-card .recipe-content { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 7px; margin: 0; padding: 13px 14px; color: #4f5360; font-size: .87rem; }
.meal-recipe-card h3 { color: var(--ink); font-size: 1.12rem; }
.meal-recipe-card p { margin: 0; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; color: #695028; font-size: .8rem; font-weight: 700; }
.recipe-meta span { padding: 4px 6px; border-radius: 6px; background: #fff0c8; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.recipe-actions .button { padding-inline: 9px; }
.recipe-details { border-top: 1px solid var(--line); }
.recipe-details summary { min-height: 44px; padding: 11px 0; cursor: pointer; color: var(--red-dark); font-weight: 700; }
.discovery-empty { grid-column: 1 / -1; padding: 18px; border: 1px dashed #e5d4bd; border-radius: 12px; background: #fffdfa; color: var(--muted); }
.discovery-empty .button { margin-top: 9px; }
.meal-planning-grid { margin-top: 13px; }
.grocery-panel { border-color: #cbe8d9; background: #edfbf2; }

.discover-panel { border-color: #d8d0ee; background: #f8f3ff; }
.discover-panel .filter-chips button { border-color: #dad0ed; color: #46337c; }
.discover-panel .filter-chips button:hover, .discover-panel .filter-chips button[aria-pressed="true"] { border-color: #bdaeec; background: #e3dbfc; color: #35266d; }
.discover-panel .activity-search { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 8px; max-width: 730px; margin-top: 11px; }
.activity-more { grid-column: 1 / -1; }
.activity-more summary { display: list-item; min-height: 44px; width: fit-content; padding: 10px 0; color: #44317d; cursor: pointer; font-size: .85rem; font-weight: 700; }
.activity-more .form-grid { max-width: 550px; }
.club-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.club-grid .discovery-empty, .club-grid > .empty { grid-column: 1 / -1; padding: 19px; border-color: #d7c8f1; background: #faf7ff; }
.item-list > .club-activity-card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; border-color: #dcd2f1; border-radius: 15px; background: #fffefa; }
.club-activity-card .activity-card-body { flex: 1; padding: 13px; }
.club-activity-card img { display: block; width: 100%; height: 126px; object-fit: cover; }
.club-activity-card h3 { font-size: 1.13rem; line-height: 1.18; }
.activity-meta { display: flex; flex-wrap: wrap; gap: 4px 7px; margin-bottom: 8px; color: #5c4678; font-size: .8rem; font-weight: 650; }
.activity-meta span { padding: 3px 6px; border-radius: 5px; background: #eee5fa; }
.activity-action-row { display: flex; flex-wrap: wrap; align-items: start; gap: 4px; padding: 0 13px 13px; }
.activity-action-row .button { padding-inline: 9px; }
.activity-options summary { min-height: 44px; padding: 11px 8px; color: var(--muted); cursor: pointer; font-size: .85rem; font-weight: 700; }
.activity-card-date { font-weight: 700; }
.activity-card-location, .activity-card-status { color: var(--muted); font-size: .85rem; }
.activity-full .activity-card-status { color: #a01429; font-weight: 700; }
.club-host-panel { margin-top: 13px; padding-block: 8px; }
.club-host-panel > .editor { margin: 0; border: 0; }
.club-host-panel > .editor summary { min-height: 48px; padding-block: 14px; font-size: 1rem; }
.club-friends-panel { border-color: #cde7d7; background: #edfbf3; }

.wellness-summary { margin: 0 0 13px; }
.wellness-summary h2 { margin-bottom: 9px; }
.weekly-wellness { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr)); gap: 8px; }
.weekly-wellness-tile { min-width: 0; padding: 13px; overflow-wrap: anywhere; border: 1px solid #c8dcfa; border-radius: 14px; background: #e5f1ff; }
.weekly-wellness-tile:nth-child(2) { border-color: #e9d3a1; background: #fff1c5; }
.weekly-wellness-tile:nth-child(3) { border-color: #cbe6d5; background: #e3f7eb; }
.weekly-wellness-tile:nth-child(4) { border-color: #e8c8d2; background: #ffeaf0; }
.weekly-wellness-label { color: #4a5368; font-size: .85rem; font-weight: 690; }
.weekly-wellness-value { display: block; margin-top: 3px; color: #222947; font-size: clamp(1.28rem, 3vw, 1.85rem); line-height: 1.05; font-weight: 790; font-variant-numeric: tabular-nums; }
.hydration-card { border-color: #c9def4; background: #f0f7ff; }
.hydration-card .hydration-heading { gap: 11px; }
.hydration-card .hydration-total { font-size: clamp(1.3rem, 4.2vw, 2.1rem); }
.hydration-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 11px; }
.hydration-chart-panel, .hydration-forms { min-width: 0; padding: 13px; border: 1px solid #d3e3f4; border-radius: 13px; background: #fffefa; }
.hydration-week-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 3px; margin: 10px 0 0; padding: 0; list-style: none; }
.hydration-week-day { display: grid; min-width: 0; grid-template-rows: auto 101px auto; align-items: center; gap: 5px; padding: 0 2px 3px; border: 0; text-align: center; justify-content: stretch; }
.hydration-week-bar { position: relative; display: grid; height: 101px; place-items: center; }
.hydration-week-bar meter, .hydration-week-bar progress { position: absolute; width: 93px; height: 15px; margin: 0; transform: rotate(-90deg); accent-color: #3173b8; }
.hydration-week-bar meter::-webkit-meter-bar { overflow: hidden; border: 0; border-radius: 999px; background: #e2eefb; }
.hydration-week-bar meter::-webkit-meter-optimum-value { border-radius: 999px; background: #5494d7; }
.hydration-week-bar meter::-moz-meter-bar { border-radius: 999px; background: #5494d7; }
.hydration-week-day.is-today .hydration-week-bar meter::-webkit-meter-optimum-value { background: #1a609f; }
.hydration-week-day.is-today .hydration-week-bar meter::-moz-meter-bar { background: #1a609f; }
.hydration-week-date, .hydration-week-value { min-width: 0; overflow-wrap: anywhere; font-size: .73rem; font-variant-numeric: tabular-nums; }
.hydration-week-date { color: #465670; }
.hydration-week-value { color: #1a5288; font-weight: 700; }
.hydration-week-day.is-today .hydration-week-date { color: #194f8d; font-weight: 760; }
.hydration-chart-unit { margin-top: 7px; color: #465670; font-size: .82rem; }

.fitness-overview-panel { border-color: #d1eadb; background: #eaf8ed; }
.fitness-overview > * { border-color: #d6e7d9; }
.fitness-routine-panel { border-color: #e5d5a6; background: #fff6d9; }
.learn-index { border-color: #ead1d5; background: #fff0ed; }
.learn-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); }
.learn-list > .learn-card { display: flex; overflow: hidden; flex-direction: column; padding: 0; }
.learn-card-image { display: block; width: 100%; height: clamp(135px, 13vw, 180px); object-fit: cover; }
.learn-card-body { padding: 13px 15px; }
.learn-card-body .inline-button { margin-top: 5px; }
.learn-detail-image { display: block; width: 100%; max-height: 335px; margin-block: 12px; object-fit: cover; border-radius: 13px; }

.offline-content { width: min(calc(100% - 32px), 480px); margin: min(16vh, 110px) auto 30px; padding: clamp(20px, 5vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.offline-content p { margin-top: 9px; color: var(--muted); }
.offline-content a { display: inline-flex; min-height: 44px; align-items: center; color: var(--red-dark); font-weight: 720; }

@media (min-width: 901px) and (max-width: 1150px) {
  .app-shell { grid-template-columns: 155px minmax(0, 1fr); }
  .sidebar { padding-inline: 9px; }
}
@media (max-width: 900px) {
  .mobile-brand span.brand-mark { flex-basis: 38px; width: 38px; height: 38px; padding: 5px; }
  .mobile-brand .brand-name { font-size: 1.53rem; }
  .main-nav .nav-item .icon { color: #3e4a7c; }
  .main-nav .nav-item[data-view="fitness"] .icon { color: #a11d43; }
  .main-nav .nav-item[data-view="meals"] .icon { color: #86541f; }
  .main-nav .nav-item[data-view="activities"] .icon { color: #20715c; }
  .main-nav .nav-item[data-view="progress"] .icon { color: #225c9b; }
  .main-nav .nav-item[data-view="learn"] .icon { color: #633a87; }
  .main-nav .nav-item[aria-current="page"] .icon { color: var(--red-dark); }
  .sidebar { box-shadow: 0 -3px 17px #29314714; }
}
@media (max-width: 690px) {
  #auth-screen .gateway-content { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
  #auth-screen .welcome { min-height: 218px; padding: 19px; border-radius: 18px; background-position: 54% 35%; }
  .welcome h1 { font-size: clamp(2.54rem, 8.5vw, 4rem); }
  .welcome p { max-width: 25ch; font-size: .93rem; }
  .welcome-learn { margin-top: 12px; padding-inline: 9px; }
  .landing-top span.brand-mark { flex-basis: 40px; width: 40px; height: 40px; }
  .landing-top .brand-name { font-size: 1.49rem; }
  .landing-top .button { padding-inline: 7px; }
  .landing-features { grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 12px; }
  .landing-feature { display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr); align-items: center; border-radius: 12px; }
  .landing-feature img { height: 100%; min-height: 90px; }
  .landing-feature > div { padding: 9px; }
  .landing-feature h2 { font-size: 1.04rem; }
  .landing-feature p { margin-top: 4px; font-size: .8rem; }
  .main-content { padding-top: 12px; padding-inline: 11px; }
  .lifestyle-hero { min-height: 168px; padding: 15px; border-radius: 17px; background: linear-gradient(90deg, #a91229 0%, #c61d37 33%, #c61d37d4 48%, transparent 98%),
    url("/images/iwin-lifestyle.webp") right 40% / 86% auto no-repeat, var(--poppy); }
  .lifestyle-hero-content { width: min(73%, 28rem); }
  .lifestyle-hero .subhead { max-width: 26ch; }
  .lifestyle-hero .add-shift { margin-top: 10px; }
  .view-banner { min-height: 144px; gap: 8px; padding: 14px; border-radius: 17px; background: linear-gradient(90deg, var(--banner-color) 0%, var(--banner-color) 36%, var(--banner-solid) 54%, transparent 90%),
    var(--banner-art) right var(--banner-position) / 71% auto no-repeat, var(--banner-color); }
  .view-banner > div { width: min(75%, 29rem); }
  .view-banner .subhead { max-width: 25ch; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 11px; }
  .quick-actions button { min-height: 53px; padding-inline: 6px; font-size: .83rem; }
  .quick-actions .square-icon { flex-basis: 31px; width: 31px; height: 31px; }
  .dashboard { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .recipe-discovery .recipe-grid { grid-template-columns: repeat(auto-fill, minmax(min(145px, 100%), 1fr)); }
  .recipe-image { height: 110px; }
  .meal-recipe-card .recipe-content { padding: 9px; }
  .meal-recipe-card h3 { font-size: 1rem; }
  .filter-chips { gap: 5px; }
  .filter-chips button { padding-inline: 8px; }
  .weekly-wellness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekly-wellness-tile { padding: 10px; }
  .hydration-layout { grid-template-columns: minmax(0, 1fr); }
  .hydration-chart-panel, .hydration-forms { padding: 10px; }
}
@media (max-width: 375px) {
  .landing-top { gap: 5px; }
  .landing-top nav { gap: 1px; }
  .discovery-search button, .discover-panel .activity-search button { padding-inline: 8px; }
  .recipe-discovery .recipe-grid { grid-template-columns: minmax(0, 1fr); }
}

.phone-check-dialog { width:min(92vw,28rem); max-height:85dvh; overflow:auto; margin:auto; padding:1.5rem; border:1px solid #d6c9e1; border-radius:1.25rem; background:#fffdf8; color:#261b33; box-shadow:0 15px 55px #21152730; }
.phone-check-dialog::backdrop {background:#22183280}
.phone-check-dialog p {margin:.75rem 0}
