.stage4-plan-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px;padding:18px 20px;border:1px solid #d9e4e8;border-radius:20px;background:linear-gradient(135deg,#f8fbfc,#eef6f3)}
.stage4-plan-heading h4,.stage4-plan-heading p{margin:4px 0}.stage4-plan-heading p{max-width:720px;color:#60736c}.stage4-plan-heading>small{white-space:nowrap;color:#526d64;font-weight:850}
.stage4-client-plan{display:grid;gap:4px}.stage4-client-plan .circadian-card{margin-top:6px}
.plan-download-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}.plan-download-actions>.plan-wallpaper-card{margin:0}.plan-report-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:18px 20px;border:1px solid #bfd1ed;border-radius:20px;background:linear-gradient(135deg,#eef5ff,#f8fbff)}.plan-report-card h4,.plan-report-card p{margin:3px 0}.plan-report-card p{max-width:690px;color:#607080}.plan-report-card .btn{flex:0 0 auto;min-width:132px}
.circadian-legend>div>span{display:grid;gap:2px;min-width:0}.circadian-legend>div>span>strong{color:#29483e}.circadian-legend>div>span>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#667a73;font-size:.72rem;font-weight:600}
.nutrition-day-preview .plan-meal[data-meal-kind="breakfast"],.meal-example-card[data-meal-kind="breakfast"]{border-left:5px solid #d99b2b}
.nutrition-day-preview .plan-meal[data-meal-kind="snack"],.meal-example-card[data-meal-kind="snack"]{border-left:5px solid #c56d9f}
.nutrition-day-preview .plan-meal[data-meal-kind="lunch"],.meal-example-card[data-meal-kind="lunch"]{border-left:5px solid #e3684f}
.nutrition-day-preview .plan-meal[data-meal-kind="dinner"],.meal-example-card[data-meal-kind="dinner"]{border-left:5px solid #4f9871}
.nutrition-day-preview .plan-meal[data-meal-kind="supplement"],.meal-example-card[data-meal-kind="supplement"]{border-left:5px solid #7b68a6}
.weekly-visit-selector [data-weekly-visit][aria-pressed="true"]{box-shadow:0 0 0 3px rgba(23,111,221,.12)}
@media(max-width:700px){.stage4-client-plan,.stage4-client-plan>*{min-width:0}.stage4-plan-heading{display:grid;min-width:0;padding:15px}.stage4-plan-heading>small{white-space:normal}.plan-download-actions{grid-template-columns:minmax(0,1fr)}.plan-report-card{display:grid;padding:15px}.plan-report-card .btn{width:100%;min-width:0}.circadian-legend>div{grid-template-columns:11px minmax(0,1fr);}.circadian-legend>div>b{grid-column:2}.circadian-legend>div>span>small{white-space:normal}}
.circadian-live{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px;margin:12px 0}.circadian-now,.circadian-next{display:grid;gap:5px;min-width:0;padding:16px;border:1px solid #d6e6df;border-radius:18px;background:#f2faf6;color:#21473a}.circadian-now{border-left:5px solid #2f7566}.circadian-next{background:#fff}.circadian-live span{font-size:.72rem;font-weight:850;letter-spacing:.07em}.circadian-live strong{font-size:1.1rem;overflow-wrap:anywhere}.circadian-live small,.circadian-live p{margin:0;color:#527265;overflow-wrap:anywhere}.circadian-variant-choice{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}.circadian-variant-choice button{min-height:44px;padding:9px 16px;border:1px solid #bdd7cb;border-radius:12px;background:#fff;color:#315b4d;font:inherit;cursor:pointer}.circadian-variant-choice button[aria-pressed="true"]{background:#2f7566;color:#fff}
@media(max-width:600px){.circadian-live{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.circadian-live *,.circadian-variant-choice button{transition:none!important;animation:none!important}}
.rhythm-sim-control{display:grid;gap:5px;max-width:220px;margin:12px 0;font-weight:750}.rhythm-sim-control input{min-height:44px}.rhythm-dial-editor{display:grid;justify-items:center;gap:8px;max-width:300px;margin:12px auto;padding:14px;border:1px solid #dce9e3;border-radius:18px;background:#f8fbf9}.rhythm-dial-editor label{display:grid;gap:4px;width:100%;font-weight:750}.rhythm-dial-editor select{min-height:44px;width:100%}.rhythm-dial-editor svg{display:block;width:min(100%,240px);height:auto;touch-action:none}.rhythm-dial-face{fill:#fff;stroke:#c9dfd3;stroke-width:12}.rhythm-dial-editor line{stroke:#376e5e;stroke-width:3}.rhythm-dial-editor [data-dial-handle]{fill:transparent;stroke:transparent;stroke-width:3;cursor:grab;outline:0}.rhythm-dial-editor [data-dial-display]{fill:#2f7566;stroke:#fff;stroke-width:3;pointer-events:none}.rhythm-dial-editor [data-dial-display="end"]{fill:#d99b2b}.rhythm-dial-editor [data-dial-handle]:focus-visible{stroke:#142c24;stroke-width:3}.rhythm-dial-editor small{color:#61766d;text-align:center}
.meal-choice-list{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:8px}.meal-choice-list button{display:grid;gap:4px;min-height:52px;padding:10px 12px;border:1px solid #cddfd6;border-radius:12px;background:#fff;color:#234b3d;text-align:start;font:inherit;cursor:pointer}.meal-choice-list button[aria-pressed="true"]{border-color:#2f7566;background:#e8f5ed;box-shadow:inset 0 0 0 1px #2f7566}.meal-choice-list button small{font-size:.71rem;color:#5e756b}.meal-choice-list button span{font-weight:750;overflow-wrap:anywhere}
.meal-example-grid{grid-template-columns:minmax(0,1fr)}.meal-example-card{grid-template-columns:46px minmax(0,1fr);min-width:0}.meal-example-card>*{min-width:0;overflow-wrap:anywhere}.meal-example-title{min-width:0}.meal-choice-list{min-width:0}
.meal-example-card .meal-total-chip{grid-column:1/-1;width:fit-content;max-width:100%;white-space:normal}
.rhythm-now-marker line{stroke:#c14647;stroke-width:4;stroke-linecap:round}.rhythm-now-marker circle{fill:#c14647;stroke:#fff;stroke-width:2}
.stage4-client-plan[data-active-variant="main"] .circadian-card[data-variant="alternative"],.stage4-client-plan[data-active-variant="alternative"] .circadian-card[data-variant="main"]{display:none}
.meal-example-card.is-current{border-color:#2f7566;box-shadow:0 8px 22px rgba(47,117,102,.16);background:#f3faf5}
.alternative-meal-time{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:420px;margin:8px 0;padding:10px;border:1px solid #dce9e3;border-radius:12px;background:#f8fbf9}.alternative-meal-time label{display:grid;gap:4px;min-width:0}.alternative-meal-time input{width:100%;min-width:0;min-height:44px}.alternative-meal-time small{grid-column:1/-1;color:#61766d}
.meal-exact-time{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-width:420px;margin:8px 0}.meal-exact-time label{display:grid;gap:4px;min-width:0}.meal-exact-time input{width:100%;min-width:0;min-height:44px}
@media(max-width:375px){.alternative-meal-time,.meal-exact-time{grid-template-columns:minmax(0,1fr)}}

/* Published plan: the live day and approved exchanges share one clear hierarchy. */
.stage4-client-plan{gap:12px;min-width:0}
.stage4-client-plan .stage4-plan-heading{margin:0;background:#f1f8f3;border-color:#d6e7dc}
.stage4-client-plan .circadian-live{margin:0;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr)}
.stage4-client-plan .circadian-now{background:#eaf6ec;border-color:#badbc5}
.stage4-client-plan .circadian-next{background:#fff;border-color:#d6e5dd}
.stage4-client-plan .circadian-card{margin:0;background:#fff}
.stage4-client-plan .circadian-clock{max-width:480px}
.stage4-client-plan .meal-example-section{margin:8px 0}
.stage4-client-plan .circadian-live-root{order:1}
.stage4-client-plan .plan-photo-preview{order:2}
.stage4-client-plan .circadian-variant-choice{order:3}
.stage4-client-plan>.circadian-card{order:4}
.stage4-client-plan .meal-example-section{order:5}
.stage4-client-plan .client-plan-energy,.stage4-client-plan .client-water-plan{order:6}
.stage4-client-plan .plan-download-actions{order:7}
.stage4-client-plan .plan-note{order:8}
.stage4-client-plan .plan-photo-preview{display:grid;gap:7px;padding:10px 12px;border:1px solid #d8e8dc;border-radius:17px;background:#f7fbf8}
.stage4-client-plan .plan-photo-preview>strong{font-size:.8rem;color:#285b4b}
.stage4-client-plan .plan-photo-preview>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stage4-client-plan .plan-photo-preview a{display:grid;justify-items:center;align-content:start;gap:3px;min-width:0;padding:6px;border:1px solid #e2ece5;border-radius:11px;background:#fff;color:#254f40;text-decoration:none;text-align:center}
.stage4-client-plan .plan-photo-preview .food-visual-picture{display:block;width:min(100%,88px);aspect-ratio:1}
.stage4-client-plan .plan-photo-preview .food-visual-image{display:block;width:100%;height:100%;object-fit:contain}
.stage4-client-plan .plan-photo-preview a span{max-width:100%;font-size:.7rem;line-height:1.2;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.stage4-client-plan .meal-example-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.stage4-client-plan .meal-example-card{background:#fff;box-shadow:0 5px 20px rgba(27,72,62,.05)}
.stage4-client-plan .meal-choice-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.stage4-client-plan .meal-choice-list button{grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto 1fr;align-items:center;column-gap:9px;min-width:0;min-height:80px}
.stage4-client-plan .meal-choice-list .food-visual-picture{grid-row:1/3;display:block;width:64px;height:64px;border-radius:11px;background:#f5f9f5;overflow:hidden}
.stage4-client-plan .meal-choice-list .food-visual-image{display:block;width:100%;height:100%;object-fit:contain}
.stage4-client-plan .meal-choice-list button small,.stage4-client-plan .meal-choice-list button span{grid-column:2;min-width:0}
.stage4-client-plan .meal-choice-list button:not(:has(.food-visual-picture)) small,.stage4-client-plan .meal-choice-list button:not(:has(.food-visual-picture)) span{grid-column:1/-1}
.stage4-client-plan .meal-content-details{grid-column:1/-1;color:#456158}
.stage4-client-plan .meal-content-details summary{cursor:pointer;font-weight:750}
.stage4-client-plan .meal-content-details p{margin:6px 0 0;white-space:pre-line}
@media(max-width:700px){
  .stage4-client-plan{gap:9px}
  .stage4-client-plan .stage4-plan-heading{padding:11px 13px}
  .stage4-client-plan .stage4-plan-heading p{margin:2px 0;font-size:.78rem;line-height:1.35}
  .stage4-client-plan .stage4-plan-heading>small{font-size:.72rem}
  .stage4-client-plan .circadian-live{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  .stage4-client-plan .circadian-now,.stage4-client-plan .circadian-next{padding:12px}
  .stage4-client-plan .circadian-live strong{font-size:1rem}
  .stage4-client-plan .circadian-card{padding:10px}
  .stage4-client-plan .circadian-heading{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px}
  .stage4-client-plan .circadian-heading p{display:none}
  .stage4-client-plan .circadian-heading h4{margin:0}
  .stage4-client-plan .hydration-summary{padding:5px 7px;grid-template-columns:auto minmax(0,1fr);font-size:.75rem}
  .stage4-client-plan .hydration-summary small{display:none}
  .stage4-client-plan .circadian-layout{gap:2px}
  .stage4-client-plan .circadian-clock{max-width:315px}
  .stage4-client-plan .circadian-legend{display:block;padding:7px 9px;border:0;box-shadow:none;background:#f2f8f4}
  .stage4-client-plan .circadian-legend summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:750;color:#285b4b}
  .stage4-client-plan .circadian-legend:not([open])>div,.stage4-client-plan .circadian-legend:not([open])>small{display:none}
  .stage4-client-plan .meal-example-grid{grid-template-columns:minmax(0,1fr)}
  .stage4-client-plan .meal-example-heading p{font-size:.78rem;line-height:1.35}
  .stage4-client-plan .meal-choice-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stage4-client-plan .meal-choice-list button{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;justify-items:center;min-height:0;text-align:center;padding:8px}
  .stage4-client-plan .meal-choice-list .food-visual-picture{grid-row:auto;grid-column:1;width:min(100%,120px);height:auto;aspect-ratio:1}
  .stage4-client-plan .meal-choice-list button small,.stage4-client-plan .meal-choice-list button span{grid-column:1}
}
@media(max-width:375px){.stage4-client-plan .circadian-live{grid-template-columns:minmax(0,1fr)}}

/* A legible two-dial clock: colour lives in the activity arcs, not behind the labels. */
.circadian-card .circadian-clock{overflow:visible;filter:drop-shadow(0 16px 24px rgba(17,42,72,.14))}
.circadian-card .day-ring-base{stroke:#e6edf3;stroke-width:27}
.circadian-card .day-ring-base.pm{stroke:#e9e6f0}
.circadian-card .day-segment{stroke-width:24;filter:drop-shadow(0 3px 4px rgba(25,45,65,.18))}
.circadian-card .hydration-ring{stroke:#9fd2df;stroke-width:5;stroke-dasharray:2 6}
.circadian-card .night-face{fill:#f5f8fc;stroke:#c4d9e8;stroke-width:4}
.circadian-card .night-sleep-arc{stroke:#163754;stroke-width:11}
.circadian-card .night-live-time{fill:#102a46;font-size:21px;font-weight:950;letter-spacing:-1px}
.circadian-card .night-title{fill:#668399;font-size:7px}
.circadian-card .night-time{font-size:8px;fill:#31516b}
.circadian-card .night-duration{fill:#6b8496}
.circadian-card .night-number{fill:#658095;font-size:8px}
.circadian-card .rhythm-segment-label{fill:#102a46;stroke:#fff;stroke-width:2.5px}
.circadian-card .rhythm-selection-detail{border-radius:12px;background:#eaf4f5;color:#214b5f;padding:11px 13px}
.meal-example-card .meal-choice-disclosure{grid-column:1/-1;min-width:0;border-top:1px solid #dfe7ed;padding-top:8px}
.meal-choice-disclosure>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:48px;cursor:pointer;color:#173e59;font-weight:850;list-style:none}
.meal-choice-disclosure>summary::-webkit-details-marker{display:none}
.meal-choice-disclosure>summary:before{content:'+';display:grid;place-items:center;width:27px;height:27px;flex:0 0 auto;border-radius:50%;background:#e5eef8;color:#22518a;font-size:1.2rem}
.meal-choice-disclosure[open]>summary:before{content:'−'}
.meal-choice-disclosure>summary span{flex:1}
.meal-choice-disclosure>summary small{font-size:.76rem;color:#61798b}
.meal-choice-disclosure .meal-choice-list{margin-top:8px}
.meal-example-card:focus{outline:3px solid #70a5f5;outline-offset:3px}
/* Weekly assignment controls share the existing rhythm editor flow. */
.rhythm-sim-controls{display:flex;flex-wrap:wrap;gap:12px;min-width:0}
.rhythm-sim-controls .rhythm-sim-control{min-width:min(100%,180px)}
.assignment-days{display:grid;gap:8px;min-width:0}
.assignment-day-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.assignment-day-buttons button{min-height:44px;min-width:0;padding:6px;border:1px solid #b9d5ca;border-radius:10px;background:#fff;color:#214f40;font:inherit;overflow-wrap:anywhere}
.assignment-day-buttons button[aria-pressed="true"]{background:#d6f1e7;border-color:#25896e;font-weight:800}
@media(max-width:430px){.assignment-day-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}.rhythm-sim-controls .rhythm-sim-control{max-width:none;flex:1 1 100%}}
