/* ==========================================================================
   MyVitality — the app, drawn in HTML (mvui.js fills these)
   Every device is drawn at its real size in points (iPhone 17 Pro 402×874,
   Apple Watch 46 mm 208×248) and scaled as a whole with `zoom`, so the UI
   inside keeps the app's own numbers: 20 pt gutters, 12/20 pt radii, 56 pt
   rows. `zoom` re-lays out instead of transforming, so text stays crisp
   and the device takes up its scaled size in the page.
   ========================================================================== */

/* ── iPhone ── */
.iphone {
  --z: .62;
  zoom: var(--z);
  position: relative; flex-shrink: 0;
  width: 426px; height: 898px; padding: 12px; border-radius: 72px;
  /* titanium edge, then a black bezel */
  background:
    linear-gradient(#000, #000) padding-box,
    linear-gradient(145deg, #8a8a8f 0%, #3a3a3d 22%, #1c1c1e 50%, #4a4a4e 78%, #9a9a9f 100%) border-box;
  border: 3px solid transparent;
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.45), 0 30px 60px -30px rgba(0,0,0,.35);
}
.iphone::before, .iphone::after { /* side buttons */
  content: ''; position: absolute; width: 5px; border-radius: 3px; background: #3a3a3d;
}
.iphone::before { left: -7px; top: 210px; height: 64px; box-shadow: 0 86px 0 #3a3a3d; }
.iphone::after { right: -7px; top: 260px; height: 104px; }
.iphone .island {
  position: absolute; z-index: 40; top: 23px; left: 50%; width: 126px; height: 37px; margin-left: -63px;
  border-radius: 20px; background: #000; pointer-events: none;
}
.iphone .screen {
  position: relative; width: 402px; height: 874px; border-radius: 58px; overflow: hidden;
  background: var(--a-bg); color: var(--a-text); isolation: isolate;
}
@media all /* the app's dark set, always */ { .iphone { box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 60px 120px -40px rgba(0,0,0,.8); } }

/* ── App tokens inside the phone (AppColor) ── */
.iphone {
  --a-bg: #FFFFFF; --a-surface: #F4F4F5; --a-raised: #FFFFFF; --a-border: #E5E5E5; --a-fill: #E5E5E5;
  --a-text: #111111; --a-text-2: #6B6B6B; --a-muted: #A3A3A3;
  --a-inverse: #111111; --a-on-inverse: #FFFFFF;
  --a-hero: #111111; --a-on-hero: #FFFFFF; --a-on-hero-2: #9C9C9C; --a-hero-border: #2C2C2E;
  --a-accent: #047857; --a-accent-subtle: #E7F5EF; --a-caution: #9A5B00; --a-low: #A42C50;
  --a-sleep: #6D42B5; --a-training: #A34612; --a-hydration: #0369A1;
  --a-protein: #0F766E; --a-carbs: #9A5B00; --a-fat: #8541A8; --a-liked: #BE3452; --a-danger: #D92D20;
  --a-c0: #E5E5E5; --a-c1: #A3A3A3; --a-c2: #6B6B6B; --a-c3: #111111;
  --a-z1: #7B8794; --a-z2: #2B8C9A; --a-z3: #2E9A5C; --a-z4: #C98A1C; --a-z5: #C8553A;
  --a-glass: rgba(255,255,255,.72); --a-glass-edge: rgba(0,0,0,.06); --a-glass-pill: rgba(0,0,0,.07);
}
@media all /* the app's dark set, always */ {
  .iphone {
    --a-bg: #0E0E0E; --a-surface: #1C1C1E; --a-raised: #2C2C2E; --a-border: #2C2C2E; --a-fill: #3A3A3C;
    --a-text: #FFFFFF; --a-text-2: #9C9C9C; --a-muted: #5C5C5C;
    --a-inverse: #FFFFFF; --a-on-inverse: #111111;
    --a-hero: #1C1C1E;
    --a-accent: #34D399; --a-accent-subtle: #0F2A21; --a-caution: #F2B54B; --a-low: #FDA4AF;
    --a-sleep: #C4B5FD; --a-training: #FDBA74; --a-hydration: #7DD3FC;
    --a-protein: #5EEAD4; --a-carbs: #F2B54B; --a-fat: #E9A8FA; --a-liked: #FB8A9E; --a-danger: #F04438;
    --a-c0: #2C2C2E; --a-c1: #5C5C5C; --a-c2: #9C9C9C; --a-c3: #FFFFFF;
    --a-z1: #8E9AA8; --a-z2: #45B3C2; --a-z3: #4CC27E; --a-z4: #E9AB3F; --a-z5: #EA7556;
    --a-glass: rgba(40,40,42,.72); --a-glass-edge: rgba(255,255,255,.08); --a-glass-pill: rgba(255,255,255,.16);
  }
}
/* The phones always show the app's dark set (the owner's choice,
   2026-12-01), whatever the visitor's own setting: the dark blocks in this
   file are "@media all". */

/* ── Apple Watch (46 mm) ── */
.watch {
  --wz: .9;
  zoom: var(--wz);
  position: relative; flex-shrink: 0; width: 246px; height: 290px;
}
/* Hardware, after a 46 mm Series 11 in jet black aluminium with a black
   Sport Band: the band is narrower than the case and curves away (darker,
   slightly tapered, fading out); the rim is polished at the edges; the
   glass carries a faint reflection; the crown is a knurled cylinder whose
   ridges move when it turns. */
.watch .band {
  position: absolute; left: 50%; width: 152px; margin-left: -76px; height: 190px; z-index: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.6), rgba(255,255,255,.03) 13%, rgba(255,255,255,.075) 50%, rgba(255,255,255,.03) 87%, rgba(0,0,0,.6)),
    var(--band-shade), #1a1b1e;
}
/* the band curves away from you: darker towards its end, then gone */
.watch .band.top { top: -172px; border-radius: 22px 22px 0 0;
  --band-shade: linear-gradient(0deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.6) 100%);
  -webkit-mask-image: linear-gradient(to top, #000 60%, transparent); mask-image: linear-gradient(to top, #000 60%, transparent); }
.watch .band.bottom { bottom: -172px; border-radius: 0 0 22px 22px;
  --band-shade: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.6) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.watch .band::before { /* where the band slides into the case */
  content: ''; position: absolute; left: 0; right: 0; height: 18px; background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,0)); }
