/* SeizeControl native redesign — final shared layer.
   Mobile first, low cognitive load, FND Connect navy + magenta. */

:root {
  --sc-native-bg: #f7f6f3;
  --sc-native-card: #ffffff;
  --sc-native-ink: #14243a;
  --sc-native-muted: #617084;
  --sc-native-line: #dce3ea;
  --sc-native-navy: #002b5f;
  --sc-native-magenta: #c9005a;
  --sc-native-magenta-soft: #fff1f7;
  --sc-native-blue-soft: #edf4fb;
  --sc-native-green: #126b4b;
  --sc-native-green-soft: #eaf6f0;
  --sc-native-amber: #855c00;
  --sc-native-amber-soft: #fff6df;
  --sc-native-danger: #a62922;
  --sc-native-danger-soft: #fff0ee;
  --sc-native-radius: 18px;
  --sc-native-radius-sm: 13px;
  --sc-native-shadow: 0 7px 24px rgba(0, 43, 95, 0.07);
}

body.app-authenticated,
body.shell-focused {
  background: var(--sc-native-bg) !important;
  color: var(--sc-native-ink);
  -webkit-tap-highlight-color: transparent;
}

body.app-authenticated .sc-app-main,
body.shell-focused .sc-app-main {
  width: 100%;
  max-width: 1240px;
  padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom)) !important;
}

@media (min-width: 992px) {
  body.app-authenticated main.sc-app-main:has(> .sc-native-today),
  body.app-authenticated main.sc-app-main:has(> .sc-log-page) {
    width: 100% !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
  }
}

body.app-authenticated :where(a, button, input, select, textarea, summary):focus-visible,
body.shell-focused :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(201, 0, 90, 0.32) !important;
  outline-offset: 2px;
}

/* Bootstrap modals re-homed onto document.body (bootstrap-glitch-fix.js /
   SeizeControlModals) must share a root stacking context with .modal-backdrop
   and sit above dock / tour / toast chrome. Without this, soft-nav leaves
   dialogs nested under #main-content and the grey backdrop blocks all input. */
body > .modal,
body > .modal.show {
  z-index: 12050 !important;
  pointer-events: auto !important;
}

body > .modal-backdrop,
body > .modal-backdrop.show {
  z-index: 12040 !important;
}

body > .modal .modal-content,
body > .modal .care-modal-content {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  background: #fff;
}

body.app-authenticated :where(.btn, button, a) {
  touch-action: manipulation;
}

body.app-authenticated .btn,
body.shell-focused .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 12px;
  font-weight: 750;
}

body.app-authenticated .btn-primary,
body.shell-focused .btn-primary {
  border-color: var(--sc-native-magenta) !important;
  background: var(--sc-native-magenta) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(201, 0, 90, 0.18);
}

body.app-authenticated .btn-primary:hover,
body.shell-focused .btn-primary:hover {
  border-color: #a8004a !important;
  background: #a8004a !important;
}

body.app-authenticated .btn-outline-primary,
body.shell-focused .btn-outline-primary {
  border-color: rgba(0, 43, 95, 0.35) !important;
  background: #fff !important;
  color: var(--sc-native-navy) !important;
}

body.app-authenticated :where(.form-control, .form-select),
body.shell-focused :where(.form-control, .form-select) {
  min-height: 48px;
  border: 1px solid #c8d3df;
  border-radius: 12px;
  background-color: #fff;
  color: var(--sc-native-ink);
  font-size: 1rem;
}

body.app-authenticated textarea.form-control,
body.shell-focused textarea.form-control {
  min-height: 112px;
}

body.app-authenticated :where(.care-panel, .surface-card, .sc-panel, .app-disclosure, .subsection-card),
body.shell-focused :where(.care-panel, .surface-card, .sc-panel, .app-disclosure, .subsection-card) {
  border: 1px solid var(--sc-native-line) !important;
  border-radius: var(--sc-native-radius) !important;
  background: var(--sc-native-card) !important;
  box-shadow: none !important;
}

body.app-authenticated :where(.page-hero, .workspace-hero, .looking-ahead-hero),
body.shell-focused :where(.page-hero, .workspace-hero, .looking-ahead-hero) {
  padding: 1rem !important;
  border: 1px solid var(--sc-native-line) !important;
  border-left: 4px solid var(--sc-native-magenta) !important;
  border-radius: var(--sc-native-radius) !important;
  background: #fff !important;
  color: var(--sc-native-ink) !important;
  box-shadow: none !important;
}

body.app-authenticated :where(.page-hero, .workspace-hero, .looking-ahead-hero) :where(h1, h2, strong),
body.shell-focused :where(.page-hero, .workspace-hero, .looking-ahead-hero) :where(h1, h2, strong) {
  color: var(--sc-native-navy) !important;
}

body.app-authenticated :where(.page-hero, .workspace-hero, .looking-ahead-hero) p,
body.shell-focused :where(.page-hero, .workspace-hero, .looking-ahead-hero) p {
  color: var(--sc-native-muted) !important;
}

/* Shared chrome */
body.app-authenticated .fnd-safety-strip {
  border-bottom: 0 !important;
  background: var(--sc-native-navy) !important;
}

body.app-authenticated .fnd-safety-strip__inner {
  min-height: 38px;
  font-size: 0.73rem;
}

body.app-authenticated .fnd-parent-bar {
  border-bottom: 1px solid rgba(0, 43, 95, 0.1);
  background: #fff;
}

body.app-authenticated .sc-product-bar {
  border-bottom: 1px solid var(--sc-native-line) !important;
  /* Solid background only — backdrop-filter on sticky headers causes 1px scroll
     flicker/vibration, which is unsafe for seizure-prone users. */
  background: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0, 43, 95, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.app-authenticated .sc-product-nav__link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 11px !important;
  color: #465a70 !important;
}

body.app-authenticated .sc-product-nav__link:hover,
body.app-authenticated .sc-product-nav__link.is-active,
body.app-authenticated .sc-product-more.is-active .sc-product-more__trigger {
  background: var(--sc-native-magenta-soft) !important;
  color: var(--sc-native-magenta) !important;
}

body.app-authenticated .sc-product-cta {
  min-height: 44px;
  padding-inline: 1.05rem;
  border-radius: 12px;
  background: var(--sc-native-magenta) !important;
  box-shadow: 0 5px 14px rgba(201, 0, 90, 0.2);
}

body.app-authenticated .sc-product-more__panel,
body.app-authenticated .sc-mobile-drawer {
  border-color: var(--sc-native-line) !important;
  border-radius: 0 0 var(--sc-native-radius) var(--sc-native-radius) !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(0, 43, 95, 0.14) !important;
}

body.app-authenticated .sc-app-footer {
  background: #fff !important;
  border-top: 1px solid var(--sc-native-line) !important;
}

/* Mobile dock — fixed compact height (never grow on scroll / safe-area thrash).
   Smaller footprint preferred; overrides legacy floating/growing dock styles. */
