/* Top bar: sticky, with a tools cluster (live-session chip, actions bell, settings) that never overlaps the logo. */
.topbar{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:10px}
.topbar .brand{flex:0 1 auto;min-width:0}
.topbar-tools{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
#attention-button{position:relative;width:38px;min-width:38px;height:38px;padding:0;border:0;border-radius:50%;background:var(--surface-2);color:var(--muted);display:inline-flex;align-items:center;justify-content:center}
#attention-button svg{width:20px;height:20px}
#attention-button[hidden]{display:none}
#attention-button .attention-dot{position:absolute;top:6px;right:7px;width:9px;height:9px;border-radius:50%;background:var(--ok-fill);box-shadow:0 0 0 2px var(--glass-2);opacity:0;transform:scale(.4);transition:opacity .2s,transform .2s}
#attention-button.has-dot .attention-dot{opacity:1;transform:none}
/* Live chip: compact presence of a running cooking/training session; expands the card below the top bar. */
#live-chip{display:contents}
#live-chip[hidden]{display:none}
.live-chip{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 13px 0 10px;border:0;border-radius:30px;background:var(--hero);color:var(--on-dark);font:inherit;font-size:13px;font-weight:600;letter-spacing:.1px;white-space:nowrap;max-width:46vw;box-shadow:0 6px 18px var(--shadow-3);min-width:0;overflow:hidden}
.live-chip small,.live-chip b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live-chip svg{width:17px;height:17px;flex:0 0 auto}
.live-chip b{font-weight:700;font-variant-numeric:tabular-nums}
.live-chip small{font-weight:600;opacity:.85}
.live-chip .live-pulse{width:7px;height:7px;border-radius:50%;background:var(--lime);flex:0 0 auto;animation:live-pulse 1.6s ease-in-out infinite}
@keyframes live-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(.55);opacity:.55}}
@media(prefers-reduced-motion:reduce){.live-chip .live-pulse{animation:none}}
/* Session card: only on screens without the top bar (training list, recipe detail); elsewhere the chip is the presence. */
#active-sessions{position:fixed;left:12px;right:12px;max-width:650px;margin:auto;z-index:59}
@media(max-width:720px){.live-chip{height:34px;font-size:12px;padding:0 11px 0 9px;max-width:42vw}#attention-button{width:36px;min-width:36px;height:36px}}
/* With a chip on a narrow phone the logo gives way instead of pushing the tools out of the bar. */
.topbar:has(#live-chip:not([hidden])) .brand .brand-lockup{max-width:min(52vw,calc(100vw - 236px));min-width:56px}
@media(max-width:360px){.live-chip{max-width:38vw;padding:0 9px 0 8px}.live-chip small{display:none}}
/* Action centre panel: a sheet under the top bar on phones, a card top-right on wider screens. */
#attention-center{position:fixed;inset:0;margin:0;padding:0;border:0;width:100%;max-width:none;height:100%;max-height:none;background:transparent;overflow:visible}
#attention-center::backdrop{background:var(--scrim)}
.attention-inner{position:absolute;top:calc(84px + env(safe-area-inset-top));right:12px;left:12px;max-width:420px;margin-left:auto;max-height:calc(100dvh - 110px - env(safe-area-inset-top));overflow:auto;overscroll-behavior:contain;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:22px;box-shadow:0 18px 50px var(--shadow-3);padding:6px 18px 18px}
@media(max-width:720px){.attention-inner{top:calc(78px + env(safe-area-inset-top));left:10px;right:10px;max-width:none;border-radius:20px}}
.attention-head{display:flex;align-items:center;justify-content:space-between;padding:12px 0 4px}
.attention-head h2{margin:0;font-size:19px;letter-spacing:-.3px}
.attention-close{width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:20px;line-height:1;padding:0}
.attention-group{margin-top:12px}
.attention-group h3{margin:0 0 6px;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted);font-weight:700}
.attention-item{display:flex;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.attention-item:first-of-type{border-top:0}
.attention-icon{flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:var(--surface-2);color:var(--ink);display:inline-flex;align-items:center;justify-content:center}
.attention-icon svg{width:20px;height:20px}
/* Live card: the running session with its clock, straight from the chip. */
.attention-live{display:block;background:linear-gradient(135deg,var(--hero),var(--hero));color:var(--on-dark);border:0;border-radius:18px;padding:14px 16px 16px;margin:4px 0 8px}
.attention-live+.attention-live{margin-top:10px}
.attention-live-head{display:flex;align-items:center;gap:8px}
.attention-live-icon{width:28px;height:28px;border-radius:9px;background:var(--glass-2);color:var(--lime);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.attention-live-icon svg{width:16px;height:16px}
.attention-live-head small{font-size:12px;font-weight:600;letter-spacing:.2px;color:var(--on-dark-soft)}
.attention-live-head b{margin-left:auto;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--lime)}
.attention-live strong{display:block;margin-top:8px;font-size:17px;line-height:1.3}
.attention-live .attention-actions{margin-top:12px}
.attention-go{background:var(--lime);color:var(--on-accent);border:0;font-weight:700}
.attention-soft{background:var(--glass);color:var(--on-dark);border:1px solid var(--glass-2)}
.attention-body{flex:1;min-width:0}
.attention-body strong{display:block;font-size:15px;line-height:1.35}
.attention-body p{margin:3px 0 0;font-size:13px;line-height:1.55;color:var(--ink)}
.attention-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.attention-actions button{min-height:36px;padding:0 14px;border-radius:30px;font-size:13px}
.attention-actions .ghost{border:1px solid var(--line);background:var(--surface)}
.attention-empty{margin:18px 0 12px;font-size:14px;line-height:1.6;color:var(--ink)}
/* Pending action on the dashboard (intake skipped): brand-coloured edge so it reads as a to-do, not as content. */
.dashboard-pending{border:1.5px solid var(--brand,var(--brand));border-left-width:6px;background:linear-gradient(135deg,var(--surface-2),var(--surface))}
.dashboard-pending .eyebrow{color:var(--brand,var(--brand))}
.dashboard-pending h2{margin-top:0}
.dashboard-pending p:last-of-type{margin-bottom:14px}
/* Widget offer (Android app): a mock home screen with the LivuFit widget, one tap to add it, one to decline. */
.widget-offer{border:0;border-radius:24px;padding:0;max-width:420px;width:calc(100% - 32px);background:var(--surface);color:var(--ink,var(--ink));box-shadow:0 18px 50px var(--shadow-3)}
.widget-offer::backdrop{background:var(--scrim)}
.widget-offer-inner{padding:18px 22px 22px}
.widget-offer-top{display:flex;justify-content:space-between;align-items:center}
.widget-offer h2{margin:4px 0 8px}
.widget-offer p{margin:0 0 4px;line-height:1.5}
.widget-phone{margin:16px auto;width:min(100%,290px);aspect-ratio:9/12;border-radius:30px;padding:16px 14px 14px;background:linear-gradient(160deg,var(--tint),var(--lime-soft) 60%,var(--warn-bg));box-shadow:inset 0 0 0 7px var(--shadow-3),0 10px 30px var(--shadow-2);display:flex;flex-direction:column;gap:16px}
.widget-phone-status{display:flex;justify-content:space-between;font-size:.7rem;font-weight:600;color:var(--ink);padding:0 8px}
.widget-mock{display:flex;align-items:center;gap:7px;padding:8px 12px;border-radius:16px;background:linear-gradient(90deg,var(--brand-deep),var(--hero));color:var(--on-dark);min-height:56px;box-shadow:0 6px 16px var(--shadow-3)}
.widget-mock img{width:26px;height:26px;flex:none}
.widget-mock b{font-size:1.05rem;font-weight:500;margin-right:6px;letter-spacing:-.01em}
.widget-mock>div{flex:1;min-width:0}
.widget-mock strong{display:block;font-size:1.15rem;line-height:1.1;font-weight:700}
.widget-mock small{display:block;font-size:.6rem;color:var(--on-dark-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.widget-mock i{display:block;height:3px;margin-top:3px;border-radius:2px;background:var(--frost)}
.widget-mock .water strong,.widget-mock .water small{color:var(--lime)}
.widget-mock .water i{background:var(--lime)}
.widget-phone-apps{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;padding:2px 8px}
.widget-phone-apps span,.widget-phone-dock span{display:block;width:34px;height:34px;margin:0 auto;border-radius:11px;background:var(--veil)}
.widget-phone-dock{margin-top:auto;display:grid;grid-template-columns:repeat(4,1fr);padding:8px;border-radius:18px;background:var(--glass-2)}
.widget-offer-actions{display:grid;gap:8px}

/* 18 September 2026: everything 'live' (top-bar chip, cooking-timer chips, the session card) breathes a soft glow that shifts colour with every pulse. */
@keyframes live-glow{0%,100%{box-shadow:0 0 0 0 transparent}12%{box-shadow:0 0 16px 2px color-mix(in srgb,var(--lime) 55%,transparent)}25%{box-shadow:0 0 0 0 transparent}37%{box-shadow:0 0 16px 2px color-mix(in srgb,var(--mint) 55%,transparent)}50%{box-shadow:0 0 0 0 transparent}62%{box-shadow:0 0 16px 2px color-mix(in srgb,var(--accent-water) 50%,transparent)}75%{box-shadow:0 0 0 0 transparent}87%{box-shadow:0 0 16px 2px color-mix(in srgb,var(--accent-gold) 50%,transparent)}}
.live-chip,#active-sessions{animation:live-glow 12s ease-in-out infinite}
.cook-timer-chips{position:sticky;top:calc(6px + env(safe-area-inset-top));z-index:3;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.cook-timer-chips .cook-timer-chip{height:34px;padding:0 12px 0 10px;font-size:12px;gap:6px}
.cook-timer-chips .cook-timer-chip small{display:inline;font-weight:600;opacity:.75}
.cook-timer-chips .cook-timer-chip.is-done{background:var(--lime);color:var(--on-accent)}
.cook-timer-chips .cook-timer-chip.is-done .live-pulse{background:var(--on-accent);animation:none}
@media (prefers-reduced-motion:reduce){.live-chip,#active-sessions{animation:none}}
