/* App layer for the members pages (on top of site.css and members.css / tracking.css).
   Phone first: a top bar, a bottom tab bar, big tap targets, and the guided workout session. */
:root {
  --tabbar-h: 64px;
  --cf-assistant-bottom: 24px;
  --gold-soft: rgba(242, 200, 121, .12);
  --meal: #9ad7bd; --vit: #b9a8ff;
  --card: rgba(13, 20, 48, .78);
  --tap: 48px;
}
@media (max-width: 760px) { :root { --cf-assistant-bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); } }

[hidden] { display: none !important; }
body.app { -webkit-tap-highlight-color: transparent; }
body.app .nav, body.app .member-nav { display: none !important; }   /* replaced by the app bar */
body.app .wrap { padding-top: 6px; }
@media (max-width: 760px) {
  body.app { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  body.app input, body.app select, body.app textarea { font-size: 16px !important; }  /* stops iPhone zooming in on focus */
}

/* ---------- Top bar ---------- */
.appbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  background: rgba(7, 11, 26, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(190, 205, 255, .12); }
.appbrand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; font-size: 1rem; min-height: 40px; }
.appbrand svg { width: 22px; height: 22px; flex: 0 0 auto; }
.appbrand em { font-style: normal; color: var(--gold); }
.apptabs { display: flex; gap: 4px; }
.apptab { display: flex; align-items: center; gap: 8px; color: var(--dim); text-decoration: none; padding: 9px 14px; border-radius: 999px; font: 500 .92rem var(--font-body); }
.apptab svg { width: 18px; height: 18px; }
.apptab:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.apptab[aria-current] { color: var(--sky); background: var(--gold); }

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar { display: none; }
@media (max-width: 760px) {
  .apptabs { display: none; }
  .appbrand { font-size: .86rem; letter-spacing: .1em; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 26;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: rgba(9, 13, 32, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid rgba(190, 205, 255, .16); }
  .tabbtn { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--dim); text-decoration: none; font: 500 .7rem var(--font-body); letter-spacing: .02em; position: relative; }
  .tabbtn svg { width: 25px; height: 25px; }
  .tabbtn[aria-current] { color: var(--gold); }
  .tabbtn[aria-current]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 3px 3px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
  body[data-tab="meals"] .tabbtn[aria-current] { color: var(--meal); }
  body[data-tab="meals"] .tabbtn[aria-current]::before { background: var(--meal); box-shadow: 0 0 10px var(--meal); }
  body[data-tab="vitamins"] .tabbtn[aria-current] { color: var(--vit); }
  body[data-tab="vitamins"] .tabbtn[aria-current]::before { background: var(--vit); box-shadow: 0 0 10px var(--vit); }
  .side-switch { display: none !important; }   /* Switch program lives on Today, Training and Profile instead */
}

/* ---------- Buttons ---------- */
.bigbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 16px;
  font: 600 1.02rem var(--font-body); color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); cursor: pointer; text-decoration: none; text-align: center;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.bigbtn:active { transform: scale(.98); }
