/* ─────────────────────────────────────────────
   NOVA · hearing dashboard
   Stage mode  = the 1440×1024 Figma frame, scaled to fit.
   Flow mode   = stacked layout for phones / tablets.
   ───────────────────────────────────────────── */

@property --sweep { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --reveal { syntax: '<percentage>'; inherits: false; initial-value: 100%; }

:root {
  --bg: #e6e8e7;
  --hero: #e2e3dd;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, .5);
  --pop: rgba(255, 255, 255, .86);
  --ink: #000;
  --ink-2: rgba(0, 0, 0, .5);
  --ink-6: rgba(0, 0, 0, .6);
  --ink-3: #888;
  --ink-nav: #696969;
  --olive: #b7af67;
  --green: #9fb767;
  --live: #5fad3e;
  --hair: rgba(0, 0, 0, .06);
  --ico: none;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  --font: 'Google Sans Flex', 'Google Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  interpolate-size: allow-keywords;
}
.night {
  --bg: #0d0f0e;
  --hero: #171a17;
  --card: #151815;
  --glass: rgba(255, 255, 255, .055);
  --pop: rgba(28, 31, 28, .88);
  --ink: #eff1ea;
  --ink-2: rgba(239, 241, 234, .5);
  --ink-6: rgba(239, 241, 234, .62);
  --ink-3: #8a8d85;
  --ink-nav: #8f928a;
  --hair: rgba(255, 255, 255, .07);
  --ico: invert(1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); transition: background-color .5s var(--ease); }
body {
  font-family: var(--font);
  font-weight: 400;
  font-variation-settings: "GRAD" 0, "ROND" 0, "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: normal;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
img { display: block; user-select: none; -webkit-user-drag: none; }
input { font: inherit; color: inherit; }
.ico { filter: var(--ico); transition: filter .4s; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 12px; }
b { font-weight: inherit; }

/* ───────── Stage container ───────── */
html.mode-stage body { overflow: hidden; }
html.mode-stage.stage-scroll body { overflow-y: auto; }
html.mode-stage #viewport { position: fixed; inset: 0; overflow: hidden; }
html.mode-stage.stage-scroll #viewport { position: relative; inset: auto; height: var(--vh-stage); }
html.mode-stage #stage {
  position: absolute; left: 0; top: 0;
  width: 1440px; height: 1024px;
  transform-origin: 0 0;
  transform: translate(var(--ox, 0px), var(--oy, 0px)) scale(var(--s, 1));
}

/* ───────── Top bar ───────── */
.logo {
  position: absolute; left: 52px; top: 40px;
  font-family: 'Instrument Serif', 'Didot', serif;
  font-size: 54px; line-height: normal; letter-spacing: -.5px;
  color: var(--ink); text-decoration: none;
  transform: scaleX(.86); transform-origin: 0 50%;
}
.nav {
  position: absolute; left: calc(50% + .5px); top: 59px; transform: translate(-50%, -50%);
  display: flex; align-items: flex-start; padding: 16px;
  background: var(--glass); border-radius: 32px;
  box-shadow: inset 0 0 0 1px var(--hair);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  z-index: 40;
}
.nav-item {
  position: relative; padding: 4px 16px; font-size: 14px; color: var(--ink-nav);
  white-space: nowrap; transition: color .35s var(--ease);
}
.nav-item:hover { color: var(--ink); }
.nav-item.is-active { color: var(--ink); }
.nav-dot { position: absolute; left: 0; top: 37px; width: 8px; height: 8px; transition: transform .55s var(--spring); pointer-events: none; }
.nav-dot.no-anim { transition: none; }

.actions { position: absolute; left: 1224px; top: 30px; display: flex; align-items: center; gap: 8px; z-index: 45; }
.actions > .pop-anchor:last-child { margin-left: 12px; }
.pop-anchor { position: relative; }
.icon-btn {
  position: relative; width: 56px; height: 56px; border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .25s var(--ease), background-color .3s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--glass), #fff 30%); }
.icon-btn:active, .avatar-btn:active { transform: scale(.93); }
.badge { position: absolute; left: 35px; top: 13px; width: 7px; height: 7px; border-radius: 32px; background: var(--olive); transition: transform .4s var(--spring), opacity .3s; }
.badge.gone { transform: scale(0); opacity: 0; }
.bell-ico.ring { animation: bellRing .7s var(--ease); transform-origin: 50% 10%; }
@keyframes bellRing { 0% { transform: rotate(0) } 20% { transform: rotate(16deg) } 40% { transform: rotate(-12deg) } 60% { transform: rotate(7deg) } 80% { transform: rotate(-3deg) } 100% { transform: rotate(0) } }

.avatar-btn {
  width: 56px; height: 56px; border-radius: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform .25s var(--ease);
}
.avatar { position: relative; flex: none; width: 50px; height: 50px; border-radius: 1111px; overflow: hidden; background: #9f1212; }
.avatar-ring { position: absolute; left: 0; top: 0; width: 50px; height: 50px; }
.avatar-photo { position: absolute; left: -12px; top: -2px; width: 60px; height: 78px; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; }
.avatar.sm .avatar-ring { width: 40px; height: 40px; }
.avatar.sm .avatar-photo { left: -10px; top: -2px; width: 48px; height: 62px; }

/* search */
.search { position: relative; width: 56px; height: 56px; }
.search .icon-btn { position: absolute; right: 0; top: 0; z-index: 2; }
.search input {
  position: absolute; right: 0; top: 0; height: 56px; width: 56px;
  border: 0; outline: 0; border-radius: 32px; padding: 0 56px 0 22px;
  background: var(--glass); font-size: 15px; opacity: 0; pointer-events: none;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: width .5s var(--ease), opacity .25s, background-color .3s;
}
.search input::placeholder { color: var(--ink-2); }
.search.open input { width: 300px; opacity: 1; pointer-events: auto; background: var(--pop); }
.search.open .icon-btn { background: transparent; box-shadow: none; }

/* popovers */
.pop {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px;
  background: var(--pop); border-radius: 24px; padding: 10px;
  backdrop-filter: blur(30px) saturate(1.3); -webkit-backdrop-filter: blur(30px) saturate(1.3);
  box-shadow: 0 24px 60px -18px rgba(30, 36, 26, .28), inset 0 0 0 1px var(--hair);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: 90% 0;
  pointer-events: none; filter: blur(4px);
  transition: opacity .22s var(--ease), transform .35s var(--ease), filter .3s var(--ease);
  z-index: 60;
}
.pop.open { opacity: 1; transform: none; pointer-events: auto; filter: none; }
.pop-title { font-size: 13px; color: var(--ink-2); padding: 8px 10px 6px; }
.pop-label { font-size: 12px; color: var(--ink-2); padding: 12px 8px 8px; }
.pop-hint { font-size: 11.5px; color: var(--ink-2); padding: 12px 8px 4px; }
kbd { font-family: inherit; font-size: 10.5px; padding: 1px 5px; border-radius: 5px; background: var(--hair); }
.note {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 16px;
  transition: background-color .2s;
}
.note:hover, .sr.is-hi { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.note-dot { flex: none; width: 9px; height: 9px; border-radius: 9px; background: var(--c); margin-top: 5px; }
.note b, .prefs-head b { display: block; font-size: 14px; }
.note small, .prefs-head small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.pop .note { opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .4s var(--ease), background-color .2s; }
.pop.open .note { opacity: 1; transform: none; }
.pop.open .note:nth-of-type(2) { transition-delay: 40ms; }
.pop.open .note:nth-of-type(3) { transition-delay: 80ms; }
.prefs-head { display: flex; gap: 12px; align-items: center; padding: 8px; }
.seg-mini { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 20px; background: var(--hair); }
.seg-mini button { position: relative; z-index: 1; padding: 9px; text-align: center; font-size: 13.5px; color: var(--ink-2); transition: color .3s; }
.seg-mini button.is-on { color: var(--ink); }
.seg-mini-pill { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: 16px; background: var(--card); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transition: transform .45s var(--spring); }
.night .seg-mini-pill { transform: translateX(100%); background: rgba(255, 255, 255, .12); }
.pref-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 6px; font-size: 14px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 26px; background: var(--hair); transition: background-color .3s; }
.switch span { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 20px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .4s var(--spring); }
.switch.is-on { background: var(--green); }
.switch.is-on span { transform: translateX(18px); }
.search-pop { width: 300px; }
.sr { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 14px; font-size: 14px; }
.sr small { font-size: 12px; color: var(--ink-2); }
.sr-empty { padding: 12px; font-size: 13px; color: var(--ink-2); }

/* ───────── Cards ───────── */
.board { position: absolute; inset: 0; }
.card { position: absolute; border-radius: 32px; overflow: hidden; }
.glass { background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); }
.card-title { position: absolute; left: 24px; top: 24px; font-size: 26px; font-weight: 300; letter-spacing: -.26px; color: var(--ink-2); white-space: nowrap; }

/* hero */
.hero { left: 20px; top: 117px; width: 700px; height: 887px; background: var(--hero); transition: width .95s var(--ease-io) .12s, background-color .5s; z-index: 2; }
#stage[data-screen="listening"] .hero { width: 1400px; }
.hero-bg img { position: absolute; max-width: none; }
.hb-dots { left: 50%; top: 255.2px; width: 628px; height: 414.6px; transform: translateX(-50%); }
.hb-blob-tr { left: 296.4px; top: -432.6px; width: 942.2px; height: 942.2px; }
.hb-blob-tl { left: -661px; top: -631px; width: 1097px; height: 1098px; }
.photo {
  position: absolute; left: 0; top: 0; width: 1000px; height: 1301.2px;
  transform-origin: 0 0; transform: translate(-59px, 0) scale(.7);
  transition: transform .95s var(--ease-io) .12s, filter .6s;
  will-change: transform;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; }
.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 288px;
  background: linear-gradient(to bottom, rgba(163, 172, 159, 0), rgba(119, 132, 113, .7));
  backdrop-filter: blur(22.5px); -webkit-backdrop-filter: blur(22.5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 38%);
  mask-image: linear-gradient(to bottom, transparent, #000 38%);
  pointer-events: none;
}
.night .photo { filter: brightness(.52) saturate(.85) contrast(1.05); }
.night .hero-fade { background: linear-gradient(to bottom, rgba(20, 24, 18, 0), rgba(14, 17, 13, .78)); }
.night .hero-bg { opacity: .35; }
/* ear switch: a keyed camera-turn clip (packed colour+alpha, drawn in WebGL) plays inside .photo,
   so it shares the photo transform and the night filter; the photo is hidden only while it plays */
.photo-turn { position: absolute; left: 0; top: 0; width: 1000px; height: 1301.2px; visibility: hidden; pointer-events: none; transform-origin: 0 0; }
.turn-src { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.photo.turning .photo-turn { visibility: visible; }
.photo.turning .photo-home { visibility: hidden; }
#stage.turning .hero *, #stage.turning .chip-ear { pointer-events: none !important; }

.greet { position: absolute; left: 64px; top: 699px; width: 413px; display: flex; flex-direction: column; transition: opacity .45s var(--ease) .75s, transform .7s var(--ease) .75s, filter .5s .75s; }
.greet-hi { font-size: 40px; font-weight: 300; color: rgba(255, 255, 255, .7); letter-spacing: -.4px; }
.greet-name { font-size: 72px; color: #fff; letter-spacing: -.72px; }
#stage[data-screen="listening"] .greet { opacity: 0; transform: translateY(24px); filter: blur(8px); transition-delay: 0s; transition-duration: .3s; }
#stage.booting *, #stage.booting *::before, #stage.booting *::after { transition: none !important; animation-duration: 0s !important; }

/* ── Listening UI (stage coords are relative to the 1400-wide card) ── */
.listen-ui { position: absolute; inset: 0; pointer-events: none; }
#stage[data-screen="listening"] .listen-ui { pointer-events: auto; }
.lu-top { display: contents; }
.rv {
  opacity: 0; transform: translateY(16px); filter: blur(8px);
  transition: opacity .35s var(--ease), transform .5s var(--ease), filter .35s var(--ease);
}
#stage[data-screen="listening"] .rv {
  opacity: 1; transform: none; filter: none;
  transition-duration: .6s, .8s, .6s;
  transition-delay: calc(.62s + var(--d, 0) * 55ms);
}
.back-btn {
  position: absolute; left: 56px; top: 56px; width: 72px; height: 72px; padding: 20px; border-radius: 40px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0), rgba(255, 255, 255, .36));
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
  --d: 0;
}
.back-btn img { transition: transform .35s var(--ease); }
.back-btn:hover img { transform: translateX(-4px); }
.back-btn:active { scale: .94; }
.cfg-title { position: absolute; left: 56px; top: 157px; width: 250px; font-size: 48px; font-weight: 400; line-height: 1; letter-spacing: -.48px; color: var(--ink); --d: 1; }
.fan-spacer { display: none; }
.fan-layer { position: absolute; left: 0; top: 0; width: 1400px; height: 887px; transform-origin: 0 0; pointer-events: none; }
.fan-layer.no-anim, .photo.no-anim { transition: none !important; }
.lm-label { position: absolute; left: 649px; top: 81px; width: 119px; font-size: 24px; line-height: 1; letter-spacing: -.24px; color: #fff; --d: 2; }
.fan { position: absolute; left: 743px; top: 266px; width: 0; height: 0; }
/* right ear: the whole fan layer is mirrored around the new ear (JS), text is flipped back to read normally */
.fan-layer.fan-r { --mx: -1; }
.lm-label, .ear-btn { scale: var(--mx, 1) 1; }

.wedge {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform: rotate(calc(var(--a) + var(--shift, 0deg) + var(--fold, 0deg))) scale(var(--wz, 1));
  opacity: var(--wo, 1);
  pointer-events: none;
  transition: transform .6s var(--ease), opacity .4s var(--ease);
}
#stage[data-screen="home"] .wedge { --fold: -38deg; --wz: .55; --wo: 0; transition-duration: .35s, .25s; transition-delay: 0s; }
#stage[data-screen="listening"]:not(.fan-settled) .wedge { transition-duration: .9s, .5s; transition-delay: calc(.7s + var(--i) * 70ms); }
/* hit area = an angular sector around the petal; sectors never overlap and never move on hover */
.w-hit {
  position: absolute; left: -100px; top: 0; width: 200px; height: 250px;
  pointer-events: auto; cursor: pointer;
  clip-path: polygon(83.04px 55.47px, 116.96px 55.47px, 169px 225.7px, 134.9px 233.4px, 100px 236px, 65.1px 233.4px, 31px 225.7px);
}
.w-body { position: absolute; left: 0; top: 0; pointer-events: none; transition: translate .45s var(--ease), scale .2s var(--ease); }
.wedge:not(.is-on) .w-hit:hover + .w-body, .wedge:not(.is-on):focus-visible .w-body { translate: 0 5px; }
.wedge .w-hit:active + .w-body { scale: .97; }
.wedge:focus-visible { outline: none; }
.w-shape {
  position: absolute; left: -48.18px; top: 85.7px; width: 96.37px; height: 110.85px;
  transition: left .5s var(--ease), top .5s var(--ease), width .5s var(--ease), height .5s var(--ease), filter .35s var(--ease);
}
.wedge.is-on .w-shape { left: -61px; top: 65.2px; width: 126.01px; height: 161.23px; }
.wedge:not(.is-on) .w-hit:hover + .w-body .w-shape { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .28)); }
.w-shape img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; transition: opacity .45s var(--ease); }
.w-green { opacity: 0; }
.wedge.is-on .w-green { opacity: 1; }
.wedge.is-on .w-white { opacity: 0; }
.w-label {
  position: absolute; left: 0; top: 147px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; letter-spacing: -.28px; line-height: 1; color: #000;
  transform: translate(-50%, -50%) rotate(90deg) scaleX(var(--mx, 1));
  transition: top .5s var(--ease), left .5s var(--ease), color .4s, font-size .5s var(--ease);
}
.wedge.is-on .w-label { top: 158px; left: 2px; color: #fff; font-size: 16px; letter-spacing: -.32px; }
.w-ico { position: relative; width: 20px; height: 20px; flex: none; }
.w-ico img { position: absolute; inset: 0; width: 20px; height: 20px; transition: opacity .4s; }
.w-ico .on { opacity: 0; }
.wedge.is-on .w-ico .on { opacity: 1; }
.wedge.is-on .w-ico .off { opacity: 0; }

.ripple {
  position: absolute; left: 743px; top: 266px; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none; animation: ripple 1.4s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes ripple { from { transform: scale(.7); opacity: .7 } to { transform: scale(3.6); opacity: 0 } }

.ear-btn { position: absolute; left: 611px; top: 158px; width: 50px; height: 50px; pointer-events: auto; --d: 3; perspective: 300px; }
.ear-ring { position: absolute; left: 0; top: 0; width: 50px; height: 50px; transition: transform .6s var(--spring); }
.ear-btn:hover .ear-ring { transform: scale(1.12); }
.ear-face {
  position: absolute; left: 6px; top: 6px; width: 38px; height: 38px; border-radius: 38.691px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(5.32px); -webkit-backdrop-filter: blur(5.32px);
  box-shadow: inset 0 0 18.1px rgba(255, 255, 255, .2);
  font-size: 19.573px; font-weight: 600; letter-spacing: -.39px; color: #fff; line-height: 1;
  transition: transform .5s var(--ease);
}
.ear-face.flip { transform: rotateY(180deg); }
.ear-face span { display: block; transition: opacity .15s; }

.battery { position: absolute; left: 1165px; top: 159px; display: flex; align-items: flex-end; gap: 12px; --d: 2; cursor: default; }
.glass-btn {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .4);
  backdrop-filter: blur(7.7px); -webkit-backdrop-filter: blur(7.7px);
  box-shadow: inset 0 0 26.2px rgba(255, 255, 255, .2);
}
.night .glass-btn { background: rgba(255, 255, 255, .1); }
.glass-btn.lg { width: 56px; height: 56px; }
.battery .glass-btn img { transition: transform .5s var(--spring); }
.battery:hover .glass-btn img { transform: scale(1.12) rotate(-6deg); }
.battery-txt { display: flex; flex-direction: column; gap: 12px; white-space: nowrap; }
.battery-txt small { font-size: 16px; color: var(--ink-2); letter-spacing: -.16px; }
.battery-txt b { font-size: 48px; line-height: 1; letter-spacing: -.96px; color: var(--ink); font-variant-numeric: tabular-nums; }

.device-id { position: absolute; left: 66px; top: 720px; display: flex; flex-direction: column; gap: 7px; --d: 4; }
.di-row { display: flex; align-items: center; gap: 16px; }
.live-dot { position: relative; flex: none; width: 11px; height: 11px; border-radius: 32px; background: var(--live); }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--live); animation: live 2.4s ease-out infinite; }
.live-dot.sm { width: 9px; height: 9px; }
@keyframes live { 0% { transform: scale(1); opacity: .6 } 70%, 100% { transform: scale(2.6); opacity: 0 } }
.di-name { font-size: 48px; font-weight: 300; letter-spacing: -.48px; white-space: nowrap; color: var(--ink); }
.gear-btn img { transition: transform .8s var(--ease); }
.gear-btn:hover img { transform: rotate(60deg); }
.gear-btn.spin img { animation: spin 1s var(--ease-io); }
@keyframes spin { to { transform: rotate(360deg) } }
.di-sync { padding-left: 25px; font-size: 24px; font-weight: 300; letter-spacing: -.24px; color: var(--ink-2); white-space: nowrap; }

