/* Demo Home — Vitals Ring. Halo / Iron Man style radial selector.
 * Responsive: desktop, iPhone portrait, iPhone landscape, iPad portrait + landscape.
 */
.vr-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
  padding:
    max(16px, env(safe-area-inset-top, 0px))
    max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px))
    max(16px, env(safe-area-inset-left, 0px));
  container-type: size;
  container-name: vr;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: contain;
  --vr-max: 540px;
  --vr-icon: 32px;
  --vr-label: clamp(12px, 2.3vw, 15px);
  --vr-track: 0.14em;
  --vr-hub-title: clamp(11px, 2.1vw, 14px);
  --vr-lab-gap: 6px;
  --vr-lab-pad: 8px 4px;
  --vr-glow-inset: -6%;
}
.vr-overlay:not([hidden]) { pointer-events: auto; }
/* [hidden] must actually hide. display:flex above overrides the UA display:none,
   which left an invisible full-screen wheel (z-index 70) over the page. Segments
   and labels use pointer-events:auto, so taps on Movie Night (and other tiles)
   were hitting the Dogs / Labs wedges instead. */
.vr-overlay[hidden] { display: none !important; }
.vr-overlay:not(.show),
.vr-overlay:not(.show) * { pointer-events: none !important; }
.vr-backdrop {
  appearance: none; border: 0; padding: 0; margin: 0;
  position: absolute; inset: 0;
  background: rgba(5, 8, 14, 0.52);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  opacity: 0;
  transition: opacity .36s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.vr-wheel {
  position: relative;
  width: min(var(--vr-max), 88vw, 86dvh, 86vh);
  height: min(var(--vr-max), 88vw, 86dvh, 86vh);
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  box-sizing: border-box;
  overflow: visible;
  z-index: 1;
  transform: scale(.72) rotate(-10deg);
  opacity: 0;
  filter: blur(10px);
  transition: transform .5s var(--ease, cubic-bezier(.2,.8,.2,1)),
              opacity .42s var(--ease, cubic-bezier(.2,.8,.2,1)),
              filter .42s var(--ease, cubic-bezier(.2,.8,.2,1));
  will-change: transform, opacity, filter;
}
@supports (width: 1cqmin) {
  .vr-wheel {
    width: min(var(--vr-max), 100cqmin);
    height: min(var(--vr-max), 100cqmin);
  }
}
.vr-overlay.show .vr-backdrop { opacity: 1; }
.vr-overlay.show .vr-wheel {
  transform: none;
  opacity: 1;
  filter: none;
}
.vr-overlay:not(.show) .vr-backdrop { transition-duration: .28s; }
.vr-overlay:not(.show) .vr-wheel {
  transition-duration: .28s, .28s, .28s;
  transform: scale(.78) rotate(6deg);
  opacity: 0;
  filter: blur(8px);
}
.vr-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  touch-action: manipulation;
}
.vr-svg .vr-seg {
  pointer-events: auto;
  cursor: pointer;
  fill: rgba(13, 19, 28, 0.42);
  stroke: rgba(114, 217, 248, 0.28);
  stroke-width: 1.1;
  transition: fill .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              stroke .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              filter .18s var(--ease, cubic-bezier(.2,.8,.2,1));
  filter: drop-shadow(0 0 2px rgba(114, 217, 248, 0.12));
  -webkit-tap-highlight-color: transparent;
}
.vr-svg .vr-seg.is-hot,
.vr-wheel[data-hot] .vr-seg.is-hot,
.vr-svg .vr-seg:active {
  fill: rgba(114, 217, 248, 0.18);
  stroke: #72d9f8;
  filter: drop-shadow(0 0 10px rgba(114, 217, 248, 0.55));
}
.vr-halo {
  fill: none;
  stroke: rgba(114, 217, 248, 0.55);
  stroke-width: 1.4;
  filter: url(#vrGlow);
  pointer-events: none;
}
.vr-halo-inner {
  fill: none;
  stroke: rgba(114, 217, 248, 0.22);
  stroke-width: 0.8;
  pointer-events: none;
}
.vr-ticks {
  fill: none;
  stroke: rgba(114, 217, 248, 0.42);
  stroke-width: 1.1;
  stroke-linecap: round;
  transform-origin: 100px 100px;
  animation: vr-spin 28s linear infinite;
  pointer-events: none;
}
.vr-bloom {
  fill: none;
  stroke: rgba(114, 217, 248, 0.16);
  stroke-width: 6;
  pointer-events: none;
}
.vr-labels {
  position: absolute; inset: 0;
  pointer-events: none;
}
.vr-lab {
  appearance: none; border: 0; background: transparent; color: var(--text, #edf4fa);
  position: absolute;
  width: 30%;
  min-height: 44px;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--vr-lab-gap);
  pointer-events: auto;
  cursor: pointer;
  padding: var(--vr-lab-pad);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.vr-lab svg {
  width: var(--vr-icon); height: var(--vr-icon);
  flex: none;
  stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(114, 217, 248, 0.35));
  pointer-events: none;
}
.vr-lab .vr-name {
  font-family: "Oswald", "Montserrat", sans-serif;
  font-weight: 500;
  font-size: var(--vr-label);
  letter-spacing: var(--vr-track);
  text-transform: uppercase;
  color: #edf4fa;
  text-shadow: 0 0 12px rgba(114, 217, 248, 0.35);
  white-space: nowrap;
  line-height: 1.1;
  max-width: 100%;
  pointer-events: none;
}
.vr-lab.is-hot .vr-name,
.vr-lab:active .vr-name {
  color: #72d9f8;
  text-shadow: 0 0 16px rgba(114, 217, 248, 0.7);
}
.vr-lab.is-hot svg,
.vr-lab:active svg { stroke: #72d9f8; }
.vr-hub {
  appearance: none; border: 0; cursor: pointer;
  position: absolute; left: 50%; top: 50%;
  width: 32%; height: 32%;
  min-width: 72px; min-height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(18, 28, 40, 0.88), rgba(8, 12, 18, 0.92));
  border: 1px solid rgba(114, 217, 248, 0.38);
  box-shadow:
    0 0 0 6px rgba(114, 217, 248, 0.05),
    0 0 28px rgba(114, 217, 248, 0.28),
    inset 0 1px 0 rgba(237, 244, 250, 0.12);
  color: var(--text, #edf4fa);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  z-index: 2;
  padding: 8px;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              box-shadow .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              transform .18s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.vr-hub:focus-visible,
.vr-hub:active {
  border-color: #72d9f8;
  box-shadow:
    0 0 0 6px rgba(114, 217, 248, 0.08),
    0 0 36px rgba(114, 217, 248, 0.45),
    inset 0 1px 0 rgba(237, 244, 250, 0.16);
}
.vr-hub:active { transform: translate(-50%, -50%) scale(0.97); }
.vr-hub-kicker {
  font-size: 8px; font-weight: 750; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--sky, #72d9f8);
  line-height: 1.2;
}
.vr-hub-title {
  font-family: "Oswald", "Montserrat", sans-serif;
  font-weight: 500;
  font-size: var(--vr-hub-title);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.vr-hub-x {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #99a8b8);
  font-weight: 650;
}
.vr-wheel-glow {
  position: absolute; inset: var(--vr-glow-inset);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(114, 217, 248, 0.16), transparent 62%);
  pointer-events: none;
  z-index: 0;
  animation: vr-pulse 2.8s ease-in-out infinite;
}
@keyframes vr-spin { to { transform: rotate(360deg); } }
@keyframes vr-pulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .vr-ticks, .vr-wheel-glow { animation: none; }
  .vr-backdrop, .vr-wheel { transition: none; }
}

/* Hover highlights only on real pointers — avoids sticky iOS hover. */
@media (hover: hover) and (pointer: fine) {
  .vr-svg .vr-seg:hover {
    fill: rgba(114, 217, 248, 0.18);
    stroke: #72d9f8;
    filter: drop-shadow(0 0 10px rgba(114, 217, 248, 0.55));
  }
  .vr-lab:hover .vr-name {
    color: #72d9f8;
    text-shadow: 0 0 16px rgba(114, 217, 248, 0.7);
  }
  .vr-lab:hover svg { stroke: #72d9f8; }
  .vr-hub:hover {
    border-color: #72d9f8;
    box-shadow:
      0 0 0 6px rgba(114, 217, 248, 0.08),
      0 0 36px rgba(114, 217, 248, 0.45),
      inset 0 1px 0 rgba(237, 244, 250, 0.16);
  }
}

/* Lock background scroll while the ring is open (iOS safari). */
html.vr-open, body.vr-open {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Header / sidebar launcher */
.side-foot-actions .btn.vr-launch {
  letter-spacing: 0.1em;
  touch-action: manipulation;
}
.icon-btn.vr-launch {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn.vr-launch svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== iPhone portrait (matches phone.css: max-width 480px) ===== */
@media (max-width: 480px) {
  .vr-overlay {
    --vr-max: 420px;
    --vr-icon: 28px;
    --vr-label: 12px;
    --vr-track: 0.08em;
    --vr-hub-title: 12px;
    --vr-lab-gap: 4px;
    --vr-lab-pad: 6px 2px;
    --vr-glow-inset: -4%;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      max(12px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
  }
  .vr-hub { padding: 6px; min-width: 64px; min-height: 64px; }
  .vr-hub-kicker { font-size: 7px; letter-spacing: 0.16em; }
  .vr-hub-title { letter-spacing: 0.1em; }
  .vr-hub-x { margin-top: 2px; font-size: 10px; }
  .vr-bloom { stroke-width: 4; }

  /* phone.css uses display:contents on .hero-right — give the ring button a row-1 slot next to Settings. */
  header.hero .icon-btn.vr-launch {
    order: 3;
    flex: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

/* Very narrow phones (SE / mini) */
@media (max-width: 380px) {
  .vr-overlay {
    --vr-icon: 24px;
    --vr-label: 11px;
    --vr-track: 0.06em;
    --vr-hub-title: 11px;
    --vr-lab-gap: 3px;
  }
  .vr-hub-kicker { letter-spacing: 0.12em; }
  .vr-hub-title { letter-spacing: 0.08em; }
}

/* ===== iPhone landscape (matches phone.css) ===== */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 932px) {
  .vr-overlay {
    --vr-max: 360px;
    --vr-icon: 22px;
    --vr-label: 11px;
    --vr-track: 0.07em;
    --vr-hub-title: 11px;
    --vr-lab-gap: 2px;
    --vr-lab-pad: 4px 2px;
    --vr-glow-inset: -3%;
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      max(12px, env(safe-area-inset-right, 0px))
      max(8px, env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-left, 0px));
  }
  .vr-hub { padding: 4px; min-width: 56px; min-height: 56px; gap: 0; }
  .vr-hub-kicker { font-size: 6.5px; letter-spacing: 0.12em; }
  .vr-hub-title { letter-spacing: 0.08em; }
  .vr-hub-x { margin-top: 1px; font-size: 9px; }
  .vr-bloom { stroke-width: 3.5; }
  header.hero .icon-btn.vr-launch {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }
}

/* ===== iPad portrait (home-screen / tablet, 744px+ like iPad Mini and up) ===== */
@media (orientation: portrait) and (min-width: 744px) {
  .vr-overlay {
    --vr-max: 620px;
    --vr-icon: 36px;
    --vr-label: clamp(13px, 1.7vw, 16px);
    --vr-track: 0.12em;
    --vr-hub-title: clamp(13px, 1.6vw, 16px);
    --vr-lab-gap: 8px;
    --vr-lab-pad: 10px 6px;
    --vr-glow-inset: -6%;
    padding:
      max(28px, env(safe-area-inset-top, 0px))
      max(28px, env(safe-area-inset-right, 0px))
      max(28px, env(safe-area-inset-bottom, 0px))
      max(28px, env(safe-area-inset-left, 0px));
  }
  .vr-hub { padding: 10px; }
  .vr-hub-kicker { font-size: 9px; }
  .vr-hub-x { font-size: 12px; margin-top: 6px; }
  header.hero .icon-btn.vr-launch {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}

/* ===== iPad landscape ===== */
@media (orientation: landscape) and (min-width: 744px) and (min-height: 500px) and (max-height: 1024px) {
  .vr-overlay {
    --vr-max: 580px;
    --vr-icon: 34px;
    --vr-label: clamp(13px, 1.5vw, 16px);
    --vr-track: 0.12em;
    --vr-hub-title: clamp(12px, 1.4vw, 15px);
    --vr-lab-gap: 6px;
    --vr-lab-pad: 8px 4px;
    --vr-glow-inset: -5%;
    padding:
      max(20px, env(safe-area-inset-top, 0px))
      max(24px, env(safe-area-inset-right, 0px))
      max(20px, env(safe-area-inset-bottom, 0px))
      max(24px, env(safe-area-inset-left, 0px));
  }
  header.hero .icon-btn.vr-launch {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}


/* ===== Health / Animals submenu (2026-11-19) ===== */
.vr-svg .vr-seg[data-item="health"].is-hot,
.vr-svg .vr-seg[data-item="animals"].is-hot {
  fill: rgba(114, 217, 248, 0.22);
  stroke: #72d9f8;
  filter: drop-shadow(0 0 12px rgba(114, 217, 248, 0.7));
}
.vr-orbit {
  position: absolute; inset: -22%;
  pointer-events: none; z-index: 4;
  opacity: 0; transform: scale(.86);
  transition: opacity .4s var(--ease, cubic-bezier(.2,.8,.2,1)),
              transform .5s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.vr-overlay.is-health .vr-orbit[data-orbit="health"],
.vr-overlay.is-animals .vr-orbit[data-orbit="animals"] { opacity: 1; transform: none; pointer-events: auto; }
.vr-orbit-ring {
  position: absolute; inset: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(114, 217, 248, 0.28);
  box-shadow: 0 0 40px rgba(114, 217, 248, 0.08) inset;
  pointer-events: none;
}
.vr-node {
  appearance: none; border: 0; cursor: pointer;
  position: absolute; width: 86px; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; color: var(--text, #edf4fa); padding: 0;
  pointer-events: auto;
}
.vr-node .pip {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(18, 28, 40, 0.94), rgba(8, 12, 18, 0.96));
  border: 1px solid rgba(114, 217, 248, 0.42);
  box-shadow: 0 0 0 4px rgba(114, 217, 248, 0.05), 0 0 18px rgba(114, 217, 248, 0.28), inset 0 1px 0 rgba(237, 244, 250, 0.1);
  backdrop-filter: blur(10px);
  transition: border-color .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              box-shadow .18s var(--ease, cubic-bezier(.2,.8,.2,1)),
              transform .18s var(--ease, cubic-bezier(.2,.8,.2,1));
}
.vr-node svg {
  width: 26px; height: 26px; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(114, 217, 248, 0.35));
}
.vr-node .nm {
  font-family: "Oswald", "Montserrat", sans-serif; font-weight: 500;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: #edf4fa; text-shadow: 0 0 12px rgba(114, 217, 248, 0.35); white-space: nowrap;
}
.vr-node .new {
  position: absolute; top: -8px; right: 4px;
  font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #06111b; background: linear-gradient(180deg, #c6f581, #9ad54f);
  padding: 2px 6px; border-radius: 999px; box-shadow: 0 4px 12px rgba(154, 213, 79, 0.35);
}
.vr-node.is-hot .pip,
.vr-node:hover .pip {
  border-color: #72d9f8;
  box-shadow: 0 0 0 5px rgba(114, 217, 248, 0.1), 0 0 26px rgba(114, 217, 248, 0.55), inset 0 1px 0 rgba(237, 244, 250, 0.16);
  transform: scale(1.05);
}
.vr-node.is-hot .nm, .vr-node:hover .nm { color: #72d9f8; }
.vr-node.is-hot svg, .vr-node:hover svg { stroke: #72d9f8; }
.vr-overlay.is-sub .vr-wheel {
  width: min(480px, 70vw, 70dvh, 70vh);
  height: min(480px, 70vw, 70dvh, 70vh);
}
.vr-overlay.is-sub .vr-close {
  position: absolute;
  right: -38%;
  top: -28%;
  z-index: 8;
}
@media (max-width: 480px) {
  .vr-overlay.is-sub .vr-wheel {
    width: min(300px, 64vw, 52dvh);
    height: min(300px, 64vw, 52dvh);
  }
  .vr-orbit { inset: -28%; }
  .vr-node { width: 64px; }
  .vr-node .pip { width: 44px; height: 44px; }
  .vr-node svg { width: 20px; height: 20px; }
  .vr-node .nm { font-size: 9px; letter-spacing: .1em; }
  .vr-overlay.is-sub .vr-close { top: max(44px, env(safe-area-inset-top, 0px)); }
}


/* ===================================================================
 * Round 4 (2026-11-17): status arcs, readable chips, live hub, honest
 * states, attention-only pulse, 52px+ targets, dim amber night ring.
 * The vr-spin tick bezel (28s) is unchanged and spins just outside the
 * arcs; vr-pulse (2.8s) now runs only on wedges/nodes that need you.
 * =================================================================== */
.vr-overlay {
  --st-ok: #74e3a2; --st-info: #72d9f8; --st-warn: #f0b850; --st-alert: #ff6f82;
  --st-stale: #8796a5; --st-locked: #8796a5; --st-error: #ff8a96; --st-loading: #5c6b7a;
}
.vr-overlay .st-ok      { --c: var(--st-ok); }
.vr-overlay .st-info    { --c: var(--st-info); }
.vr-overlay .st-warn    { --c: var(--st-warn); }
.vr-overlay .st-alert   { --c: var(--st-alert); }
.vr-overlay .st-stale   { --c: var(--st-stale); }
.vr-overlay .st-locked  { --c: var(--st-locked); }
.vr-overlay .st-error   { --c: var(--st-error); }
.vr-overlay .st-loading { --c: var(--st-loading); }

/* The whole-wheel glow no longer pulses; only attention wedges do. */
.vr-overlay .vr-wheel-glow { animation: none; opacity: .85; }

/* ---- rim status arcs ---- */
.vr-arcs { pointer-events: none; }
.vr-arc-bg, .vr-arc-fg { fill: none; stroke-width: 4.2; stroke-linecap: butt; }
.vr-arc-bg { stroke: rgba(114, 217, 248, 0.09); }
.vr-arc-fg {
  stroke: var(--c, #72d9f8);
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 2.2px var(--c, #72d9f8));
  transition: stroke-dashoffset .95s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms), stroke .3s ease;
}
.vr-overlay.show .vr-arc-fg { stroke-dashoffset: calc(var(--off, 100) * 1px); }
.vr-overlay:not(.show) .vr-arc-fg { transition: none; }
/* stale / locked / error / loading: no length claim — a dashed full-length rim instead */
.vr-arc.st-stale .vr-arc-fg, .vr-arc.st-locked .vr-arc-fg, .vr-arc.st-error .vr-arc-fg, .vr-arc.st-loading .vr-arc-fg,
.vr-mini.st-stale .vr-arc-fg, .vr-mini.st-locked .vr-arc-fg, .vr-mini.st-error .vr-arc-fg, .vr-mini.st-loading .vr-arc-fg,
.vr-harc.st-stale .vr-arc-fg, .vr-harc.st-locked .vr-arc-fg, .vr-harc.st-error .vr-arc-fg, .vr-harc.st-loading .vr-arc-fg { opacity: 0; }
.vr-arc.st-stale .vr-arc-bg, .vr-arc.st-locked .vr-arc-bg, .vr-arc.st-error .vr-arc-bg,
.vr-mini.st-stale .vr-arc-bg, .vr-mini.st-locked .vr-arc-bg, .vr-mini.st-error .vr-arc-bg,
.vr-harc.st-stale .vr-arc-bg, .vr-harc.st-locked .vr-arc-bg, .vr-harc.st-error .vr-arc-bg {
  stroke: var(--c); stroke-opacity: .55; stroke-dasharray: 1.6 1.4;
}

/* ---- attention pulse: wedge glow, only where needs-you ---- */
.vr-attn { fill: transparent; opacity: 0; pointer-events: none; transform-origin: 100px 100px; }
.vr-attn.on { fill: var(--c, #f0b850); fill-opacity: .16; opacity: .7; animation: vr-pulse 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 6px var(--c, #f0b850)); }

/* ---- readable chips: icon + colour + words ---- */
.vr-chip {
  --c: var(--st-loading);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  max-width: 100%; margin-top: 2px; padding: 3px 9px 3px 6px; box-sizing: border-box;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: rgba(7, 11, 17, 0.78);
  color: var(--c);
  font-family: "Montserrat", sans-serif; font-weight: 750; font-size: 12.5px; line-height: 1.15; letter-spacing: .01em;
  text-transform: none; white-space: nowrap; pointer-events: none;
}
.vr-chip b { font-weight: 750; overflow: hidden; text-overflow: ellipsis; }
.vr-chip i { display: inline-grid; place-items: center; flex: none; width: 13px; height: 13px; }
.vr-chip i svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; filter: none; }
.vr-chip.st-error { white-space: normal; text-align: left; }
.vr-overlay .vr-lab { min-height: 52px; gap: 4px; }
.vr-lab.needs .vr-name { color: #fff; }

/* ---- Health orbit: mini arcs + chips, 52px+ targets ---- */
.vr-overlay .vr-node { min-width: 64px; min-height: 52px; gap: 4px; }
.vr-node .pip { position: relative; }
.vr-mini { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.vr-mini .vr-arc-bg, .vr-mini .vr-arc-fg { stroke-width: 2.6; }
.vr-mini .vr-arc-fg { filter: none; }
.vr-overlay.is-sub .vr-mini .vr-arc-fg { stroke-dashoffset: calc(var(--off, 100) * 1px); }
.vr-overlay:not(.is-sub) .vr-mini .vr-arc-fg { stroke-dashoffset: 100; transition: none; }
.vr-node .vr-chip { font-size: 11.5px; padding: 2px 8px 2px 5px; }
.vr-node .vr-chip i, .vr-node .vr-chip i svg { width: 12px; height: 12px; }
.vr-node.needs .pip::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 18px 2px color-mix(in srgb, var(--st-warn) 55%, transparent);
  animation: vr-pulse 2.8s ease-in-out infinite;
}
.vr-node.needs:has(.vr-chip.st-alert) .pip::after { box-shadow: 0 0 18px 2px color-mix(in srgb, var(--st-alert) 55%, transparent); }

/* ---- live centre hub ---- */
.vr-overlay .vr-hub { min-width: 96px; min-height: 96px; padding: 0; overflow: hidden; }
.vr-hub-arcs { position: absolute; inset: 3%; width: 94%; height: 94%; transform: rotate(-90deg); pointer-events: none; }
.vr-harc .vr-arc-bg, .vr-harc .vr-arc-fg { stroke-width: 3.4; }
.vr-harc .vr-arc-bg { stroke: rgba(114, 217, 248, 0.08); }
.vr-harc[data-harc="protein"] { --c: var(--st-info); }
.vr-harc[data-harc="meds"]    { --c: var(--st-warn); }
.vr-harc[data-harc="kcal"]    { --c: var(--st-ok); }
.vr-harc[data-harc="meds"].st-ok { --c: var(--st-ok); }
.vr-harc[data-harc="kcal"].st-info { --c: var(--st-ok); }
.vr-harc .vr-arc-fg { filter: none; }
.vr-hub-live, .vr-hub-menu { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.vr-overlay.is-sub .vr-hub-live { display: none; }
.vr-overlay:not(.is-sub) .vr-hub-menu { display: none; }
.vr-hub-n { font-family: "Oswald", sans-serif; font-weight: 600; font-size: clamp(22px, 3.2cqmin, 36px); line-height: 1; color: #edf4fa; font-variant-numeric: tabular-nums; }
.vr-hub-need { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--sky, #72d9f8); }
.vr-hub-key { display: flex; gap: 5px; margin-top: 3px; font-size: 8.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #99a8b8); }
.vr-hub-key i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 2px; vertical-align: 1px; }
.vr-hub-key .k-p { background: var(--st-info); } .vr-hub-key .k-m { background: var(--st-warn); } .vr-hub-key .k-c { background: var(--st-ok); }
.vr-hub-upd { margin-top: 2px; font-size: 9.5px; font-weight: 650; letter-spacing: .04em; color: var(--muted, #99a8b8); white-space: nowrap; }

/* ---- 52px+ targets: close, night toggle, launcher ---- */
.vr-overlay .vr-close { width: 56px; height: 56px; font-size: 24px; touch-action: manipulation; }
.vr-night-btn {
  position: absolute; top: -6%; left: -6%; z-index: 8; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  background: rgba(11, 16, 24, 0.8); border: 1px solid rgba(114, 217, 248, 0.4); color: #edf4fa;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.vr-night-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vr-overlay.is-sub .vr-night-btn { left: -38%; top: -28%; }
header.hero .icon-btn.vr-launch { width: 52px; height: 52px; min-width: 52px; min-height: 52px; }

/* ---- night ring: dim amber, slower spin, softer pulse (manual; auto off by default) ---- */
.vr-overlay.vr-night {
  --st-ok: #b9a46a; --st-info: #c79a55; --st-warn: #e0a04a; --st-alert: #e07a5a;
  --st-stale: #6e6356; --st-locked: #6e6356; --st-error: #d67a5e; --st-loading: #4f463c;
  --sky: #c79a55;
}
.vr-overlay.vr-night .vr-backdrop { background: rgba(3, 3, 2, 0.74); }
.vr-overlay.vr-night .vr-wheel { filter: none; }
.vr-overlay.vr-night .vr-wheel-glow { background: radial-gradient(circle, rgba(224, 160, 74, 0.07), transparent 62%); }
.vr-overlay.vr-night .vr-svg .vr-seg { fill: rgba(16, 11, 5, 0.55); stroke: rgba(224, 160, 74, 0.2); filter: none; }
.vr-overlay.vr-night .vr-svg .vr-seg.is-hot { fill: rgba(224, 160, 74, 0.12); stroke: rgba(224, 160, 74, 0.6); filter: none; }
.vr-overlay.vr-night .vr-halo { stroke: rgba(224, 160, 74, 0.32); filter: none; }
.vr-overlay.vr-night .vr-halo-inner { stroke: rgba(224, 160, 74, 0.16); }
.vr-overlay.vr-night .vr-bloom { stroke: rgba(224, 160, 74, 0.06); }
.vr-overlay.vr-night .vr-ticks { stroke: rgba(224, 160, 74, 0.32); animation-duration: 60s; }
.vr-overlay.vr-night .vr-arc-bg { stroke: rgba(224, 160, 74, 0.07); }
.vr-overlay.vr-night .vr-arc-fg { filter: none; opacity: .85; }
.vr-overlay.vr-night .vr-lab .vr-name, .vr-overlay.vr-night .vr-node .nm { color: #d8b88a; text-shadow: none; }
.vr-overlay.vr-night .vr-lab svg, .vr-overlay.vr-night .vr-node svg { stroke: #c99a5a; filter: none; }
.vr-overlay.vr-night .vr-lab.is-hot .vr-name { color: #f0c27a; }
.vr-overlay.vr-night .vr-hub { border-color: rgba(224, 160, 74, 0.32); box-shadow: 0 0 0 6px rgba(224, 160, 74, 0.03); background: radial-gradient(circle at 50% 40%, rgba(22, 16, 8, 0.9), rgba(8, 6, 3, 0.94)); }
.vr-overlay.vr-night .vr-hub-n { color: #e8cfa6; }
.vr-overlay.vr-night .vr-hub-upd, .vr-overlay.vr-night .vr-hub-key { color: #8a7a64; }
.vr-overlay.vr-night .vr-chip { background: rgba(10, 7, 3, 0.82); }
.vr-overlay.vr-night .vr-node .pip { border-color: rgba(224, 160, 74, 0.3); box-shadow: none; background: radial-gradient(circle at 50% 40%, rgba(22, 16, 8, 0.94), rgba(8, 6, 3, 0.96)); }
.vr-overlay.vr-night .vr-orbit-ring { border-color: rgba(224, 160, 74, 0.18); box-shadow: none; }
.vr-overlay.vr-night .vr-close, .vr-overlay.vr-night .vr-night-btn { border-color: rgba(224, 160, 74, 0.35); color: #e0b878; background: rgba(12, 8, 4, 0.85); }
.vr-overlay.vr-night .vr-night-btn svg { fill: rgba(224, 160, 74, 0.35); }
.vr-overlay.vr-night .vr-attn.on { fill-opacity: .07; filter: none; animation-duration: 4.2s; }
.vr-overlay.vr-night .vr-node.needs .pip::after { box-shadow: 0 0 10px 1px rgba(224, 160, 74, 0.28); animation-duration: 4.2s; }
.vr-overlay.vr-night .vr-node .new { filter: saturate(.3) brightness(.7); }

@media (prefers-reduced-motion: reduce) {
  .vr-arc-fg { transition: none; }
  .vr-attn.on, .vr-node.needs .pip::after { animation: none; }
  .vr-attn.on { opacity: .85; }
}

/* ---- phones ---- */
@media (max-width: 480px) {
  .vr-chip { font-size: 10.5px; padding: 2px 7px 2px 5px; gap: 3px; }
  .vr-chip i, .vr-chip i svg { width: 11px; height: 11px; }
  .vr-node .vr-chip { font-size: 9.5px; padding: 1px 6px 1px 4px; }
  .vr-overlay .vr-node .pip { width: 50px; height: 50px; }
  .vr-hub-key { display: none; }
  .vr-hub-need { font-size: 8.5px; letter-spacing: .1em; }
  .vr-hub-upd { font-size: 8px; }
  .vr-overlay .vr-close { top: -17%; right: 0; }
  .vr-night-btn { top: -17%; left: 0; }
  .vr-overlay.is-sub .vr-night-btn { left: max(4px, env(safe-area-inset-left, 0px)); top: max(44px, env(safe-area-inset-top, 0px)); position: fixed; }
  .vr-overlay.is-sub .vr-close { position: fixed; right: max(4px, env(safe-area-inset-right, 0px)); top: max(44px, env(safe-area-inset-top, 0px)); }
}
@media (orientation: landscape) and (max-height: 480px) and (max-width: 932px) {
  .vr-chip { font-size: 9.5px; padding: 1px 6px 1px 4px; }
  .vr-hub-key, .vr-hub-upd { display: none; }
}
/* r4 fixes: mini arcs must beat the generic .vr-node svg icon rule; chips may exceed the label box */
.vr-node .pip svg.vr-mini { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); stroke: none; filter: none; transform: rotate(-90deg); }
.vr-node .vr-chip { max-width: none; }
.vr-lab .vr-chip { max-width: 150%; }
@media (max-width: 480px) {
  /* .vr-wheel is transformed, so position:fixed is relative to it: anchor the corner buttons to the screen edges with calc. */
  .vr-overlay.is-sub .vr-night-btn, .vr-overlay.is-sub .vr-close { position: absolute; top: calc(50% - 50dvh + max(52px, env(safe-area-inset-top, 0px) + 8px)); }
  .vr-overlay.is-sub .vr-night-btn { left: calc(50% - 50vw + max(12px, env(safe-area-inset-left, 0px))); }
  .vr-overlay.is-sub .vr-close { right: calc(50% - 50vw + max(12px, env(safe-area-inset-right, 0px))); }
}
.vr-node .new { z-index: 3; }
@media (max-width: 480px) {
  .vr-node .vr-chip { white-space: normal; max-width: 84px; text-align: center; line-height: 1.1; }
  .vr-overlay.is-sub .vr-lab .vr-chip { max-width: 100%; }
}