.bigbtn.go { background: var(--gold); border-color: var(--gold); color: var(--sky); box-shadow: 0 6px 24px rgba(242, 200, 121, .22); }
.bigbtn.stop { border-color: rgba(240, 165, 143, .6); color: #f6b9a6; }
.bigbtn.wide { width: 100%; }
.bigbtn[disabled] { opacity: .4; cursor: not-allowed; }
.bigbtn svg { width: 20px; height: 20px; flex: 0 0 auto; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btnrow > * { flex: 1 1 140px; }
.linkbtn { background: none; border: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
@media (max-width: 760px) {
  body.app .start { min-height: 46px; padding-inline: 18px; font-size: .98rem; }
  body.app .here, body.app .chip { min-height: 40px; }
  body.app .chip { padding: 8px 14px; }
}

/* ---------- Today ---------- */
.today { display: grid; gap: 18px; padding-bottom: 40px; max-width: 760px; }
.hello .eyebrow { color: var(--gold); }
.hello h2 { margin: 4px 0 2px; font-size: clamp(2rem, 7vw, 2.8rem); }
.hello p { margin: 0; color: var(--dim); }
.hello p b { color: var(--ink); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--card); backdrop-filter: blur(6px); padding: 20px; display: grid; gap: 12px; }
.card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 0; line-height: 1.15; }
.card p { margin: 0; color: var(--dim); }
.card .eyebrow { font-size: .72rem; }
.next-card { border-color: rgba(242, 200, 121, .55); background: linear-gradient(160deg, rgba(242, 200, 121, .14), rgba(13, 20, 48, .85) 55%); }
.next-card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.next-card .meta span { font: .76rem var(--font-data); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.next-card .exlist { margin: 0; padding-left: 20px; color: var(--dim); font-size: .92rem; display: grid; gap: 2px; }
.live-now { border-color: var(--gold); background: var(--gold-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.live-now b { color: var(--ink); }
.live-now .t { font: 500 1.3rem var(--font-data); color: var(--gold); font-variant-numeric: tabular-nums; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week div { display: grid; justify-items: center; gap: 6px; font: .7rem var(--font-data); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 8px 0; border-radius: 12px; }
.week div.is-today { background: rgba(255, 255, 255, .05); color: var(--ink); }
.week i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.week div.did i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(242, 200, 121, .7); }
.tiles-h { font-family: var(--font-data); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 6px 0 -6px; font-weight: 500; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qtile { display: grid; gap: 8px; align-content: start; min-height: 104px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.qtile svg { width: 26px; height: 26px; color: var(--gold); }
.qtile b { font-weight: 600; font-size: 1rem; }
.qtile small { color: var(--dim); font-size: .8rem; line-height: 1.35; }
.qtile.qmeal svg { color: var(--meal); } .qtile.vit svg { color: var(--vit); }
.qtile:active { transform: scale(.98); }
.itip { border-style: dashed; }
.tiprow { display: flex; justify-content: space-between; gap: 10px; align-items: start; }

/* The "you're on" line and program switch on Training */
body.app .you-on { margin: 4px 0 18px; }
.switch-inline { margin-left: auto; }

/* ---------- Sheets (protein calculator, confirmations) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(3, 5, 14, .66); animation: fade .15s ease; }
.sheet { position: fixed; z-index: 61; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 92vh; overflow-y: auto;
  background: #0f1736; border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: grid; gap: 14px; animation: up .2s ease; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); }
@media (min-width: 761px) { .sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 24px; border-bottom: 1px solid var(--line); } }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 0; }
.sheet p { margin: 0; color: var(--dim); }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .18); justify-self: center; margin-top: -8px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sheet .x, .lv-x { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; font-size: 1.3rem; display: grid; place-items: center; }
.sheet label, .pfield { display: grid; gap: 6px; font: 500 .74rem var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.big-number { font: 500 3.2rem var(--font-data); color: var(--vit); line-height: 1; font-variant-numeric: tabular-nums; }
.big-number small { font-size: 1.1rem; color: var(--ink); margin-left: 6px; }
.based { font-size: .9rem; border-left: 3px solid var(--vit); padding: 4px 0 4px 12px; color: var(--ink) !important; }
.facts2 { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts2 li { display: flex; gap: 10px; align-items: baseline; color: var(--dim); font-size: .94rem; }
.facts2 li::before { content: "\2726"; color: var(--vit); font-size: .8rem; }
.facts2 b { color: var(--ink); font-weight: 600; }
.small-print { font-size: .8rem !important; }
.calc-btn { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--vit);
  background: rgba(185, 168, 255, .16); color: var(--ink); font: 600 .98rem var(--font-body); cursor: pointer; }
.calc-btn svg { width: 18px; height: 18px; color: var(--vit); }
#vitamins .supp .calc-btn { width: 100%; justify-content: center; }

/* Segmented choice (Male / Female, kg / lb) */
.seg2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg2 button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font: 600 .95rem var(--font-body); cursor: pointer; text-transform: none; letter-spacing: 0; }
.seg2 button[aria-pressed="true"] { background: var(--gold); color: var(--sky); }
.seg2.sm button { min-height: 36px; padding: 0 12px; font-size: .85rem; }

/* Number stepper: big − and + either side of the value */
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: stretch; border: 1px solid var(--line); border-radius: 16px; background: rgba(7, 11, 26, .7); overflow: hidden; }
.stepper button { border: 0; background: rgba(255, 255, 255, .05); color: var(--ink); font: 400 1.9rem/1 var(--font-body); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stepper button:active { background: var(--gold); color: var(--sky); }
.stepper .val { display: grid; justify-items: center; align-content: center; padding: 6px 4px; min-width: 0; }
.stepper input { width: 100%; min-width: 0; text-align: center; background: transparent; border: 0; color: var(--ink); font: 500 1.9rem/1.1 var(--font-data) !important; padding: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.pfield .stepper input, .sheet .stepper input { border: 0; background: transparent; min-height: 0; padding: 0; border-radius: 0; }
.sheet .stepper .val, .pfield .stepper .val { gap: 0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.stepper:focus-within { border-color: var(--gold); }
.stepper .u { font: .7rem var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.steppers { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }

/* ---------- Live workout session ---------- */
.live { position: fixed; inset: 0; z-index: 40; display: grid; grid-template-rows: auto auto auto 1fr auto;
  background: radial-gradient(120% 70% at 50% 0%, #17235a 0%, var(--sky) 62%); color: var(--ink); }
.lv-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 8px; }
.lv-title { min-width: 0; }
.lv-title small { display: block; font: .68rem var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-title b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-clockbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px 12px; flex-wrap: wrap; border-bottom: 1px solid rgba(190, 205, 255, .14); }
.lv-clock { display: grid; }
.lv-clock .clock { font: 500 2.4rem/1 var(--font-data); color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lv-clock small { font: .68rem var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.lv-clock.idle .clock { color: var(--dim); }
.lv-clock.paused .clock { animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.lv-ctl { display: flex; gap: 8px; }
.lv-ctl .bigbtn { min-height: 48px; padding: 10px 18px; border-radius: 14px; }
.lv-progress { padding: 10px 16px 4px; display: grid; gap: 8px; }
.lv-steplabel { font: .74rem var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.lv-steplabel b { color: var(--gold); font-weight: 500; }
.lv-dots { display: flex; gap: 5px; }
.lv-dots button { flex: 1 1 0; height: 6px; min-width: 6px; border: 0; border-radius: 9px; background: rgba(190, 205, 255, .16); cursor: pointer; padding: 0; }
.lv-dots button.warm { flex-grow: .55; }
.lv-dots button.done { background: rgba(242, 200, 121, .6); }
.lv-dots button.skipped { background: rgba(190, 205, 255, .4); }
.lv-dots button[aria-current="true"] { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.live .live-body { overflow-y: auto; padding: 12px 16px 28px; -webkit-overflow-scrolling: touch; }
.live .live-card { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.live .kind { font: .72rem var(--font-data); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.live h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.08; margin: 0; }
.presc-big { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.presc-big b { font: 500 1.5rem var(--font-data); color: var(--ink); }
.presc-big span { font: .8rem var(--font-data); color: var(--dim); }
.live .how { color: var(--dim); font-size: .94rem; margin: 0; }
.howto { border: 1px solid var(--line); border-radius: 16px; background: rgba(7, 11, 26, .5); }
.howto summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; min-height: 48px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); line-height: 1; }
.howto[open] summary::after { content: "\2212"; }
.howto ol { margin: 0; padding: 0 16px 6px 16px; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--ink); font-size: .98rem; }
.howto li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font: 500 .82rem var(--font-data); }
.howto .avoid { margin: 4px 16px 14px; padding: 10px 12px; border-radius: 12px; background: rgba(240, 165, 143, .1); color: #f6c4b4; font-size: .9rem; }
.howto .vid { margin: 0 16px 14px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); color: var(--dim); font-size: .85rem; text-align: center; }
.howto .gear { margin: 0 16px 14px; color: var(--dim); font-size: .85rem; }
.lv-ready ol.plan { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lv-ready ol.plan li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(190, 205, 255, .1); }
.lv-ready ol.plan em { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 500 .8rem var(--font-data); border: 1px solid var(--line); color: var(--dim); }
.lv-ready ol.plan li.main em { border-color: var(--gold); color: var(--gold); }
.lv-ready ol.plan li.from { border-color: var(--gold); }
.lv-ready ol.plan span { color: var(--ink); }
.lv-ready ol.plan small { font: .78rem var(--font-data); color: var(--dim); white-space: nowrap; }
.lv-ready .grp { font: .7rem var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 6px 0 -4px; }

/* The set you're on */
.setcard { border: 1px solid var(--gold); border-radius: 22px; padding: 16px; display: grid; gap: 12px; background: linear-gradient(170deg, rgba(242, 200, 121, .12), rgba(7, 11, 26, .5) 60%); }
.setcard.wd { border-color: rgba(154, 215, 189, .7); background: linear-gradient(170deg, rgba(154, 215, 189, .12), rgba(7, 11, 26, .5) 60%); }
.sethead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sethead b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.sethead span { font: .72rem var(--font-data); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.sug { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px; background: rgba(7, 11, 26, .55); font-size: .94rem; }
.sug svg { width: 22px; height: 22px; color: var(--gold); margin-top: 1px; }
.sug b { color: var(--gold); font: 500 1rem var(--font-data); display: block; }
.sug span { color: var(--dim); }
.setlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.setlist li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; border: 1px solid rgba(190, 205, 255, .12); min-height: 48px; }
.setlist li .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 .78rem var(--font-data); border: 1px solid var(--line); color: var(--dim); }
.setlist li.done .n { background: var(--gold); border-color: var(--gold); color: var(--sky); }
.setlist li.cur { border-color: var(--gold); }
.setlist li .v { font: 500 .98rem var(--font-data); color: var(--ink); }
.setlist li.skipped .v { color: var(--dim); text-decoration: line-through; }
.setlist li .v small { display: block; font: .74rem var(--font-body); color: var(--dim); }
.setlist li.next .v { color: var(--dim); }
.setlist li.wd .n { border-color: var(--meal); color: var(--meal); }
.setlist li.wd.done .n { background: var(--meal); color: var(--sky); }
.setlist .mini { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--dim); font: 500 .82rem var(--font-body); cursor: pointer; }
.rest2 { border: 1px solid var(--gold); border-radius: 22px; padding: 18px; display: grid; justify-items: center; gap: 10px; text-align: center; background: var(--gold-soft); }
.rest2 .big { font: 500 3.6rem/1 var(--font-data); color: var(--gold); font-variant-numeric: tabular-nums; }
.rest2 p { margin: 0; color: var(--dim); }
.rest2 .btnrow { width: 100%; }
.effort { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.effort button { min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--dim); font: 500 .78rem var(--font-body); cursor: pointer; display: grid; place-items: center; line-height: 1.15; padding: 4px; }
.effort button b { display: block; font: 500 1rem var(--font-data); color: var(--ink); }
.effort button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--sky); }
.effort button[aria-pressed="true"] b { color: var(--sky); }
.lv-h { font: .72rem var(--font-data); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 6px 0 -6px; }
.live .notes-in { width: 100%; font: 1rem var(--font-body); color: var(--ink); background: rgba(7, 11, 26, .7); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 48px; }
.live .stopwatch2 { display: grid; justify-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(7, 11, 26, .5); }
.live .stopwatch2 .big { font: 500 3.2rem/1 var(--font-data); font-variant-numeric: tabular-nums; }
.live .live-foot { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(7, 11, 26, .92); }
.live .live-foot .bigbtn { padding-inline: 16px; }
.live .live-msg { color: var(--gold); font-size: .92rem; min-height: 1.3em; margin: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.summary-grid div { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .02); }
.summary-grid b { display: block; font: 500 1.6rem var(--font-data); color: var(--gold); font-variant-numeric: tabular-nums; }
.summary-grid span { font-size: .8rem; color: var(--dim); }
.done-list { margin: 0; padding-left: 18px; color: var(--dim); font-size: .92rem; display: grid; gap: 4px; }
.done-list b { color: var(--ink); font-weight: 500; }
@media (min-width: 761px) {
  .lv-top, .lv-clockbar, .lv-progress { max-width: 760px; margin-inline: auto; width: 100%; }
  .live .live-foot { padding-inline: max(16px, calc(50% - 360px)); }
}

/* ---------- Profile and Support pages ---------- */
.ppage { max-width: 680px; display: grid; gap: 18px; padding-bottom: 50px; }
.phead { display: flex; gap: 16px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--sky); font: 400 1.8rem var(--font-display); flex: 0 0 auto; }
.phead h2 { margin: 0; font-size: 2rem; }
.phead p { margin: 0; color: var(--dim); overflow-wrap: anywhere; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .pgrid { grid-template-columns: 1fr; } }
.pgrid .full { grid-column: 1 / -1; }
.pfield input, .pfield select { font: 500 1.05rem var(--font-body); text-transform: none; letter-spacing: 0; color: var(--ink); background: rgba(7, 11, 26, .7); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 50px; width: 100%; }
.menu { display: grid; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card); }
.menu a, .menu button { display: grid; grid-template-columns: 30px minmax(0, 1fr) 14px; gap: 14px; align-items: center; padding: 14px 18px; min-height: 60px; color: var(--ink); text-decoration: none;
  border: 0; border-top: 1px solid rgba(190, 205, 255, .1); background: none; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.menu .stat { display: grid; grid-template-columns: 30px minmax(0, 1fr) 14px; gap: 14px; align-items: center; padding: 14px 18px; min-height: 60px; border-top: 1px solid rgba(190, 205, 255, .1); }
.menu > :first-child { border-top: 0; }
.menu svg { width: 24px; height: 24px; color: var(--gold); }
.menu b { font-weight: 600; display: block; }
.menu small { color: var(--dim); font-size: .82rem; display: block; }
.menu i { width: 9px; height: 9px; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); transform: rotate(-45deg); }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .03); }
.menu .danger b { color: #f6b9a6; }
.guide ol { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; gap: 12px; }
.guide li { counter-increment: g; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; color: var(--ink); }
.guide li::before { content: counter(g); width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--sky); display: grid; place-items: center; font: 600 .9rem var(--font-data); }
.guide li span { padding-top: 4px; }
.guide .kbd { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: .9em; white-space: nowrap; }
.guide .kbd svg { width: 15px; height: 15px; }
.faq details { border-top: 1px solid rgba(190, 205, 255, .12); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; min-height: 48px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 14px; color: var(--dim); }
.faq details > div p { margin: 0 0 8px; }

/* Public home page: signed-in members get a clear way back to the app */
.member-cta { background: var(--gold); color: var(--sky); border-color: var(--gold); }
.welcome-back { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--gold); background: rgba(242, 200, 121, .1);
  border-radius: 16px; padding: 12px 16px; margin: 8px 0 0; }
.welcome-back p { margin: 0; color: var(--ink); }

/* Phones: keep the clock, controls and the current set on one screen */
@media (max-width: 480px) {
  .lv-clockbar { flex-wrap: nowrap; gap: 8px; }
  .lv-clock .clock { font-size: 1.9rem; }
  .lv-ctl .bigbtn { min-height: 46px; padding: 8px 12px; font-size: .92rem; gap: 6px; }
  .lv-ctl .bigbtn svg { width: 16px; height: 16px; }
  .steppers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .steppers:has(> :only-child) { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; border-radius: 14px; }
  .stepper button { font-size: 1.6rem; }
  .stepper input { font-size: 1.5rem !important; }
  .setcard { padding: 14px; gap: 10px; }
  .sethead b { font-size: 1.35rem; }
  .live .live-card { gap: 12px; }
}

/* The set in progress opens up inside the list of sets */
.setlist li.setcard { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; border-radius: 22px; border: 1px solid var(--gold); min-height: 0; animation: grow .18s ease; }
.setlist li.setcard.wd { border-color: rgba(154, 215, 189, .7); }
@keyframes grow { from { transform: scale(.97); opacity: .6; } }
.setlist li.setcard .rest2 { border: 0; padding: 4px 0 0; background: none; }

/* AI monthly review (Today card + review sheet) */
.review-card { border-color: rgba(185, 168, 255, .55); background: linear-gradient(160deg, rgba(185, 168, 255, .14), rgba(13, 20, 48, .85) 55%); }
.review-card .eyebrow { color: var(--vit); }
.review-card h3 { margin: 4px 0 6px; }
.review-card .rv-up { color: var(--gold); margin: 0 0 10px; }
.review-card .rv-next { font-size: .82rem; margin: 10px 0 0; }
.rv-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; }
.rv-bar i { display: block; height: 100%; width: 35%; border-radius: inherit; background: var(--vit); animation: rvslide 1.4s ease-in-out infinite; }
@keyframes rvslide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.rv-h { margin: 18px 0 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #aab); }
.rv-list { margin: 0; padding-left: 20px; } .rv-list li { margin: 4px 0; }
.rv-list.good li::marker { color: var(--meal); } .rv-list.warn li::marker { color: var(--gold); }
.rv-ex { display: grid; gap: 10px; }
.rv-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.rv-item p { margin: 6px 0 0; font-size: .92rem; }
.rv-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.rv-chg { font: .74rem var(--font-data); border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); white-space: nowrap; }
.rv-chg.increase { color: var(--meal); border-color: rgba(154, 215, 189, .6); }
.rv-chg.decrease { color: var(--gold); border-color: rgba(242, 200, 121, .6); }
.rv-target { font: 1.05rem var(--font-data); color: var(--gold); margin-top: 6px; }
.rv-last { font-size: .84rem; opacity: .75; margin-top: 2px; }
.rv-cap { color: var(--gold); }
.rv-foot { font-size: .82rem; margin: 16px 0 12px; }
.presc-big .ai-tag { color: var(--vit); }

/* Schedule: week strip on Today + full-screen monthly calendar */
.sched-card .sc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sched-card .bigbtn { margin-top: 12px; }
.sched-card .bigbtn svg { width: 20px; height: 20px; }
.week div em { font: normal .66rem var(--font-data); color: var(--gold); letter-spacing: 0; min-height: 1em; }
.week div.plan i { border-color: var(--gold); }
.week div.gentle { background: rgba(185, 168, 255, .26); }
.missed-card { border-color: rgba(242, 200, 121, .5); }
.missed-card p { margin: 0 0 10px; }
html.sched-open, html.sched-open body { overflow: hidden; }
.sched { position: fixed; inset: 0; z-index: 58; overflow-y: auto; background: var(--night, #070b1a); background-image: radial-gradient(ellipse at top, rgba(242, 200, 121, .08), transparent 60%); -webkit-overflow-scrolling: touch; }
.sched-in { width: min(760px, 100%); margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 12px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.sched-top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; }
.sched-top h2 { text-align: center; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.sched-top .x { font-size: 1.6rem; }
.cal-nav { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; text-align: center; gap: 8px; }
.cal-nav .bigbtn { padding: 0; min-height: 44px; font-size: 1.3rem; }
.cal-nav b { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { text-align: center; font: .68rem var(--font-data); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.cal-day { min-height: 74px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; background: rgba(13, 20, 48, .55); transition: background .12s, border-color .12s; }
.cal-day .n { font: .74rem var(--font-data); color: var(--dim); padding-left: 2px; }
.cal-day.out { opacity: .4; }
.cal-day.past { opacity: .62; }
.cal-day.today { border-color: var(--gold); }
.cal-day.today .n { color: var(--gold); font-weight: 600; }
.cal-day.gentle { background: rgba(185, 168, 255, .3); border-color: rgba(185, 168, 255, .8); }
.cal-day.gentle .n { color: var(--vit); }
.cal-day.can-drop:not(.past) { border-style: dashed; cursor: pointer; }
.cal-day.over { background: rgba(242, 200, 121, .22); border-color: var(--gold); }
.cal-day .rest { font: .62rem var(--font-data); color: var(--dim); opacity: .6; text-align: center; margin-top: auto; }
.chip { font: 600 .74rem var(--font-data); color: #1a1405; background: var(--gold); border: 0; border-radius: 8px; padding: 7px 2px; min-height: 30px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.chip.done { background: rgba(154, 215, 189, .2); color: var(--meal); cursor: default; touch-action: auto; }
.chip.missed { background: transparent; color: var(--gold); border: 1px dashed var(--gold); }
.chip.picked { outline: 2px solid #fff; outline-offset: 2px; }
.chip.lifting { opacity: .35; }
.chip.ghost { position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, -60%) scale(1.15); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); padding: 7px 10px; }
.cal-msg { min-height: 1.3em; margin: 0; color: var(--gold); font-size: .92rem; }
.cal-sel h3 { margin: 4px 0; }
.cal-sel .btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--dim); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-s { background: var(--gold); } .lg-d { background: rgba(154, 215, 189, .5); } .lg-m { border: 1px dashed var(--gold); } .lg-g { background: rgba(185, 168, 255, .6); }
.cal-help p { margin: 6px 0; font-size: .92rem; }
@media (max-width: 400px) { .cal-day { min-height: 62px; padding: 3px; } .chip { font-size: .66rem; padding: 6px 1px; } }

/* Gentle days (cycle-aware, opt-in) */
.gentle-card { border-color: rgba(185, 168, 255, .55); background: linear-gradient(160deg, rgba(185, 168, 255, .16), rgba(13, 20, 48, .85) 60%); }
.gentle-card .eyebrow { color: var(--vit); }
.gentle-card h3 { margin: 4px 0 6px; }
.gentle-card .btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.gentle-card .gc-foot { font-size: .82rem; margin: 10px 0 0; }
.gentle-list { padding-left: 22px; margin: 8px 0; }
.gentle-list li { margin: 0 0 12px; }
.gentle-list li div { display: flex; justify-content: space-between; gap: 10px; }
.gentle-list li span { font: .78rem var(--font-data); color: var(--vit); white-space: nowrap; }
.gentle-list li p { margin: 4px 0 0; font-size: .92rem; }
.cycle-card .consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; font-size: .92rem; }
.cycle-card .consent-row input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--gold); }
.cycle-card .bigbtn + .bigbtn { margin-top: 8px; }
/* Public FAQ page (faq.html) */
.faq-wrap { max-width: 780px; margin: 0 auto; padding: 24px 0 40px; }
.faq-wrap .faq.panel { margin-bottom: 18px; }
.faq-wrap .faq h3 { margin: 0 0 4px; }
.faq-legal { font-size: .9em; margin-top: 24px; }
.faq-wrap details { scroll-margin-top: 90px; }