.sound-panel {
  position: absolute; left: 974px; bottom: 24px; width: 402px; padding: 24px; border-radius: 40px;
  display: flex; flex-direction: column; gap: 40px;
  background: rgba(255, 255, 255, .36);
  backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px);
  box-shadow: inset 0 0 26.2px rgba(255, 255, 255, .2);
  --d: 3;
}
.night .sound-panel { background: rgba(22, 25, 22, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
#stage[data-screen="listening"] .sound-panel.rv { transition-delay: .78s; }
.sp-head { display: flex; flex-direction: column; gap: 8px; white-space: nowrap; }
.sp-title { font-size: 24px; letter-spacing: -.24px; }
.sp-sub { font-size: 16px; color: var(--ink-2); letter-spacing: -.16px; }
.sp-rows { display: flex; flex-direction: column; gap: 16px; }
.sp-row { display: flex; flex-direction: column; gap: 10px; }
.sp-line { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.sp-label { flex: 1; font-size: 16px; letter-spacing: -.16px; color: var(--ink-6); }
.sp-val { font-size: 16px; letter-spacing: -.16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slider { --v: 50%; position: relative; padding: 8px 0 8px 52px; margin: -8px 0; touch-action: none; cursor: pointer; outline: none; }
.track { position: relative; height: 8px; border-radius: 56px; background: rgba(0, 0, 0, .12); box-shadow: 0 4px 20px rgba(0, 0, 0, .1); }
.night .track { background: rgba(255, 255, 255, .12); }
.fill { position: absolute; left: 0; top: 0; height: 8px; width: var(--v); border-radius: 47px; background: linear-gradient(to left, #d1dba0, #a2c48e 95%); }
.knob { position: absolute; top: -6px; left: calc(var(--v) - 10px); width: 20px; height: 20px; transition: scale .3s var(--spring); }
.knob img { position: absolute; left: 0; top: 0; }
.knob .knob-in { left: 4px; top: 4px; }
.slider:hover .knob, .slider:focus-visible .knob { scale: 1.2; }
.slider.drag .knob { scale: 1.35; }
.slider:focus-visible .track { box-shadow: 0 0 0 3px rgba(183, 175, 103, .35); }
.slider.anim .fill { transition: width .55s var(--ease); }
.slider.anim .knob { transition: left .55s var(--ease), scale .3s var(--spring); }
.ticks { position: relative; height: 5px; margin-top: 14px; }
.ticks i { position: absolute; top: 0; left: round(nearest, var(--p), 1px); width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: rgba(0, 0, 0, .12); transition: background-color .35s var(--ease); }
.ticks i.on { background: #a2c48e; }
.night .ticks i { background: rgba(255, 255, 255, .16); }
.night .ticks i.on { background: #a2c48e; }
.dir-wrap { padding-left: 52px; }
.dir-seg {
  position: relative; display: flex; overflow: hidden; border-radius: 96px;
  border: 3px solid rgba(255, 255, 255, .2);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0), rgba(255, 255, 255, .2));
  backdrop-filter: blur(3.8px); -webkit-backdrop-filter: blur(3.8px);
}
.dir-seg button { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 20px; border-radius: 36px; }
.dir-pill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% / 3); border-radius: 36px; background: rgba(255, 255, 255, .4); transform: translateX(calc(var(--di, 1) * 100%)); transition: transform .5s var(--spring); }
.night .dir-pill { background: rgba(255, 255, 255, .14); }
.dir-ico { position: relative; width: 24px; height: 24px; transition: transform .4s var(--spring); }
.dir-ico img { position: absolute; left: -5.75px; top: -3.5px; width: 35.5px; height: 31px; max-width: none; }
.dir-ico.front img { left: -6.5px; top: -4.25px; width: 37.75px; height: 32.5px; }
.dir-ico.flip { transform: scaleX(-1); }
.dir-ico.front img { transition: transform .8s var(--ease-io), filter .4s; }
#stage.ear-r .dir-ico.front img { transform: scaleX(-1); }
.dir-seg button:active .dir-ico { transform: scale(.85); }
.dir-seg button:active .dir-ico.flip { transform: scaleX(-1) scale(.85); }

/* ───────── Home side cards ───────── */
.side-out { transition: opacity .4s var(--ease), transform .7s var(--ease), filter .4s; }
#stage[data-screen="home"] .side-card { transition: opacity .55s var(--ease), transform .8s var(--ease), filter .55s var(--ease); transition-delay: calc(.62s + var(--i) * 45ms); }
#stage[data-screen="listening"] .side-card { opacity: 0; transform: translateX(46px) scale(.96); filter: blur(10px); pointer-events: none; transition: opacity .3s var(--ease), transform .5s var(--ease), filter .3s; transition-delay: calc(var(--i) * 28ms); }

/* environment card */
.env { left: 740px; top: 117px; width: 680px; height: 295px; background: var(--card); container-type: inline-size; }
.env-glow { position: absolute; left: -283px; top: -454px; width: 1296.05px; height: 1242.05px; max-width: none; transform: rotate(-90deg); transition: opacity .8s var(--ease), filter .8s; pointer-events: none; }
.night .env-glow { opacity: .55; }
.env-chart { position: absolute; left: 0; top: 0; width: 448px; height: 295px; transform-origin: 0 0; }
.env-title { left: 32px; top: 32px; }
.bars { position: absolute; left: 28px; top: 96px; width: 398px; height: 157px; display: flex; align-items: flex-end; gap: 8px; }
.bar-g { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 5px; cursor: pointer; }
.bar {
  flex: 1; height: var(--h); border-radius: 2px; background: rgba(239, 239, 239, .6);
  transform-origin: 50% 100%; transform: scaleY(var(--g, 1));
  transition: height .55s var(--ease), background-color .3s, border-radius .3s, transform .9s var(--ease);
}
.night .bar { background: rgba(255, 255, 255, .14); }
.bar-g.now .bar, .bar-g:hover .bar { background: #fff; border-radius: 1px; }
.night .bar-g.now .bar, .night .bar-g:hover .bar { background: rgba(255, 255, 255, .92); }
.bars.grow .bar { --g: 0; transition: none; }
.xlabels { position: absolute; left: 6px; top: 262px; width: 442px; display: flex; }
.xlabels span { flex: 1; text-align: center; font-size: 12px; font-weight: 300; line-height: 11.443px; color: rgba(126, 123, 93, .8); white-space: nowrap; }
.night .xlabels span { color: rgba(200, 196, 160, .7); }
.bubble {
  position: absolute; left: var(--x); top: var(--y); padding: 12px; border-radius: 88px; background: var(--card);
  box-shadow: 0 0 0 0 rgba(183, 175, 103, 0);
  transition: transform .45s var(--spring), box-shadow .35s var(--ease), background-color .3s;
  animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--x) * -0.03s / 1px);
}
.bubble img { width: 20px; height: 20px; }
.bubble:hover { transform: translateY(-4px) scale(1.08); }
.bubble:active { transform: scale(.92); }
.bubble.is-on { background: var(--olive); box-shadow: 0 0 0 5px rgba(183, 175, 103, .25), 0 10px 24px -8px rgba(120, 112, 40, .5); }
.bubble.is-on img { filter: brightness(0) invert(1); }
@keyframes bob { 0%, 100% { translate: 0 0 } 50% { translate: 0 -4px } }
.bar-tip {
  position: absolute; left: 0; top: 0; padding: 6px 10px; border-radius: 10px; white-space: nowrap;
  background: rgba(20, 22, 18, .86); color: #fff; font-size: 12px; pointer-events: none;
  opacity: 0; transform: translate(-50%, calc(-100% - 6px)) scale(.94); transition: opacity .2s, transform .3s var(--ease);
  backdrop-filter: blur(8px);
}
.bar-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 10px)); }