@media (max-width: 991.98px) {
  body.app-authenticated .care-mobile-dock,
  body.app-authenticated .sc-mobile-dock {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    /* Content band ~50px + home indicator only — lock both min and max. */
    height: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(50px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    padding: 2px 2px env(safe-area-inset-bottom, 0px) !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(var(--mobile-dock-items, 5), minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-top: 1px solid #d5dee7 !important;
    background: #ffffff !important;
    box-shadow: 0 -6px 18px rgba(0, 43, 95, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
    z-index: 1040 !important;
  }

  body.app-authenticated .care-mobile-dock-link {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 2px 1px 1px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #657488 !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    line-height: 1.15 !important;
    text-decoration: none !important;
    overflow: visible !important;
  }

  body.app-authenticated .care-mobile-dock-link i {
    flex: 0 0 auto;
    font-size: 1.15rem !important;
    line-height: 1 !important;
  }

  /* Labels: avoid line-height:1 + overflow clipping half of letters */
  body.app-authenticated .care-mobile-dock-link span {
    display: block !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 1px !important;
    color: inherit !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.app-authenticated .care-mobile-dock-link.is-active:not(.care-mobile-dock-log) {
    background: var(--sc-native-magenta-soft) !important;
    color: var(--sc-native-magenta) !important;
  }

  /* Kill legacy active top-pip that can steal space / look like growth */
  body.app-authenticated .care-mobile-dock-link.is-active::before {
    display: none !important;
  }

  body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log {
    z-index: 2;
    justify-content: flex-end !important;
    color: var(--sc-native-navy) !important;
    background: transparent !important;
    overflow: visible !important;
  }

  body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log i {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: 1.15rem !important;
  }

  body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus {
    width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    display: block !important;
    margin: -14px auto 0 !important;
    border: 3px solid #fff !important;
    border-radius: 50% !important;
    background: var(--sc-native-magenta) !important;
    box-shadow: 0 4px 12px rgba(201, 0, 90, 0.25) !important;
    color: transparent !important;
    font-size: 0 !important;
  }

  body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log > span:last-child {
    margin-top: 0 !important;
    color: var(--sc-native-navy) !important;
  }

  /* Room for fixed dock without jump when URL bar shows/hides */
  body.app-authenticated.shell-app .sc-app-main,
  body.app-authenticated.shell-app .care-main {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Native Today */
.sc-native-today {
  display: grid;
  gap: 1rem;
  max-width: 1120px;
  margin-inline: auto;
}

.sc-native-today__welcome {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0.15rem 0;
}

.sc-native-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--sc-native-magenta);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.sc-native-today__welcome h1 {
  margin: 0;
  color: var(--sc-native-navy);
  font-size: clamp(1.85rem, 8vw, 2.65rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.sc-native-today__welcome p {
  margin: 0.45rem 0 0;
  color: var(--sc-native-muted);
  font-size: 1.02rem;
}

.sc-native-private {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #d5dee8;
  border-radius: 999px;
  background: #fff;
  color: var(--sc-native-navy);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.sc-native-actions {
  display: grid;
  gap: 0.65rem;
}

.sc-native-actions__secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
}

.sc-native-action {
  min-width: 0;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
  color: var(--sc-native-ink);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 43, 95, 0.045);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.sc-native-action:hover {
  border-color: rgba(201, 0, 90, 0.32);
  color: var(--sc-native-ink);
  box-shadow: var(--sc-native-shadow);
  transform: translateY(-1px);
}

.sc-native-action__icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
  font-size: 1.25rem;
}

.sc-native-action--primary {
  min-height: 88px;
  justify-content: center;
  border-color: var(--sc-native-magenta);
  background: linear-gradient(135deg, #d60060, #c9005a);
  color: #fff;
  box-shadow: 0 9px 24px rgba(201, 0, 90, 0.22);
}

.sc-native-action--primary .sc-native-action__icon {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.55rem;
}

.sc-native-action--primary strong { color: #fff; font-size: 1.25rem; }
.sc-native-action--primary small { color: rgba(255, 255, 255, 0.84); }

.sc-native-actions__secondary .sc-native-action {
  min-height: 82px;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.35rem;
  border: 0;
  border-right: 1px solid var(--sc-native-line);
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.sc-native-actions__secondary .sc-native-action:last-child { border-right: 0; }
.sc-native-actions__secondary .sc-native-action small { display: none; }
.sc-native-actions__secondary .sc-native-action__icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }

.sc-illustrated-icon,
.sc-capture-sheet__item > i,
.sc-product-more__feature > i,
.sc-product-more__link > i,
.sc-mobile-drawer__feature > i,
.sc-mobile-drawer__link > i,
.symptom-type-pill > i {
  display: inline-grid !important;
  place-items: center;
  border-radius: 12px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
}

.sc-illustrated-icon.is-symptom { background: #fff0e4; color: #9a4b00; }
.sc-illustrated-icon.is-checkin { background: #eef4ff; color: #175ea8; }
.sc-illustrated-icon.is-medication { background: var(--sc-native-green-soft); color: var(--sc-native-green); }

.sc-native-action strong,
.sc-native-action small {
  display: block;
}

.sc-native-action strong {
  color: var(--sc-native-navy);
  font-size: 0.94rem;
  line-height: 1.15;
}

.sc-native-action small {
  margin-top: 0.23rem;
  color: var(--sc-native-muted);
  font-size: 0.72rem;
}

.sc-native-action.sc-native-action--primary strong { color: #fff; }
.sc-native-action.sc-native-action--primary small { color: rgba(255, 255, 255, 0.88); }

.sc-native-today__layout,
.sc-native-today__main,
.sc-native-today__side {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.sc-native-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--sc-native-line);
  border-radius: var(--sc-native-radius);
  background: #fff;
  box-shadow: 0 5px 19px rgba(0, 43, 95, 0.045);
}

.sc-native-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.sc-native-card__head h2,
.sc-native-pattern h2,
.sc-native-guide h2 {
  margin: 0;
  color: var(--sc-native-navy);
  font-size: 1.14rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.sc-native-card__head > a,
.sc-native-pattern > a {
  flex: 0 0 auto;
  color: var(--sc-native-magenta);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.sc-native-card__note {
  margin: 0.8rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.sc-native-windows {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e0e6ec;
  border-radius: 14px;
}

.sc-native-window {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.25rem;
  border-right: 1px solid #e4e8ed;
  background: #fff;
  color: var(--sc-native-navy);
  text-align: center;
  text-decoration: none;
}

.sc-native-window:last-child { border-right: 0; }
.sc-native-window:hover { color: var(--sc-native-navy); }

.sc-native-window__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf4fc;
  color: #174f91;
  font-size: 1.15rem;
}

.sc-native-window__copy strong,
.sc-native-window__copy small { display: block; }
.sc-native-window__copy strong { overflow: hidden; font-size: 0.76rem; text-overflow: ellipsis; }
.sc-native-window__copy small { margin-top: 0.18rem; color: #356ca7; font-size: 0.63rem; line-height: 1.2; }
.sc-native-window.is-higher { background: #fff8e9; }
.sc-native-window.is-higher .sc-native-window__icon { background: #fff0c8; color: #ad6100; }
.sc-native-window.is-higher .sc-native-window__copy small { color: var(--sc-native-magenta); font-weight: 780; }
.sc-native-window.is-watch { background: #fffaf0; }
.sc-native-window.is-watch .sc-native-window__icon { background: #fff3d6; color: #9a6500; }
.sc-native-window.is-building .sc-native-window__icon { background: #f1f3f5; color: #69798a; }
.sc-native-window.is-building .sc-native-window__copy small { color: #667789; }
.sc-native-window.is-current { box-shadow: inset 0 -3px 0 var(--sc-native-magenta); }
.sc-native-window__current {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  padding: 0.12rem 0.28rem;
  border-radius: 999px;
  background: var(--sc-native-magenta);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sc-native-timeline {
  display: grid;
}

.sc-native-timeline__item {
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #edf0f3;
  color: inherit;
  text-decoration: none;
}

.sc-native-timeline__item:last-child { border-bottom: 0; }

.sc-native-timeline__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
}

.sc-native-timeline__item.is-seizure .sc-native-timeline__icon {
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
}

.sc-native-timeline__item.is-medication .sc-native-timeline__icon {
  background: var(--sc-native-green-soft);
  color: var(--sc-native-green);
}

.sc-native-timeline__copy strong,
.sc-native-timeline__copy small {
  display: block;
}

.sc-native-timeline__copy strong {
  overflow: hidden;
  color: var(--sc-native-ink);
  font-size: 0.9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-native-timeline__copy small,
.sc-native-timeline__item time {
  color: var(--sc-native-muted);
  font-size: 0.72rem;
}

.sc-native-empty {
  color: var(--sc-native-muted);
  font-size: 0.85rem;
}

.sc-native-empty--action {
  min-height: 76px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.sc-native-empty__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
}

.sc-native-empty strong,
.sc-native-empty p { display: block; margin: 0; }
.sc-native-empty strong { color: var(--sc-native-ink); }
.sc-native-empty p { margin-top: 0.18rem; font-size: 0.75rem; line-height: 1.4; }
.sc-native-empty a { color: var(--sc-native-magenta); font-size: 0.78rem; font-weight: 750; }

.sc-native-week {
  height: 104px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
}

.sc-native-week__day {
  min-width: 0;
  display: grid;
  grid-template-rows: 66px auto auto;
  justify-items: center;
  gap: 0.1rem;
  color: var(--sc-native-muted);
}

.sc-native-week__bar {
  width: 100%;
  height: 62px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.2rem;
  border-radius: 9px;
  background: #f4f6f8;
}

.sc-native-week__bar i {
  width: min(18px, 70%);
  height: var(--activity-height);
  min-height: 5px;
  display: block;
  border-radius: 7px 7px 3px 3px;
  background: #9db2c9;
}

.sc-native-week__day.is-today .sc-native-week__bar {
  background: var(--sc-native-magenta-soft);
}

.sc-native-week__day.is-today .sc-native-week__bar i {
  background: var(--sc-native-magenta);
}

.sc-native-week__day strong { font-size: 0.68rem; }
.sc-native-week__day small { font-size: 0.62rem; }

.sc-native-pattern {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #cfddeb;
  border-radius: var(--sc-native-radius);
  background: var(--sc-native-blue-soft);
}

.sc-native-pattern__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sc-native-navy);
  color: #fff;
}

.sc-native-pattern p {
  margin: 0.4rem 0 0;
  color: #53677d;
  font-size: 0.8rem;
  line-height: 1.5;
}

.sc-native-pattern > a {
  grid-column: 2;
}

.sc-native-medication__dose {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #d9e2ea;
  border-radius: 14px;
  background: #fafcfe;
}

.sc-native-medication__icon {
  width: 42px;
  height: 42px;
  display: grid;
  grid-row: span 2;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
  font-size: 1.15rem;
}

.sc-native-medication__dose .btn { grid-column: 1 / -1; }

.sc-native-medication__time span,
.sc-native-medication__time strong,
.sc-native-medication__copy strong,
.sc-native-medication__copy small { display: block; }
.sc-native-medication__time span { color: var(--sc-native-muted); font-size: 0.68rem; font-weight: 750; text-transform: uppercase; }
.sc-native-medication__time strong { margin-top: 0.1rem; color: var(--sc-native-navy); font-size: 1.25rem; }
.sc-native-medication__copy strong { color: var(--sc-native-ink); font-size: 0.9rem; }
.sc-native-medication__copy small { margin-top: 0.18rem; color: var(--sc-native-muted); font-size: 0.73rem; }
.sc-native-medication__dose.is-attention { border-color: #ead8a9; background: var(--sc-native-amber-soft); }
.sc-native-medication__dose .btn { width: 100%; }

.sc-native-medication__complete,
.sc-native-attention__clear {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--sc-native-green-soft);
}

.sc-native-medication__complete > span,
.sc-native-attention__clear > i {
  color: var(--sc-native-green);
  font-size: 1.35rem;
}

.sc-native-medication__complete strong,
.sc-native-medication__complete p,
.sc-native-attention__clear strong,
.sc-native-attention__clear p { display: block; margin: 0; }
.sc-native-medication__complete p,
.sc-native-attention__clear p { margin-top: 0.15rem; color: #496c5c; font-size: 0.75rem; }

.sc-native-attention__list { display: grid; gap: 0.55rem; }

.sc-native-attention__item {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #e3e7eb;
  border-radius: 13px;
  color: inherit;
  text-decoration: none;
}

.sc-native-attention__item > i:first-child { color: var(--sc-native-amber); font-size: 1.05rem; text-align: center; }
.sc-native-attention__item > i:last-child { color: #8a98a8; font-size: 0.8rem; }
.sc-native-attention__item strong,
.sc-native-attention__item small { display: block; }
.sc-native-attention__item strong { color: var(--sc-native-ink); font-size: 0.8rem; line-height: 1.3; }
.sc-native-attention__item small { margin-top: 0.15rem; color: var(--sc-native-magenta); font-size: 0.7rem; font-weight: 750; }

.sc-native-guide {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #d7e2ed;
  border-radius: var(--sc-native-radius);
  background: var(--sc-native-blue-soft);
}

.sc-native-guide p { max-width: 42rem; margin: 0.35rem 0 0; color: #53677d; font-size: 0.8rem; }

.sc-native-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.sc-native-links a {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.sc-native-links i { color: var(--sc-native-magenta); }

/* Selected seizure logging A */
body.is-quick-log .sc-log-header { display: none !important; }

[data-log-mode="quick"] .care-intake-shell {
  max-width: 640px !important;
}

[data-log-mode="quick"] .care-intake-form {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

[data-log-mode="quick"] .care-form-section.log-essentials-card {
  padding: 1rem !important;
  border: 1px solid var(--sc-native-line) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: var(--sc-native-shadow) !important;
}

body.is-quick-log [data-log-mode="quick"] .log-quick-intro,
body.is-quick-log [data-log-mode="quick"] .log-quick-question,
body.is-quick-log [data-log-mode="quick"] .log-quick-note { display: block !important; }

.log-quick-intro { margin-bottom: 1.1rem; }
.log-quick-intro__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.log-quick-intro__meta span { color: var(--sc-native-magenta); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.065em; text-transform: uppercase; }
.log-quick-intro__meta span:last-child { color: var(--sc-native-navy); }
.log-quick-intro h2 { margin: 0.8rem 0 0; color: var(--sc-native-navy); font-size: 1.65rem; font-weight: 850; letter-spacing: -0.04em; }
.log-quick-intro p { margin: 0.3rem 0 0; color: var(--sc-native-muted); font-size: 0.86rem; }

[data-log-mode="quick"] #whenSingleRow {
  padding: 0.75rem;
  border: 1px solid #e1e6eb;
  border-radius: 14px;
  background: #fafbfc;
}

[data-log-mode="quick"] #whenSingleRow .form-label {
  color: var(--sc-native-muted);
  font-size: 0.68rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

[data-log-mode="quick"] #whenSingleRow .form-control {
  min-height: 42px;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  color: var(--sc-native-navy);
  font-size: 0.91rem;
  font-weight: 750;
  box-shadow: none !important;
}

.log-quick-question { margin-top: 1.35rem; display: block; }
.log-quick-question fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: block;
  /* Avoid Safari fieldset flex/grid hit-testing bugs that swallow taps. */
  position: relative;
  z-index: 1;
}
.log-quick-question legend { margin: 0; color: var(--sc-native-navy); font-size: 1rem; font-weight: 820; }
.log-quick-question fieldset > p { margin: 0.25rem 0 0.7rem; color: var(--sc-native-muted); font-size: 0.76rem; }

/* Detail panels that open when stage symptom pills need more detail */
.stage-detail-panel {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #f7fafc;
}

.stage-detail-label {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--sc-native-navy);
}

.stage-details-host:empty {
  display: none;
}

.stage-detail-section {
  margin-top: 1rem;
}

/* ── Stage map summaries (open overlays) ─────────────────── */
.stage-detail-summaries {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.stage-detail-summaries[hidden] {
  display: none !important;
}

.stage-map-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid #d5dee8;
  border-radius: 16px;
  background: #f7fafc;
  color: var(--sc-native-navy, #002b5f);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.stage-map-summary:hover,
.stage-map-summary:focus-visible {
  border-color: rgba(0, 43, 95, 0.28);
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 43, 95, 0.08);
  outline: none;
}

.stage-map-summary__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: rgba(201, 0, 90, 0.1);
  color: var(--sc-native-magenta, #c9005a);
  font-size: 1.15rem;
}

.stage-map-summary__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stage-map-summary__text strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.stage-map-summary__text span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a6b80;
  line-height: 1.3;
}

.stage-map-summary__action {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sc-native-magenta, #c9005a);
  white-space: nowrap;
}

/* ── Detail map sheets (mobile bottom sheet / desktop modal) ─ */
.sc-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  align-items: end;
  justify-items: center;
}

.sc-detail-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.sc-detail-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 18, 36, 0.48);
  cursor: pointer;
}

.sc-detail-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  max-height: min(92vh, 44rem);
  overflow: auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 0.55rem 1.1rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -16px 48px rgba(0, 16, 40, 0.22);
}

body.sc-detail-sheet-open {
  overflow: hidden;
}

.sc-detail-sheet__handle {
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #d5dde7;
  margin: 0.15rem auto 0.75rem;
}

.sc-detail-sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.sc-detail-sheet__head > div {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-detail-sheet__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sc-native-magenta, #c9005a);
}

.sc-detail-sheet__head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--sc-native-navy, #002b5f);
  line-height: 1.25;
}

.sc-detail-sheet__sub {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: #5a6b80;
}

.sc-detail-sheet__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #f7fafc;
  color: var(--sc-native-navy, #002b5f);
}

.sc-detail-sheet__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8eef4;
}

.sc-detail-sheet__actions .btn {
  min-height: 2.75rem;
  border-radius: 12px;
  font-weight: 750;
}

.sc-detail-sheet__done {
  min-width: 7.5rem;
}

/* Brain map — photo + hit regions + named legend */
.sc-brain-map {
  display: grid;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
  border: 1px solid #e1e8f0;
}

.sc-brain-map__frame {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 43, 95, 0.08);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.sc-brain-map__img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.sc-brain-map__hits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sc-brain-region {
  cursor: pointer;
  fill: transparent;
  stroke: transparent;
  stroke-width: 0.45;
  stroke-linejoin: round;
  transition: fill 0.12s ease, stroke 0.12s ease, filter 0.12s ease;
  outline: none;
  /* Prefer the painted lobe under the pointer when edges overlap slightly */
  pointer-events: visiblePainted;
}

.sc-brain-region:hover,
.sc-brain-region:focus-visible {
  fill: rgba(201, 0, 90, 0.2);
  stroke: rgba(201, 0, 90, 0.65);
  stroke-width: 0.7;
}

.sc-brain-region.is-selected {
  fill: rgba(201, 0, 90, 0.34);
  stroke: #c9005a;
  stroke-width: 0.9;
  filter: drop-shadow(0 0 0.4rem rgba(201, 0, 90, 0.4));
}

.sc-lobe-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.sc-lobe-legend__btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.55rem 0.65rem;
  border: 1.5px solid #d5dee8;
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy, #002b5f);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.sc-lobe-legend__btn:hover,
.sc-lobe-legend__btn:focus-visible {
  border-color: rgba(201, 0, 90, 0.4);
  outline: none;
}

.sc-lobe-legend__btn.is-selected {
  border-color: var(--sc-native-magenta, #c9005a);
  background: #fff1f7;
  box-shadow: 0 0 0 2px rgba(201, 0, 90, 0.12);
}

.sc-lobe-legend__swatch {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 2px solid rgba(0, 43, 95, 0.12);
}

.sc-lobe-legend__swatch.is-frontal { background: #b89ad8; }
.sc-lobe-legend__swatch.is-parietal { background: #d4b86a; }
.sc-lobe-legend__swatch.is-temporal { background: #e8a87c; }
.sc-lobe-legend__swatch.is-occipital { background: #7ec4e0; }

.sc-lobe-legend__copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.sc-lobe-legend__copy strong {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.sc-lobe-legend__copy small {
  font-size: 0.7rem;
  font-weight: 600;
  color: #657689;
  line-height: 1.2;
}

.sc-brain-map__hint,
.sc-body-map__hint {
  margin: 0;
  padding: 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sc-native-navy, #002b5f);
  text-align: center;
}

/* Limb picker — large named buttons */
.sc-limb-picker {
  display: grid;
  gap: 0.95rem;
}

.sc-limb-picker__group {
  display: grid;
  gap: 0.45rem;
}

.sc-limb-picker__label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6a7b8f;
}

.sc-limb-picker__grid {
  display: grid;
  gap: 0.5rem;
}

.sc-limb-picker__grid--2 {
  grid-template-columns: 1fr 1fr;
}

.sc-limb-picker__grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.sc-limb-choice {
  min-height: 3.15rem;
  padding: 0.7rem 0.55rem;
  border: 1.5px solid #d5dee8;
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.sc-limb-choice:hover,
.sc-limb-choice:focus-visible {
  border-color: rgba(201, 0, 90, 0.4);
  outline: none;
}

.sc-limb-choice.is-selected {
  border-color: var(--sc-native-magenta, #c9005a);
  background: var(--sc-native-magenta, #c9005a);
  color: #fff;
  box-shadow: 0 8px 18px rgba(201, 0, 90, 0.22);
}

@media (max-width: 22rem) {
  .sc-limb-picker__grid--3 {
    grid-template-columns: 1fr;
  }
  .sc-lobe-legend {
    grid-template-columns: 1fr;
  }
}

.sc-map-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 0.5rem;
  margin-top: 0.75rem;
}

.sc-map-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 0, 90, 0.28);
  background: #fff1f7;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}

.sc-map-chip i {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Desktop: centered modal card instead of bottom sheet */
@media (min-width: 40rem) {
  .sc-detail-sheet {
    align-items: center;
    padding: 1.25rem;
  }

  .sc-detail-sheet__panel {
    border-radius: 22px;
    width: min(100%, 34rem);
    max-height: min(88vh, 46rem);
    padding: 1rem 1.25rem 1.15rem;
    box-shadow: 0 24px 64px rgba(0, 16, 40, 0.28);
  }

  .sc-detail-sheet__handle {
    display: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    .sc-detail-sheet__panel {
      animation: sc-detail-pop 0.2s ease-out;
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sc-detail-sheet__panel {
    animation: sc-sheet-up 0.22s ease-out;
  }
}

@keyframes sc-detail-pop {
  from { transform: translateY(0.6rem) scale(0.98); opacity: 0.6; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 39.98rem) {
  .sc-brain-map__svg {
    width: min(100%, 100%);
  }
  .sc-body-map__svg {
    width: min(100%, 16rem);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.log-quick-choice-grid,
.log-quick-duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

/* All seizure types as equal buttons (no “More types” overflow menu) */
.log-quick-type-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 520px) {
  .log-quick-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .log-quick-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.log-quick-choice,
.log-quick-duration {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cfd9e3;
  border-radius: 13px;
  background: #fff;
  color: var(--sc-native-ink);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: left;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.log-quick-choice i {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
}

.log-quick-choice.is-selected,
.log-quick-duration.is-selected {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-navy);
  box-shadow: inset 0 0 0 1px var(--sc-native-magenta);
}

.log-quick-choice.is-selected i {
  background: var(--sc-native-magenta);
  color: #fff;
}

.log-quick-duration {
  min-height: 52px;
  justify-content: center;
  text-align: center;
}

.log-quick-more {
  min-height: 42px;
  margin-top: 0.35rem;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--sc-native-magenta);
  font-size: 0.77rem;
  font-weight: 750;
}

[data-log-mode="quick"] .log-standard-essentials {
  display: block;
  margin-top: 0 !important;
}

[data-log-mode="quick"] .log-standard-essentials > div {
  display: none;
  width: 100%;
  margin-top: 0.55rem;
}

[data-log-mode="quick"] .log-standard-essentials > div.is-quick-expanded {
  display: block;
}

.log-quick-note { margin-top: 1.15rem; }
.log-quick-note .form-label span { color: var(--sc-native-muted); font-weight: 500; }
.log-quick-note .form-control { font-size: 0.9rem !important; }

body.is-quick-log [data-log-mode="quick"] .log-quick-safety {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0.7rem;
  border-radius: 12px;
  background: var(--sc-native-blue-soft);
  color: #455e76;
  font-size: 0.72rem;
  line-height: 1.45;
}

.log-quick-safety i { color: var(--sc-native-navy); }

/* ── Log action pair: secondary LEFT · primary RIGHT ─────── */
.log-step-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.log-action-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
  width: 100%;
}

.log-action-back {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 3.25rem;
  min-width: 0;
}

.log-action-pair {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0.55rem;
  min-width: 0;
}

/* Secondary always left, primary always right (order + DOM: save then continue).
   Do NOT use display:!important here — it was overriding hide/mode rules and
   left both Continue buttons visible on steps 2–3. */
.log-action-btn {
  flex: 1 1 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.5rem;
  padding: 0.7rem 0.85rem !important;
  border-radius: 14px !important;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}

/* JS + mode hide must always win over the flex display above */
.log-action-btn[hidden],
.log-action-btn.is-action-hidden {
  display: none !important;
}

/* Mode defaults for the pair — always subordinate to [hidden] / .is-action-hidden */
.log-action-pair > .log-quick-only {
  display: none !important;
}
[data-log-mode="quick"] .log-action-pair > .log-full-only,
body.is-quick-log .log-action-pair > .log-full-only {
  display: none !important;
}
[data-log-mode="quick"] .log-action-pair > .log-quick-only:not([hidden]):not(.is-action-hidden),
body.is-quick-log .log-action-pair > .log-quick-only:not([hidden]):not(.is-action-hidden) {
  display: inline-flex !important;
  flex-direction: column;
}
/* Full mode next: only when JS has not hidden it */
[data-log-mode="single"] .log-action-pair > .log-full-only:not([hidden]):not(.is-action-hidden) {
  display: inline-flex;
  flex-direction: column;
}

.log-action-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.log-action-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.9;
  line-height: 1.3;
  max-width: 16rem;
}

.log-action-btn.is-secondary {
  order: 1;
  flex: 0.92 1 0;
  border: 1px solid #c5d0dc !important;
  background: #fff !important;
  color: var(--sc-native-navy, #002b5f) !important;
  box-shadow: none !important;
}

.log-action-btn.is-secondary:hover {
  background: #f4f7fa !important;
  border-color: #aebccb !important;
}

.log-action-btn.is-secondary .log-action-sub {
  opacity: 0.75;
  color: #4a5d73;
}

.log-action-btn.is-primary {
  order: 2;
  flex: 1.12 1 0;
  border: 0 !important;
  background: var(--sc-native-magenta, #c9005a) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(201, 0, 90, 0.22) !important;
}

.log-action-btn.is-primary:hover {
  filter: brightness(1.05);
}

.log-action-btn.is-primary .log-action-sub {
  opacity: 0.92;
  color: rgba(255, 255, 255, 0.92);
}

/* Final step: only primary save — push to the right */
.log-action-pair.is-single-primary .log-action-btn.is-primary {
  margin-left: auto;
  flex: 0 1 18rem;
  max-width: 100%;
}

.log-finish-later {
  align-self: flex-end;
  font-weight: 650;
}

/*
 * Mobile: NEVER stack the stage actions.
 * With Back: 1/5 + 2/5 + 2/5 (Back | Save | Continue)
 * Without Back: Save and Continue share the row equally.
 */
@media (max-width: 48rem) {
  .log-action-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    width: 100%;
  }

  /* Back visible → Back 1/5, action pair 4/5 */
  .log-action-toolbar:has(.log-action-back:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
  }

  .log-action-back[hidden],
  .log-action-back.is-action-hidden {
    display: none !important;
  }

  .log-action-back:not([hidden]) {
    width: 100%;
    min-height: 3.35rem;
    padding: 0.35rem 0.2rem !important;
    display: inline-flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    border-radius: 12px !important;
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1.1;
  }

  .log-action-back:not([hidden]) i {
    font-size: 1.05rem;
    line-height: 1;
  }

  .log-action-back:not([hidden]) span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .log-action-pair {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    flex: unset;
  }

  /* Only one primary (e.g. step 3 save) */
  .log-action-pair.is-single-primary {
    grid-template-columns: minmax(0, 1fr);
  }

  .log-action-btn {
    width: 100%;
    min-width: 0;
    flex: unset !important;
    min-height: 3.35rem;
    padding: 0.4rem 0.35rem !important;
    border-radius: 12px !important;
    gap: 0.12rem;
  }

  .log-action-title {
    font-size: 0.84rem;
    letter-spacing: 0;
  }

  .log-action-sub {
    font-size: 0.58rem;
    max-width: none;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .log-action-pair.is-single-primary .log-action-btn.is-primary {
    margin-left: 0;
    flex: unset;
    max-width: none;
  }

  .log-action-btn.is-secondary { order: 1; }
  .log-action-btn.is-primary { order: 2; }
}

/* Very narrow phones: slightly tighter type so 3-up still fits */
@media (max-width: 22rem) {
  .log-action-title { font-size: 0.78rem; }
  .log-action-sub { font-size: 0.54rem; }
  .log-action-back { font-size: 0.62rem; }
}

/* Dedicated cluster capture — one calm summary instead of repeated full forms. */
.log-cluster-only { display: none !important; }
body.is-cluster-log .sc-log-header { display: none !important; }

[data-log-mode="cluster"] .log-cluster-only { display: block !important; }
[data-log-mode="cluster"] :where(.log-full-only, .log-quick-only, .log-step, .care-form-actions, .log-autosave-note) { display: none !important; }
[data-log-mode="cluster"] .care-intake-shell {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: 720px !important;
  margin-inline: auto !important;
}
[data-log-mode="cluster"] .care-intake-main { width: 100%; }
[data-log-mode="cluster"] .care-intake-form {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cluster-composer {
  padding: 1rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--sc-native-shadow);
}

.cluster-composer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--sc-native-magenta);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cluster-composer__meta span:last-child { color: var(--sc-native-navy); }

.cluster-composer__head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.cluster-composer__hero-icon,
.cluster-field-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
  font-size: 1.25rem;
}

.cluster-composer__head h2 {
  margin: 0;
  color: var(--sc-native-navy);
  font-size: clamp(1.45rem, 6.5vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.cluster-composer__head p {
  margin: 0.45rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.cluster-composer__count {
  margin-top: 1.45rem;
  text-align: center;
}

.cluster-composer__count > span,
.cluster-time-fieldset legend,
.cluster-type-fieldset legend {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--sc-native-navy);
  font-size: 1rem;
  font-weight: 820;
}

.cluster-count-control {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 1rem;
  width: min(310px, 100%);
  margin-inline: auto;
}

.cluster-count-control button {
  width: 64px;
  height: 64px;
  border: 2px solid var(--sc-native-navy);
  border-radius: 18px;
  background: #fff;
  color: var(--sc-native-navy);
  font-size: 1.55rem;
}

.cluster-count-control strong,
.cluster-count-control .cluster-count-value,
.cluster-count-control #clusterCountValue {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.15rem 0.2rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--sc-native-navy);
  font-size: 4rem;
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  font-variant-numeric: tabular-nums;
}

.cluster-count-control #clusterCountValue:focus {
  outline: none;
  background: rgba(0, 43, 95, 0.05);
  box-shadow: inset 0 0 0 2px rgba(0, 43, 95, 0.18);
}

/* Hide number-spin affordances if type ever becomes number */
.cluster-count-control #clusterCountValue::-webkit-outer-spin-button,
.cluster-count-control #clusterCountValue::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cluster-date-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #dfe5eb;
  border-radius: 14px;
  cursor: pointer;
}

.cluster-date-row small,
.cluster-date-row strong { display: block; }
.cluster-date-row small { color: var(--sc-native-muted); font-size: 0.68rem; }
.cluster-date-row strong { color: var(--sc-native-navy); font-size: 0.95rem; }
.cluster-date-row input { width: 38px; height: 38px; opacity: 0.01; cursor: pointer; }

.cluster-time-fieldset,
.cluster-type-fieldset {
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
}

.cluster-time-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe5eb;
  border-radius: 14px;
}

.cluster-time-range label {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  text-align: center;
}

.cluster-time-range label:first-child { border-right: 1px solid #dfe5eb; }
.cluster-time-range label span { color: var(--sc-native-muted); font-size: 0.72rem; }
.cluster-time-range input {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--sc-native-navy);
  font-size: clamp(1.4rem, 7vw, 2.1rem);
  font-weight: 820;
  text-align: center;
}

.cluster-uncertain {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  color: var(--sc-native-navy);
  font-size: 0.83rem;
}

.cluster-uncertain input { width: 24px; height: 24px; accent-color: var(--sc-native-magenta); }

.cluster-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.cluster-type-grid button {
  min-width: 0;
  min-height: 88px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.25rem;
  border: 1px solid #d6dee7;
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.18;
}

.cluster-type-grid button i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-blue-soft);
  font-size: 1rem;
}

.cluster-type-grid button.is-selected {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta-soft);
  box-shadow: inset 0 0 0 1px var(--sc-native-magenta);
}

.cluster-type-grid button.is-selected i { background: var(--sc-native-magenta); color: #fff; }

.cluster-details {
  margin-top: 1rem;
  border: 1px solid #dfe5eb;
  border-radius: 14px;
  background: #fff;
}

.cluster-details > summary {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.6rem;
  list-style: none;
}

.cluster-details > summary::-webkit-details-marker { display: none; }
.cluster-details > summary .cluster-field-icon { width: 42px; height: 42px; }
.cluster-details > summary > span:nth-child(2) { color: var(--sc-native-navy); font-size: 0.83rem; font-weight: 760; }
.cluster-details > summary small { display: block; margin-top: 0.12rem; color: var(--sc-native-muted); font-size: 0.68rem; font-weight: 500; }
.cluster-details__body { display: grid; gap: 0.8rem; padding: 0 0.8rem 0.9rem; }
.cluster-details__body label > span { display: block; margin-bottom: 0.3rem; color: var(--sc-native-navy); font-size: 0.78rem; font-weight: 750; }

.cluster-safety-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
  padding: 0.7rem;
  border-radius: 14px;
  background: var(--sc-native-magenta-soft);
}

.cluster-safety-note > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--sc-native-magenta);
  font-size: 1.25rem;
  line-height: 1;
}

.cluster-safety-note > span > i {
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--sc-native-magenta);
}

.cluster-safety-note > span > i::before {
  display: block;
  font-family: bootstrap-icons !important;
  line-height: 1;
  color: inherit;
}

.cluster-safety-note p { margin: 0; color: #5a3550; font-size: 0.74rem; line-height: 1.45; }
.cluster-composer__actions { display: grid; gap: 0.55rem; margin-top: 0.9rem; }
.cluster-composer__actions .btn-primary { min-height: 54px; font-size: 1rem; }

@media (min-width: 768px) {
  .cluster-composer { padding: 1.5rem; }
  .cluster-composer__head { grid-template-columns: 52px minmax(0, 1fr); }
  .cluster-composer__hero-icon { width: 52px; height: 52px; }
  .cluster-type-grid button { min-height: 104px; font-size: 0.86rem; }
}

/* Calm, consistent forms and report surfaces throughout the app. */
.symptoms-page,
.meds-page,
.account-page,
.alerts-page,
.hist-page,
.looking-ahead-page,
.checkin-page,
.wearable-learning-page,
.menstruation-page,
.pip-assist-page {
  width: 100%;
  min-width: 0;
  max-width: 1120px;
  margin-inline: auto;
}

/* History inherited card padding inside an already padded hero, producing a
   needlessly tall first screen on phones. Keep the grouping without nesting
   three layers of whitespace. */
@media (max-width: 767px) {
  body.app-authenticated .workspace-hero-history {
    gap: 0.9rem !important;
    margin-bottom: 1rem !important;
  }

  body.app-authenticated .workspace-hero-history :where(.workspace-hero-copy, .workspace-hero-stats) {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.app-authenticated .workspace-hero-history .hero-stat {
    margin: 0 !important;
  }
}

/* The private PIP hero is useful immediately. It should never disappear while
   the optional below-fold reveal enhancement is booting. */
.pip-anim .pip-hero[data-reveal] {
  opacity: 1 !important;
  transform: none !important;
}

body.app-authenticated :where(.choice-btn, .tag-pill, .symptom-type-btn, .symptom-segmented button, .alerts-filter-btn) {
  min-height: 44px;
  border-color: #cbd6e0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--sc-native-ink) !important;
}

body.app-authenticated :where(.choice-btn.is-selected, .tag-pill.is-selected, .symptom-type-btn.is-selected, .symptom-segmented button.is-selected, .alerts-filter-btn.is-active) {
  border-color: var(--sc-native-magenta) !important;
  background: var(--sc-native-magenta-soft) !important;
  color: var(--sc-native-navy) !important;
  box-shadow: inset 0 0 0 1px var(--sc-native-magenta);
}

body.app-authenticated details > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.account-verification-row {
  flex-wrap: wrap;
}

.account-verification-row .btn {
  width: auto;
  max-width: 100%;
  white-space: normal;
}

.symptom-type-more {
  overflow: hidden;
  border: 1px solid var(--sc-native-line);
  border-radius: 13px;
  background: #fafbfd;
}

.symptom-type-more > summary {
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  color: var(--sc-native-navy);
  font-size: 0.82rem;
  font-weight: 780;
  list-style: none;
}

.symptom-type-more > summary::-webkit-details-marker { display: none; }
.symptom-type-more__body { display: grid; gap: 1rem; padding: 0.3rem 0.8rem 0.9rem; }

.checkin-page .setup-ranges label {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem !important;
  border: 1px solid var(--sc-native-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
}

.checkin-page .setup-ranges input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--sc-native-magenta); }
.checkin-question-icon,
.checkin-section h2 > i,
.checkin-section .form-label > i {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
  font-size: 1.05rem;
}

.checkin-section h2,
.checkin-section .form-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkin-page .choice-pill > i {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
}

.checkin-page .choice-pill.is-selected > i { background: var(--sc-native-magenta); color: #fff; }

body.app-authenticated :where(.modal-content, .care-modal-content) {
  border: 0 !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 24px 60px rgba(0, 43, 95, 0.2) !important;
}

body.app-authenticated :where(.table-responsive, .care-chart-shell, .sc-premium-chart) {
  border-radius: 14px;
  overflow: auto;
}

body.app-authenticated table { color: var(--sc-native-ink); }
body.app-authenticated table th { color: var(--sc-native-muted); font-size: 0.73rem; letter-spacing: 0.03em; text-transform: uppercase; }

.sc-capture-sheet__panel {
  border-radius: 24px 24px 0 0 !important;
  background: #fff !important;
  box-shadow: 0 -18px 46px rgba(0, 43, 95, 0.18) !important;
}

.sc-capture-sheet__item {
  min-height: 68px;
  border: 1px solid var(--sc-native-line) !important;
  border-radius: 14px !important;
}

/* Do not force background:#fff here — primary (Quick log) needs magenta soft fill. */
.sc-capture-sheet__item:not(.is-primary) {
  background: #fff !important;
}

.sc-capture-sheet__item > i {
  display: inline-grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 1.25rem;
  line-height: 1;
}

.sc-capture-sheet__item > i::before {
  display: block;
  font-family: bootstrap-icons !important;
  line-height: 1;
}

.sc-capture-sheet__item.is-primary > i {
  background: var(--sc-native-magenta) !important;
  color: #fff !important;
}

.sc-capture-sheet__item.is-primary > i::before {
  color: #fff !important;
}

.sc-product-more__feature > i,
.sc-mobile-drawer__feature > i {
  width: 42px !important;
  height: 42px !important;
  color: var(--sc-native-magenta) !important;
  font-size: 1.18rem !important;
}

.sc-product-more__link > i,
.sc-mobile-drawer__link > i {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px;
  color: var(--sc-native-magenta) !important;
}

.symptom-type-pill > i {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  font-size: 1.05rem;
}

.sc-capture-sheet__item.is-primary {
  border-color: rgba(201, 0, 90, 0.3) !important;
  background: var(--sc-native-magenta-soft) !important;
}

@media (max-width: 575.98px) {
  body.app-authenticated .fnd-safety-strip__inner { width: calc(100% - 1rem); }
  body.app-authenticated .fnd-safety-strip__inner span { max-width: 76%; }
  body.app-authenticated .fnd-parent-bar { display: none; }
  body.app-authenticated .sc-product-bar__inner { min-height: 72px; }
  /* Keep mobile logo in line with FND Connect (176px), not a tiny 34px mark */
  body.app-authenticated .sc-product-brand img {
    width: 176px;
    max-width: min(100%, 176px);
    height: auto;
    max-height: 64px;
  }
  body.app-authenticated .sc-product-burger { width: 44px; height: 44px; }

  .sc-native-today__welcome { align-items: center; }
  .sc-native-private span { display: none; }
  .sc-native-private { width: 38px; padding: 0; justify-content: center; }
  .sc-native-today__welcome h1 { font-size: 1.8rem; }

  .sc-native-card,
  .sc-native-pattern,
  .sc-native-guide { padding: 0.9rem; border-radius: 16px; }

  .sc-native-action { min-height: 82px; padding: 0.72rem; gap: 0.55rem; }
  .sc-native-action__icon { width: 38px; height: 38px; flex-basis: 38px; font-size: 1.08rem; }
  .sc-native-action strong { font-size: 0.84rem; }

  .sc-native-empty--action { grid-template-columns: 36px minmax(0, 1fr); }
  .sc-native-empty--action > :last-child { grid-column: 2; justify-self: start; }

  body.app-authenticated .modal-dialog.modal-dialog-scrollable {
    align-items: flex-end;
    min-height: 100%;
    margin: 0;
  }

  body.app-authenticated .modal-dialog.modal-dialog-scrollable .modal-content {
    max-height: 94dvh;
    border-radius: 24px 24px 0 0 !important;
  }
}

@media (min-width: 768px) {
  body.app-authenticated .sc-app-main,
  body.shell-focused .sc-app-main { padding: 1.5rem 1.5rem 3rem !important; }

  body.app-authenticated :where(.page-hero, .workspace-hero, .looking-ahead-hero),
  body.shell-focused :where(.page-hero, .workspace-hero, .looking-ahead-hero) { padding: 1.25rem !important; }

  .sc-native-actions { grid-template-columns: minmax(280px, 1.15fr) minmax(0, 1.85fr); }
  .sc-native-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sc-native-medication__dose { grid-template-columns: 42px auto minmax(0, 1fr) auto; align-items: center; }
  .sc-native-medication__dose .btn { grid-column: auto; width: auto; min-width: 112px; }
  .log-quick-duration-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .log-quick-duration-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .sc-native-today { gap: 1.25rem; }
  .sc-native-today__layout { grid-template-columns: minmax(0, 1.7fr) minmax(310px, 0.8fr); align-items: start; gap: 1.25rem; }
  .sc-native-today__side { position: sticky; top: 84px; }
  .sc-native-card { padding: 1.2rem; }
  .sc-native-action { min-height: 94px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Symptom capture — multi-select types (each becomes its own typeKey log row). */
.symptoms-native {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: 0.15rem;
  box-sizing: border-box;
}

.symptoms-native__logger {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 1.1rem 1rem 1.25rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 18px;
  background: #fff;
  box-sizing: border-box;
}

.symptoms-native__head {
  margin-bottom: 1rem;
}

.symptoms-native__head h1 {
  margin: 0.25rem 0 0.35rem;
  color: var(--sc-native-navy);
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.08;
}

.symptoms-native__head p {
  margin: 0;
  color: var(--sc-native-muted);
  font-size: 0.96rem;
}

.symptoms-native .symptom-form {
  display: grid;
  gap: 1rem;
}

.symptoms-native__search {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 15px;
  background: #fff;
  color: var(--sc-native-navy);
}

.symptoms-native__search i { font-size: 1.3rem; }

.symptoms-native__search input {
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sc-native-navy);
  font: inherit;
  font-size: 1rem;
}

.symptoms-native .symptom-type-groups {
  display: grid;
  gap: 0.75rem;
}

.symptoms-native .symptom-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.symptoms-native .symptom-type-pill {
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy);
  text-align: left;
  font-weight: 760;
  box-sizing: border-box;
}

.symptoms-native .symptom-type-pill i {
  width: 34px;
  flex: 0 0 34px;
  text-align: center;
  font-size: 1.35rem;
}

.symptoms-native .symptom-type-pill.is-selected {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta-soft, #fff0f6);
  color: var(--sc-native-magenta);
  box-shadow: 0 4px 14px rgba(201, 0, 90, 0.1);
}

.symptoms-native .symptom-type-pill.is-selected i {
  color: var(--sc-native-magenta);
}

.symptoms-native .symptom-type-pill.is-custom {
  border-style: dashed;
}

.symptoms-native .symptom-type-pill.is-custom.is-selected {
  border-style: solid;
}

.symptoms-native__yours-hint,
.symptoms-native__custom-note {
  margin: 0 0 0.55rem;
  color: var(--sc-native-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.symptoms-native__custom-note {
  margin: 0.45rem 0 0;
}

.symptoms-native .symptom-type-more {
  border: 0;
  background: transparent;
}

.symptoms-native .symptom-type-more > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--sc-native-magenta);
  font-weight: 780;
  list-style: none;
}

.symptoms-native .symptom-type-more > summary::-webkit-details-marker { display: none; }

.symptoms-native .symptom-type-more__body {
  display: grid;
  gap: 1rem;
  padding: 0.9rem 0 0;
}

.symptoms-native .symptom-type-group-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--sc-native-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.symptoms-native__severity,
.symptoms-native__relation {
  min-width: 0;
  margin: 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--sc-native-line);
}

.symptoms-native__severity legend,
.symptoms-native__relation legend {
  float: none;
  width: auto;
  margin: 0 0 0.7rem;
  color: var(--sc-native-navy);
  font-size: 1.15rem;
  font-weight: 820;
}

.symptoms-native__severity-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #f7f9fb;
  box-sizing: border-box;
}

.symptoms-native__severity-buttons button {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--sc-native-navy);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 780;
  box-shadow: 0 0 0 1px var(--sc-native-line);
}

.symptoms-native__severity-buttons button.is-selected {
  background: var(--sc-native-magenta);
  color: #fff;
  box-shadow: 0 0 0 1px var(--sc-native-magenta);
}

.symptoms-native .symptom-severity-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: var(--sc-native-navy);
  font-size: 0.76rem;
}

.symptoms-native .symptom-severity-scale span:nth-child(2) { text-align: center; }

.symptoms-native__severity > p {
  margin: 0.65rem 0 0;
  color: var(--sc-native-muted);
  text-align: center;
  font-size: 0.86rem;
}

.symptoms-native__started {
  min-height: 62px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
  color: var(--sc-native-navy);
}

.symptoms-native__started > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.1rem;
}

.symptoms-native__started span { display: grid; gap: 0.05rem; }
.symptoms-native__started small { color: var(--sc-native-muted); font-size: 0.72rem; }

.symptoms-native .symptom-segmented {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #f7f9fb;
  box-sizing: border-box;
}

.symptoms-native .symptom-seg-btn {
  min-width: 0;
  min-height: 52px;
  padding: 0.35rem 0.25rem;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--sc-native-navy);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 720;
  box-shadow: 0 0 0 1px var(--sc-native-line);
}

.symptoms-native .symptom-seg-btn.is-selected {
  background: var(--sc-native-magenta);
  color: #fff;
  box-shadow: 0 0 0 1px var(--sc-native-magenta);
}

@media (max-width: 575.98px) {
  .symptoms-native .symptom-segmented {
    grid-template-columns: 1fr 1fr;
  }
  .symptoms-native .symptom-seg-btn:first-child {
    grid-column: 1 / -1;
  }
}

.symptoms-native__details {
  overflow: hidden;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
}

.symptoms-native__details > summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--sc-native-navy);
  list-style: none;
}

.symptoms-native__details > summary::-webkit-details-marker { display: none; }
.symptoms-native__details > summary > span {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 0 0.7rem;
}
.symptoms-native__details > summary > span > i {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 10px;
}
.symptoms-native__details > summary strong { font-size: 0.85rem; }
.symptoms-native__details > summary small { color: var(--sc-native-muted); font-size: 0.72rem; }
.symptoms-native__details[open] > summary > i { transform: rotate(180deg); }
.symptoms-native .symptom-detail-body { padding: 1rem; border-top: 1px solid var(--sc-native-line); }

.symptoms-native .symptom-form-actions {
  display: grid;
  gap: 0.45rem;
}

.symptoms-native .symptom-save-btn { width: 100%; min-height: 56px; }
.symptoms-native__save-another {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--sc-native-magenta);
  font: inherit;
  font-weight: 760;
}
.symptoms-native__save-another:disabled { opacity: 0.45; }
.symptoms-native .symptom-form-hint { margin: -0.25rem 0 0; text-align: center; }

.symptoms-native__boundary {
  display: flex;
  gap: 0.55rem;
  margin: 0.2rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.76rem;
}

.symptoms-native__record-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sc-native-line);
}

.symptoms-native__record-head h2 { margin: 0.2rem 0 0; color: var(--sc-native-navy); font-size: 1.45rem; }

/* Mockup completion — energy guide. */
.energy-native {
  width: min(100%, 860px);
  margin-inline: auto;
}

.energy-native__head h1,
.planner-native__head h1 {
  margin: 0.25rem 0;
  color: var(--sc-native-navy);
  font-size: clamp(2rem, 7vw, 2.85rem);
  line-height: 1.08;
}

.energy-native__head p,
.planner-native__head p {
  margin: 0;
  color: var(--sc-native-muted);
}

.energy-native .sc-insights-tabs { margin: 1rem 0; }

.energy-native__dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.energy-native__dates button {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--sc-native-line);
  border-radius: 15px;
  background: #fff;
  color: var(--sc-native-navy);
  font: inherit;
}

.energy-native__dates button span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.energy-native__dates button strong { font-size: 1.55rem; line-height: 1.1; }
.energy-native__dates button.is-selected { border-color: var(--sc-native-navy); background: var(--sc-native-navy); color: #fff; }

.energy-native__capacity {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(210px, 1.2fr);
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 18px;
  background: #fff;
}

.energy-native__ring {
  --energy-capacity: 0%;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(#34a85e var(--energy-capacity), #e8ecef 0);
  transition: background 180ms ease;
}

.energy-native__ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: #fff;
}

.energy-native__ring > div {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: center;
  color: var(--sc-native-navy);
}

.energy-native__ring strong { font-size: 2.7rem; line-height: 1; }
.energy-native__ring span { font-size: 1.15rem; font-weight: 800; }
.energy-native__ring small { grid-column: 1 / -1; margin-top: 0.2rem; text-align: center; font-size: 0.88rem; font-weight: 750; }

.energy-native__capacity-copy { display: grid; }
.energy-native__capacity-copy p {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--sc-native-line);
  color: var(--sc-native-navy);
}
.energy-native__capacity-copy p:last-child { border-bottom: 0; }
.energy-native__capacity-copy b { font-size: 1.5rem; }
.energy-native__dot { width: 12px; height: 12px; border-radius: 50%; background: #34a85e; }
.energy-native__dot.is-reserve { background: #ffad22; }

.energy-native__windows {
  display: grid;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
}

.energy-native__window {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--sc-native-line);
  color: var(--sc-native-navy);
  text-decoration: none;
}

.energy-native__window:last-child { border-bottom: 0; }
.energy-native__window:hover { color: var(--sc-native-navy); background: #fbfcfd; }
.energy-native__window > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-green-soft);
  color: var(--sc-native-green);
  font-size: 1.15rem;
}
.energy-native__window strong { font-size: 0.93rem; }
.energy-native__window strong small { color: var(--sc-native-muted); font-size: 0.79rem; font-weight: 600; }
.energy-native__window em {
  padding: 0.3rem 0.55rem;
  border: 1px solid #8bc99e;
  border-radius: 9px;
  background: #edf8ef;
  color: #20723d;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 760;
}
.energy-native__window.is-medium-energy > span { background: #fff5dc; color: #aa6900; }
.energy-native__window.is-medium-energy em { border-color: #f0be61; background: #fff7e6; color: #895100; }
.energy-native__window.is-low-energy > span { background: var(--sc-native-danger-soft); color: var(--sc-native-danger); }
.energy-native__window.is-low-energy em { border-color: #e7a3a0; background: #fff2f0; color: #96312c; }

.energy-native__sweet-spot {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(201, 0, 90, 0.35);
  border-radius: 15px;
  background: #fff8fb;
  color: var(--sc-native-magenta);
}
.energy-native__sweet-spot > i { font-size: 2.2rem; }
.energy-native__sweet-spot span { display: grid; }
.energy-native__sweet-spot small { color: var(--sc-native-ink); }
.energy-native__plan { width: 100%; min-height: 58px; margin: 1rem 0; }

.energy-native__drivers { margin-top: 1.2rem; }
.energy-native__drivers h2 { color: var(--sc-native-navy); font-size: 1.25rem; }
.energy-native__drivers > a { display: block; margin-top: 0.75rem; color: var(--sc-native-navy); text-align: center; }
.energy-native__driver {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid var(--sc-native-line);
  color: var(--sc-native-navy);
}
.energy-native__driver > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-blue-soft);
}
.energy-native__driver small { color: var(--sc-native-muted); }
.energy-native__driver.is-sleep > span { background: #f3efff; color: #6544b3; }
.energy-native__driver.is-symptoms > span { background: #fff1de; color: #b86600; }
.energy-native__driver.is-activity > span { background: var(--sc-native-green-soft); color: var(--sc-native-green); }

.energy-native__full {
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
}
.energy-native__full > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  color: var(--sc-native-navy);
  font-weight: 760;
  list-style: none;
}
.energy-native__full > summary::-webkit-details-marker { display: none; }
.energy-native__full-body { padding: 0.85rem; border-top: 1px solid var(--sc-native-line); }

/* Activity planner — full-width list flow (override legacy 2-col card grids). */
.planner-native {
  width: min(100%, 720px);
  margin-inline: auto;
}

.planner-native__head { margin-bottom: 1rem; }
.planner-native__head h1 {
  margin: 0.25rem 0;
  color: var(--sc-native-navy);
  font-size: clamp(1.85rem, 5vw, 2.55rem);
}
.planner-native__head p {
  max-width: 40rem;
  margin: 0;
  color: var(--sc-native-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Journey steps */
.planner-native__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
}
.planner-native__step {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0.55rem 0.25rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 12px;
  background: #fff;
  color: var(--sc-native-muted);
  text-align: center;
}
.planner-native__step strong {
  display: block;
  color: var(--sc-native-navy);
  font-size: 0.72rem;
  font-weight: 800;
}
.planner-native__step small {
  display: block;
  font-size: 0.62rem;
  line-height: 1.2;
}
.planner-native__step-num {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-line);
  color: var(--sc-native-navy);
  font-size: 0.72rem;
  font-weight: 800;
}
.planner-native__step.is-active {
  border-color: var(--sc-native-navy);
  box-shadow: 0 4px 14px rgba(0, 43, 95, 0.08);
}
.planner-native__step.is-active .planner-native__step-num {
  background: var(--sc-native-navy);
  color: #fff;
}
.planner-native__step.is-done .planner-native__step-num {
  background: var(--sc-native-green, #228446);
  color: #fff;
}

.planner-native__panel {
  margin: 0 0 1rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
}
.planner-native__panel-head { margin-bottom: 0.75rem; }
.planner-native__panel-head--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.planner-native__panel-step {
  display: inline-block;
  margin-bottom: 0.2rem;
  color: var(--sc-native-magenta);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.planner-native__panel-head h2 {
  margin: 0;
  color: var(--sc-native-navy);
  font-size: 1.2rem;
}
.planner-native__panel-head p {
  margin: 0.3rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.planner-native__field-label {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--sc-native-navy);
  font-size: 0.78rem;
  font-weight: 800;
}
.planner-native__selection-summary {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: var(--sc-native-blue-soft, #eef4fb);
  color: var(--sc-native-navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.planner-native__selectors { display: grid; gap: 0.85rem; }

.planner-native .activity-day-tabs,
.planner-native .activity-window-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.15rem 0;
  scrollbar-width: none;
}
.planner-native .activity-day-tabs::-webkit-scrollbar,
.planner-native .activity-window-tabs::-webkit-scrollbar { display: none; }

.planner-native .activity-day-tab,
.planner-native .activity-window-tab {
  min-width: 5.5rem;
  min-height: 4.25rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.12rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 12px;
  background: #fff;
  color: var(--sc-native-navy);
  text-align: center;
}
.planner-native .activity-window-tab {
  min-width: 6.5rem;
  min-height: 4.75rem;
  grid-template-rows: auto auto auto;
}
.planner-native .activity-day-tab.is-selected,
.planner-native .activity-window-tab.is-selected {
  border-color: var(--sc-native-navy);
  background: var(--sc-native-navy);
  color: #fff;
}
.planner-native .activity-day-tab.is-selected strong,
.planner-native .activity-day-tab.is-selected span,
.planner-native .activity-window-tab.is-selected .activity-window-tab__label,
.planner-native .activity-window-tab.is-selected .activity-window-tab__energy,
.planner-native .activity-window-tab.is-selected .activity-window-tab__meta {
  color: inherit;
}
.planner-native .activity-day-tab strong { font-size: 0.9rem; }
.planner-native .activity-day-tab span { font-size: 0.72rem; opacity: 0.85; }
.planner-native .activity-window-tab__label {
  font-size: 0.78rem;
  font-weight: 800;
}
.planner-native .activity-window-tab__energy {
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1;
}
.planner-native .activity-window-tab__meta {
  max-width: 6.5rem;
  color: var(--sc-native-muted);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.2;
}
.planner-native .activity-window-tab.is-selected .activity-window-tab__meta { opacity: 0.9; }
.planner-native .activity-window-tab.is-high-energy { box-shadow: inset 0 -3px 0 #228446; }
.planner-native .activity-window-tab.is-medium-energy { box-shadow: inset 0 -3px 0 #ad6a00; }
.planner-native .activity-window-tab.is-low-energy { box-shadow: inset 0 -3px 0 var(--sc-native-magenta); }
.planner-native .activity-window-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Budget */
.planner-native__budget-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}
.planner-native__budget-numbers > span {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.25rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 12px;
  color: var(--sc-native-navy);
}
.planner-native__budget-numbers strong { font-size: 1.55rem; line-height: 1; }
.planner-native__budget-numbers small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--sc-native-muted);
  text-align: center;
}
.planner-native__budget-message {
  margin: 0 0 0.55rem;
  color: var(--sc-native-navy);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}
.planner-native .activity-budget-track {
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef2f6;
}
.planner-native .activity-budget-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sc-native-navy), var(--sc-native-magenta));
  transition: width 180ms ease;
}
.planner-native__budget-remaining,
.planner-native #activity-budget-remaining {
  display: block;
  margin-top: 0.4rem;
  color: var(--sc-native-muted);
  text-align: right;
  font-size: 0.76rem;
}
.planner-native .activity-budget-state.is-close .planner-native__budget-message,
.planner-native .activity-budget-state.is-over .planner-native__budget-message {
  color: var(--sc-native-magenta);
}

/* Selected plan + catalogue — single full-width rows (never 2 skinny columns) */
.planner-native .activity-selected-list,
.planner-native .activity-catalogue {
  overflow: hidden;
  margin-top: 0.15rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
  background: #fff;
}
.planner-native .activity-empty-plan {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding: 1.25rem 1rem;
  color: var(--sc-native-muted);
  text-align: center;
}
.planner-native .activity-empty-plan i { font-size: 1.5rem; color: var(--sc-native-navy); }
.planner-native .activity-empty-plan strong { color: var(--sc-native-navy); }
.planner-native .activity-empty-plan span { max-width: 22rem; font-size: 0.84rem; line-height: 1.4; }

.planner-native .activity-selected-row {
  min-height: 3.75rem;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto 2.5rem;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--sc-native-line);
}
.planner-native .activity-selected-row:last-child { border-bottom: 0; }
.planner-native .activity-selected-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
  font-size: 1.1rem;
}
.planner-native .activity-selected-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}
.planner-native .activity-selected-copy strong {
  color: var(--sc-native-navy);
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.planner-native .activity-selected-copy span {
  color: var(--sc-native-muted);
  font-size: 0.78rem;
}
.planner-native .activity-selected-total {
  color: var(--sc-native-navy);
  font-size: 0.95rem;
  white-space: nowrap;
}
.planner-native .activity-selected-row > button {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--sc-native-navy);
  border-radius: 50%;
  background: #fff;
  color: var(--sc-native-navy);
}
.planner-native__add {
  width: 100%;
  min-height: 3.25rem;
  margin-top: 0.7rem;
  border: 1px dashed var(--sc-native-navy);
  border-radius: 12px;
  background: #fff;
  color: var(--sc-native-navy);
  font: inherit;
  font-weight: 780;
}

/* Catalogue: force single column list — kills legacy 2-col grid that wraps to 1 word/line */
.planner-native .activity-group + .activity-group { border-top: 1px solid var(--sc-native-line); }
.planner-native .activity-group-head {
  padding: 0.85rem 0.9rem 0.45rem;
  background: #f8fafc;
}
.planner-native .activity-group-head strong {
  display: block;
  color: var(--sc-native-navy);
  font-size: 0.95rem;
}
.planner-native .activity-group-head span {
  display: block;
  margin-top: 0.15rem;
  color: var(--sc-native-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.planner-native .activity-card-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
.planner-native .activity-card {
  width: 100%;
  min-height: 4.25rem;
  display: grid !important;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto 2.5rem !important;
  align-items: center;
  gap: 0.75rem !important;
  padding: 0.8rem 0.9rem !important;
  border: 0 !important;
  border-top: 1px solid var(--sc-native-line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--sc-native-navy);
  text-align: left;
}
.planner-native .activity-card:hover,
.planner-native .activity-card:focus-visible {
  background: #f7fafc !important;
}
.planner-native .activity-card.is-selected {
  background: #fff7fa !important;
}
.planner-native .activity-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.planner-native .activity-card-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.planner-native .activity-card-copy strong {
  color: var(--sc-native-navy);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
.planner-native .activity-card-copy small {
  color: var(--sc-native-muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
}
.planner-native .activity-card-cost {
  color: var(--sc-native-navy);
  font-size: 0.9rem;
  font-weight: 850;
  white-space: nowrap;
}
.planner-native .activity-card-count {
  min-width: 1.75rem;
  color: var(--sc-native-magenta);
  font-size: 0.95rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}
.planner-native .activity-card-count:empty,
.planner-native .activity-card-count[hidden] { display: none; }
.planner-native .activity-card-add {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--sc-native-navy);
  border-radius: 50%;
  color: var(--sc-native-navy);
  background: #fff;
  flex-shrink: 0;
}
.planner-native .activity-card.is-selected .activity-card-add {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta);
  color: #fff;
}

.planner-native__actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.65rem;
  margin-top: 0.25rem;
}
.planner-native__save-status {
  min-height: 1.25rem;
  margin: 0.55rem 0 0;
  color: var(--sc-native-green, #228446);
  font-size: 0.84rem;
  font-weight: 700;
}
.planner-native .activity-add-feedback {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 1040;
  transform: translateX(-50%);
}
.planner-native .activity-clear-button {
  flex-shrink: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 10px;
  background: #fff;
  color: var(--sc-native-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.forecast-native__window.is-highest.is-high {
  border: 2px solid var(--sc-native-magenta);
  background: #fff8fb;
}

@media (max-width: 767.98px) {
  .symptoms-native__record-head { display: grid; align-items: start; }
  .symptoms-native__record-head .workspace-hero-tags { justify-content: flex-start; }
  .energy-native__capacity { grid-template-columns: 1fr 1fr; }
  .planner-native__budget-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .planner-native__steps { gap: 0.3rem; }
  .planner-native__step small { display: none; }
}

@media (max-width: 575.98px) {
  .symptoms-native__head h1,
  .energy-native__head h1,
  .planner-native__head h1 { font-size: 2rem; }
  .symptoms-native .symptom-type-pill { min-height: 60px; padding: 0.55rem 0.65rem; font-size: 0.8rem; }
  .symptoms-native .symptom-type-pill i { width: 28px; flex-basis: 28px; font-size: 1.15rem; }
  .symptoms-native .symptom-seg-btn { min-height: 60px; padding: 0.25rem; font-size: 0.66rem; }
  .symptoms-native .symptom-detail-row { grid-template-columns: 1fr; }
  .energy-native__capacity { grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0.85rem; }
  .energy-native__ring { width: 132px; height: 132px; }
  .energy-native__ring::before { width: 106px; height: 106px; }
  .energy-native__ring strong { font-size: 2.1rem; }
  .energy-native__capacity-copy p { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 0.45rem; padding: 0.7rem 0; }
  .energy-native__capacity-copy strong { font-size: 0.75rem; }
  .energy-native__capacity-copy b { font-size: 1.2rem; }
  .energy-native__window { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 0.5rem; padding-inline: 0.65rem; }
  .energy-native__window > i:last-child { display: none; }
  .energy-native__window strong { font-size: 0.82rem; }
  .energy-native__window strong small { display: block; margin-top: 0.15rem; font-size: 0.68rem; }
  .energy-native__driver { grid-template-columns: 36px minmax(0, 1fr) 20px; }
  .energy-native__driver small { display: none; }
  .planner-native .activity-day-tab { min-width: 5rem; }
  .planner-native .activity-window-tab { min-width: 5.75rem; }
  .planner-native__panel { padding: 0.85rem; }
  .planner-native__budget-numbers strong { font-size: 1.35rem; }
  .planner-native__budget-numbers small { font-size: 0.62rem; }
  .planner-native .activity-card {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto 2.25rem !important;
    gap: 0.55rem !important;
    padding: 0.7rem 0.75rem !important;
  }
  .planner-native .activity-card-copy strong { font-size: 0.92rem; }
  .planner-native .activity-selected-row {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto 2.25rem;
    gap: 0.5rem;
  }
  .planner-native__actions { grid-template-columns: 1fr; gap: 0.5rem; }
  .planner-native__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .symptoms-native .symptom-type-pill,
  .symptoms-native__details > summary > i,
  .energy-native__ring,
  .planner-native .activity-budget-track span {
    transition: none !important;
  }

  body.app-authenticated :where(.care-mobile-dock-link, .sc-product-nav__link, .sc-mobile-drawer a) {
    transition: none !important;
  }

  body.app-authenticated .care-mobile-dock-link.is-pending::after {
    animation: none !important;
    border-right-color: currentColor;
  }
}

/* Log plus: geometric cross (compact size to match fixed dock). */
body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus {
  position: relative;
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  display: block !important;
  margin: -14px auto 0 !important;
  border: 3px solid #fff !important;
  border-radius: 50% !important;
  background: var(--sc-native-magenta) !important;
  box-shadow: 0 4px 12px rgba(201, 0, 90, 0.25) !important;
  color: transparent !important;
  font-size: 0 !important;
}

body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus::before,
body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 99px;
  background: #fff;
  transform: translate(-50%, -50%);
}

body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus::before {
  width: 16px;
  height: 2px;
}

body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log .sc-dock-plus::after {
  width: 2px;
  height: 16px;
}

body.app-authenticated .care-mobile-dock-link.care-mobile-dock-log > span:last-child {
  margin-top: 0 !important;
  color: var(--sc-native-navy) !important;
}

/* Immediate navigation acknowledgement while the next server-rendered page is
   loading. This is feedback only; links keep their native navigation. */
body.app-authenticated .care-mobile-dock-link,
body.app-authenticated .sc-product-nav__link,
body.app-authenticated .sc-mobile-drawer a {
  transition: color 120ms ease, background-color 120ms ease, transform 90ms ease, opacity 120ms ease;
}

body.app-authenticated :where(.care-mobile-dock-link, .sc-product-nav__link, .sc-mobile-drawer a).is-pressed {
  transform: scale(0.96);
}

body.app-authenticated :where(.care-mobile-dock-link, .sc-product-nav__link, .sc-mobile-drawer a).is-pending {
  background: var(--sc-native-magenta-soft) !important;
  color: var(--sc-native-magenta) !important;
}

body.app-authenticated .care-mobile-dock-link.is-pending::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sc-dock-pending 650ms linear infinite;
}

body.app-authenticated.sc-is-navigating .sc-app-main {
  cursor: progress;
}

@keyframes sc-dock-pending {
  to { transform: rotate(360deg); }
}

/* Daily check-in — five calm decisions, with detail behind disclosure rows. */
.checkin-native {
  width: min(100%, 760px);
  display: grid;
  gap: 1.05rem;
}

.checkin-native__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.checkin-native__head .page-kicker {
  color: var(--sc-native-magenta);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkin-native__head .page-title {
  margin: 0.28rem 0 0.22rem;
  color: var(--sc-native-navy);
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  line-height: 1.08;
}

.checkin-native__head .page-subtitle {
  max-width: 560px;
  margin: 0;
  color: var(--sc-native-muted);
  font-size: 0.96rem;
}

.checkin-native__cancel {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.2rem;
  color: var(--sc-native-navy) !important;
  font-weight: 750;
  text-decoration: none;
}

.checkin-native__form {
  display: grid;
  gap: 0.9rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.checkin-scale,
.checkin-medication {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 17px;
  background: #fff;
}

.checkin-scale legend,
.checkin-medication legend {
  width: auto;
  float: none;
  margin: 0 0 0.75rem;
  color: var(--sc-native-navy);
  font-size: 1.04rem;
  font-weight: 820;
}

.checkin-scale__choices,
.checkin-medication__choices {
  display: grid;
  gap: 0.45rem;
}

.checkin-scale__choices {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.checkin-scale__choices button,
.checkin-medication__choices button {
  min-width: 0;
  min-height: 54px;
  border: 1px solid #ece9e5;
  border-radius: 12px;
  background: #faf9f7;
  color: var(--sc-native-navy);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 720;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.checkin-scale__choices button:hover,
.checkin-medication__choices button:hover {
  border-color: rgba(201, 0, 90, 0.35);
  transform: translateY(-1px);
}

.checkin-scale__choices button.is-selected {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta);
  color: #fff;
  box-shadow: 0 7px 18px rgba(201, 0, 90, 0.2);
}

.checkin-scale__caption {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.82rem;
}

.checkin-scale__caption i { color: var(--sc-native-navy); }

.checkin-native__disclosure {
  overflow: hidden;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
}

.checkin-native__disclosure > summary {
  min-height: 72px !important;
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  list-style: none;
}

.checkin-native__disclosure > summary::-webkit-details-marker { display: none; }
.checkin-native__disclosure > summary > span:nth-child(2) { display: grid; gap: 0.1rem; }
.checkin-native__disclosure > summary strong { color: var(--sc-native-navy); font-size: 0.88rem; }
.checkin-native__disclosure > summary small { color: var(--sc-native-muted); font-size: 0.76rem; }
.checkin-native__disclosure > summary > i { color: var(--sc-native-navy); transition: transform 150ms ease; }
.checkin-native__disclosure[open] > summary > i { transform: rotate(90deg); }

.checkin-native__row-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
  font-size: 1.15rem;
}

.checkin-native__disclosure-body {
  display: grid;
  gap: 1rem;
  padding: 0.15rem 0.9rem 1rem;
  border-top: 1px solid var(--sc-native-line);
}

.checkin-native__disclosure-body .checkin-section {
  padding: 0.85rem 0 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.checkin-native__disclosure-body .checkin-section h2 {
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
}

.checkin-medication__choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkin-medication__choices button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.checkin-medication__choices button.is-selected {
  border-color: var(--sc-native-magenta);
  background: var(--sc-native-magenta-soft);
  color: var(--sc-native-magenta);
  box-shadow: inset 0 0 0 1px var(--sc-native-magenta);
}

.checkin-medication__hint {
  margin: 0.65rem 0 0;
  color: var(--sc-native-muted);
  font-size: 0.76rem;
}

.checkin-native .checkin-actions {
  display: grid;
  gap: 0.45rem;
  padding: 0 !important;
}

.checkin-native .checkin-actions .btn {
  width: 100%;
  min-height: 56px;
  font-size: 1rem;
}

.checkin-native .checkin-actions > span {
  color: var(--sc-native-muted);
  font-size: 0.75rem;
  text-align: center;
}

/* Planning overview — mobile matches the selected four-window flow; desktop
   expands the same evidence into a weekly working surface. */
.looking-ahead-page--unified {
  max-width: 1240px;
}

.looking-ahead-page--unified .looking-ahead-hero {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.looking-ahead-page--unified .looking-ahead-hero .page-title {
  margin: 0.2rem 0;
  color: var(--sc-native-navy);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
}

.looking-ahead-page--unified .looking-ahead-hero .page-subtitle {
  max-width: 650px;
  margin: 0;
  color: var(--sc-native-muted);
}

.planning-native {
  display: grid;
  gap: 1rem;
}

.planning-native__status,
.planning-native__today,
.planning-native__week,
.planning-native__energy,
.planning-native__noticing,
.planning-native__help,
.planning-native__appointment,
.planning-native__evidence {
  border: 1px solid var(--sc-native-line);
  border-radius: 18px;
  background: #fff;
}

.planning-native__status {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
  padding: 1.35rem;
  border-color: #0a4a9a;
}

.planning-native__status-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-blue-soft);
  color: var(--sc-native-navy);
  font-size: 2rem;
}

.planning-native__status h2,
.planning-native h2 {
  margin: 0;
  color: var(--sc-native-navy);
  font-size: 1.12rem;
}

.planning-native__status p { margin: 0.3rem 0 0; color: var(--sc-native-ink); font-size: 0.86rem; }
.planning-native__boundary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c8d8ed;
  border-radius: 12px;
  background: #f7fbff;
  color: #154b94;
  font-size: 0.76rem;
  line-height: 1.3;
}

.planning-native__layout,
.planning-native__main,
.planning-native__side {
  display: grid;
  gap: 1rem;
}

.planning-native__today,
.planning-native__week,
.planning-native__energy,
.planning-native__noticing,
.planning-native__help,
.planning-native__appointment,
.planning-native__evidence {
  padding: 1rem;
}

.planning-native__windows {
  overflow: hidden;
  display: grid;
  margin: 0.85rem 0;
  border: 1px solid var(--sc-native-line);
  border-radius: 14px;
}

.planning-native__window {
  position: relative;
  min-height: 68px;
  display: grid;
  grid-template-columns: 46px minmax(0, auto) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.72rem;
  border: 0;
  border-bottom: 1px solid var(--sc-native-line);
  background: #fff;
  color: var(--sc-native-navy);
  text-align: left;
}

.planning-native__window:last-child { border-bottom: 0; }
.planning-native__window > span:first-child {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sc-native-blue-soft);
  color: #0a4a9a;
  font-size: 1.35rem;
}
.planning-native__window strong { font-size: 0.96rem; }
.planning-native__window small { color: #1c67bf; font-size: 0.84rem; }
.planning-native__window em {
  padding: 0.2rem 0.42rem;
  border-radius: 99px;
  background: var(--sc-native-navy);
  color: #fff;
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}
.planning-native__window.is-high {
  background: #fff8e8;
  box-shadow: inset 3px 0 #f3a500;
}
.planning-native__window.is-high > span:first-child { background: #f3a500; color: #fff; }
.planning-native__window.is-high small,
.planning-native__window.is-high > i { color: var(--sc-native-magenta); }
.planning-native__today > .btn { width: 100%; min-height: 52px; }

.planning-native__energy-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(130px, 0.9fr);
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
}

.planning-native__battery {
  position: relative;
  width: min(100%, 270px);
  height: 50px;
  padding: 5px;
  border: 3px solid var(--sc-native-navy);
  border-radius: 8px;
  background: #fff;
}

.planning-native__battery::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 13px;
  width: 7px;
  height: 18px;
  border-radius: 0 4px 4px 0;
  background: var(--sc-native-navy);
}

.planning-native__battery > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--sc-native-navy) 0 18px, transparent 18px 22px);
  transition: width 220ms ease;
}

.planning-native__energy-body strong { display: block; margin-top: 0.35rem; color: var(--sc-native-navy); font-size: 1.05rem; }
.planning-native__energy-body p { margin: 0; color: var(--sc-native-ink); font-size: 0.88rem; }
.planning-native__energy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-top: 0.9rem; }

