/* Today screen v2 (docs/PHOTOS-DASHBOARD-PLAN-20261012.md §B.2). Every selector is scoped under .today-v2 so the
   older .dashboard/.calorie-first rules in dashboard.css never apply. Mobile first; RTL through logical properties. */
.today-v2{--tv-protein:#7457d8;--tv-protein-soft:#cbbdf3;--tv-link:#b8432f;--muted:#6f625b;--tv-kcal:var(--accent,#e75b45);--tv-ok:#2f6b4c;--tv-care:#fff4e8;--tv-good:#eaf6ef;--tv-tile:#faf7ff;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;font-family:Heebo,sans-serif;color:var(--ink)}
.today-v2 .card{padding:16px;border-radius:20px;margin:0;min-width:0}
.today-v2 h2{font-size:18px;line-height:1.3}
.today-v2 button{font-family:inherit}
.today-v2 .text-button{background:transparent;color:var(--tv-link);padding:6px 0;min-height:44px;font-size:13px;font-weight:600;border-radius:8px}
.today-v2 [dir=ltr]{unicode-bidi:isolate}
.today-v2 .tv-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:4px}

/* Hero */
.today-v2 .tv-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.today-v2 .tv-date{font-size:14px;font-weight:700;color:var(--muted)}
.today-v2 .tv-window{min-height:44px;padding:6px 12px;border-radius:999px;background:var(--lilac,#eee7fb);color:var(--ink);font-size:13px;font-weight:600;line-height:1.3;text-align:start;max-width:100%}
.today-v2 .tv-window[data-phase=open]{background:var(--tv-good);color:var(--tv-ok)}
.today-v2 .tv-window[data-phase=before],.today-v2 .tv-window[data-phase=closed]{background:#fff1e6;color:#8a4f37}
.today-v2 .tv-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.today-v2 .tv-tile{background:var(--tv-tile);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.today-v2 .tv-big{font-size:34px;font-weight:800;line-height:1.1;letter-spacing:-.5px;font-variant-numeric:tabular-nums;align-self:flex-start}
.today-v2 .tv-kcal .tv-big{color:var(--ink)}
.today-v2 .tv-kcal.over .tv-big{color:var(--tv-kcal)}
.today-v2 .tv-protein .tv-big{color:var(--tv-protein)}
.today-v2 .tv-label{font-size:14px;font-weight:600}
.today-v2 .tv-sub{font-size:13px;color:var(--muted);line-height:1.5;font-variant-numeric:tabular-nums}
.today-v2 .tv-protein.hit .tv-sub{color:var(--tv-ok)}
.today-v2 .tv-protein.hit.range-gap .tv-sub{color:var(--muted)}
.today-v2 .tv-track{position:relative;height:8px;border-radius:8px;background:#ece6f6;margin-top:8px;overflow:visible}
.today-v2 .tv-track>i{position:absolute;inset-block:0;inset-inline-start:0;display:block;border-radius:8px;background:var(--tv-kcal);transition:width .35s ease}
.today-v2 .tv-protein .tv-track>i{background:var(--tv-protein)}
.today-v2 .tv-band{position:absolute;inset-block:0;background:var(--tv-protein-soft);box-shadow:inset 0 0 0 1px #a993ea;border-radius:8px}
.today-v2 .tv-tick{position:absolute;top:-3px;width:2px;height:14px;background:var(--ink);border-radius:2px;margin-inline-start:-1px}
.today-v2 .tv-range-hint{background:transparent;color:var(--muted);font-size:13px;font-weight:500;padding:4px 0;min-height:44px;text-align:start;text-decoration:underline;text-underline-offset:3px;line-height:1.4}
.today-v2 .tv-review{width:100%;margin-top:10px}
.today-v2 .tv-quick{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.today-v2 .tv-quick button{min-height:48px;display:flex;align-items:center;justify-content:center;gap:6px;background:var(--lilac,#eee7fb);color:var(--ink);font-size:15px;font-weight:700;padding:8px 6px;border-radius:14px}
.today-v2 .tv-quick button:first-child{background:var(--tv-link);color:#fff}
.today-v2 .tv-quick .ui-icon{width:20px;height:20px}
.today-v2 .tv-energy{margin-top:2px}
.today-v2 .tv-question{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--tv-care);border-radius:14px;padding:10px 12px;margin-top:6px}
.today-v2 .tv-question p{font-size:14px;line-height:1.5;min-width:0}
.today-v2 .tv-question button{flex-shrink:0;padding:8px 14px}

/* Meals */
.today-v2 .tv-meal-list{list-style:none;margin:0;padding:0}
.today-v2 .tv-meal{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;background:transparent;color:var(--ink);padding:10px 2px;min-height:52px;border-radius:0;border-top:1px solid var(--line);text-align:start;font-weight:400;font-size:14px}
.today-v2 .tv-meal-list li:first-child .tv-meal{border-top:0}
.today-v2 .tv-meal.queued{opacity:.75;grid-template-columns:auto minmax(0,1fr) auto}
.today-v2 .tv-meal.queued .pu-offline-badge{grid-column:2/-1}
.today-v2 .tv-meal-time{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:38px}
.today-v2 .tv-meal-name{display:flex;flex-direction:column;align-items:flex-start;min-width:0;font-weight:600;gap:2px}
/* Up to two lines of the meal name; the before/after tag sits under it, so it never eats the name's width. */
.today-v2 .tv-meal-title{min-width:0;max-width:100%;overflow:hidden;white-space:normal;line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow-wrap:anywhere}
.today-v2 .tv-meal-name .tv-tag{margin-inline-start:0}
.today-v2 .tv-meal-num{font-size:13px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.today-v2 .tv-meal-num b{color:var(--ink);font-weight:700}
.today-v2 .tv-tag{font-style:normal;font-size:13px;font-weight:600;background:var(--lilac,#eee7fb);border-radius:8px;padding:1px 6px;margin-inline-start:6px;vertical-align:1px}
.today-v2 .tv-empty{font-size:14px;color:var(--muted);padding:8px 0}
.today-v2 .tv-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.today-v2 .tv-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px 12px;border-radius:999px;background:#f6f2fd;color:var(--ink);font-size:13px;font-weight:600}
.today-v2 .tv-chip .ui-icon{width:16px;height:16px;color:var(--tv-protein)}
.today-v2 .tv-chip.tv-water{padding:0;gap:0;overflow:hidden}
.today-v2 .tv-chip-main{display:inline-flex;align-items:center;gap:6px;background:transparent;color:var(--ink);font-size:13px;font-weight:600;padding-block:6px;padding-inline:12px 6px;min-height:44px;border-radius:0}
.today-v2 .tv-chip-plus{background:transparent;color:var(--accent);min-height:44px;min-width:44px;padding:6px;border-radius:0;border-inline-start:1px solid #e7defa;display:grid;place-items:center}
.today-v2 .tv-chip-plus .ui-icon{color:var(--accent);width:18px;height:18px}

/* Week */
.today-v2 .tv-insight{font-size:14px;line-height:1.5;padding:8px 12px;border-radius:12px;background:var(--lilac,#eee7fb);margin:4px 0 6px}
.today-v2 .tv-insight.tone-care{background:var(--tv-care)}
.today-v2 .tv-insight.tone-good{background:var(--tv-good);color:var(--tv-ok)}
.today-v2 .tv-chart{position:relative;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;height:118px;margin:10px 0 12px}
.today-v2 .tv-col{display:grid;grid-template-rows:minmax(0,1fr) 8px 18px;row-gap:4px;justify-items:center;min-width:0}
.today-v2 .tv-col small{font-size:13px;line-height:18px;color:var(--muted)}
.today-v2 .tv-bar-wrap{width:100%;max-width:26px;height:100%;display:flex;align-items:flex-end}
.today-v2 .tv-bar{display:block;width:100%;height:calc(var(--h)*1%);background:#c9b8f5;border-radius:6px 6px 3px 3px;transition:height .35s ease}
.today-v2 .tv-col.within .tv-bar{background:#9d86ea}
.today-v2 .tv-col.over .tv-bar{background:var(--tv-kcal)}
.today-v2 .tv-col.under .tv-bar{background:transparent;box-shadow:inset 0 0 0 2px #b9a7ef}
.today-v2 .tv-col.partial .tv-bar{background:repeating-linear-gradient(135deg,#9d86ea 0 4px,#d9cdf8 4px 8px)}
.today-v2 .tv-col.missing .tv-bar-wrap{height:22px;align-self:end;border:1.5px dashed #d6cbee;border-radius:6px}
.today-v2 .tv-dot{width:8px;height:8px;border-radius:50%;box-shadow:inset 0 0 0 1.5px var(--tv-protein);display:block}
.today-v2 .tv-dot.hit{background:var(--tv-protein)}
.today-v2 .tv-col.missing .tv-dot{box-shadow:none}
.today-v2 .tv-allow{position:absolute;inset-inline:0;bottom:calc(34px + (100% - 34px)*var(--a)/100);border-top:1.5px dashed #8d80a6;pointer-events:none;z-index:1}
.today-v2 .tv-legend{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;line-height:1.5;color:var(--muted);margin:-4px 0 10px}
.today-v2 .tv-legend span{display:inline-flex;align-items:center;gap:5px}
.today-v2 .tv-legend i{display:inline-block;flex-shrink:0}
.today-v2 .tv-legend .lg-line{width:14px;border-top:1.5px dashed #8d80a6}
.today-v2 .tv-legend .lg-dot{width:8px;height:8px;border-radius:50%;background:var(--tv-protein)}
.today-v2 .tv-legend .lg-part{width:10px;height:10px;border-radius:3px;background:repeating-linear-gradient(135deg,#9d86ea 0 3px,#d9cdf8 3px 6px)}
.today-v2 .tv-legend .lg-miss{width:10px;height:10px;border-radius:3px;border:1.5px dashed #b9abd9}
.today-v2 .tv-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.today-v2 .tv-stat{background:var(--tv-tile);border-radius:14px;padding:10px;display:flex;flex-direction:column;gap:1px;min-width:0}
.today-v2 .tv-stat strong{font-size:20px;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums;align-self:flex-start}
.today-v2 .tv-stat span{font-size:13px;font-weight:600}
.today-v2 .tv-stat small{font-size:13px;color:var(--muted);line-height:1.4}

/* Weight */
.today-v2 .tv-weight{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px}
.today-v2 .tv-weight-main{display:flex;align-items:center;gap:12px;min-width:0}
.today-v2 .tv-weight-main p{font-size:14px;color:var(--muted)}
.today-v2 .tv-weight-kg{font-size:26px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.today-v2 .tv-weight-kg small{font-size:14px;font-weight:600;color:var(--muted)}
.today-v2 .tv-weight-main>div{display:flex;flex-direction:column}
.today-v2 .tv-weight-when{font-size:14px;font-weight:600}
.today-v2 .tv-weight-meta{font-size:13px;color:var(--muted);line-height:1.5}
.today-v2 .tv-weight-actions{display:flex;align-items:center;gap:12px;margin-inline-start:auto}
.today-v2 .tv-weight-actions .secondary{padding:8px 14px}

/* Below the fold */
.today-v2 .tv-extras{display:grid;gap:12px;min-width:0}
.today-v2 .tv-extras:empty{display:none}
.today-v2 .tv-plan>summary{font-weight:700;font-size:16px;min-height:44px;display:flex;align-items:center;cursor:pointer}
.today-v2 .tv-plan[open]>summary{margin-bottom:8px}
.today-v2 .tv-plan>*+*:not(summary){margin-top:10px}
.today-v2 .tv-plan-base{font-size:14px;color:var(--muted)}
.today-v2 .tv-plan-routine p{font-size:14px;color:var(--muted);margin:4px 0 8px}
.today-v2 .tv-plan .card{box-shadow:none}

/* Window details modal */
.tv-window-details{display:grid;gap:12px}
.tv-window-details .tv-window-hours{font-size:22px;font-weight:800;text-align:start}
.tv-window-details .pu-actions{display:flex;flex-wrap:wrap;gap:8px}

@media(max-width:360px){.today-v2 .tv-big{font-size:30px}.today-v2 .tv-tile{padding:10px}.today-v2 .tv-quick button{font-size:14px;gap:4px}.today-v2 .tv-stat{padding:8px}.today-v2 .tv-stat strong{font-size:18px}.today-v2 .tv-chart{gap:4px}}
@media(min-width:900px){.today-v2{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:start}.today-v2 .tv-hero{grid-column:1;grid-row:1}.today-v2 .tv-week{grid-column:2;grid-row:1}.today-v2 .tv-meals,.today-v2 .tv-weight,.today-v2 .tv-extras{grid-column:1/-1}.today-v2>.legacy-notice{grid-column:1/-1}}
@media(prefers-reduced-motion:reduce){.today-v2 .tv-bar,.today-v2 .tv-track>i{transition:none}}