.env-now {
  position: absolute; left: 448px; top: 16px; width: 216px; height: 263px;
  background: var(--card); border-radius: 24px; padding: 16px;
  display: flex; flex-direction: column; gap: 20px; overflow: hidden;
  transition: background-color .5s;
}
.meter { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 8px; }
.mline { position: relative; width: 2px; height: 100%; transform-origin: 50% 100%; will-change: transform; }
.mline.short { height: 73px; }
.mline img { position: absolute; left: 2px; top: 0; height: 2px; width: var(--len); max-width: none; transform-origin: 0 0; transform: rotate(90deg); }
.env-now-txt { display: flex; flex-direction: column; gap: 16px; }
.swap { display: flex; flex-direction: column; gap: 4px; }
.swap.out { animation: swapOut .22s var(--ease) forwards; }
.swap.in { animation: swapIn .5s var(--ease); }
@keyframes swapOut { to { opacity: 0; transform: translateY(-8px); filter: blur(6px) } }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); filter: blur(6px) } }
.en-h { font-size: 20px; letter-spacing: -.2px; color: var(--ink); }
.en-s { font-size: 12px; letter-spacing: -.12px; color: var(--ink-2); }
.tune-btn {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 6px 6px 6px 8px;
  border-radius: 272px; background: var(--olive); color: #fff;
  font-size: 12px; font-weight: 300; letter-spacing: -.12px;
  transition: transform .3s var(--ease), filter .3s, box-shadow .3s;
}
.tune-btn > span:first-child { flex: 1; }
.tune-btn:hover { box-shadow: 0 10px 22px -10px rgba(120, 112, 40, .8); filter: brightness(1.05); }
.tune-btn:active { transform: scale(.97); }
.tune-arrow { display: flex; padding: 4px; border-radius: 27px; background: #fff; transition: transform .45s var(--spring); }
.tune-btn:hover .tune-arrow { transform: translateX(3px) rotate(-45deg); }
.tune-btn.pulse { animation: tunePulse 1.6s var(--ease) 2; }
@keyframes tunePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(183, 175, 103, .5) } 50% { box-shadow: 0 0 0 8px rgba(183, 175, 103, 0) } }