.planning-native__noticing #insights-overview-findings ul {
  display: grid;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}
.planning-native__noticing #insights-overview-findings li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.7rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--sc-native-line);
}
.planning-native__noticing #insights-overview-findings li > span { color: var(--sc-native-muted); font-size: 0.72rem; }
.planning-native__noticing #insights-overview-findings li strong { color: var(--sc-native-navy); font-size: 0.86rem; }
.planning-native__noticing #insights-overview-findings li small { grid-column: 1 / -1; color: var(--sc-native-muted); font-size: 0.73rem; }
.planning-native__text-link { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--sc-native-magenta); font-weight: 760; }

.planning-native__section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}
.planning-native__section-head p { margin: 0.15rem 0 0; color: var(--sc-native-muted); font-size: 0.75rem; }
.planning-native__section-head > span { color: var(--sc-native-muted); font-size: 0.7rem; }
.planning-native__week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; margin-top: 0.8rem; background: var(--sc-native-line); border: 1px solid var(--sc-native-line); border-radius: 12px; overflow: hidden; }
.planning-native__week-grid article { min-width: 0; display: grid; justify-items: center; gap: 0.22rem; padding: 0.7rem 0.35rem; background: #fff; text-align: center; }
.planning-native__week-grid article > span { color: var(--sc-native-navy); font-size: 0.72rem; font-weight: 780; }
.planning-native__week-grid article > strong { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #e9f6ef; color: #16834a; font-size: 0.82rem; }
.planning-native__week-grid article.is-watch > strong { background: #fff2d8; color: #a66100; }
.planning-native__week-grid article.is-high > strong { background: #ffe6f0; color: var(--sc-native-magenta); }
.planning-native__week-grid article small { color: var(--sc-native-muted); font-size: 0.62rem; }

.planning-native__help > p,
.planning-native__appointment > p,
.planning-native__evidence > p { margin: 0.35rem 0 0.8rem; color: var(--sc-native-muted); font-size: 0.78rem; }
.planning-native__help article { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0.7rem; padding: 0.85rem 0; border-bottom: 1px solid var(--sc-native-line); }
.planning-native__help article strong { color: var(--sc-native-navy); font-size: 0.82rem; }
.planning-native__help article p { margin: 0.2rem 0 0; color: var(--sc-native-ink); font-size: 0.75rem; }
.planning-native__help > .btn,
.planning-native__appointment > .btn { width: 100%; margin-top: 0.8rem; }
.planning-native__evidence-rows { overflow: hidden; border: 1px solid var(--sc-native-line); border-radius: 12px; }
.planning-native__evidence-rows > * {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 36px 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--sc-native-line);
  background: #fff;
  color: var(--sc-native-navy) !important;
  text-align: left;
  text-decoration: none;
}
.planning-native__evidence-rows > *:last-child { border-bottom: 0; }
.planning-native__evidence-rows strong { font-size: 0.78rem; }
.planning-native__evidence-rows small { color: var(--sc-native-muted); font-size: 0.7rem; }
.planning-native__privacy { display: flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0 0.3rem; color: var(--sc-native-muted); font-size: 0.72rem; }
.planning-native__privacy span:last-child { margin-left: auto; }

/* Forecast — selected day and four rows first; the dense board remains as
   optional detail, retaining every existing forecast feature. */
.forecast-native {
  width: min(100%, 920px);
  margin-inline: auto;
}
.forecast-native__head { margin-bottom: 0.8rem; }
.forecast-native__head h1 { margin: 0.2rem 0; color: var(--sc-native-navy); font-size: clamp(2rem, 6vw, 2.8rem); }
.forecast-native__head p { max-width: 620px; margin: 0; color: var(--sc-native-muted); }
.forecast-native .sc-insights-tabs { margin-bottom: 1rem; }
.forecast-native__date-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 0.35rem; margin-bottom: 1rem; }
.forecast-native__date-nav > button { width: 44px; height: 56px; border: 0; background: transparent; color: var(--sc-native-navy); font-size: 1.35rem; }
.forecast-native__dates { display: flex; gap: 0.55rem; overflow-x: auto; padding: 2px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.forecast-native__dates::-webkit-scrollbar { display: none; }
.forecast-native__dates button { min-width: 76px; min-height: 68px; display: grid; place-items: center; align-content: center; gap: 0.05rem; scroll-snap-align: start; border: 1px solid var(--sc-native-line); border-radius: 12px; background: #fff; color: var(--sc-native-navy); }
.forecast-native__dates button span { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.forecast-native__dates button strong { font-size: 1.35rem; line-height: 1; }
.forecast-native__dates button.is-active { border: 2px solid var(--sc-native-magenta); color: var(--sc-native-magenta); box-shadow: 0 5px 15px rgba(201, 0, 90, 0.11); }
.forecast-native__day h2 { margin: 0 0 0.65rem; color: var(--sc-native-navy); font-size: 1.18rem; }
.forecast-native__windows { display: grid; gap: 0.5rem; }
.forecast-native__window {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.72rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 13px;
  background: #fff;
  color: var(--sc-native-navy);
  text-align: left;
}
.forecast-native__window-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; color: #228446; font-size: 1.15rem; }
.forecast-native__window > span:nth-child(2) { display: grid; gap: 0.12rem; }
.forecast-native__window > span:nth-child(2) strong { font-size: 0.86rem; }
.forecast-native__window > span:nth-child(2) small { color: var(--sc-native-muted); font-size: 0.72rem; }
.forecast-native__window-score { font-size: 0.84rem; font-weight: 800; }
.forecast-native__window.is-medium { color: #ad6a00; }
.forecast-native__window.is-high { border: 2px solid var(--sc-native-magenta); background: #fff7fa; color: var(--sc-native-magenta); box-shadow: 0 6px 18px rgba(201, 0, 90, 0.08); }
.forecast-native__window.is-high .forecast-native__window-icon { color: var(--sc-native-magenta); }
.forecast-native__window.is-medium .forecast-native__window-icon { color: #ad6a00; }
.forecast-native__window.is-empty { color: var(--sc-native-muted); }
.forecast-native__plan { width: 100%; min-height: 56px; margin-top: 0.85rem; }
.forecast-native__detail { display: grid; gap: 0.55rem; margin-top: 0.95rem; }
.forecast-native__disclosure { overflow: hidden; border: 1px solid var(--sc-native-line); border-radius: 13px; background: #fff; }
.forecast-native__disclosure > summary,
.forecast-native__full-board > summary { justify-content: space-between; gap: 1rem; padding: 0.7rem 0.9rem; list-style: none; color: var(--sc-native-navy); font-weight: 800; }
.forecast-native__disclosure > summary::-webkit-details-marker,
.forecast-native__full-board > summary::-webkit-details-marker { display: none; }
.forecast-native__disclosure > summary i,
.forecast-native__full-board > summary i { transition: transform 150ms ease; }
.forecast-native__disclosure[open] > summary i,
.forecast-native__full-board[open] > summary i { transform: rotate(180deg); }
.forecast-native__disclosure-body { padding: 0.75rem 0.9rem; border-top: 1px solid var(--sc-native-line); }
.forecast-native__reason { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; color: var(--sc-native-navy); font-size: 0.84rem; }
.forecast-native__reason small { color: var(--sc-native-muted); }
.forecast-native__privacy { display: flex; align-items: center; gap: 0.45rem; margin: 0.8rem 0; color: var(--sc-native-muted); font-size: 0.72rem; }
.forecast-native__full-board { overflow: hidden; border: 1px solid var(--sc-native-line); border-radius: 14px; background: #fff; }
.forecast-native__full-board-body { padding: 0.9rem; border-top: 1px solid var(--sc-native-line); }

/* Appointment reviews — output choice and diary evidence lead; the complete
   AI and PDF workspaces remain below for users who choose them. */
.reviews-native {
  max-width: 1120px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.reviews-native__hero { order: 1; display: block !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
.reviews-native__hero .page-title { margin: 0.25rem 0; color: var(--sc-native-navy); font-size: clamp(2rem, 5vw, 2.75rem); }
.reviews-native__hero .page-subtitle { margin: 0; color: var(--sc-native-muted); }
.reviews-native__paths {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  grid-template-columns: 1fr;
}
.reviews-native__path {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "media copy"
    "cta cta";
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--sc-native-line);
  border-radius: 16px;
  background: #fff;
}
.reviews-native__path-photo,
.reviews-native__path-icon {
  grid-area: media;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--sc-native-navy);
}
.reviews-native__path-icon {
  display: grid;
  place-items: center;
  color: var(--sc-native-magenta);
  font-size: 1.85rem;
  background: #fff7fb;
}
.reviews-native__path-icon.is-pdf { border-radius: 14px; }
.reviews-native__path-copy { grid-area: copy; min-width: 0; }
.reviews-native__path h2 { margin: 0; color: var(--sc-native-navy); font-size: 1.15rem; }
.reviews-native__path p { margin: 0.2rem 0 0; color: var(--sc-native-muted); font-size: 0.86rem; line-height: 1.35; }
.reviews-native__path-cta {
  grid-area: cta;
  justify-self: stretch;
  min-height: 2.75rem;
  width: 100%;
}
.reviews-native__privacy { display: flex; align-items: center; gap: 0.55rem; margin: 0.85rem 0 0; color: var(--sc-native-muted); font-size: 0.82rem; }
.reviews-native__privacy i { color: var(--sc-native-navy); }

/* Access banner sits between hero paths and the live workspace */
.reviews-native .reviews-access-banner { order: 2; margin: 0; }
.reviews-native #dr-mothew { order: 3; }
.reviews-native .sc-report-analytics { order: 4; }
.reviews-native #pdf-pack { order: 5; }
.reviews-native .reviews-history { order: 6; }

.reviews-native #dr-mothew[hidden] {
  display: none !important;
}

.reviews-access-banner.is-ready {
  border-color: rgba(47, 143, 114, 0.28);
  background: #f3fbf7;
}

@media (min-width: 720px) {
  .reviews-native__paths {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .reviews-native__path {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "media copy"
      "cta cta";
  }
  .reviews-native__path-cta {
    width: auto;
    justify-self: start;
    min-width: 10.5rem;
  }
}

.reviews-history-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.reviews-history-full-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 43, 95, 0.08);
}

.reviews-stream-caret {
  display: inline-block;
  width: 0.45rem;
  height: 1em;
  margin-left: 0.12rem;
  vertical-align: text-bottom;
  background: var(--sc-native-magenta, #c9005a);
  border-radius: 1px;
  animation: reviews-caret-blink 0.9s steps(1, end) infinite;
}

.reviews-countdown-live {
  font-weight: 750;
  color: var(--sc-native-magenta, #c9005a);
  white-space: nowrap;
}

@keyframes reviews-caret-blink {
  50% { opacity: 0; }
}

.reviews-bubble.is-streaming,
#typedResponseWrap.is-streaming {
  outline: 2px solid rgba(201, 0, 90, 0.12);
}

/*
 * Report analytics charts (By month / Time of day / Day of week).
 * These used to live only in sc-insights.css, which is not loaded on /reviews.
 * Keep them here so Appointment reviews always styles correctly.
 */
.sc-report-analytics__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
  border-top: 1px solid var(--sc-native-line, #e1e8f0);
  padding-top: 0.95rem;
}

.sc-report-analytics__card {
  padding: 0.9rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 43, 95, 0.08);
  background: #f7fafd;
  box-shadow: none;
}

.sc-report-analytics__card h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--sc-native-navy, #002b5f);
}

.sc-report-analytics__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 5.5rem;
}

.sc-report-analytics__col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
}

.sc-report-analytics__bar {
  width: 70%;
  max-width: 1.5rem;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #ed2b7b, #c9005a);
  min-height: 3px;
}

.sc-report-analytics__col span {
  font-size: 0.62rem;
  font-weight: 650;
  color: #5f6f84;
  text-align: center;
  line-height: 1.1;
}

.sc-hbar-list {
  display: grid;
  gap: 0.45rem;
}

.sc-hbar-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr 1.6rem;
  gap: 0.45rem;
  align-items: center;
}

.sc-hbar-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5f6f84;
}

.sc-hbar-track {
  height: 0.7rem;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.sc-hbar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ed2b7b, #c9005a);
  min-width: 0;
  transition: width 0.4s ease;
}

.sc-hbar-fill.is-navy {
  background: linear-gradient(90deg, #3d7ab5, #002b5f);
}

.sc-hbar-value {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sc-native-navy, #002b5f);
  text-align: right;
}

@media (max-width: 900px) {
  .sc-report-analytics__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .planning-native__status,
  .planning-native__week,
  .planning-native__evidence,
  .planning-native__help,
  .planning-native__appointment { display: none; }
  .planning-native__layout { display: block; }
  .planning-native__main,
  .planning-native__side { display: contents; }
  .planning-native__today { margin-bottom: 1rem; }
  .planning-native__energy { margin-bottom: 1rem; }
}

@media (min-width: 992px) {
  body.app-authenticated main.sc-app-main:has(> .looking-ahead-page--unified),
  body.app-authenticated main.sc-app-main:has(> .reviews-native) {
    width: min(100%, 1280px);
    max-width: 1280px !important;
  }
  .planning-native__layout { grid-template-columns: minmax(0, 2.1fr) minmax(290px, 0.9fr); align-items: start; }
  .planning-native__side { position: sticky; top: 92px; }
  /* Keep "Protect your energy" and today windows visible — they were
     incorrectly display:none on desktop, so energy looked "not loaded". */
}

/* Overview "Today’s windows" reuses Higher-chance times cards */
.planning-today-windows {
  margin-top: 0.65rem;
}
.planning-native__today .forecast-native__window {
  width: 100%;
  cursor: pointer;
}

/* Energy tab on Looking Ahead uses the same native board as /energy */
.energy-native--hub {
  max-width: 720px;
}
.energy-native--hub .energy-native__head {
  margin-bottom: 0.75rem;
}
.energy-native--hub .energy-native__head h2 {
  margin: 0.2rem 0;
  color: var(--sc-native-navy);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
}

@media (max-width: 575.98px) {
  .checkin-native__head .page-subtitle { font-size: 0.86rem; }
  .checkin-scale,
  .checkin-medication { padding: 0.85rem; }
  .checkin-scale__choices { gap: 0.32rem; }
  .checkin-scale__choices button { min-height: 50px; padding: 0.2rem; font-size: 0.75rem; }
  .checkin-medication__choices { grid-template-columns: 1fr; }
  .checkin-medication__choices button { min-height: 48px; justify-content: flex-start; padding-inline: 0.8rem; }
  .planning-native__window { grid-template-columns: 42px minmax(0, auto) minmax(0, 1fr) auto; gap: 0.45rem; padding-inline: 0.55rem; }
  .planning-native__window > i:last-child { display: none; }
  .planning-native__window em { position: absolute; right: 0.45rem; top: 0.3rem; }
  .planning-native__energy-body { grid-template-columns: 1fr; }
  .planning-native__energy-actions { grid-template-columns: 1fr 1fr; }
  .forecast-native__date-nav { grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .forecast-native__date-nav > button { width: 34px; }
  .forecast-native__dates button { min-width: 69px; }
  .forecast-native__window { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 0.5rem; }
  .forecast-native__window > i:last-child { display: none; }
  .forecast-native__window-icon { width: 36px; height: 36px; }
  .forecast-native__window > span:nth-child(2) strong { font-size: 0.78rem; }
  .reviews-native__path {
    gap: 0.65rem 0.75rem;
    padding: 0.85rem;
  }
  .reviews-native__path-photo,
  .reviews-native__path-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .checkin-scale__choices button,
  .checkin-medication__choices button,
  .checkin-native__disclosure > summary > i,
  .planning-native__battery > span,
  .forecast-native__disclosure > summary i,
  .forecast-native__full-board > summary i {
    transition: none !important;
  }
}

/* ── Permissions campaign (push + location + install) ───── */
body.sc-permissions-open {
  overflow: hidden;
}

.sc-permissions-campaign {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: end center;
  padding: 0;
}

.sc-permissions-campaign[hidden] {
  display: none !important;
}

.sc-permissions-campaign__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 45, 0.48);
  backdrop-filter: blur(2px);
}

.sc-permissions-campaign__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  max-height: min(92vh, 40rem);
  overflow: auto;
  margin: 0;
  padding: 1.15rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  border-radius: 1.1rem 1.1rem 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 43, 95, 0.22);
}

@media (min-width: 40rem) {
  .sc-permissions-campaign {
    place-items: center;
    padding: 1rem;
  }
  .sc-permissions-campaign__sheet {
    border-radius: 1rem;
    padding: 1.35rem 1.4rem 1.25rem;
  }
}

.sc-permissions-campaign__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.sc-permissions-campaign__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  background: #eef4fb;
  color: #002b5f;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.sc-permissions-campaign__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9005a;
}