.watch .band.top::before { bottom: 0; transform: scaleY(-1); }
.watch .band.bottom::before { top: 0; }
.watch .band.bottom::after { /* pin holes */
  content: ''; position: absolute; left: 50%; top: 58px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: #08080a; box-shadow: inset 0 1px 1px #000, 0 .5px 0 rgba(255,255,255,.08), 0 19px 0 #08080a, 0 38px 0 #08080a, 0 57px 0 #08080a;
}
.watch .case {
  position: absolute; inset: 0; z-index: 1; border-radius: 66px; padding: 5px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 14%),
    linear-gradient(340deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 16%),
    linear-gradient(180deg, #2a2b2e, #111113 40%, #0b0b0c 70%, #1d1e21);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), inset 0 1.5px 1px rgba(255,255,255,.35), inset 0 -2px 3px rgba(0,0,0,.7),
    0 0 0 .5px #000, 0 34px 70px -24px rgba(0,0,0,.75);
}
.watch .glass { position: relative; width: 100%; height: 100%; border-radius: 61px; background: #000; padding: 15px 13px; box-shadow: inset 0 0 0 1.5px #161618; }
.watch .glass::after { /* the reflection on the glass */
  content: ''; position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none;
  background: linear-gradient(128deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.04) 26%, rgba(255,255,255,0) 40%),
    radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.06), transparent 60%);
}
.watch .crown {
  position: absolute; z-index: 0; right: -11px; top: 64px; width: 15px; height: 46px; border-radius: 3px 7px 7px 3px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(255,255,255,.22) 26%, rgba(255,255,255,.06) 52%, rgba(0,0,0,.75) 100%),
    repeating-linear-gradient(180deg, #55565a 0 1.1px, #1a1b1d 1.1px 2.5px);
  background-size: 100% 100%, 100% 100%;
  box-shadow: inset -1px 0 1px rgba(255,255,255,.2), 0 0 0 .5px #000;
  transition: background-position .6s var(--ease-out, ease-out);
}
.watch .crown::before { /* the collar between crown and case */
  content: ''; position: absolute; left: -4px; top: 9px; width: 5px; height: 28px; border-radius: 2px; background: linear-gradient(180deg, #0d0d0e, #2c2d30 45%, #0d0d0e); }
.watch .side-btn { position: absolute; z-index: 0; right: -4px; top: 132px; width: 7px; height: 62px; border-radius: 3.5px;
  background: linear-gradient(90deg, #0e0e0f, #3e3f43 55%, #18191b); box-shadow: 0 0 0 .5px #000; }

/* Watch UI (MyVitalityWatch palette; sizes in points on a 46 mm display) */
.w-ui {
  --w-canvas: #080B0A; --w-surface: #171F1C; --w-accent: #54D9A6; --w-accent-s: #243B30;
  --w-heart: #FA6B85; --w-energy: #FCB061; --w-time: #FFDE5C; --w-sleep: #C4B5FC; --w-good: #33D499; --w-calm: #8CC2FA;
  --w-2: rgba(235,242,239,.6);
  position: relative; width: 208px; height: 248px; border-radius: 46px; overflow: hidden; isolation: isolate;
  background: var(--w-canvas); color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; line-height: 1.18; -webkit-font-smoothing: antialiased;
}
.w-ui .wr { font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
.w-ui svg { display: block; }
.w-clock { position: absolute; top: 10px; right: 21px; z-index: 6; font-size: 15px; font-weight: 600; }
.w-page { position: absolute; inset: 0; z-index: 1; display: none; flex-direction: column; padding: 37px 13px 10px; background: var(--w-canvas); overflow: hidden; }
.w-page.on { display: flex; }
.w-page::before { /* content scrolls up under the time and the title */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 36px; z-index: 3; background: linear-gradient(var(--w-canvas) 70%, transparent); pointer-events: none; }
.w-full:not([data-w="summary"])::before, .w-sheet::before { display: none; }
[data-w="summary"]::before { height: 33px; }
.w-bar { position: absolute; z-index: 4; top: 8px; left: 15px; right: 64px; height: 26px; display: flex; align-items: center; gap: 7px; }
.w-navt { font-size: 16px; font-weight: 600; white-space: nowrap; }
.w-backbtn { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.17); box-shadow: inset 0 .5px 0 rgba(255,255,255,.3), inset 0 -.5px 0 rgba(255,255,255,.06); }
.w-backbtn svg { width: 13px; height: 13px; }
.w-scroll { position: relative; z-index: 1; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; transition: transform .7s cubic-bezier(.32,.72,0,1); }
.w-start.tap, .w-sport.tap, .w-cbtn.tap, .w-wide.tap { transform: scale(.95); filter: brightness(1.3); }

/* Home */
.w-start { min-height: 44px; border-radius: 15px; background: var(--w-accent); color: #000; display: flex; align-items: center; gap: 6px; padding: 0 10px; transition: transform .2s, filter .2s; }
.w-start > svg { width: 19px; height: 19px; } .w-start b { font-size: 14px; font-weight: 700; }
.w-start .w-arrow { margin-left: auto; } .w-start .w-arrow svg { width: 13px; height: 13px; }
.w-rec { min-height: 46px; border-radius: 15px; background: var(--w-surface); display: flex; align-items: center; gap: 6px; padding: 6px 10px; }
.w-rec b { display: block; font-size: 14px; font-weight: 600; } .w-rec small { display: block; font-size: 13px; color: var(--w-2); margin-top: 2px; }
.w-rec .v { margin-left: auto; font-size: 20px; font-weight: 700; } .w-rec i { color: var(--w-2); } .w-rec i svg { width: 9px; height: 9px; }
.w-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.w-tile { min-height: 44px; border-radius: 13px; background: var(--w-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; font-weight: 600; }
.w-tile svg { width: 12px; height: 12px; }

/* Workouts, and the countdown that replaces the list */
.w-list { gap: 6px; }
.w-sport { min-height: 44px; border-radius: 14px; background: var(--w-surface); display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 17px; font-weight: 600; transition: transform .2s, filter .2s; }
.w-sport.run { background: var(--w-accent-s); }
.w-sport .ic { width: 24px; display: flex; justify-content: center; color: var(--w-accent); } .w-sport .ic svg { width: 19px; height: 19px; }
.w-sport .go { margin-left: auto; color: var(--w-accent); } .w-sport .go svg { width: 10px; height: 10px; }
.w-sport.set { font-size: 14px; gap: 6px; } .w-sport.set .ic { width: auto; color: #fff; } .w-sport.set .ic svg { width: 16px; height: 16px; }
.w-sport .go.dn { color: var(--w-2); }
.w-count { display: none; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding-bottom: 6px; }
.w-page.counting .w-list { display: none; }
.w-page.counting .w-count { display: flex; animation: wFade .25s ease-out; }
.w-count .n { position: relative; width: 100%; height: 80px; }
.w-count .n b { position: absolute; inset: 0; text-align: center; font-size: 76px; line-height: 80px; font-weight: 700; color: var(--w-accent); }
.w-cl { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; } .w-cl svg { width: 15px; height: 15px; }
.w-count small { font-size: 13px; color: var(--w-2); }
@keyframes wFade { from { opacity: 0; } }

/* The workout: whole-screen pages, paged with the crown */
.w-full { padding: 33px 17px 11px 12px; }
.w-top { display: flex; align-items: center; gap: 4px; }
.w-top .nm { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--w-accent); } .w-top .nm svg { width: 15px; height: 15px; }
.w-zone { --zc: #8CC2FA; margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 6px; border-radius: 9px; color: var(--zc); background: color-mix(in srgb, var(--zc) 17%, transparent); transition: color .4s, background .4s; }
.w-label { font-size: 13px; font-weight: 600; color: var(--w-2); margin-top: 3px; }
.w-head { font-size: 46px; font-weight: 600; color: var(--w-accent); line-height: 1; letter-spacing: -.01em; }
.w-mid { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-top: 3px; }
.w-mid span { display: inline-flex; align-items: center; gap: 4px; } .w-mid svg { width: 14px; height: 14px; } .w-mid .hr svg { color: var(--w-heart); }
.w-foot { margin-top: auto; }
.w-div { height: 1px; background: rgba(255,255,255,.16); margin-bottom: 5px; }
.w-stats { display: flex; gap: 5px; font-size: 14px; font-weight: 600; animation: wFade .3s; }
.w-stats span { flex: 1; display: flex; align-items: baseline; gap: 3px; } .w-stats small { font-size: 10px; font-weight: 600; color: var(--w-2); }
.w-banner { display: none; font-size: 17px; font-weight: 600; color: var(--w-accent); }
.w-page.banner .w-stats { display: none; }
.w-page.banner .w-banner { display: block; animation: wRise .5s cubic-bezier(.32,.72,0,1); }
@keyframes wRise { from { transform: translateY(110%); opacity: 0; } }
.w-ctrl { flex: 1; display: flex; align-items: center; gap: 8px; }
.w-cbtn { flex: 1; min-height: 74px; border-radius: 17px; background: var(--w-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; transition: transform .2s, filter .2s; }
.w-cbtn svg { width: 20px; height: 20px; }
.w-hrpage { --zc: #FFDE5C; gap: 6px; padding: 33px 18px 12px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--zc) 25%, var(--w-canvas)), color-mix(in srgb, var(--zc) 16%, var(--w-canvas))); }
.w-hk { font-size: 14px; font-weight: 600; color: var(--w-2); }
.w-zl { display: flex; align-items: baseline; gap: 6px; } .w-zl b { font-size: 30px; font-weight: 700; line-height: 1.05; color: #FFDE5C; transition: color .4s; }
.w-zl span { font-size: 14px; font-weight: 600; color: var(--w-2); }
.w-zbar { display: flex; gap: 3px; align-items: center; height: 12px; }
.w-zbar i { flex: 1; height: 8px; border-radius: 4px; background: var(--c); opacity: .25; transition: height .3s, opacity .3s; }
.w-zbar i.on { height: 12px; border-radius: 6px; opacity: 1; }
.w-cols { display: flex; margin-top: auto; } .w-cols div { flex: 1; }
.w-cols b { display: block; font-size: 21px; font-weight: 600; } .w-cols small { font-size: 10px; font-weight: 600; color: var(--w-2); }
.w-sheet { background: #000; justify-content: center; gap: 14px; padding: 30px 13px 26px; }
.w-sheet .x { position: absolute; top: 8px; left: 15px; }
.w-sheet .t { text-align: center; font-size: 17px; font-weight: 600; }
.w-wide { min-height: 44px; flex-shrink: 0; border-radius: 22px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 500; transition: transform .2s, filter .2s; }
.w-wide.done { background: color-mix(in srgb, var(--w-good) 22%, transparent); color: var(--w-good); font-weight: 600; }
[data-w="summary"] { padding: 33px 14px 10px; }
.w-sumlist { gap: 6px; transition: none; }
.w-sum-h { display: flex; align-items: center; gap: 5px; color: var(--w-good); font-size: 17px; font-weight: 600; } .w-sum-h svg { width: 19px; height: 19px; }
.w-srow { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.w-srow span { font-size: 14px; color: var(--w-2); } .w-srow b { font-size: 17px; font-weight: 600; }
.w-note { margin: 0; font-size: 13px; line-height: 1.25; color: var(--w-2); }
.w-dots { position: absolute; z-index: 7; right: 5px; top: 52px; display: flex; flex-direction: column; gap: 3px; opacity: 0; transition: opacity .3s; }
.w-dots.show { opacity: 1; } .w-dots i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); } .w-dots i.on { background: #fff; }

/* Today */
.w-rings { display: flex; gap: 10px; padding: 2px 6px 0; }
.w-ring { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.w-ring .o { position: relative; width: 100%; aspect-ratio: 1; }
.w-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.w-ring circle { fill: none; stroke-width: 6; }
.w-ring .t { stroke: color-mix(in srgb, var(--c) 20%, transparent); }
.w-ring .a { stroke: color-mix(in srgb, var(--c) 45%, transparent); }
.w-ring .p { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 150.8; stroke-dashoffset: var(--off); }
.w-page.on .w-ring .p { animation: wRing 1.1s cubic-bezier(.34,1.3,.64,1) .15s both; }
@keyframes wRing { from { stroke-dashoffset: 150.8; } }
.w-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; }
.w-ring small { font-size: 10px; font-weight: 600; color: var(--w-2); }
.w-upd { font-size: 13px; color: var(--w-2); padding: 7px 6px 0; }
.w-detail { display: flex; flex-direction: column; gap: 5px; padding: 10px 6px 0; }
.w-detail div { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--w-2); }
.w-detail span { width: 18px; display: flex; justify-content: center; } .w-detail svg { width: 13px; height: 13px; }
.w-detail b { margin-left: auto; font-size: 17px; font-weight: 600; color: #fff; }
.w-links { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.w-link { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; background: var(--w-surface); }
.w-link .ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; } .w-link .ic svg { width: 15px; height: 15px; }
.w-link > div { flex: 1; min-width: 0; }
.w-link b { display: block; font-size: 17px; font-weight: 600; } .w-link small { display: block; font-size: 13px; color: var(--w-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-link i { color: rgba(255,255,255,.3); } .w-link i svg { width: 11px; height: 11px; }

/* A fingertip: where the demo taps */
.w-tap { position: absolute; z-index: 8; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(255,255,255,.35); opacity: 0; transform: scale(.4); pointer-events: none; }
.w-tap.go { animation: wTap .5s ease-out; }
@keyframes wTap { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .w-tap.go, .w-page.on .w-ring .p, .w-stats, .w-page.banner .w-banner { animation: none; } .w-scroll { transition: none; } }

/* ==========================================================================
   iPhone app UI (Features/*, Core/Design) — sizes in points
   ========================================================================== */
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.screen { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif; font-size: 16px; line-height: 1.25; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
.screen svg { display: block; }
/* Status bar and home indicator sit above every view */
.a-status { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; color: var(--a-text); font-size: 17px; font-weight: 600; pointer-events: none; transition: color .3s; }
.a-status .ic { display: flex; gap: 6px; align-items: center; }
.a-status svg { height: 13px; width: auto; }
.a-homebar { position: absolute; z-index: 30; bottom: 8px; left: 50%; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--a-text); opacity: .9; transition: background .3s; }
.screen.dark-top .a-status { color: #fff; } .screen.dark-top .a-homebar { background: #fff; }

/* Views: one per screen, stacked; the player moves between them */
.a-view { position: absolute; inset: 0; background: var(--a-bg); overflow: hidden; visibility: hidden; }
.a-view.on { visibility: visible; z-index: 2; }
.a-view.leaving { visibility: visible; z-index: 1; }
.a-scroll { padding: 62px 20px 40px; display: flex; flex-direction: column; gap: 12px; will-change: transform; }
.a-view.gap16 .a-scroll { gap: 16px; }
/* MainTabView stacks the content above the glass bar (60 pt capsule, 42 pt
   up), so nothing scrolls under it */
.a-view.tabbed { bottom: 106px; }
.a-view.tabbed .a-scroll { padding-bottom: 24px; }
/* Pushed screens: the system inline bar, a round glass back button */
.a-view.pushed .a-scroll { padding-top: 110px; }
.a-nav { position: absolute; z-index: 5; top: 54px; left: 0; right: 0; height: 52px; padding: 4px 16px; display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; align-items: center; text-align: center; color: var(--a-text);
  background: linear-gradient(var(--a-bg) 62%, transparent); }
.a-nav b { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-glass { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--a-text);
  background: var(--a-glass); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 0 0 .5px var(--a-glass-edge), inset 0 1px 0 rgba(255,255,255,.3), 0 4px 14px rgba(0,0,0,.08); }
.a-glass svg { width: 20px; height: 20px; }

/* Tab switch: the new view rises a little and fades in */
.a-view.in-tab { animation: aTabIn .45s var(--ease-out, ease-out) both; }
.a-view.out-tab { animation: aTabOut .3s ease-in both; }
@keyframes aTabIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes aTabOut { to { opacity: 0; transform: scale(.985); } }
/* Full-screen cover (recording, story): slides up over the tab */
.a-view.in-cover { animation: aCoverIn .6s cubic-bezier(.32,.72,0,1) both; }
.a-view.out-cover { animation: aCoverOut .5s cubic-bezier(.32,.72,0,1) both; z-index: 3; visibility: visible; }
@keyframes aCoverIn { from { transform: translateY(100%); } }
@keyframes aCoverOut { to { transform: translateY(100%); } }
/* Push (navigation): in from the right, the old one drifts left and dims */
.a-view.in-push { animation: aPushIn .5s cubic-bezier(.32,.72,0,1) both; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
.a-view.out-push { animation: aPushOut .5s cubic-bezier(.32,.72,0,1) both; }
@keyframes aPushIn { from { transform: translateX(100%); } }
@keyframes aPushOut { to { transform: translateX(-30%); filter: brightness(.85); } }
/* Cards stagger in when a view arrives (80 ms apart, rise 16) */
.a-view.on .a-scroll > * { animation: aRise .4s var(--ease-out, ease-out) both; }
.a-view.on .a-scroll > :nth-child(2) { animation-delay: .08s; } .a-view.on .a-scroll > :nth-child(3) { animation-delay: .16s; }
.a-view.on .a-scroll > :nth-child(4) { animation-delay: .24s; } .a-view.on .a-scroll > :nth-child(5) { animation-delay: .32s; }
.a-view.on .a-scroll > :nth-child(6) { animation-delay: .4s; } .a-view.on .a-scroll > :nth-child(n+7) { animation-delay: .48s; }
@keyframes aRise { from { opacity: 0; transform: translateY(16px); } }

/* ── Glass tab bar (GlassTabBarView): icons only, a lens behind the selected
   one; outline symbols, `.fill` when selected ── */
.a-tabbar { position: absolute; z-index: 20; left: 16px; right: 16px; bottom: 42px; height: 60px; border-radius: 30px; padding: 6px;
  display: grid; grid-template-columns: repeat(7, 1fr); align-items: center;
  background: var(--a-glass); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 0 0 .5px var(--a-glass-edge), inset 0 1px 0 rgba(255,255,255,.35), 0 8px 30px rgba(0,0,0,.12);
  transition: transform .35s var(--ease-out, ease-out), opacity .3s; }
.a-tabbar.hide { transform: translateY(140px); opacity: 0; }
.a-tab { position: relative; z-index: 1; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--a-text); }
.a-tab svg { width: 26px; height: 26px; }
.a-tab .f { position: absolute; opacity: 0; transition: opacity .25s; } .a-tab .o { transition: opacity .25s; }
.a-tab.sel .f { opacity: 1; } .a-tab.sel .o { opacity: 0; }
.a-tab .ava { width: 26px; height: 26px; border-radius: 50%; background: #E6E6E6; color: #111; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; transition: box-shadow .25s; }
@media all /* the app's dark set, always */ { .a-tab .ava { background: #3D3D3D; color: #fff; } }
.a-tab.sel .ava { box-shadow: inset 0 0 0 1.5px var(--a-text); }
.a-lens { position: absolute; z-index: 0; top: 6px; left: 6px; height: 48px; border-radius: 24px; background: var(--a-glass-pill);
  width: calc((100% - 12px) / 7 * 1.14); margin-left: calc((100% - 12px) / 7 * -.07);
  transform: translateX(calc((100% / 1.14) * var(--i, 0)));
  transition: transform .55s cubic-bezier(.34,1.35,.64,1), width .3s; }

/* ── Building blocks (Core/Design) ── */
.a-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 0 4px; }
.a-over { font-size: 13px; font-weight: 500; color: var(--a-text-2); margin-bottom: 2px; }
.a-title { font-size: 34px; font-weight: 600; letter-spacing: .01em; line-height: 1.1; color: var(--a-text); }
.a-hbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--a-text); }
.a-hbtn svg { width: 24px; height: 24px; }
.a-card { background: var(--a-surface); border-radius: 20px; padding: 16px; }
.a-card.flush { padding: 0; }
.a-hero { background: var(--a-hero); color: var(--a-on-hero); }
.a-h { font-size: 17px; font-weight: 600; color: var(--a-text); display: flex; align-items: center; gap: 8px; }
.a-h svg { width: 20px; height: 20px; flex-shrink: 0; }
.a-lbl { font-size: 13px; font-weight: 500; color: var(--a-text-2); }
.a-sm { font-size: 13px; color: var(--a-text-2); }
.a-cap { font-size: 12px; color: var(--a-text-2); }
.a-t2 { font-size: 22px; font-weight: 600; color: var(--a-text); }
.a-metric { font-size: 28px; font-weight: 600; color: var(--a-text); }
.a-unit { font-size: 13px; font-weight: 400; color: var(--a-text-2); margin-left: 3px; }
.a-row { display: flex; align-items: center; gap: 12px; }
.a-sp { flex: 1; min-width: 0; }
.a-chev { width: 13px; height: 13px; color: var(--a-text-2); flex-shrink: 0; }
.a-chev svg { width: 100%; height: 100%; }
.a-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--a-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.a-tile svg { width: 24px; height: 24px; }
.a-btn { height: 56px; border-radius: 28px; background: var(--a-inverse); color: var(--a-on-inverse); font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; }
.a-btn svg { width: 20px; height: 20px; }
.a-btn.sec { background: var(--a-surface); color: var(--a-text); }
/* iOS 26 segmented control: a capsule track, a capsule thumb */
.a-seg { height: 34px; border-radius: 17px; background: var(--a-fill); padding: 2px; display: grid; grid-template-columns: 1fr 1fr; font-size: 14px; font-weight: 500; color: var(--a-text); }
.a-seg span { display: flex; align-items: center; justify-content: center; border-radius: 15px; }
.a-seg .s { background: var(--a-raised); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
@media all /* the app's dark set, always */ { .a-seg { background: rgba(118,118,128,.24); } .a-seg .s { background: #636366; } }
.a-div { height: 1px; background: var(--a-border); }
.a-tag { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 12px; background: var(--a-fill); color: var(--a-text-2); }
/* SectionHeader: grey icon, label, hairline */
.a-sec { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--a-text-2); }
.a-sec svg { width: 16px; height: 16px; flex-shrink: 0; } .a-sec::after { content: ''; flex: 1; height: 1px; background: var(--a-border); margin-left: 6px; }
/* StatusLabel: icon + text in the tint */
.a-stat { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--a-text); white-space: nowrap; }
.a-stat svg { width: 14px; height: 14px; flex-shrink: 0; }
/* featureRow: a 44 tile on the background, title in the tint, subtitle, chevron */
.a-frow { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--ft, var(--a-text)); }
.a-frow .t { font-size: 17px; font-weight: 600; color: var(--ft, var(--a-text)); }
.a-frow .a-sm { margin-top: 4px; }
.a-frow + .a-frow::before { content: ''; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--a-border); }

/* ProgressRing: --p fills 0 → --to over 1.1 s from the top with a round end;
   .tg is a faint target range (Strain) */
.a-ring { position: relative; flex-shrink: 0; --p: 0; transition: --p 1.1s cubic-bezier(.3,.7,.2,1) .15s; }
.a-view.on .a-ring { --p: var(--to); }
.a-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.a-ring circle { fill: none; }
.a-ring .tr { stroke: var(--rt, var(--a-border)); }
.a-ring .tg { stroke: var(--rc); opacity: .32; }
.a-ring .pr { stroke: var(--rc); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p) * 100); }
.a-ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ── Home (HomeView.swift) ── */
.h-steps { display: flex; align-items: center; gap: 20px; }
.h-steps .a-ring b { font-size: 17px; font-weight: 600; color: #fff; }
.h-steps .a-lbl { color: var(--a-on-hero-2); }
.h-steps .big { font-size: 34px; font-weight: 600; line-height: 1.15; color: var(--a-on-hero); }
.h-steps .a-sm { color: var(--a-on-hero-2); }
.h-steps .burn { display: flex; align-items: center; gap: 4px; font-size: 16px; margin-top: 8px; color: var(--a-on-hero); }
.h-steps .burn svg { width: 14px; height: 14px; color: #fff; }
@media all /* the app's dark set, always */ { .a-hero { background: var(--a-surface); } }
.h-scores { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: start; padding-top: 20px; }
.h-scores .sep { width: 1px; height: 60px; background: var(--a-border); }
.h-score { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.h-score .a-ring { margin-bottom: 6px; }
.h-score .ic svg { width: 20px; height: 20px; }
.h-score .n { font-size: 22px; font-weight: 600; }
.h-sugg { display: flex; align-items: flex-start; gap: 12px; }
.h-sugg .bub { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--a-training) 14%, transparent); color: var(--a-training); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.h-sugg .bub svg { width: 22px; height: 22px; }
.h-sugg .a-h { margin: 2px 0 4px; }
.h-streak { display: flex; align-items: center; gap: 12px; }
.h-streak .fl { color: var(--a-training); display: flex; } .h-streak .fl svg { width: 28px; height: 28px; }
.h-streak .a-sm, .h-week .a-sm { margin-top: 2px; }
.h-gym { display: grid; grid-template-columns: repeat(15, 1fr); grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; margin-top: 16px; }
.h-gym i { aspect-ratio: 1; border-radius: 22%; background: var(--a-c0); }
.h-gym i.l1 { background: var(--a-c1); } .h-gym i.l2 { background: var(--a-c2); } .h-gym i.l3 { background: var(--a-c3); }
.h-gym i.fut { visibility: hidden; }
.a-view.on .h-gym i { animation: gymPop .35s cubic-bezier(.34,1.5,.64,1) both; animation-delay: calc(var(--c) * 70ms + .2s); }
@keyframes gymPop { from { transform: scale(0); opacity: 0; } }
.h-week { display: flex; align-items: center; gap: 12px; }
.h-week .ic { color: var(--a-text-2); display: flex; } .h-week .ic svg { width: 24px; height: 24px; }
.h-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.h-tile { aspect-ratio: 1.3; display: flex; flex-direction: column; justify-content: space-between; }
.h-tile .bx { width: 36px; height: 36px; border-radius: 12px; background: var(--a-bg); display: flex; align-items: center; justify-content: center; color: var(--a-text); }
.h-tile .bx svg { width: 20px; height: 20px; }
.h-tile .v { font-size: 22px; font-weight: 600; white-space: nowrap; }
.h-tile .a-sm { margin-top: 4px; }
.h-bar { height: 5px; border-radius: 3px; background: var(--a-border); margin: 12px 0; overflow: hidden; }
.h-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--bc, var(--a-training)); transition: width 1s var(--ease-out, ease-out) .3s; }
.a-view.on .h-bar i { width: var(--w); }
.h-bar.ink i { background: var(--a-inverse); }
.h-kcal { margin: 16px 0 12px; }
.h-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.h-macro { background: var(--a-bg); border-radius: 12px; padding: 12px; }
.h-macro .sw { height: 4px; width: 0; border-radius: 2px; background: var(--mc); margin-bottom: 8px; transition: width .8s var(--ease-out, ease-out) .5s; }
.a-view.on .h-macro .sw { width: 100%; }
.h-macro .g { font-size: 22px; font-weight: 600; }
.h-stress .a-metric { margin-top: 16px; }
.h-stress .h-bar { height: 6px; margin: 8px 0; }
.h-monh { gap: 6px; margin-top: 16px; }
.h-mon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.h-vital { display: flex; gap: 8px; padding: 16px 12px 16px 16px; }
.h-vital .nm { display: flex; gap: 6px; align-items: center; font-size: 16px; font-weight: 600; color: var(--a-text-2); }
.h-vital .nm svg { width: 18px; height: 18px; }
.h-vital .a-metric { margin: 6px 0 4px; white-space: nowrap; }
.h-vital .ok { display: flex; gap: 4px; align-items: center; font-size: 16px; color: var(--a-accent); }
.h-vital .ok svg { width: 16px; height: 16px; }
.h-gauge { margin-left: auto; width: 24px; height: 104px; border-radius: 12px; background: var(--a-bg); position: relative; flex-shrink: 0; }
.h-gauge::before { content: ''; position: absolute; left: 9px; width: 6px; top: 10px; bottom: 10px; border-radius: 3px; background: var(--a-border); }
.h-gauge::after { content: ''; position: absolute; left: 9px; width: 6px; top: 30%; height: 40%; border-radius: 3px; background: var(--a-text); }
.h-gauge i { position: absolute; z-index: 1; left: 5px; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--a-text); background: var(--a-bg); top: calc(var(--y) - 7px); transition: top .9s cubic-bezier(.34,1.3,.64,1) .4s; }
.a-view:not(.on) .h-gauge i { top: 90%; }

/* ── Activities (ActivitiesView.swift) ── */
.a-seg + .a-btn { margin-top: 4px; }
.ac-week { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ac-week .a-t2 { white-space: nowrap; font-size: 20px; }
.ac-week .a-cap { margin-top: 4px; }
.ac-recent { padding-top: 8px; }
.ac-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; }
.a-card.flush .ac-row { padding: 12px; }
.ac-row + .ac-row::before { content: ''; position: absolute; top: 0; left: 68px; right: 0; height: 1px; background: var(--a-border); }
.ac-row .nm { font-size: 17px; font-weight: 600; }
.ac-row .a-sm, .ac-row .a-cap { margin-top: 4px; }
.ac-row .a-sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Live recording (WorkoutCaptureView.swift, always dark) ── */
.rec { background: #0E0E0E; color: #fff; }
.rec .in { position: absolute; inset: 0; padding: 62px 20px 46px; display: flex; flex-direction: column; align-items: center; }
.rec .top { width: 100%; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px; }
.rec .top .x { color: #9C9C9C; display: flex; } .rec .top .x svg { width: 20px; height: 20px; }
.rec .top b { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; }
.rec .top b svg { width: 20px; height: 20px; }
.rec-dial { position: relative; width: 310px; height: 310px; margin-top: 16px; flex-shrink: 0; }
.rec-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rec-dial .arc { transform-origin: 50% 50%; transform: rotate(-90deg); }
.rec-dial .arc circle { fill: none; stroke: #34D399; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100 100; }
.rec-dial .tip { transform-origin: 50% 50%; }
.rec-dial .tip circle { fill: #34D399; filter: drop-shadow(0 0 6px #34D399); }
.rec-dial .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rec-time { font-size: 74px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.rec-time small { font-size: 25px; color: #9C9C9C; font-weight: 500; }
.rec-state { font-size: 13px; font-weight: 500; color: #34D399; margin-top: 4px; }
.rec-read { width: 100%; display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center; text-align: center; margin-top: 24px; }
.rec-read i { height: 38px; background: rgba(255,255,255,.1); }
.rec-read b { font-size: 28px; font-weight: 600; display: block; } .rec-read b small { font-size: 13px; color: #9C9C9C; font-weight: 400; margin-left: 3px; }
.rec-read > div > span { display: block; font-size: 13px; font-weight: 500; color: #9C9C9C; margin-top: 4px; }
.rec-read b { white-space: nowrap; }
.rec-cap { font-size: 12px; color: #9C9C9C; margin-top: 12px; }
.rec-watch { font-size: 12px; color: #9C9C9C; margin-top: 12px; display: flex; align-items: center; gap: 4px; }
.rec-watch svg { width: 14px; height: 14px; }
.rec-pause { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; margin-top: auto; }
.rec-pause svg { width: 30px; height: 30px; }
.rec-pl { font-size: 13px; font-weight: 500; color: #9C9C9C; margin-top: 8px; }

/* ── Story card composer (WorkoutStoryCard.swift: 360×640, drawn at 300) ── */
.story-v { background: var(--a-bg); }
.story-v .in { position: absolute; inset: 0; padding: 58px 20px 34px; display: flex; flex-direction: column; gap: 12px; }
.story-v .bar { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; height: 44px; font-size: 17px; font-weight: 600; flex-shrink: 0; }
.story-v .bar .b { display: flex; justify-content: center; } .story-v .bar svg { width: 22px; height: 22px; }
.story { position: relative; align-self: center; flex-shrink: 0; width: 300px; height: 533px; border-radius: 20px; overflow: hidden; color: #fff;
  background: radial-gradient(330px 330px at 85% 8%, rgba(232,199,138,.16), transparent 70%), linear-gradient(#171719, #080809);
  padding: 45px 22px 58px; display: flex; flex-direction: column; }
.story .tp { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 600; }
.story .wm { display: flex; align-items: center; gap: 5px; font-family: "Barlow", sans-serif; font-weight: 700; font-size: 14px; }
.story .wm img { width: 17px; height: 17px; filter: invert(1); }
.story .route { fill: none; stroke: #E8C78A; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.story .casing { fill: none; stroke: rgba(0,0,0,.7); stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-view.on .story .route, .a-view.on .story .casing { animation: drawRoute 2.2s cubic-bezier(.45,0,.2,1) .35s forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
.story .pill { align-self: flex-start; display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; padding: 2.5px 9px 2.5px 3px; border-radius: 14px; background: rgba(0,0,0,.5); margin-bottom: 8px; }
.story .pill .rm { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(#FFE08A, #D9A33A); color: #3A2A08; display: flex; align-items: center; justify-content: center; }
.story .pill .rm svg { width: 12px; height: 12px; }
.story .sp { font-size: 10px; font-weight: 500; color: #E8C78A; }
.story .nm { font-size: 28px; font-weight: 600; line-height: 1.15; margin: 2px 0 12px; }
.story .ln { height: 1px; background: rgba(255,255,255,.16); margin-bottom: 10px; }
.story .hl { display: grid; grid-template-columns: repeat(3, 1fr); }
.story .hl span { display: block; font-size: 9px; font-weight: 500; color: rgba(255,255,255,.6); }
.story .hl b { font-size: 18px; font-weight: 600; }
/* with a photo (the app's 360 pt card at 300 px: × 0.833) */
.story.st-photo { background: url(/assets/photos/story.jpg) 50% 50% / cover, #171719; text-shadow: 0 .8px 8px rgba(0,0,0,.55); }
/* the date often lands on the brightest sky: a closer shadow under it too */
.story.st-photo .tp > span:last-child { text-shadow: 0 .8px 8px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.45); }
.story.st-photo .wm img { filter: invert(1) drop-shadow(0 .8px 4px rgba(0,0,0,.55)); }
/* the route alone: 2.5 pt gold on a 4.5 pt dark edge in the app's small size */
.story .rt-only { margin: auto 0 12px; width: 76px; flex-shrink: 0; filter: drop-shadow(0 .8px 5px rgba(0,0,0,.4)); }
.story .rt-only svg { display: block; width: 100%; height: auto; overflow: visible; }
.story .rt-only .route { stroke-width: 4.8; }
.story .rt-only .casing { stroke: rgba(0,0,0,.58); stroke-width: 8.6; }
.story.st-photo .pill { box-shadow: 0 .8px 8px rgba(0,0,0,.3); }
.story.st-photo .sp { color: #fff; }
.story.st-photo .ln { background: rgba(255,255,255,.7); box-shadow: 0 .8px 6px rgba(0,0,0,.35); }
.story.st-photo .hl span { color: rgba(255,255,255,.92); }
.story-v .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.story-v .btns .a-btn { font-size: 16px; }
@media (prefers-reduced-motion: reduce) {
  .story .route, .story .casing { stroke-dashoffset: 0; }
}

/* ── Flyover (WorkoutFlyoverView.swift / WorkoutFlyoverMap.swift): the
   daylight sky in both modes, satellite ground, the camera following ── */
.fly { background: #33472f; color: #fff; }
/* the camera: its own 3D context, so the marker and controls stay on top */
.fly .cam { position: absolute; inset: 0; perspective: 640px; perspective-origin: 50% 46%; overflow: hidden; }
/* a little haze where the ground meets the sky (horizonBlend) */
.fly .cam::after { content: ''; position: absolute; left: 0; right: 0; top: 29%; height: 14%; pointer-events: none; background: linear-gradient(rgba(184,212,240,0), rgba(184,212,240,.5) 45%, rgba(184,212,240,0)); }
/* The map's point under the camera is pinned to the marker (left/top);
   JS turns and slides the map beneath it (screens.js LIVE.fly). */
.fly .sky { position: absolute; left: 0; right: 0; top: 0; height: 46%; background: linear-gradient(#122952 0%, #295C9E 30%, #B8D4F0 78%, #B8D4F0); }
.fly .plane { position: absolute; left: 50%; top: 65%; width: 1500px; height: 1700px; transform-origin: 0 0;
  transform: rotateX(62deg) translate(-750px, -1150px); }
.fly .plane svg { width: 100%; height: 100%; }
.fly .route { fill: none; stroke: #5EE6CF; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.fly .casing { fill: none; stroke: #000; stroke-opacity: .92; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.fly .marker { position: absolute; left: 50%; top: 65%; width: 25px; height: 25px; margin: -12.5px; border-radius: 50%; background: #5EE6CF; box-shadow: 0 0 0 4.5px #fff, 0 6px 18px rgba(0,0,0,.45); }
.fly .fbtn { position: absolute; z-index: 2; top: 70px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; }
.fly .fbtn.l { left: 20px; } .fly .fbtn.r { right: 20px; } .fly .fbtn svg { width: 18px; height: 18px; }
.fly .hud { position: absolute; z-index: 2; top: 122px; left: 20px; right: 20px; text-align: center; text-shadow: 0 0 3px rgba(0,0,0,.55); }
.fly .hud .wm { display: inline-flex; align-items: center; gap: 6px; font-family: "Barlow", sans-serif; font-weight: 700; font-size: 18px; }
.fly .hud .wm img { width: 24px; height: 24px; filter: invert(1) drop-shadow(0 0 3px rgba(0,0,0,.55)); }
.fly .hud h4 { font-size: 17px; font-weight: 600; margin: 8px 0 4px; }
.fly .hud .st { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 4px; }
.fly .hud .st div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fly .hud .st span { font-size: 16px; font-weight: 600; white-space: nowrap; }
.fly .hud .st b { font-size: 34px; font-weight: 600; line-height: 1.05; }
.fly .hud .st em { font-style: normal; font-size: 17px; font-weight: 600; }
.fly .ctl { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 54px; height: 52px; border-radius: 20px; background: #fff; color: #000; display: flex; align-items: center; gap: 14px; padding: 4px 14px; }
.fly .ctl svg { width: 20px; height: 20px; }
.fly .ctl .sl { flex: 1; height: 4px; border-radius: 2px; background: #E5E5E5; position: relative; }
.fly .ctl .sl i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--fp, 0) * 100%); background: #000; border-radius: 2px; }
.fly .ctl .sl i::after { content: ''; position: absolute; right: -12px; top: -8px; width: 24px; height: 20px; border-radius: 10px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.06); }
.fly .ctl b { font-size: 17px; font-weight: 600; }

/* ── Maps ── */
.mp-search { height: 48px; border-radius: 12px; background: var(--a-surface); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--a-text-2); font-size: 16px; }
.mp-search svg { width: 20px; height: 20px; } .mp-search .bk { margin-left: auto; color: var(--a-text); }
.mp-chips { display: flex; gap: 8px; overflow: hidden; margin: 0 -20px; padding: 0 20px; }
.mp-chip { height: 36px; border-radius: 18px; padding: 0 12px; background: var(--a-surface); color: var(--a-text); font-size: 13px; display: flex; align-items: center; gap: 5px; white-space: nowrap; flex-shrink: 0; }
.mp-chip svg { width: 14px; height: 14px; }
.mp-chip.on { background: var(--a-inverse); color: var(--a-on-inverse); }
.mp-map { position: relative; margin: 0 -20px; height: 430px; overflow: hidden; background: var(--m-land); }
.mp-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.iphone { --m-land: #F2EFE9; --m-park: #CFE7C6; --m-water: #A9D3F0; --m-road: #FFFFFF; --m-road-e: #DEDAD2; --m-block: #E8E4DC; }
@media all /* the app's dark set, always */ { .iphone { --m-land: #1E1F22; --m-park: #1D3427; --m-water: #17304A; --m-road: #3A3B40; --m-road-e: #2A2B2F; --m-block: #26272B; } }
.mp-map .rt-casing { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.mp-map .rt { fill: none; stroke: var(--a-hydration); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-view.on .mp-map .rt { animation: drawRoute 1.8s cubic-bezier(.45,0,.2,1) .5s forwards; }
.mp-pin { position: absolute; width: 30px; height: 38px; margin: -38px 0 0 -15px; color: var(--a-hydration); }
.mp-pin svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.a-view.on .mp-pin { animation: pinDrop .5s cubic-bezier(.34,1.5,.64,1) both; animation-delay: calc(var(--k) * 90ms + .3s); }
@keyframes pinDrop { from { transform: translateY(-30px); opacity: 0; } }
.mp-badge { position: absolute; width: 27px; height: 27px; margin: -13.5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.25); }
.mp-badge svg { width: 12px; height: 12px; }
.mp-fab { position: absolute; left: 12px; width: 44px; height: 44px; border-radius: 50%; background: var(--a-bg); color: var(--a-text); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.mp-fab svg { width: 20px; height: 20px; }
.mp-create { position: absolute; right: 12px; bottom: 12px; height: 36px; border-radius: 18px; padding: 0 14px; background: var(--a-inverse); color: var(--a-on-inverse); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.mp-create svg { width: 14px; height: 14px; }
.mp-cards { display: flex; gap: 12px; margin-right: -20px; }
.mp-card { width: 265px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.mp-card .a-tile { background: var(--a-fill); color: var(--a-hydration); }

/* ── AppScreen header: 44 pt actions and the "Updated" line ── */
.a-acts { display: flex; margin-right: -10px; } .a-acts .a-hbtn { width: 44px; }
.a-upd { font-size: 12px; color: var(--a-text-2); margin-top: -10px; }

/* ── Nutrition (NutritionView.swift) ── */
.n-date { display: flex; align-items: center; gap: 6px; height: 32px; color: var(--a-text); }
.n-date svg { width: 18px; height: 18px; } .n-date svg:last-child { width: 14px; height: 14px; color: var(--a-text-2); }
.n-date b { font-size: 17px; font-weight: 600; }
.n-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: -8px; }
.n-day { height: 56px; border-radius: 12px; background: var(--a-surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.n-day span { font-size: 12px; color: var(--a-text-2); } .n-day b { font-size: 16px; font-weight: 600; }
.n-day.s { background: var(--a-inverse); } .n-day.s span, .n-day.s b { color: var(--a-on-inverse); }
.n-cal .tp { display: flex; justify-content: space-between; align-items: center; }
.n-cal .tp .a-h { color: #FDBA74; }
.n-cal .tp b { font-size: 16px; font-weight: 600; color: #fff; }
.n-cal .k { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.n-cal .k .a-metric { color: #fff; } .n-cal .k .of { font-size: 13px; color: #9C9C9C; }
.n-cal .h-bar { background: #2C2C2E; } .n-cal .h-bar i { background: #FDBA74; }
.n-cal .dv { height: 1px; background: #2C2C2E; margin: 4px 0 12px; }
@media all /* the app's dark set, always */ { .n-cal .h-bar, .n-cal .dv { background: #3A3A3C; } }
.n-macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.n-macros .nm { font-size: 13px; color: var(--mc); } .n-macros b { display: block; font-size: 17px; font-weight: 600; color: #fff; margin: 2px 0; }
.n-macros small { font-size: 12px; color: #9C9C9C; }
.n-macros .h-bar { height: 3px; margin: 8px 0 0; } .n-macros .h-bar i { background: var(--mc); }
.n-water .a-h { color: var(--a-hydration); }
.n-water .v { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.n-water .h-bar i { background: var(--a-hydration); }
.n-wbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.n-wbtns span { height: 44px; border-radius: 22px; background: var(--a-fill); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; transition: transform .15s, background .2s; }
.n-wbtns span.tap { transform: scale(.94); background: var(--a-border); }
.n-meal .hd { display: flex; align-items: center; gap: 8px; }
.n-meal .add { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--a-inverse); color: var(--a-on-inverse); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.n-meal .add svg { width: 16px; height: 16px; }
.n-food { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--a-border); margin-top: 12px; padding-top: 12px; }
.n-food b { font-size: 16px; font-weight: 600; display: block; } .n-food .a-cap { display: block; margin-top: 2px; }
.n-food .more { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--a-text-2); } .n-food .more svg { width: 18px; height: 18px; }
.n-save { font-size: 17px; font-weight: 600; margin-top: 12px; }
.n-again { border-top: 1px solid var(--a-border); margin-top: 12px; padding-top: 12px; }
.n-again b { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; } .n-again b svg { width: 18px; height: 18px; }
.n-again .a-cap { display: block; margin-top: 4px; }

/* Add food (NutritionFoodPicker.swift), a sheet: inline title, glass
   Cancel; the four ways and recent foods until two letters are typed */
.sheet-v { background: rgba(0,0,0,.35); }
.sheet-v .sh { position: absolute; left: 0; right: 0; bottom: 0; top: 62px; border-radius: 34px 34px 0 0; background: var(--a-raised); padding: 14px 20px 40px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.sheet-v .bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; text-align: center; height: 44px; }
.sheet-v .bar b { font-size: 17px; font-weight: 600; }
.sheet-v .bar .cn { height: 44px; padding: 0 16px; border-radius: 22px; display: flex; align-items: center; font-size: 17px; color: var(--a-text);
  background: var(--a-glass); box-shadow: inset 0 0 0 .5px var(--a-glass-edge), 0 4px 14px rgba(0,0,0,.08); }
.n-search { height: 56px; border-radius: 20px; background: var(--a-surface); display: flex; align-items: center; gap: 10px; padding: 0 16px; font-size: 16px; color: var(--a-text-2); flex-shrink: 0; --xc: var(--a-surface); }
.n-search > svg { width: 20px; height: 20px; flex-shrink: 0; }
.n-search .typed { color: var(--a-text); display: none; white-space: pre; }
.sh.q .n-search .typed, .sh.typing .n-search .typed { display: inline; }
.sh.q .n-search .ph, .sh.typing .n-search .ph { display: none; }
.n-search .caret { width: 2px; height: 20px; background: var(--a-accent); margin-left: -9px; display: none; }
.sh.typing .n-search .caret { display: block; animation: caretBlink 1s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.n-search .clr { margin-left: auto; color: var(--a-muted); display: none; } .n-search .clr svg { width: 18px; height: 18px; }
.sh.q .n-search .clr, .sh.typing .n-search .clr { display: flex; }
.n-ways { display: flex; flex-direction: column; gap: 12px; }
.n-ways .a-h { margin-top: 4px; }
.sh.q .n-ways { display: none; }
.n-found { display: none; flex-direction: column; gap: 16px; }
.sh.q .n-found { display: flex; }
.n-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.n-tile { height: 64px; border-radius: 20px; background: var(--a-surface); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 16px; font-weight: 600; line-height: 1.15; }
.n-tile svg { width: 24px; height: 24px; flex-shrink: 0; }
.n-list { padding: 0 16px; }
.n-res { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.n-res + .n-res { border-top: 1px solid var(--a-border); }
.n-res b { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.n-res b svg { width: 13px; height: 13px; color: var(--a-accent); flex-shrink: 0; }
.n-res .a-cap { display: block; margin-top: 2px; }
.n-res .kc { font-size: 16px; font-weight: 600; white-space: nowrap; }
.n-res .pl { width: 36px; height: 36px; border-radius: 50%; background: var(--a-fill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .25s, color .25s; }
.n-res .pl svg { width: 16px; height: 16px; }
.n-res .pl.ok { background: var(--a-inverse); color: var(--a-on-inverse); }
.a-view.on .sh.q .n-found .n-res { animation: aRise .35s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 90ms); }
.n-link { font-size: 17px; font-weight: 600; color: var(--a-text); }
@media all /* the app's dark set, always */ {
  .sheet-v .sh { background: #1C1C1E; }
  .sheet-v .n-tile, .sheet-v .n-search, .sheet-v .a-card { background: #2C2C2E; }
  .sheet-v .n-search { --xc: #2C2C2E; }
}

/* ── Social ── */
.so-v .a-scroll { padding-left: 0; padding-right: 0; gap: 14px; }
.so-v .a-head, .so-v .a-upd { padding-left: 20px; padding-right: 20px; }
.so-stories { display: flex; gap: 16px; padding: 0 20px; }
.so-st { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 62px; flex-shrink: 0; font-size: 12px; color: var(--a-text-2); }
.so-st .rg { width: 62px; height: 62px; border-radius: 50%; padding: 4px; box-shadow: inset 0 0 0 2px var(--a-inverse); }
.so-st.seen .rg { box-shadow: inset 0 0 0 2px var(--a-border); }
.so-st .rg i, .so-st .plus { display: flex; width: 100%; height: 100%; border-radius: 50%; align-items: center; justify-content: center; font-style: normal; font-size: 16px; font-weight: 600; color: var(--a-text); background: var(--a-fill); }
.so-st .plus { width: 62px; height: 62px; } .so-st .plus svg { width: 22px; height: 22px; }
.so-st .grp { width: 62px; height: 62px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--a-border); display: flex; align-items: center; justify-content: center; }
.so-st .grp svg { width: 22px; height: 22px; }
.a-ava { border-radius: 50%; background: var(--a-fill); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; color: var(--a-text); }
.so-post .hd { display: flex; align-items: center; gap: 10px; padding: 0 20px 10px; }
.so-post .hd .a-ava { width: 36px; height: 36px; font-size: 13px; }
.so-post .hd b { font-size: 17px; font-weight: 600; display: block; }
.so-media { position: relative; width: 100%; aspect-ratio: 1 / 1.15; background: var(--m-land); overflow: hidden; }
.so-media svg { width: 100%; height: 100%; }
.so-media .so-map, .so-media > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.so-media .so-map { object-fit: cover; }
.so-media .rt-casing { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.so-media .rt { fill: none; stroke: var(--a-hydration); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.so-heart { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px; color: #fff; opacity: 0; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }
.so-heart svg { width: 100%; height: 100%; }
.so-heart.pop { animation: likePop 1s cubic-bezier(.34,1.5,.64,1); }
@keyframes likePop { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.1); } 45% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
.so-acts { display: flex; align-items: center; gap: 16px; padding: 12px 20px 8px; font-size: 13px; font-weight: 600; }
.so-acts span { display: flex; align-items: center; gap: 5px; }
.so-acts svg { width: 22px; height: 22px; } .so-acts .bm { margin-left: auto; }
.so-acts .lk svg { transition: color .2s, transform .3s cubic-bezier(.34,1.6,.64,1); }
.so-acts .lk.on svg { color: var(--a-liked); fill: currentColor; transform: scale(1.12); }
.so-wk { display: flex; align-items: center; gap: 12px; padding: 4px 20px 8px; }
.so-wk .a-tile { background: var(--a-surface); }
.so-wk b { font-size: 17px; font-weight: 600; display: block; }
.so-cap { padding: 0 20px; font-size: 16px; }
.so-cap b { font-weight: 600; }
.so-more { padding: 6px 20px 0; font-size: 13px; color: var(--a-text-2); }

/* ── Challenges & badges ── */
.b-entry .tp { display: flex; align-items: center; gap: 14px; }
.b-entry .tp b { font-size: 22px; font-weight: 600; display: block; }
.b-warn { margin-top: 12px; border-radius: 12px; padding: 10px 12px; font-size: 15px; font-weight: 600; color: var(--a-caution); background: color-mix(in srgb, var(--a-caution) 13%, transparent); display: flex; gap: 8px; align-items: center; }
.b-warn svg { width: 16px; height: 16px; }
.b-shelf { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--a-border); }
.b-shelf .vb { margin-left: auto; font-size: 15px; font-weight: 600; }
.b-ch .kind { font-size: 12px; color: var(--a-accent); display: flex; gap: 4px; align-items: center; }
.b-ch .kind svg { width: 13px; height: 13px; }
.b-ch .ttl { font-size: 22px; font-weight: 600; margin-top: 4px; }
.b-ch .pr { font-size: 17px; font-weight: 600; margin-top: 12px; }
.b-ch .h-bar { height: 4px; margin: 8px 0 4px; } .b-ch .h-bar i { background: var(--a-accent); }
/* Medal (BadgeMedal.swift), one SVG from screens.js medal(): metal outline,
   dark plate at 0.84 with light on its upper half, the mark in metal, pips
   inside the plate; locked = faint dashed shape. --msh is the metal's shadow. */
.medal { display: inline-block; flex-shrink: 0; width: var(--ms, 56px); height: var(--ms, 56px); color: var(--a-text);
  filter: drop-shadow(0 calc(var(--ms, 56px) * .03) calc(var(--ms, 56px) * .06) var(--msh, transparent)); }
.medal svg { width: 100%; height: 100%; overflow: visible; }
.medal text { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; }
.medal .mk { filter: drop-shadow(0 1.5px 1.5px rgba(0,0,0,.45)); }

/* ── Health ── */
.he-rec { display: flex; align-items: center; gap: 12px; }
.he-rec .a-h svg { color: var(--a-accent); }
.he-rec .v { font-size: 22px; font-weight: 600; margin-top: 6px; } .he-rec .v small { font-size: 13px; color: var(--a-text-2); font-weight: 400; }
.he-st { font-size: 13px; color: var(--a-accent); display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.he-st svg { width: 14px; height: 14px; }
.he-sleep { display: flex; align-items: center; }
.he-sleep .a-h, .he-sleep .a-h svg { color: #C4B5FD; }
.he-sleep .v { font-size: 22px; font-weight: 600; color: #fff; margin-top: 6px; }
.he-sleep .a-sm { color: #9C9C9C; }
.he-rowc { display: flex; align-items: center; gap: 12px; }
.he-rowc .bx { width: 38px; height: 38px; border-radius: 12px; background: var(--a-fill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.he-rowc .bx svg { width: 20px; height: 20px; }
.he-rowc b { font-size: 17px; font-weight: 600; display: block; }
.he-ecg { height: 26px; margin-top: 4px; }
.he-ecg path { fill: none; stroke: var(--a-liked); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-view.on .he-ecg path { animation: drawRoute 2.4s linear .6s infinite; }
.he-body { display: flex; gap: 14px; align-items: center; }
.he-fig { width: 150px; height: 300px; flex-shrink: 0; }
.he-fig .sk { fill: var(--a-raised); stroke: var(--a-muted); stroke-width: 1.2; }
.he-fig .mu { fill: var(--a-fill); stroke: var(--a-surface); stroke-width: 1; transition: fill .6s ease; }
.a-view.on .he-fig .mu.t { fill: color-mix(in srgb, var(--a-accent) var(--s, 60%), var(--a-fill)); transition-delay: calc(var(--k) * 120ms + .4s); }
.he-tags { display: flex; flex-direction: column; gap: 8px; }
.he-tags span { font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 12px; background: var(--a-fill); white-space: nowrap; }
.he-vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.he-vt .tp { display: flex; justify-content: space-between; } .he-vt .tp svg { width: 22px; height: 22px; }
.he-vt b { display: block; font-size: 15px; font-weight: 600; margin-top: 8px; line-height: 1.2; }
.he-vt .a-metric { font-size: 26px; margin: 4px 0 2px; }

/* ── Profile ── */
.pr-top { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; height: 44px; }
.pr-top .gear { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; background: var(--a-surface); display: flex; align-items: center; justify-content: center; }
.pr-top svg { width: 20px; height: 20px; }
.pr-id { display: flex; align-items: center; gap: 18px; }
.pr-id .a-ava { width: 82px; height: 82px; font-size: 26px; box-shadow: 0 0 0 3px var(--a-bg), 0 0 0 4px var(--a-border); }
.pr-stats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.pr-stats b { display: block; font-size: 22px; font-weight: 600; }
.pr-name { font-size: 30px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pr-pill { font-size: 12px; font-weight: 500; color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 12%, transparent); padding: 4px 10px; border-radius: 12px; }
.pr-edit { height: 44px; border-radius: 22px; background: var(--a-surface); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.pr-cons { font-size: 16px; font-weight: 600; color: var(--a-accent); display: flex; gap: 6px; align-items: center; }
.pr-cons svg { width: 16px; height: 16px; }
.pr-shelf { display: flex; gap: 18px; margin-top: 10px; }
.pr-shelf div { text-align: center; font-size: 12px; color: var(--a-text-2); }
.pr-tabs { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; }
.pr-tabs span { width: 56px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--a-text-2); }
.pr-tabs span.s { background: var(--a-inverse); color: var(--a-on-inverse); }
.pr-tabs svg { width: 18px; height: 18px; }
.pr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 -20px; padding: 0 0; }
.pr-grid i { aspect-ratio: 3 / 4; border-radius: 12px; background: var(--a-surface); overflow: hidden; }
.pr-grid i svg { width: 100%; height: 100%; }

/* ── Sleep detail ── */
.sl-times { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sl-times b { display: block; font-size: 20px; font-weight: 600; margin-top: 2px; }
.sl-hyp { width: 100%; height: 112px; margin: 12px 0 6px; display: block; }
.sl-hyp line { stroke: var(--a-border); stroke-width: 1; stroke-dasharray: 2 4; }
.sl-hyp rect { transform-box: fill-box; transform-origin: left center; }
.a-view.on .sl-hyp rect { animation: slGrow .45s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 45ms + .25s); }
@keyframes slGrow { from { transform: scaleX(0); opacity: 0; } }
.sl-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; color: var(--a-text-2); }
.sl-legend div { display: flex; align-items: center; gap: 8px; }
.sl-legend i { width: 10px; height: 10px; border-radius: 3px; }
.sl-legend b { margin-left: auto; color: var(--a-text); font-weight: 600; }
.sl-part { display: grid; grid-template-columns: 1fr auto; font-size: 14px; margin-top: 12px; }
.sl-part b { font-weight: 600; font-size: 13px; }
.sl-part .h-bar { grid-column: 1 / -1; margin: 6px 0 0; }
.sl-kv { display: flex; justify-content: space-between; font-size: 14px; color: var(--a-text-2); padding: 6px 0; border-top: 1px solid var(--a-border); }
.sl-kv b { color: var(--a-text); font-weight: 600; }

/* ── Recovery and strain ── */
.rc-top { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 18px; }
.rc-v { font-size: 46px; font-weight: 600; line-height: 1; }
.rc-bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; margin-top: 14px; }
.rc-bars i { flex: 1; height: max(3px, var(--h)); border-radius: 4px; background: var(--bc); opacity: .85; transform-origin: bottom; }
.rc-bars i:last-child { opacity: 1; }
.a-view.on .rc-bars i { animation: rcGrow .5s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 35ms + .3s); }
@keyframes rcGrow { from { transform: scaleY(0); } }
.st-v { font-size: 44px; font-weight: 600; line-height: 1.1; margin: 8px 0 14px; }
.st-scale { position: relative; height: 10px; border-radius: 5px; background: var(--a-fill); }
.st-scale .rg { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: color-mix(in srgb, var(--a-training) 45%, transparent); }
.st-scale .mk { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--a-training); box-shadow: 0 0 0 3px var(--a-surface); left: 0; transition: left 1.1s cubic-bezier(.34,1.25,.64,1) .2s; }
.a-view.on .st-scale .mk { left: var(--x); }
.st-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--a-text-2); margin-top: 8px; }
.a-card .ac-row { padding: 12px 0; }
.ac-row b { font-size: 16px; font-weight: 600; display: block; }

/* ── Messages ── */
.ch { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 56px 16px 34px; }
.ch-top { margin: 0 -4px; border-bottom: 1px solid var(--a-border); padding-bottom: 8px; height: 52px; }
.ch-who { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ch-who .a-ava { width: 30px; height: 30px; font-size: 12px; }
.ch-list { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px 0; }
.ch-day { text-align: center; font-size: 12px; color: var(--a-text-2); margin-bottom: 4px; }
.ch-b { max-width: 74%; padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.3; background: var(--a-surface); color: var(--a-text); align-self: flex-start; border-bottom-left-radius: 6px; }
.ch-b.me { align-self: flex-end; background: var(--a-inverse); color: var(--a-on-inverse); border-bottom-left-radius: 20px; border-bottom-right-radius: 6px; }
.a-view.on .ch-b { animation: aRise .35s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 120ms + .15s); }
.ch-new, .ch-typing { display: none; }
.ch-new.on { display: block; animation: chPop .35s cubic-bezier(.34,1.4,.64,1) both !important; }
.ch-typing.on { display: flex; gap: 4px; align-self: flex-start; background: var(--a-surface); padding: 13px 14px; border-radius: 20px; border-bottom-left-radius: 6px; }
.ch-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-text-2); animation: chDot 1s infinite ease-in-out; }
.ch-typing i:nth-child(2) { animation-delay: .15s; } .ch-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes chPop { from { opacity: 0; transform: scale(.8); transform-origin: left bottom; } }
.ch-bar { display: flex; gap: 8px; align-items: center; }
.ch-in { flex: 1; height: 40px; border-radius: 20px; border: 1px solid var(--a-border); display: flex; align-items: center; padding: 0 16px; font-size: 16px; color: var(--a-muted); }
.ch-send { width: 40px; height: 40px; border-radius: 50%; background: var(--a-inverse); color: var(--a-on-inverse); display: flex; align-items: center; justify-content: center; }
.ch-send svg { width: 18px; height: 18px; transform: rotate(-90deg); }

/* The food sheet: the dim fades, the sheet rises */
.sheet-v.in-cover { animation: aFade .3s ease-out both; }
.sheet-v.in-cover .sh { animation: aCoverIn .55s cubic-bezier(.32,.72,0,1) both; }
.sheet-v.out-cover { animation: aFadeOut .4s ease-in both; }
.sheet-v.out-cover .sh { animation: aCoverOut .45s cubic-bezier(.32,.72,0,1) both; }
@keyframes aFade { from { opacity: 0; } }
@keyframes aFadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .a-view, .a-view * { animation: none !important; transition: none !important; }
  .a-ring { --p: var(--to); }
  .st-scale .mk { left: var(--x); }
  .ch-new { display: block; }
}

/* ==========================================================================
   Pushed bar, Social, Messages, Challenges, Health, Sleep, Recovery, Strain,
   Maps, Profile — sizes from the Swift source (AppText styles: heading 17,
   title 22, metric 28, display 34, bodyStrong 16, bodySmall 13, caption 12)
   ========================================================================== */
.iphone { --a-st-awake: #FF9500; --a-st-rem: #32ADE6; --a-st-core: #007AFF; --a-st-deep: #5856D6; }
@media all /* the app's dark set, always */ { .iphone { --a-st-awake: #FF9F0A; --a-st-rem: #64D2FF; --a-st-core: #0A84FF; --a-st-deep: #5E5CE6; } }

/* iOS 26 inline bar on pushed screens: round glass buttons, centred title */
.a-nav { position: absolute; z-index: 6; left: 0; right: 0; top: 0; height: 110px; padding: 58px 16px 0; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px;
  background: linear-gradient(var(--a-bg) 66%, transparent); pointer-events: none; }
.a-nav b { text-align: center; font-size: 17px; font-weight: 600; color: var(--a-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-glass { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--a-text); flex-shrink: 0;
  background: var(--a-glass); -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 0 0 .5px var(--a-glass-edge), inset 0 1px 0 rgba(255,255,255,.3), 0 4px 16px rgba(0,0,0,.1); }
.a-glass svg { width: 20px; height: 20px; }

/* Social */
.a-hbtn.dm { position: relative; }
.a-hbtn.dm i { position: absolute; top: 9px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--a-accent); box-shadow: 0 0 0 2px var(--a-bg); }
.so-post .hd .mo { color: var(--a-text); display: flex; } .so-post .hd .mo svg { width: 22px; height: 22px; }
.so-media { aspect-ratio: 1.15 / 1; }
.so-acts { gap: 18px; } .so-acts svg { width: 21px; height: 21px; }
.so-acts span b { font-weight: 600; }
.so-wk .a-tile { background: transparent; }
.so-cap { font-size: 16px; }
.so-post::after { content: ''; display: block; height: 1px; margin: 14px 20px 0; background: var(--a-border); }

/* Messages */
.ch { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 110px 0 0; }
.ch-list { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 8px 16px 12px; overflow: hidden; justify-content: flex-end; }
.ch-day { align-self: center; font-size: 12px; color: var(--a-text-2); margin: 0 0 8px; }
.ch-b { max-width: 300px; align-self: flex-start; padding: 8px 12px; border-radius: 18px; font-size: 16px; line-height: 1.3; background: var(--a-surface); color: var(--a-text); }
.ch-b.me { align-self: flex-end; background: var(--a-inverse); color: var(--a-on-inverse); }
.a-view.on .ch-b { animation: aRise .35s var(--ease-out, ease-out) both; animation-delay: calc(var(--k, 0) * 90ms + .1s); }
.ch-b.ch-new { display: none; }
.ch-b.ch-new.on { display: block; animation: chPop .4s cubic-bezier(.34,1.4,.64,1) both; }
.ch-bar { display: flex; align-items: center; gap: 8px; padding: 6px 16px 10px; }
.ch-in { flex: 1; min-height: 40px; border-radius: 20px; background: var(--a-surface); border: 0; display: flex; align-items: center; padding: 0 16px; font-size: 16px; color: var(--a-text); }
.ch-in .ph { color: var(--a-text-2); }
.ch-send { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--a-inverse); color: var(--a-on-inverse); opacity: .4; transition: opacity .2s; }
.ch-send.on { opacity: 1; } .ch-send svg { width: 18px; height: 18px; }

/* Challenges */
.b-entry { display: flex; flex-direction: column; gap: 12px; }
.b-entry .tp { display: flex; align-items: center; gap: 12px; }
.b-entry .tp .a-sp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b-entry .tp b { font-size: 22px; font-weight: 600; } .b-entry .wk { font-size: 16px; font-weight: 600; }
.b-warn { display: flex; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 14px; font-size: 16px; font-weight: 600; line-height: 1.25;
  color: var(--a-danger); background: color-mix(in srgb, var(--a-danger) 10%, transparent); }
.b-warn svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.b-shelf { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--a-border); }
.b-opts { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.b-ch { display: flex; flex-direction: column; gap: 12px; }
.b-ch .kind { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--a-accent); } .b-ch .kind svg { width: 14px; height: 14px; }
.b-ch .ttl { font-size: 22px; font-weight: 600; margin: 4px 0; }
.b-ch .pr { font-size: 17px; font-weight: 600; }
.b-ch .h-bar { margin: -4px 0 0; height: 6px; } .h-bar.acc i { background: var(--a-accent); }
.b-mem { display: flex; align-items: center; gap: 10px; }
.b-mem .a-ava { width: 34px; height: 34px; font-size: 12px; }
.b-mem b { display: block; font-size: 16px; font-weight: 600; } .b-mem .a-cap { display: block; } .b-mem .ac { color: var(--a-accent); }
.b-mem .clap { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--a-text-2); }
.b-mem .clap svg { width: 18px; height: 18px; } .b-mem .clap.on { color: var(--a-accent); }
.b-ideas { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.b-ideas .grp { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; } .b-ideas .grp b { font-size: 16px; font-weight: 600; }
.b-ideas .strip { display: flex; gap: 8px; margin: 6px -20px 0; padding: 0 20px; overflow: hidden; }
.b-idea { width: 158px; height: 148px; flex-shrink: 0; border-radius: 16px; padding: 12px; display: flex; flex-direction: column;
  background: linear-gradient(135deg, color-mix(in srgb, var(--it) 10%, transparent), transparent 70%), var(--a-surface); }
.b-idea .ic { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--it); background: color-mix(in srgb, var(--it) 16%, transparent); }
.b-idea .ic svg { width: 20px; height: 20px; }
.b-idea .len { align-self: flex-start; font-size: 12px; padding: 4px 8px; border-radius: 99px; background: var(--a-fill); color: var(--a-text); }
.b-idea .v { margin-top: auto; font-size: 22px; font-weight: 600; } .b-idea b { font-size: 16px; font-weight: 600; margin-top: 2px; }

/* Health */
.he-rec { display: flex; align-items: center; gap: 12px; }
.he-rec .a-sp, .he-sleep .a-sp, .rc-sum .a-sp { display: flex; flex-direction: column; gap: 4px; }
.he-rec .v { font-size: 22px; font-weight: 600; }
.he-sleep { gap: 16px; } .he-sleep .v { margin-top: 0; }
.he-sleep .a-h, .he-sleep .a-h svg { color: #C4B5FD; }
.he-sleep .a-cap, .he-sleep .a-sm, .rc-sum .a-cap, .rc-sum .a-sm { color: var(--a-on-hero-2); }
.he-sleep .a-ring b, .rc-sum .a-ring b { font-size: 22px; font-weight: 600; color: var(--a-on-hero); }
.he-sleep .a-chev { color: var(--a-on-hero-2); }
.he-row { display: flex; align-items: center; gap: 12px; }
.he-row .bx { width: 38px; height: 38px; border-radius: 10px; background: var(--a-fill); color: var(--a-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.he-row .bx svg { width: 20px; height: 20px; }
.he-row b { display: block; font-size: 17px; font-weight: 600; } .he-row .a-cap { display: block; margin-top: 2px; }
.rb { width: 44px; height: 44px; border-radius: 50%; background: var(--a-fill); color: var(--a-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rb svg { width: 20px; height: 20px; }
.he-mus .he-body { display: flex; justify-content: center; margin: 10px 0; }
.he-mus .he-fig { width: auto; height: 380px; max-width: 100%; }
.he-mus .he-tags { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.he-wt .v { font-size: 28px; font-weight: 600; margin-top: 6px; }
.he-wt .a-sm { margin: 2px 0 12px; }
.he-wchart { display: block; width: 100%; height: 120px; margin-top: 12px; overflow: visible; }
.he-wchart line { stroke: var(--a-border); stroke-width: 1; }
.he-wchart .ln { fill: none; stroke: var(--a-text); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-view.on .he-wchart .ln { animation: drawRoute 1.2s cubic-bezier(.45,0,.2,1) .3s forwards; }
.he-wchart circle { fill: var(--a-text); }
.he-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.he-day { display: flex; flex-direction: column; gap: 4px; }
.he-day .ic { color: var(--a-text); } .he-day .ic svg { width: 22px; height: 22px; }
.he-day .a-sm { margin-top: 4px; }
.he-vt { display: flex; flex-direction: column; gap: 2px; }
.he-vt .tp { display: flex; justify-content: space-between; align-items: center; color: var(--a-text-2); margin-bottom: 6px; } .he-vt .tp > svg { width: 22px; height: 22px; }
.he-vt b { font-size: 17px; font-weight: 600; line-height: 1.2; }
.he-vt .a-metric { margin: 4px 0 2px; }
.he-in { display: flex; align-items: center; gap: 4px; color: var(--a-accent); } .he-in svg { width: 13px; height: 13px; }

/* Sleep */
.sl-night { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--a-fill); font-size: 15px; font-weight: 600; color: var(--a-text); }
.sl-night svg { width: 14px; height: 14px; }
.sl-need { margin: 8px 0 6px; }
.sl-kv { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; color: var(--a-text-2); border: 0; }
.sl-kv b, .sl-kv span { font-weight: 400; color: var(--a-text-2); }
.sl-times { display: flex; gap: 28px; margin: 12px 0 14px; }
.sl-times > div { display: flex; flex-direction: column; gap: 2px; } .sl-times b { font-size: 17px; font-weight: 600; }
.sl-times .a-card { all: unset; }
.sl-lanes { display: flex; flex-direction: column; gap: 4px; }
.sl-lane { position: relative; height: 12px; border-radius: 6px; background: var(--a-fill); overflow: hidden; }
.sl-lane i { position: absolute; top: 0; bottom: 0; border-radius: 3px; transform-origin: left; }
.a-view.on .sl-lane i { animation: slLane .45s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 35ms + .2s); }
@keyframes slLane { from { transform: scaleX(0); } }
.sl-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.sl-legend > div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--a-text-2); }
.sl-legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .sl-legend b { font-weight: 400; }
.sl-part { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin-top: 12px; }
.sl-part .h-bar { grid-column: 1 / -1; height: 4px; margin: 6px 0 0; } .sl-part .h-bar i { background: var(--a-sleep); }

/* Recovery and Strain */
.rc-sum { display: flex; align-items: center; gap: 16px; }
.rc-sum .a-h { color: var(--a-on-hero); }
.rc-sum .v { font-size: 22px; font-weight: 600; color: var(--a-on-hero); }
.rc-sum .v small { font-size: 13px; font-weight: 400; color: var(--a-on-hero-2); margin-left: 4px; }
.st-sum .a-h, .st-sum .a-h svg { color: #FDBA74; }
.st-sum .a-ring b { font-size: 17px; }
.rc-part { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.rc-part b { font-size: 16px; font-weight: 600; }
.rc-part .h-bar { height: 4px; margin: 4px 0 0; }
.rc-trend .rd { margin: 12px 0 8px; } .rc-trend .rd .a-t2 { font-variant-numeric: tabular-nums; }
.rc-chart { position: relative; display: flex; gap: 8px; height: 160px; }
.rc-chart svg { flex: 1; height: 100%; overflow: visible; }
.rc-chart line { stroke: var(--a-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rc-chart .ar { fill: url(#mvRcA); }
.rc-chart .ln { fill: none; stroke: var(--a-hydration); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-view.on .rc-chart .ln { animation: drawRoute 1.3s cubic-bezier(.45,0,.2,1) .3s forwards; }
.rc-chart .halo { fill: color-mix(in srgb, var(--a-hydration) 20%, transparent); }
.rc-chart .ring { fill: var(--a-surface); } .rc-chart .dot { fill: var(--a-hydration); }
.rc-chart .ya, .st-chart .ya { display: flex; flex-direction: column; justify-content: space-between; width: 22px; margin: -7px 0; font-size: 11px; color: var(--a-text-2); }
.rc-trend .xa, .st-chart + .xa { display: flex; margin: 6px 30px 8px 0; font-size: 11px; color: var(--a-text-2); }
.rc-trend .xa span { flex: 1; } .st-chart + .xa span { flex: 1; white-space: nowrap; }
.st-room { display: flex; align-items: baseline; gap: 4px; margin: 6px 0 2px; }
.st-scale { position: relative; height: 16px; margin: 14px 0 4px; background: none; }
.st-scale::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 8px; border-radius: 4px; background: var(--a-fill); }
.st-scale .rg { position: absolute; top: 4px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--a-training) 45%, transparent); }
.st-scale .mk { position: absolute; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; box-sizing: border-box; border: 3px solid var(--a-surface); background: var(--a-text); box-shadow: none; }
.st-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--a-text-2); }
.st-adv { margin-top: 12px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.st-wk { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.st-wk b { font-size: 16px; font-weight: 600; }
.st-wk .h-bar { height: 4px; margin: 4px 0 0; } .st-wk .h-bar i { background: var(--a-training); }
.st-chart { display: flex; gap: 8px; height: 170px; margin-top: 12px; }
.st-chart .bars { flex: 1; display: flex; align-items: flex-end; border-bottom: 1px solid var(--a-border);
  background: linear-gradient(var(--a-border) 1px, transparent 1px) 0 0 / 100% 33.333%; }
.st-chart .bars span { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.st-chart .bars i { width: 62%; height: var(--h); border-radius: 3px 3px 0 0; background: var(--a-training); opacity: .4; transform-origin: bottom; }
.st-chart .bars i.on { opacity: 1; }
.a-view.on .st-chart .bars i { animation: stGrow .5s var(--ease-out, ease-out) both; animation-delay: calc(var(--k) * 30ms + .25s); }
@keyframes stGrow { from { transform: scaleY(0); } }

/* Maps */
.a-scroll.mp { padding-top: 62px; gap: 12px; }
.mp-top { display: flex; flex-direction: column; gap: 10px; }
.mp-search { height: 44px; padding: 0 6px; gap: 6px; }
.mp-search .b { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--a-text); }
.mp-search .b svg { width: 20px; height: 20px; }
.mp-chip svg { width: 13px; height: 13px; }
.mp-map { height: 470px; }
.mp-pin { width: 30px; height: 40px; margin: -40px 0 0 -15px; color: var(--a-hydration); }
.mp-pin.seg { color: #FF9500; }
.mp-pin svg { width: 100%; height: 100%; } .mp-pin svg path { fill: currentColor; stroke: #fff; stroke-width: 1.5; }
.mp-pin .g { position: absolute; left: 0; right: 0; top: 6px; display: flex; justify-content: center; color: #fff; } .mp-pin .g svg { width: 16px; height: 16px; }
.mp-loop { position: absolute; width: 28px; height: 28px; margin: -14px; border-radius: 50%; background: #fff; color: #16A34A; box-shadow: 0 0 0 2.5px #16A34A; display: flex; align-items: center; justify-content: center; }
.mp-loop svg { width: 16px; height: 16px; }
.mp-ctl { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; }
.mp-ctl span { width: 44px; height: 44px; border-radius: 50%; background: var(--a-bg); color: var(--a-text); display: flex; align-items: center; justify-content: center; }
.mp-ctl svg { width: 20px; height: 20px; }
.mp-go { position: absolute; right: 12px; bottom: 32px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--a-inverse); color: var(--a-on-inverse); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mp-go svg { width: 15px; height: 15px; }
.mp-res { display: flex; flex-direction: column; gap: 8px; }
.mp-rh .a-h svg { width: 18px; height: 18px; } .mp-rh .rf { color: var(--a-text); display: flex; } .mp-rh .rf svg { width: 20px; height: 20px; }
.mp-cards { gap: 8px; }
.mp-card .a-tile { background: var(--a-fill); color: var(--a-text); }
.mp-card .ck { color: var(--a-text); display: flex; } .mp-card .ck svg { width: 14px; height: 14px; }

/* Profile */
.pr-top { display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 600; }
.pr-id .ring { display: flex; padding: 3px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--a-border); }
.pr-name { font-size: 34px; font-weight: 600; line-height: 1.1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-bio { font-size: 16px; margin-top: 4px; }
.pr-shelfw { display: flex; flex-direction: column; gap: 12px; }
.pr-shelf { display: flex; justify-content: space-around; }
.pr-shelf > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--a-text-2); }
.pr-row { display: flex; align-items: center; gap: 12px; }
.pr-row .bx { width: 44px; height: 44px; border-radius: 12px; background: var(--a-fill); color: var(--a-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pr-row .bx svg { width: 22px; height: 22px; }
.pr-tabs { display: flex; gap: 8px; margin-top: 4px; }
.pr-tabs span { flex: 1; width: auto; height: auto; min-height: 54px; border-radius: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--a-text-2); }
.pr-tabs span i { width: 56px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.pr-tabs span svg { width: 24px; height: 24px; }
.pr-tabs span.s { background: none; color: var(--a-text); }
.pr-tabs span.s i { background: var(--a-inverse); color: var(--a-on-inverse); }
.pr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 -12px; }
.pr-grid i { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; display: flex; }
.pr-grid i.ph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pr-grid i.wk { background: var(--a-surface); flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center; color: var(--a-text); font-style: normal; }
.pr-grid i.wk svg { width: 28px; height: 28px; } .pr-grid i.wk span { font-size: 12px; color: var(--a-text-2); line-height: 1.25; }
@media (prefers-reduced-motion: reduce) {
  .a-view.on .sl-lane i, .a-view.on .st-chart .bars i, .a-view.on .ch-b { animation: none; }
  .he-wchart .ln, .rc-chart .ln { stroke-dashoffset: 0; animation: none !important; }
}