/* device card */
.device-card { left: 740px; top: 424px; width: 353px; height: 357px; cursor: pointer; container-type: inline-size; }
.dc-glow {
  position: absolute; left: 109.79px; top: 54px; width: 259.303px; height: 347.281px; transform: scaleX(-1);
  -webkit-mask: url(assets/home/device-mask.svg) .209px 0 / 259.094px 347px no-repeat;
  mask: url(assets/home/device-mask.svg) .209px 0 / 259.094px 347px no-repeat;
  transition: opacity .6s, transform .8s var(--ease);
}
.dc-glow img { width: 100%; height: 100%; object-fit: cover; }
.device-card:hover .dc-glow { opacity: .85; transform: scaleX(-1) scale(1.06); }
.dc-device { position: absolute; left: 202.07px; top: 77px; width: 131px; height: 232px; perspective: 600px; }
.dc-device img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) translateY(var(--fy, 0px));
  transition: transform .5s var(--ease);
  filter: drop-shadow(0 14px 18px rgba(40, 46, 30, .14));
}
.device-card .card-title { color: var(--ink-2); }
.dc-info { position: absolute; left: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 32px; align-items: flex-start; }
.dc-name-wrap { display: flex; flex-direction: column; gap: 7px; }
.dc-name { display: flex; align-items: center; gap: 7px; font-size: 32px; font-weight: 300; letter-spacing: -.32px; white-space: nowrap; }
.dc-sync { font-size: 16px; font-weight: 300; letter-spacing: -.16px; color: var(--ink-2); white-space: nowrap; }
.chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0), rgba(255, 255, 255, .4));
}
.night .chip { background: rgba(255, 255, 255, .06); }
.chip-item { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.chip-item:last-child { gap: 6px; }
.chip-item b { font-size: 14px; letter-spacing: -.28px; line-height: 1; }
.chip-ear { width: 18px; height: 18px; border-radius: 28px; background: #000; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: -.24px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.night .chip-ear { background: #eff1ea; color: #000; }
.chip-ear { cursor: pointer; transition: transform .35s var(--ease), background-color .4s, color .4s; }
.chip-ear:hover { transform: scale(1.15); }
.chip-ear:active { transform: scale(.92); }
.chip-mode-ico { position: relative; width: 20px; height: 20px; }
.chip-mode-ico img { width: 20px; height: 20px; }
.swap-txt { display: inline-block; }
.swap-txt.out, .chip-mode-ico.out { animation: swapOut .2s var(--ease) forwards; }
.swap-txt.in, .chip-mode-ico.in { animation: swapIn .45s var(--ease); }
.caret-btn {
  position: absolute; left: 289px; top: 24px; width: 40px; height: 40px; padding: 10px; border-radius: 40px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, .95));
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .08));
  transition: transform .4s var(--spring), background-color .3s;
}
.night .caret-btn { background: rgba(255, 255, 255, .1); }
.caret-btn:hover { transform: translateX(3px); }
.caret-btn:active { transform: scale(.9); }