.sc-permissions-campaign__head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
  line-height: 1.25;
  color: #002b5f;
}

.sc-permissions-campaign__lead {
  margin: 0 0 0.75rem;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.45;
}

.sc-permissions-campaign__why {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem 0.75rem 1.35rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sc-permissions-campaign__why li + li {
  margin-top: 0.4rem;
}

.sc-permissions-campaign__actions {
  display: grid;
  gap: 0.5rem;
}

.sc-permissions-campaign__actions .btn {
  justify-content: center;
  min-height: 2.75rem;
}

.sc-permissions-campaign__later {
  color: #64748b !important;
}

.sc-permissions-campaign__fineprint {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

/* Soft-nav view transitions (no design change — brief crossfade only) */
@supports (view-transition-name: none) {
  #main-content { view-transition-name: sc-main; }
}
::view-transition-old(sc-main),
::view-transition-new(sc-main) {
  animation-duration: 0.18s;
  animation-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(sc-main),
  ::view-transition-new(sc-main) { animation: none; }
}

/* Soft-nav view transitions (brief crossfade only) */
@supports (view-transition-name: none) {
  #main-content { view-transition-name: sc-main; }
}
::view-transition-old(sc-main),
::view-transition-new(sc-main) {
  animation-duration: 0.18s;
  animation-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(sc-main),
  ::view-transition-new(sc-main) { animation: none; }
}

/* Soft-nav: capture/log sheets used on every app route (must not depend on sc-insights) */
.sc-capture-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
}

.sc-capture-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.sc-capture-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 20, 40, 0.45);
  cursor: pointer;
}