/* profile card */
.profile-card { left: 1105px; top: 424px; width: 315px; height: 357px; container-type: inline-size; }
.profile-card .caret-btn { left: 251px; }
.legend { position: absolute; left: 25px; top: 83px; display: flex; gap: 24px; }
.lg-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 300; line-height: 11.443px; color: var(--ink-3); white-space: nowrap; transition: opacity .3s; }
.lg-dot { width: 9px; height: 9px; border-radius: 32px; background: var(--c); transition: transform .4s var(--spring), background-color .3s, box-shadow .3s; }
.lg-item:not(.is-on) { opacity: .5; }
.lg-item:not(.is-on) .lg-dot { transform: scale(.7); background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.lg-item:hover .lg-dot { transform: scale(1.3); }
.lg-item.ping .lg-dot { animation: lgPing 1s var(--ease); }
@keyframes lgPing { 35% { transform: scale(1.7); } }
.pl-tip b { font-weight: 600; }
.plot { position: absolute; left: 49px; top: 128px; width: 240px; height: 164px; overflow: hidden; cursor: crosshair; }
.plot > img, .pl-ear { position: absolute; max-width: none; }
.pl-line { left: -.5px; top: -.5px; width: 487px; height: 1px; }
.pl-grid { left: -.5px; top: -.5px; width: 421px; height: 159px; }
.night .pl-grid, .night .pl-line { opacity: .25; }
.pl-ear { transition: opacity .45s var(--ease); clip-path: inset(0 var(--reveal) 0 0); }
.plot.drawn .pl-ear { --reveal: 0%; transition: opacity .45s var(--ease), --reveal 1.4s var(--ease); }
.pl-right { left: -.63px; top: 64px; width: 301.27px; height: 82.5px; }
.pl-left { left: 0; top: 78.82px; width: 300px; height: 62.18px; }
.pl-ear svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pl-ear.off { opacity: 0; }
.pl-cross { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s; pointer-events: none; }
.night .pl-cross { background: rgba(255, 255, 255, .25); }
.plot:hover .pl-cross { opacity: 1; }
.pc-dot { position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 9px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.pc-dot.l { background: var(--olive); }
.pc-dot.r { background: var(--green); }
.pl-tip {
  position: absolute; left: 0; top: 104px; padding: 6px 10px; border-radius: 10px; white-space: nowrap;
  background: rgba(20, 22, 18, .86); color: #fff; font-size: 11.5px; pointer-events: none;
  opacity: 0; transform: translateX(-50%) translateY(4px); transition: opacity .2s, transform .3s var(--ease);
}
.pl-tip.show { opacity: 1; transform: translateX(-50%); }
.pl-tip i { font-style: normal; display: inline-block; width: 7px; height: 7px; border-radius: 7px; margin: 0 4px 0 0; background: var(--c); }
.ylabels { position: absolute; left: 20px; top: 128px; width: 30px; height: 162px; display: flex; flex-direction: column; justify-content: space-between; }
.ylabels span, .xlabels2 span { font-size: 12px; font-weight: 300; line-height: 11.443px; color: var(--ink-3); }
.xlabels2 { position: absolute; left: 49px; top: 302px; width: 278px; display: flex; }
.xlabels2 span { flex: 1; }
.pl-axis { position: absolute; left: calc(50% - 42.5px); top: 326px; font-size: 12px; letter-spacing: -.12px; color: var(--ink-2); white-space: nowrap; }

/* metric cards */
.metric { top: 793px; height: 211px; }
.comfort { left: 740px; width: 219px; }
#speechCard { left: 971px; width: 218px; }
#noiseCard { left: 1201px; width: 219px; }
.m-title { position: absolute; left: 20px; top: 20px; font-size: 16px; font-weight: 300; letter-spacing: -.16px; color: var(--ink-2); white-space: nowrap; }
.gauge {
  position: absolute; left: -31px; top: 37px; width: 279px; height: 266px; max-width: none;
  -webkit-mask-image: conic-gradient(from -90deg at 50% 52.44%, #000 var(--sweep), transparent calc(var(--sweep) + 6deg));
  mask-image: conic-gradient(from -90deg at 50% 52.44%, #000 var(--sweep), transparent calc(var(--sweep) + 6deg));
  --sweep: 0deg;
}
.gauge.on { --sweep: 186deg; transition: --sweep 1.6s var(--ease) .2s; }
.night .gauge { opacity: .8; }
.comfort-val { position: absolute; left: 50%; top: 82px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; white-space: nowrap; font-weight: 300; }
.comfort-val b { font-size: 48px; letter-spacing: -.48px; line-height: 35px; font-variant-numeric: tabular-nums; }
.comfort-val span { font-size: 16px; letter-spacing: -.16px; opacity: .5; }
.comfort-legend { position: absolute; left: 50%; top: 163px; width: 179px; transform: translateX(-50%); display: flex; justify-content: space-between; }
.cl { width: 62px; display: flex; gap: 8px; align-items: flex-start; }
.cl.w86 { width: 86px; }
.cl-dot { flex: none; width: 9px; height: 9px; border-radius: 32px; background: var(--c); margin-top: 3px; }
.cl > span:last-child { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 11.443px; font-weight: 300; white-space: nowrap; }
.cl small { font-size: 10px; color: var(--ink-3); }
.m-body { position: absolute; left: 24px; top: 96px; display: flex; flex-direction: column; gap: 11px; }
.m-num { display: flex; align-items: flex-end; gap: 3px; font-weight: 300; white-space: nowrap; }
.m-num b { font-size: 48px; letter-spacing: -.48px; font-variant-numeric: tabular-nums; }
.m-num span { font-size: 32px; letter-spacing: -.32px; opacity: .5; }
.m-delta { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 300; letter-spacing: -.12px; white-space: nowrap; }
.m-delta > span:last-child { opacity: .5; }
.delta-pill { display: flex; padding: 4px; border-radius: 27px; background: var(--live); }
.delta-pill.down { transform: rotate(180deg); }
.metric, .profile-card, .device-card, .env { transition: opacity .5s var(--ease), filter .5s var(--ease), transform .6s var(--ease); }
.metric:hover, .profile-card:hover, .device-card:hover { transform: translateY(-3px); }

/* spotlight (Environment / Progress tabs) */
.spot-environment #stage[data-screen="home"] .side-card:not([data-spot~="environment"]),
.spot-environment #stage[data-screen="home"] .hero,
.spot-progress #stage[data-screen="home"] .side-card:not([data-spot~="progress"]),
.spot-progress #stage[data-screen="home"] .hero {
  opacity: .28; filter: blur(3px) saturate(.6); transition-delay: 0s;
}
.spot-environment .env, .spot-progress [data-spot~="progress"] { box-shadow: 0 30px 60px -30px rgba(60, 70, 40, .35), inset 0 0 0 1px var(--hair); }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: 40px; z-index: 80; padding: 12px 18px; border-radius: 40px;
  background: rgba(20, 22, 18, .88); color: #fff; font-size: 14px; white-space: nowrap;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translate(-50%, 16px) scale(.96); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .5s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.night .toast { background: rgba(240, 242, 235, .92); color: #111; }

/* view-transition circular theme reveal */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ─────────────────────────────────────────────
   FLOW MODE — phones & tablets
   ───────────────────────────────────────────── */
html.mode-flow body { overflow-x: hidden; }
html.mode-flow #viewport { position: relative; }
html.mode-flow #stage { position: relative; width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; padding-top: env(safe-area-inset-top); }
html.mode-flow .topbar { position: relative; height: 76px; display: flex; align-items: center; justify-content: space-between; }
html.mode-flow .logo { position: relative; left: auto; top: auto; font-size: 44px; }
html.mode-flow .actions { position: relative; left: auto; top: auto; gap: 6px; }
html.mode-flow .actions > .pop-anchor:last-child { margin-left: 4px; }
html.mode-flow .icon-btn, html.mode-flow .avatar-btn, html.mode-flow .search { width: 46px; height: 46px; }
html.mode-flow .badge { left: 28px; top: 10px; }
html.mode-flow .avatar { width: 40px; height: 40px; }
html.mode-flow .avatar-btn .avatar-ring { width: 40px; height: 40px; }
html.mode-flow .avatar-btn .avatar-photo { left: -10px; top: -2px; width: 48px; height: 62px; }
html.mode-flow .search input { height: 46px; padding-right: 46px; }
html.mode-flow .search.open input { width: min(250px, calc(100vw - 150px)); }
html.mode-flow .pop { position: fixed; top: 84px; right: 16px; width: min(320px, calc(100vw - 32px)); }

html.mode-flow .nav {
  position: fixed; left: 50%; top: auto; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  padding: 8px; max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 18px 40px -16px rgba(30, 36, 26, .35), inset 0 0 0 1px var(--hair);
  z-index: 70;
}
html.mode-flow .nav::-webkit-scrollbar { display: none; }
html.mode-flow .nav-item { padding: 9px 8px 13px; font-size: 13px; }
@media (min-width: 440px) { html.mode-flow .nav-item { padding: 9px 12px 13px; font-size: 13.5px; } }
@media (max-width: 370px) { html.mode-flow .nav-item { padding: 9px 6px 13px; font-size: 12px; } }

html.mode-flow .board {
  position: relative; inset: auto;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}
html.mode-flow .card { position: relative; left: auto; top: auto; width: auto; grid-column: span 6; }
/* the photo card keeps ONE height on both screens, so the photo only ever zooms — it never resizes, hides or swaps */
html.mode-flow .hero { height: clamp(540px, calc(100svh - 170px), 760px); }
html.mode-flow .hero, html.mode-flow #stage[data-screen="listening"] .hero { width: auto; transition: background-color .5s; }
html.mode-flow .hb-dots { top: 30%; }
html.mode-flow .greet { left: 24px; top: auto; bottom: 26px; width: auto; }
html.mode-flow .greet-hi { font-size: clamp(28px, 8vw, 40px); }
html.mode-flow .greet-name { font-size: clamp(52px, 15vw, 72px); }
html.mode-flow .hero-fade { height: 45%; }

/* flow · listening lives inside the same card */
html.mode-flow .listen-ui { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px; gap: 10px; }
html.mode-flow .lu-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 3; }
html.mode-flow .back-btn { position: relative; left: auto; top: auto; width: 52px; height: 52px; padding: 12px; }
html.mode-flow .back-btn img { width: 26px; height: 26px; }
html.mode-flow .battery { position: relative; left: auto; top: auto; gap: 10px; align-items: center; }
html.mode-flow .battery .glass-btn.lg { width: 44px; height: 44px; }
html.mode-flow .battery-txt { gap: 4px; }
html.mode-flow .battery-txt small { font-size: 13px; }
html.mode-flow .battery-txt b { font-size: 30px; }
html.mode-flow .cfg-title { position: relative; left: auto; top: auto; font-size: clamp(32px, 9vw, 44px); width: 220px; margin-top: 4px; z-index: 3; }
html.mode-flow .fan-spacer { display: block; flex: 1; min-height: 0; }
html.mode-flow .fan-layer { z-index: 2; }
html.mode-flow .device-id { position: relative; left: auto; top: auto; z-index: 3; padding-left: 4px; }
html.mode-flow .di-name { font-size: clamp(30px, 8.5vw, 42px); }
html.mode-flow .di-sync { font-size: 16px; padding-left: 27px; }
html.mode-flow .listen-ui .cfg-title, html.mode-flow .listen-ui .di-name, html.mode-flow .listen-ui .battery-txt b { color: #fff; }
html.mode-flow .listen-ui .di-sync, html.mode-flow .listen-ui .battery-txt small { color: rgba(255, 255, 255, .62); }
html.mode-flow .listen-ui .back-btn { background: rgba(255, 255, 255, .78); }
html.mode-flow .listen-ui .back-btn img { filter: none; }
html.mode-flow .listen-ui .gear-btn img { filter: invert(1); }
html.mode-flow .hero::after { content: ''; position: absolute; inset: 0 0 auto; height: 240px; background: linear-gradient(rgba(0, 0, 0, .35), transparent); pointer-events: none; z-index: 1; opacity: 0; transition: opacity .6s var(--ease); }
html.mode-flow #stage[data-screen="listening"] .hero::after { opacity: 1; transition-delay: .3s; }

/* flow · Sound Control becomes its own card under the photo (JS moves it into the board) */
html.mode-flow .sound-panel { position: relative; left: auto; bottom: auto; width: auto; grid-column: span 6; padding: 22px; gap: 28px; display: none; background: var(--glass); box-shadow: inset 0 0 0 1px var(--hair); backdrop-filter: none; -webkit-backdrop-filter: none; }
html.mode-flow #stage[data-screen="listening"] .sound-panel, html.mode-flow #stage.leaving .sound-panel { display: flex; }
@starting-style { html.mode-flow #stage[data-screen="listening"] .sound-panel { opacity: 0; transform: translateY(16px); filter: blur(8px); } }
html.mode-flow #stage[data-screen="listening"] .side-card, html.mode-flow #stage.leaving .side-card { display: none; }
html.mode-flow #stage[data-screen="home"] .side-card { animation: flowIn .7s var(--ease) both; animation-delay: calc(.15s + var(--i) * 50ms); }
html.mode-flow .side-card { transition: opacity .5s var(--ease), filter .5s var(--ease); }
@keyframes flowIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px) } }

/* flow · env card: chart scales, now-card drops below */
html.mode-flow .env { height: auto; padding-bottom: 12px; }
html.mode-flow .env-chart { position: relative; transform: scale(var(--k, 1)); margin-bottom: calc(295px * (var(--k, 1) - 1) - 6px); }
html.mode-flow .env-now { position: relative; left: auto; top: auto; width: auto; height: 236px; margin: 0 12px; }
html.mode-flow .env-glow { left: 50%; top: 50%; translate: -50% -50%; }
@media (min-width: 740px) {
  html.mode-flow .env { height: 295px; padding: 0; }
  html.mode-flow .env-chart { position: absolute; transform: none; margin: 0; left: calc(50% - 340px); }
  html.mode-flow .env-now { position: absolute; left: calc(50% + 108px); top: 16px; width: 216px; height: 263px; margin: 0; }
}

/* flow · fixed-art cards keep design size, centred */
html.mode-flow .device-card, html.mode-flow .profile-card { height: 357px; }
html.mode-flow .device-card > :not(.card-title):not(.caret-btn), html.mode-flow .profile-card > :not(.card-title):not(.caret-btn), html.mode-flow .comfort .gauge { translate: var(--cx, 0px) 0; }
html.mode-flow .device-card .caret-btn, html.mode-flow .profile-card .caret-btn { left: auto; right: 24px; }
html.mode-flow .device-card { --cx: max(0px, calc((100cqw - 353px) / 2)); }
html.mode-flow .profile-card { --cx: max(0px, calc((100cqw - 315px) / 2)); }
html.mode-flow .comfort { container-type: inline-size; --cx: max(0px, calc((100cqw - 219px) / 2)); }
html.mode-flow .device-card .dc-glow { translate: var(--cx) 0; }
html.mode-flow .metric, html.mode-flow #speechCard, html.mode-flow #noiseCard { height: 211px; left: auto; top: auto; width: auto; }
html.mode-flow #speechCard, html.mode-flow #noiseCard { grid-column: span 3; }
@media (max-width: 480px) {
  html.mode-flow .m-body { left: 18px; }
  html.mode-flow .m-num b { font-size: 42px; }
  html.mode-flow .m-num span { font-size: 24px; }
  html.mode-flow .m-title { left: 18px; }
}
@media (min-width: 720px) {
  html.mode-flow #stage { padding: 0 24px; }
  html.mode-flow .device-card, html.mode-flow .profile-card { grid-column: span 3; }
  html.mode-flow .metric, html.mode-flow #speechCard, html.mode-flow #noiseCard { grid-column: span 2; }
}
html.mode-flow .toast { position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); }
html.mode-flow .metric:hover, html.mode-flow .profile-card:hover, html.mode-flow .device-card:hover { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