.sc-capture-sheet__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 0.65rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 12, 32, 0.2);
  max-height: min(85vh, 32rem);
  overflow: auto;
}

/* Motion only when user has not asked for reduced motion (seizure-safe default). */
@media (prefers-reduced-motion: no-preference) {
  .sc-capture-sheet__panel {
    animation: sc-sheet-up 0.22s ease-out;
  }
  .sc-capture-sheet__item:hover,
  .sc-capture-sheet__item:focus-visible {
    transform: translateY(-1px);
  }
}

@keyframes sc-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sc-capture-sheet__handle {
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #d5dde7;
  margin: 0.2rem auto 0.85rem;
}

.sc-capture-sheet__panel h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--fnd-navy, #002b5f);
}

.sc-capture-sheet__sub {
  margin: 0.3rem 0 1rem;
  color: var(--fnd-muted, #5f6f84);
  font-size: 0.9rem;
}

/* Log mode sheet: three full-width options stacked for fast choice */
.sc-capture-sheet__grid--log {
  grid-template-columns: 1fr;
}

.sc-capture-sheet__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.sc-capture-sheet__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.9rem 0.85rem;
  border-radius: 16px;
  border: 1.5px solid var(--fnd-border, #dde4ec);
  text-decoration: none;
  color: var(--fnd-ink, #152238);
  background: #f8fafc;
  transition: border-color 0.12s ease;
}

/* Icon glyphs: ensure ::before (Bootstrap Icons) is visible inside the badge */
.sc-capture-sheet__item > i {
  display: inline-grid !important;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  margin: 0 0 0.25rem;
  border-radius: 12px;
  background: var(--sc-native-blue-soft, #e8f0fa);
  color: var(--fnd-navy, #002b5f);
  font-size: 1.25rem;
  line-height: 1;
  font-style: normal;
}

.sc-capture-sheet__item > i::before {
  display: block;
  font-family: bootstrap-icons !important;
  font-size: 1.25rem;
  line-height: 1;
  speak: never;
}

.sc-capture-sheet__item strong {
  font-size: 0.95rem;
}

.sc-capture-sheet__item span {
  font-size: 0.75rem;
  color: var(--fnd-muted, #5f6f84);
}

.sc-capture-sheet__item.is-primary {
  background: linear-gradient(145deg, #fff0f6, #ffe4ef);
  border-color: rgba(201, 0, 90, 0.28);
}

.sc-capture-sheet__item.is-primary > i {
  background: var(--fnd-magenta, #c9005a);
  color: #fff;
}

.sc-capture-sheet__item.is-primary > i::before {
  color: #fff;
}

.sc-capture-sheet__item:hover,
.sc-capture-sheet__item:focus-visible {
  border-color: var(--fnd-magenta, #c9005a);
  outline: none;
}

.sc-capture-sheet__cancel {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  text-align: center;
}

/* Quick links as buttons */

/* ── Permissions campaign (push + location + install) ───── */
body.sc-permissions-open {
  overflow: hidden;
}
.sc-permissions-campaign {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: end center;
  padding: 0;
}
.sc-permissions-campaign[hidden] {
  display: none !important;
}
.sc-permissions-campaign__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 45, 0.48);
  backdrop-filter: blur(2px);
}
.sc-permissions-campaign__sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 32rem);
  max-height: min(92vh, 40rem);
  overflow: auto;
  margin: 0;
  padding: 1.15rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  border-radius: 1.1rem 1.1rem 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(0, 43, 95, 0.22);
}
@media (min-width: 40rem) {
  .sc-permissions-campaign {
    place-items: center;
    padding: 1rem;
  }
  .sc-permissions-campaign__sheet {
    border-radius: 1rem;
    padding: 1.35rem 1.4rem 1.25rem;
  }
}
.sc-permissions-campaign__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}
.sc-permissions-campaign__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  background: #eef4fb;
  color: #002b5f;
  font-size: 1.25rem;
  flex: 0 0 auto;
}
.sc-permissions-campaign__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9005a;
}
.sc-permissions-campaign__head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
  line-height: 1.25;
  color: #002b5f;
}
.sc-permissions-campaign__lead {
  margin: 0 0 0.75rem;
  color: #334155;
  font-size: 0.98rem;
  line-height: 1.45;
}
.sc-permissions-campaign__why {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem 0.75rem 1.35rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 0.9rem;
  line-height: 1.4;
}
.sc-permissions-campaign__why li + li {
  margin-top: 0.4rem;
}
.sc-permissions-campaign__actions {
  display: grid;
  gap: 0.5rem;
}
.sc-permissions-campaign__actions .btn {
  justify-content: center;
  min-height: 2.75rem;
}
.sc-permissions-campaign__later {
  color: #64748b !important;
}
.sc-permissions-campaign__fineprint {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #64748b;
}

/* === UI polish batch 2026-07-28 === */

/* ── Forecast window detail sheet (fn-sheet) ───────────────── */
.fn-sheet.modal {
  --bs-modal-width: min(100vw - 1rem, 28rem);
}
.fn-sheet .modal-dialog,
.fn-sheet__dialog {
  margin: 0.75rem auto;
  max-width: min(100vw - 1rem, 28rem);
}
.fn-sheet .modal-content,
.fn-sheet__panel {
  border: 0 !important;
  border-radius: 1.15rem 1.15rem 0.85rem 0.85rem !important;
  background: #fff !important;
  box-shadow: 0 -8px 40px rgba(0, 43, 95, 0.18) !important;
  overflow: hidden;
}
.fn-sheet__handle {
  width: 2.5rem;
  height: 0.28rem;
  margin: 0.55rem auto 0.15rem;
  border-radius: 99px;
  background: #d5dee7;
}
.fn-sheet__head {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.5rem;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 1rem 0.85rem;
  border-bottom: 1px solid var(--sc-native-line, #e2e8f0);
}
.fn-sheet__period {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  color: #228446;
  font-size: 1.25rem;
}
.fn-sheet__period.is-medium { color: #ad6a00; }
.fn-sheet__period.is-high { color: var(--sc-native-magenta, #c9005a); }
.fn-sheet__kicker {
  margin: 0;
  color: var(--sc-native-magenta, #c9005a);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.fn-sheet__title {
  margin: 0.15rem 0 0.1rem;
  color: var(--sc-native-navy, #002b5f);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1.25;
}
.fn-sheet__sub {
  margin: 0;
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.86rem;
  line-height: 1.35;
}
.fn-sheet__close {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--sc-native-line, #e2e8f0);
  border-radius: 50%;
  background: #fff;
  color: var(--sc-native-navy, #002b5f);
}
.fn-sheet__body {
  padding: 0.95rem 1rem 1.15rem !important;
  display: grid;
  gap: 0.85rem;
}
.fn-sheet__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.fn-sheet__kpi {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--sc-native-line, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}
.fn-sheet__kpi span {
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.fn-sheet__kpi strong {
  color: var(--sc-native-navy, #002b5f);
  font-size: 1.15rem;
  font-weight: 850;
  line-height: 1.2;
}
.fn-sheet__kpi strong small {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sc-native-muted, #5f6f84);
}
.fn-sheet__kpi.is-high strong { color: var(--sc-native-magenta, #c9005a); }
.fn-sheet__kpi.is-medium strong { color: #ad6a00; }
.fn-sheet__note {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #eef4fb;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.82rem;
  line-height: 1.4;
}
.fn-sheet__section-title {
  margin: 0;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.95rem;
  font-weight: 820;
}
.fn-sheet__factors {
  display: grid;
  gap: 0.55rem;
}
.fn-sheet__factor {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--sc-native-line, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}
.fn-sheet__factor-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4fb;
  color: var(--sc-native-navy, #002b5f);
  font-size: 1rem;
}
.fn-sheet__factor.is-raise .fn-sheet__factor-icon {
  background: #fff1f7;
  color: var(--sc-native-magenta, #c9005a);
}
.fn-sheet__factor.is-ease .fn-sheet__factor-icon {
  background: #eef8ef;
  color: #228446;
}
.fn-sheet__factor-copy {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}
.fn-sheet__factor-copy strong {
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.9rem;
  font-weight: 820;
  line-height: 1.3;
}
.fn-sheet__factor-copy p {
  margin: 0;
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.8rem;
  line-height: 1.4;
}
.fn-sheet__factor-meta {
  display: grid;
  gap: 0.1rem;
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}
.fn-sheet__factor-meta span {
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.68rem;
  font-weight: 700;
}
.fn-sheet__factor-meta strong {
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.78rem;
}
.fn-sheet__empty {
  margin: 0;
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.86rem;
}
.fn-sheet__plan {
  width: 100%;
  min-height: 3.15rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

/* ── Meds pattern cards ───────────────────────────────────── */
.meds-insight-grid,
#medicationInsights {
  display: grid;
  gap: 0.75rem;
}
.meds-pattern-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--sc-native-line, #e2e8f0);
  border-radius: 14px;
  background: #fff;
}
.meds-pattern-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.meds-pattern-card__head h3 {
  margin: 0;
  color: var(--sc-native-navy, #002b5f);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.25;
}
.meds-pattern-card__head p {
  margin: 0.2rem 0 0;
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.82rem;
}
.meds-pattern-card__adherence {
  flex-shrink: 0;
  min-width: 3.25rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: #eef4fb;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.95rem;
  font-weight: 850;
  text-align: center;
}
.meds-pattern-card__signal {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}
.meds-pattern-card__signal.is-attention {
  background: #fff1f7;
  color: var(--sc-native-magenta, #c9005a);
}
.meds-pattern-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}
.meds-pattern-card__stats > div {
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem 0.65rem;
  border: 1px solid var(--sc-native-line, #e2e8f0);
  border-radius: 11px;
  background: #f8fafc;
}
.meds-pattern-card__stats strong {
  color: var(--sc-native-navy, #002b5f);
  font-size: 1.15rem;
  font-weight: 850;
}
.meds-pattern-card__stats span {
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}
.meds-pattern-card__note {
  margin: 0;
  color: var(--sc-native-muted, #5f6f84);
  font-size: 0.78rem;
  line-height: 1.4;
}
.meds-pattern-empty {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1.25rem 1rem;
  border: 1px dashed var(--sc-native-line, #e2e8f0);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--sc-native-muted, #5f6f84);
  text-align: center;
}
.meds-pattern-empty i {
  font-size: 1.4rem;
  color: var(--sc-native-navy, #002b5f);
}
.meds-pattern-empty strong {
  color: var(--sc-native-navy, #002b5f);
}
.meds-pattern-empty p {
  margin: 0;
  max-width: 26rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

/* ── Symptoms: legends inside bordered panels ─────────────── */
.symptoms-native__severity,
.symptoms-native__relation {
  margin: 0 !important;
  padding: 0.9rem 1rem 1rem !important;
  border: 1px solid var(--sc-native-line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-sizing: border-box;
}
.symptoms-native__severity legend,
.symptoms-native__relation legend {
  float: left !important;
  width: 100% !important;
  margin: 0 0 0.7rem !important;
  padding: 0 !important;
  color: var(--sc-native-navy) !important;
  font-size: 1.05rem !important;
  font-weight: 820 !important;
  line-height: 1.3 !important;
}
.symptoms-native__severity::after,
.symptoms-native__relation::after {
  content: "";
  display: table;
  clear: both;
}
.symptoms-native__severity-buttons {
  background: #f7f9fb !important;
}

/* Selected controls: navy bg + white text (not magenta-on-navy) */
.symptoms-native .symptom-type-pill.is-selected,
.symptoms-native .symptom-type-pill.is-custom.is-selected {
  border-color: var(--sc-native-navy) !important;
  background: var(--sc-native-navy) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 43, 95, 0.16) !important;
}
.symptoms-native .symptom-type-pill.is-selected i,
.symptoms-native .symptom-type-pill.is-custom.is-selected i {
  color: #fff !important;
}
.symptoms-native__severity-buttons button.is-selected {
  background: var(--sc-native-navy) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px var(--sc-native-navy) !important;
}
.symptoms-native .symptom-seg-btn.is-selected {
  background: var(--sc-native-navy) !important;
  color: #fff !important;
  border-color: var(--sc-native-navy) !important;
}
body.app-authenticated :where(.choice-btn.is-selected, .tag-pill.is-selected, .symptom-type-btn.is-selected, .symptom-segmented button.is-selected, .alerts-filter-btn.is-active, .choice-pill.is-selected) {
  background: var(--sc-native-navy) !important;
  color: #fff !important;
  border-color: var(--sc-native-navy) !important;
}
body.app-authenticated :where(.choice-btn.is-selected, .tag-pill.is-selected, .symptom-type-btn.is-selected, .choice-pill.is-selected) > i {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}
.log-quick-choice.is-selected,
.log-quick-duration.is-selected {
  border-color: var(--sc-native-navy) !important;
  background: var(--sc-native-navy) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.log-quick-choice.is-selected i {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

/* ── Energy planner: no horizontal breakout ───────────────── */
.planner-native {
  width: min(100%, 720px) !important;
  max-width: 100% !important;
  margin-inline: auto;
  padding-inline: 0.15rem;
  box-sizing: border-box;
  overflow-x: clip;
}
.planner-native * {
  max-width: 100%;
  box-sizing: border-box;
}
.planner-native .activity-day-tabs,
.planner-native .activity-window-tabs {
  max-width: 100%;
}
.planner-native__steps {
  max-width: 100%;
}
.planner-native__panel {
  max-width: 100%;
  overflow: hidden;
}

/* Dock label: room for descenders (g, y, p) */
@media (max-width: 991.98px) {
  body.app-authenticated .care-mobile-dock-link span {
    line-height: 1.35 !important;
    padding-bottom: 1px !important;
  }
  body.app-authenticated .care-mobile-dock,
  body.app-authenticated .sc-mobile-dock {
    height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.app-authenticated .care-mobile-dock-link {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
  }
}

/* ── App settings: customisable bottom dock ───────────────── */
.sc-dock-settings {
  margin-bottom: 1.25rem;
}
.sc-dock-preview {
  margin: 0 0 1.25rem;
  padding: 1rem 0.75rem 0.65rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(15, 40, 70, 0.06), rgba(15, 40, 70, 0.02));
  border: 1px solid rgba(15, 40, 70, 0.08);
}
.sc-dock-preview__bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.15rem;
  align-items: stretch;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  min-height: 56px;
  border-radius: 1.1rem;
  background: #0b1f36;
  box-shadow: 0 8px 28px rgba(8, 24, 48, 0.28);
  color: #fff;
}
.sc-dock-preview__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.25rem 0.1rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}
.sc-dock-preview__item i {
  font-size: 1.05rem;
  line-height: 1;
  color: #fff;
}
.sc-dock-preview__item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-dock-preview__item--log {
  color: #fff;
}
.sc-dock-preview__plus {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #e11d74;
  position: relative;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(225, 29, 116, 0.45);
}
.sc-dock-preview__plus::before,
.sc-dock-preview__plus::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 1px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.sc-dock-preview__plus::before {
  width: 0.7rem;
  height: 2px;
}
.sc-dock-preview__plus::after {
  width: 2px;
  height: 0.7rem;
}
.sc-dock-preview__item--more {
  opacity: 0.9;
}
.sc-dock-preview__hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(15, 40, 70, 0.62);
}
.sc-dock-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
.sc-dock-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.sc-dock-slot__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(15, 40, 70, 0.55);
  margin: 0;
}
.sc-dock-slot__select {
  font-size: 0.92rem;
}
.sc-dock-slot--fixed .sc-dock-slot__fixed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  background: rgba(15, 40, 70, 0.05);
  border: 1px dashed rgba(15, 40, 70, 0.18);
}
.sc-dock-slot__fixed strong {
  font-size: 0.95rem;
}
.sc-dock-slot__log-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #e11d74;
  position: relative;
  display: inline-block;
}
.sc-dock-slot__log-icon::before,
.sc-dock-slot__log-icon::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 1px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.sc-dock-slot__log-icon::before {
  width: 0.55rem;
  height: 2px;
}
.sc-dock-slot__log-icon::after {
  width: 2px;
  height: 0.55rem;
}
.sc-dock-settings__actions .page-note {
  font-size: 0.85rem;
}

/* ── Pull-to-refresh indicator ────────────────────────────── */
#sc-pull-refresh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(255,255,255,0.88));
  color: var(--sc-native-navy, #002b5f);
  font-size: 0.82rem;
  font-weight: 800;
  transition: height 0.12s ease, opacity 0.12s ease;
  opacity: 0;
}
#sc-pull-refresh.is-visible {
  opacity: 1;
}
#sc-pull-refresh.is-ready {
  color: var(--sc-native-magenta, #c9005a);
}
#sc-pull-refresh i {
  font-size: 1rem;
}
#sc-pull-refresh.is-refreshing i {
  animation: sc-ptr-spin 0.7s linear infinite;
}
@keyframes sc-ptr-spin {
  to { transform: rotate(360deg); }
}

/* Capture sheet 2×2 grid when 4 log options */
.sc-capture-sheet__grid--log {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
@media (max-width: 360px) {
  .sc-capture-sheet__grid--log {
    grid-template-columns: 1fr;
  }
}

/* === Safety strip dismiss (global) === */
/* Hide must live in always-loaded CSS (not sc-insights only). */
body.sc-safety-dismissed .fnd-safety-strip,
.fnd-safety-strip[hidden] {
  display: none !important;
}

body.app-authenticated .fnd-safety-strip__inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

body.app-authenticated .fnd-safety-strip__text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

body.app-authenticated .fnd-safety-strip__link {
  flex: 0 0 auto;
  min-height: 32px !important;
  padding-inline: 0.35rem !important;
  font-size: 0.75rem !important;
  white-space: nowrap;
}

/* Clean icon dismiss — not a bulky pill */
body.app-authenticated .fnd-safety-strip__dismiss {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0 0 0 0.15rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

body.app-authenticated .fnd-safety-strip__dismiss:hover,
body.app-authenticated .fnd-safety-strip__dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  outline: none;
}

body.app-authenticated .fnd-safety-strip__dismiss:active {
  transform: scale(0.96);
}

@media (max-width: 575.98px) {
  body.app-authenticated .fnd-safety-strip__inner {
    gap: 0.4rem;
  }
  body.app-authenticated .fnd-safety-strip__text {
    font-size: 0.68rem;
  }
  body.app-authenticated .fnd-safety-strip__dismiss {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.72rem;
  }
}

/* ── Shared-care workspace switcher + banner ─────────────── */
.sc-workspace-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.35rem;
  max-width: min(14rem, 42vw);
}
.sc-workspace-switcher__label {
  display: inline-flex;
  color: var(--sc-text-secondary, #5b6b7c);
  font-size: 1rem;
  line-height: 1;
}
.sc-workspace-switcher__select {
  appearance: none;
  border: 1px solid rgba(26, 75, 140, 0.22);
  background: #fff;
  color: var(--sc-text, #142033);
  border-radius: 999px;
  padding: 0.28rem 1.6rem 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none' stroke='%231a4b8c' stroke-width='2.2'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
}
.sc-workspace-banner {
  /* Shell-level host: sits above #main-content, always in document flow */
  position: relative;
  z-index: 5;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.85rem 0.35rem;
  background: transparent;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.sc-workspace-banner[hidden] {
  display: none !important;
}
.sc-workspace-banner__inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 75, 140, 0.1), rgba(61, 127, 217, 0.12));
  border: 1px solid rgba(26, 75, 140, 0.18);
  color: #142033;
  max-width: 1240px;
  margin: 0 auto;
}
.sc-workspace-banner__inner i,
.sc-workspace-banner__inner .sc-sf-icon {
  color: #1a4b8c;
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.sc-workspace-banner__copy {
  flex: 1 1 auto;
  min-width: 0;
}
.sc-workspace-banner__inner strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.25;
}
.sc-workspace-banner__inner span {
  display: block;
  font-size: 0.75rem;
  color: #445466;
  line-height: 1.3;
}
.sc-workspace-banner__inner .btn {
  margin-left: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
}
/* Blue accent on product bar when viewing shared — does not cover content */
body.sc-viewing-shared .sc-product-bar {
  box-shadow: inset 0 -2px 0 #3d7fd9;
}
/* When banner is a sibling before main, keep spacing tight under sticky bar */
.sc-app-shell > .sc-workspace-banner + main.sc-app-main,
.sc-app-shell > .sc-workspace-banner + .sc-page-head + main.sc-app-main {
  padding-top: 0.65rem !important;
}
.sc-care-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(20, 32, 51, 0.08);
}
.sc-care-row:last-child { border-bottom: 0; }
.sc-care-row__meta {
  display: block;
  font-size: 0.8rem;
  color: #5b6b7c;
}
.sc-care-row__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sc-care-row__actions select {
  max-width: 8.5rem;
  font-size: 0.8rem;
}
@media (max-width: 991.98px) {
  .sc-workspace-switcher {
    max-width: min(11.5rem, 48vw);
  }
  .sc-workspace-banner__inner {
    flex-wrap: wrap;
  }
  .sc-workspace-banner__inner .btn {
    margin-left: 0;
  }
}

/* ── Log sheet: Quick / Detailed / Cluster (PWA-style stack) ── */
.sc-capture-sheet__grid--log-modes {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.55rem !important;
}
.sc-capture-sheet__item.is-cluster {
  border-color: rgba(26, 75, 140, 0.28);
  background: linear-gradient(145deg, #f3f7fd, #e8f0fa);
}
.sc-capture-sheet__item.is-cluster > i {
  background: #1a4b8c;
  color: #fff;
}
.sc-capture-sheet__item.is-cluster > i::before {
  color: #fff;
}
.sc-capture-sheet__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.55rem;
  border-radius: 12px;
  color: var(--fnd-muted, #5f6f84);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: #f4f6f9;
  border: 1px solid rgba(20, 32, 51, 0.08);
}
.sc-capture-sheet__secondary:hover,
.sc-capture-sheet__secondary:focus-visible {
  color: var(--fnd-navy, #002b5f);
  border-color: rgba(26, 75, 140, 0.25);
}
/* Today primary is a button that opens the sheet */
button.sc-native-action {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  border: 0;
  background: inherit;
  color: inherit;
}
button.sc-product-cta {
  font: inherit;
  cursor: pointer;
  appearance: none;
  border: 0;
}

/* Cluster chooser card emphasis */
.log-mode-card.log-mode-cluster.is-featured {
  border-color: rgba(26, 75, 140, 0.32);
  background: linear-gradient(145deg, #f5f8fd, #eaf1fb);
}
.log-mode-card.log-mode-cluster.is-featured .log-mode-icon {
  background: #1a4b8c;
  color: #fff;
}

/* ── Native App Store shell: more PWA chrome, HIG-friendly ── */
html.sc-native-app body,
body.sc-native-app {
  /* Keep system fonts / large touch targets */
  -webkit-tap-highlight-color: transparent;
}
body.sc-native-app .fnd-parent-bar {
  display: none !important;
}
body.sc-native-app .sc-product-signout {
  display: none !important; /* native often has account-level sign-out */
}
body.sc-native-app .sc-product-bar {
  padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.18);
}
body.sc-native-app .care-mobile-dock {
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(255, 255, 255, 0.92) !important;
  border-top: 0.5px solid rgba(60, 60, 67, 0.18);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.06);
}
body.sc-native-app .sc-capture-sheet__panel {
  max-height: min(90dvh, 36rem);
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
}
body.sc-native-app .sc-app-main {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
body.sc-native-app .sc-workspace-banner {
  padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
}

/* Pattern insight card */
.sc-pattern-insight {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(26, 75, 140, 0.14);
  background: #f8fafc;
}
.sc-pattern-insight__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.sc-pattern-insight__head h3 {
  margin: 0;
  font-size: 1rem;
}
.sc-pattern-insight__meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #5b6b7c;
}
.sc-pattern-insight__body {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #142033;
  white-space: pre-wrap;
}
.sc-pattern-insight__body p:last-child { margin-bottom: 0; }
.sc-pattern-insight__status {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: #5b6b7c;
}


/* ===== SHIP v72: shared-care banner MUST push content (not overlay) ===== */
.sc-app-shell {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100%;
}
.sc-app-shell > .sc-product-bar {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sc-app-shell > .sc-workspace-banner {
  flex: 0 0 auto !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 40 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0.45rem 0.75rem !important;
  background: #eef3fa !important;
  border-bottom: 1px solid rgba(26, 75, 140, 0.18) !important;
  box-sizing: border-box !important;
}
.sc-app-shell > .sc-workspace-banner[hidden] {
  display: none !important;
  padding: 0 !important;
  border: 0 !important;
}
.sc-app-shell > .sc-workspace-banner .sc-workspace-banner__inner {
  display: flex !important;
  align-items: center !important;
  gap: 0.55rem !important;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.5rem 0.65rem !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 1px solid rgba(26, 75, 140, 0.16) !important;
}
.sc-app-shell > main.sc-app-main {
  flex: 1 1 auto !important;
  min-height: 0;
  /* clear sticky product bar + banner: content starts below both */
  position: relative !important;
  z-index: 1 !important;
}
/* Today primary log is a <button> — force same look as old <a> */
button.sc-native-action {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  text-align: left !important;
  font: inherit !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border-style: solid !important;
}
button.sc-native-action.sc-native-action--primary {
  min-height: 88px !important;
  justify-content: flex-start !important;
  border-color: var(--sc-native-magenta) !important;
  background: linear-gradient(135deg, #d60060, #c9005a) !important;
  color: #fff !important;
  box-shadow: 0 9px 24px rgba(201, 0, 90, 0.22) !important;
  padding: 0.85rem 1rem !important;
  border-radius: var(--sc-native-radius) !important;
}
button.sc-native-action.sc-native-action--primary strong { color: #fff !important; }
button.sc-native-action.sc-native-action--primary small { color: rgba(255,255,255,0.88) !important; }

/* Kill pull-to-refresh feel in WKWebView */
html.sc-native-app,
html.sc-native-app body,
body.sc-native-app,
body.sc-pwa-standalone {
  overscroll-behavior-y: none !important;
  overscroll-behavior: none !important;
}
#sc-pull-refresh { display: none !important; height: 0 !important; opacity: 0 !important; pointer-events: none !important; }

/* Build stamp for verifying live web layer */
.sc-web-build-stamp {
  font-size: 0.68rem;
  color: #8a97a8;
  text-align: center;
  padding: 0.35rem 0.5rem 0.75rem;
}

.sc-native-actions__log-modes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  margin-top: -0.35rem;
}
.sc-log-mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0.35rem 0.4rem;
  border-radius: 12px;
  border: 1.5px solid var(--sc-native-line);
  background: #fff;
  color: var(--sc-native-navy);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}
.sc-log-mode-chip.is-cluster {
  border-color: rgba(26, 75, 140, 0.35);
  background: #eef4fb;
}
