:root {
  --bg: #eef6ff;
  --app-inline-gutter: 18px;
  --app-card-radius: 24px;
  --app-nav-height: calc(52px + env(safe-area-inset-bottom, 0px));
  --app-background:
    linear-gradient(
      90deg,
      rgba(211, 229, 248, 0.72) 0%,
      rgba(242, 249, 255, 0.96) 18%,
      rgba(249, 252, 255, 0.99) 50%,
      rgba(242, 249, 255, 0.96) 82%,
      rgba(211, 229, 248, 0.72) 100%
    ),
    linear-gradient(180deg, #f8fbff 0%, #edf6ff 54%, #f7fbff 100%);
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --navy: #1d2c65;
  --navy-strong: #162451;
  --text: #213153;
  --muted: #8893a8;
  --line: #e8ebf2;
  --green: #31cf72;
  --coral: #f1523f;
  --gold: #fdcb08;
  --shadow: 0 18px 40px rgba(38, 50, 80, 0.12);
  --shadow-soft: 0 10px 24px rgba(38, 50, 80, 0.08);
}

.sr-only {
  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;
}

body.theme-dark {
  --surface: #171f34;
  --surface-soft: #202942;
  --text: #eef2ff;
  --muted: #9ca8c2;
  --line: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}

/* A 360px Android viewport is visibly denser than the 390-430px iOS target.
   Reduce type modestly while preserving the existing touch target sizes. */
html.platform-android {
  font-size: 15px;
  --app-inline-gutter: 16px;
  --app-card-radius: 22px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Inter", "SF Pro Display", "SF Pro Text", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text);
  background: var(--app-background);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-synthesis: none;
  touch-action: pan-x pan-y;
}

button,
input,
textarea,
select {
  font: inherit;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  min-height: 1.35em;
  text-align: left;
}

.app-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px 16px;
}

.phone-frame {
  width: min(100%, 430px);
  height: min(920px, calc(100vh - 32px));
  height: min(920px, calc(100dvh - 32px));
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid #dde3f0;
  background: var(--app-background);
  box-shadow: 0 24px 70px rgba(29, 44, 101, 0.16);
}

.phone-frame.is-app-starting .app-content,
.phone-frame.is-app-starting .bottom-nav,
.phone-frame.is-app-starting > .brand-strip,
.phone-frame.is-app-starting > .top-shell {
  visibility: hidden;
}

.offline-banner {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 18px;
  right: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 184, 27, 0.3);
  border-radius: 16px;
  background: rgba(255, 249, 231, 0.96);
  color: #8f6500;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 0 16px 34px rgba(29, 44, 101, 0.12);
  backdrop-filter: blur(12px);
}

.offline-banner[hidden] {
  display: none;
}

.offline-banner[data-tone="success"] {
  border-color: rgba(49, 207, 114, 0.28);
  background: rgba(234, 249, 240, 0.96);
  color: #1b8f49;
}

.offline-banner[data-tone="warning"] {
  border-color: rgba(239, 75, 67, 0.24);
  background: rgba(255, 241, 240, 0.96);
  color: #d63f36;
}

.offline-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ffb81b;
  box-shadow: 0 0 0 5px rgba(255, 184, 27, 0.16);
}

.offline-banner[data-tone="success"] .offline-dot {
  background: #31cf72;
  box-shadow: 0 0 0 5px rgba(49, 207, 114, 0.14);
}

.offline-banner[data-tone="warning"] .offline-dot {
  background: #ef4b43;
  box-shadow: 0 0 0 5px rgba(239, 75, 67, 0.13);
}

.phone-frame.drawer-open .side-drawer {
  transform: translateX(0);
}

.phone-frame.drawer-open .drawer-backdrop {
  opacity: 1;
}

.phone-frame.is-signed-out .brand-strip,
.phone-frame.is-signed-out .top-shell,
.phone-frame.is-signed-out .side-drawer,
.phone-frame.is-signed-out .drawer-backdrop,
.phone-frame.is-signed-out .bottom-nav {
  display: none;
}

.phone-frame.is-signed-out .app-content > section:not(.signin-page):not(.create-account-page):not(.forgot-password-page) {
  display: none;
}

.phone-frame.is-signed-out .app-content {
  padding-top: 0;
  padding-bottom: 0;
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 18px 8px;
  font-size: 0.95rem;
  color: #6f7991;
  font-weight: 600;
}

.brand-mark {
  width: 20px;
  height: 20px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-shell {
  margin: 8px 14px 0;
  padding: 20px 18px;
  border-radius: 24px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.brand-strip,
.top-shell {
  display: none;
}

.brand-strip.app-logo-strip,
.screen-logo-strip {
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
  min-height: 26px;
  margin: 0;
  padding: 0 20px 10px;
  background: transparent;
}

.brand-strip.app-logo-strip {
  display: none;
}

.phone-frame.screen-router-ready.is-home-screen:not(.is-signed-out) .brand-strip.app-logo-strip {
  display: flex;
}

.screen-logo-strip {
  display: flex;
}

.app-top-logo {
  display: block;
  width: clamp(66px, 19vw, 82px);
  max-height: 17px;
  object-fit: contain;
  transform: translateX(5px);
}

.top-icon,
.avatar {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.top-icon {
  cursor: pointer;
}

.header-icon,
.brand-shield-icon,
.alert-icon-svg,
.nav-glyph svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  padding: 0 12px;
}

.logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2px 0;
}

.brand-logo-image {
  display: block;
  width: min(100%, 146px);
  height: auto;
}

.brand-support {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.avatar {
  background: linear-gradient(135deg, #ffeebf, #ffd779);
  border: 2px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.profile-entry {
  cursor: pointer;
  padding: 0;
}

.avatar-portrait {
  position: relative;
  width: 28px;
  height: 28px;
}

.avatar-hair,
.avatar-face,
.avatar-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.avatar-hair {
  top: 1px;
  width: 18px;
  height: 10px;
  border-radius: 10px 10px 5px 5px;
  background: #213153;
}

.avatar-face {
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd9b3;
}

.avatar-body {
  bottom: 1px;
  width: 20px;
  height: 10px;
  border-radius: 10px 10px 4px 4px;
  background: #ffffff;
}

.app-content {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 18px 110px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--app-background);
}

.phone-frame.screen-router-ready .app-screen[hidden] {
  display: none !important;
}

.phone-frame.screen-router-ready:not(.is-home-screen):not(.is-auth-screen) .app-content {
  height: 100%;
  padding-top: 20px;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}

.phone-frame.screen-router-ready.is-auth-screen .app-content {
  height: 100%;
  padding: 0;
}

.phone-frame.screen-router-ready.is-auth-screen .bottom-nav {
  display: none;
}

.phone-frame.screen-router-ready:not(.is-home-screen) .app-content > .app-screen.is-screen-active {
  margin-top: 0;
}

.phone-frame.screen-router-ready .app-content > section[id].app-screen.is-screen-active {
  min-height: calc(100% - 20px);
}

.phone-frame.screen-router-ready .app-screen.is-screen-active:not(.is-screen-static) {
  animation: screen-slide-in 240ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.phone-frame[data-screen-direction="back"] .app-screen.is-screen-active:not(.is-screen-static) {
  animation-name: screen-slide-back-in;
}

@keyframes screen-slide-in {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.account-topbar.account-topbar-compact {
  min-height: 42px !important;
  grid-template-columns: 44px 1fr;
  padding: 4px 6px 0 !important;
}

.account-topbar.account-topbar-compact::after {
  display: none !important;
}

@keyframes screen-slide-back-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-frame.screen-router-ready .app-screen.is-screen-active:not(.is-screen-static) {
    animation: none;
  }
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 34, 0.34);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 20;
}

.side-drawer {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(80%, 310px);
  background: linear-gradient(180deg, #f7f8fc 0%, #eef1f7 100%);
  border-right: 1px solid rgba(29, 44, 101, 0.08);
  box-shadow: 14px 0 40px rgba(18, 29, 61, 0.15);
  transform: translateX(-104%);
  transition: transform 240ms ease;
  z-index: 30;
}

.drawer-scroll {
  height: 100%;
  overflow: auto;
  padding: 18px 16px 28px;
}

.drawer-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(29, 44, 101, 0.12);
  margin: 10px auto 8px;
}

.drawer-brandline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #77839c;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.profile-card {
  position: relative;
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.drawer-close svg,
.row-icon svg,
.profile-edit-pill svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-kicker {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.9;
}

.profile-avatar-wrap {
  position: relative;
  width: fit-content;
  margin: 16px auto 12px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffefc2, #ffd48b);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.avatar-portrait-large {
  width: 52px;
  height: 52px;
}

.avatar-portrait-large .avatar-hair {
  width: 30px;
  height: 16px;
}

.avatar-portrait-large .avatar-face {
  top: 10px;
  width: 24px;
  height: 24px;
}

.avatar-portrait-large .avatar-body {
  width: 34px;
  height: 16px;
  background: #22a8a4;
}

.status-dot {
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #30d86a;
  border: 3px solid var(--navy);
}

.profile-card h2 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.1;
}

.profile-edit-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-edit-pill svg {
  width: 15px;
  height: 15px;
}

.settings-group {
  margin-top: 18px;
}

.settings-group h3 {
  margin: 0 0 10px;
  color: #9aa4b8;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.settings-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.settings-row {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid #edf0f6;
  background: transparent;
  color: #53617f;
  text-align: left;
}

.settings-card .settings-row:last-child {
  border-bottom: 0;
}

.row-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4f6fb;
  color: var(--navy);
}

.row-label {
  font-weight: 700;
}

.row-arrow,
.row-value {
  color: #b2bac9;
  font-weight: 700;
}

.switch-row {
  cursor: pointer;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #dce2ee;
  transition: background 180ms ease;
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease;
}

.switch input:checked + .switch-slider {
  background: #30d86a;
}

.switch input:checked + .switch-slider::after {
  transform: translateX(20px);
}

.logout-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: #f15446;
  font-size: 1rem;
  font-weight: 800;
}

.drawer-version {
  margin: 8px 0 0;
  text-align: center;
  color: #b2bac9;
  font-size: 0.72rem;
  font-weight: 700;
}

.welcome-panel h1,
.section-head h2,
.record-date {
  margin: 0;
}

.welcome-panel h1 {
  font-size: 1.86rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.home-checkin-block {
  margin-top: 18px;
}

.section-pill,
.delete-btn,
.primary-btn,
.nav-item {
  border: 0;
  cursor: pointer;
}

.signin-page,
.create-account-page {
  min-height: 720px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 14%, rgba(49, 207, 114, 0.2), transparent 24%),
    linear-gradient(180deg, var(--navy) 0%, #17214b 38%, #f1f3f7 38%, #f1f3f7 100%);
  box-shadow: var(--shadow-soft);
}

.create-account-page {
  background:
    radial-gradient(circle at 18% 10%, rgba(253, 203, 8, 0.18), transparent 23%),
    linear-gradient(180deg, var(--navy) 0%, #17214b 31%, #f1f3f7 31%, #f1f3f7 100%);
}

.signin-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 8px 24px;
  color: white;
}

.signin-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signin-hero h1 {
  margin: 8px 0 10px;
  font-size: 2.18rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.signin-hero p {
  max-width: 320px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
}

.signin-card {
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 42px rgba(29, 44, 101, 0.14);
}

.signin-form {
  margin-top: 0;
}

.signin-panel {
  display: grid;
  gap: 12px;
}

.signin-form label {
  display: grid;
  gap: 8px;
  color: #657089;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.signin-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
  text-transform: none;
}

.signin-form input:focus {
  border-color: rgba(29, 44, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

.code-field {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
}

.code-field button {
  border: 0;
  border-radius: 16px;
  background: #eef3ff;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.signin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.remember-row {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px !important;
  color: #7c879b !important;
  font-size: 0.78rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.remember-row input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--navy);
}

.link-button,
.signin-legal button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.auth-inline-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f2f5fb;
  color: #6f7b92;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.auth-inline-status[data-tone="success"] {
  background: #eaf9f0;
  color: #1f9b52;
}

.auth-inline-status[data-tone="warning"] {
  background: #fff4df;
  color: #bc7700;
}

.signin-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.26);
  font-weight: 900;
  cursor: pointer;
}

.signin-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: #9aa4b8;
  font-size: 0.78rem;
  font-weight: 900;
}

.signin-divider::before,
.signin-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #edf0f6;
}

.social-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.social-login {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: white;
  color: #4f5d76;
  font-weight: 900;
  cursor: pointer;
}

.social-login span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.google-mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.apple-login {
  border-color: #000;
  background: #000;
  color: #fff;
}

.apple-mark {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1;
}

.social-login:disabled {
  cursor: wait;
  opacity: 0.66;
}

.signin-legal {
  margin: 16px 0 0;
  text-align: center;
  color: #7c879b;
  font-size: 0.84rem;
  font-weight: 800;
}

.signin-security {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 4px 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.signin-security span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf9f0;
  color: #2fbf67;
}

.signin-security svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signin-security p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.4;
}

.account-topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  color: white;
}

.account-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.12rem;
}

.account-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.account-back svg,
.preference-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-intro {
  padding: 8px 8px 26px;
  color: white;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-intro h1 {
  margin: 12px 0 10px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.account-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.account-form {
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 42px rgba(29, 44, 101, 0.14);
}

.account-field-grid {
  display: grid;
  gap: 12px;
}

.account-form label {
  display: grid;
  gap: 8px;
  color: #657089;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-form input[type="text"],
.account-form input[type="email"],
.account-form input[type="tel"],
.account-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
}

.account-form input:focus {
  border-color: rgba(29, 44, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

.account-preferences {
  margin-top: 16px;
}

.account-preferences h3 {
  margin: 0 0 10px;
  color: #8d98ab;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preference-row {
  min-height: 70px;
  display: grid !important;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px !important;
  padding: 12px 0;
  border-top: 1px solid #eef1f6;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.preference-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3ff;
  color: var(--navy);
}

.preference-row strong {
  display: block;
  color: #4f5d76;
  font-size: 0.92rem;
  font-weight: 900;
}

.preference-row small {
  display: block;
  margin-top: 3px;
  color: #8d98ab;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.preference-row .switch input:checked + .switch-slider {
  background: var(--navy);
}

.terms-row {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px !important;
  row-gap: 0 !important;
  margin-top: 10px;
  color: #7c879b !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.35;
  text-transform: none !important;
}

.terms-row input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  border: 2px solid #d6dce8;
  border-radius: 8px;
  background: #ffffff;
  accent-color: var(--navy);
}

.terms-row input:checked {
  border-color: var(--navy);
  background: var(--navy);
}

.terms-row input:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid #ffffff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.account-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.26);
  font-weight: 900;
  cursor: pointer;
}

.account-switch {
  margin: 16px 0 0;
  text-align: center;
  color: #7c879b;
  font-size: 0.84rem;
  font-weight: 800;
}

.account-switch button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.health-card {
  display: grid;
  grid-template-rows: 54px 1fr;
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.health-card[data-target],
.home-weight-card[data-target] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.health-card[data-target]:focus-visible,
.home-weight-card[data-target]:focus-visible {
  outline: 3px solid rgba(29, 44, 101, 0.24);
  outline-offset: 4px;
}

.card-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 54px;
  padding: 12px 44px 12px 16px;
  color: white;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.card-corner-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  opacity: 0.96;
}

.card-corner-icon svg,
.home-weight-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.health-card .card-top {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.health-card[data-status="normal"] .card-top {
  background: linear-gradient(135deg, #20b95f, #36d47a);
}

.health-card[data-status="low"] .card-top {
  background: linear-gradient(135deg, #2f86b7, #1d4f8f);
}

.health-card[data-status="caution"] .card-top {
  background: linear-gradient(135deg, #ffb300, #ffca28);
}

.health-card[data-status="danger"] .card-top {
  background: linear-gradient(135deg, #e44236, #f35a4d);
}

.health-card[data-status="waiting"] .card-top {
  background: linear-gradient(135deg, #758096, #9aa5b7);
}

.card-body {
  min-height: 166px;
  display: grid;
  grid-template-rows: minmax(82px, auto) minmax(30px, auto) 30px;
  align-items: start;
  row-gap: 6px;
  padding: 14px 16px 14px;
}

.card-body strong {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  margin-top: 0;
  color: var(--navy);
  font-size: 1.82rem;
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.card-body small {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.card-body small::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(47, 202, 103, 0.14);
}

.goal-chip {
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding: 6px 9px;
  border-radius: 12px;
  background: #f4f6fb;
  color: #8792a7;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.goal-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-chip b {
  color: var(--navy);
  font-size: clamp(0.62rem, 2.5vw, 0.72rem);
  letter-spacing: -0.03em;
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-status-caution::before {
  box-shadow: 0 0 0 4px rgba(255, 202, 40, 0.22);
}

.metric-status-low::before {
  box-shadow: 0 0 0 4px rgba(47, 134, 183, 0.16);
}

.metric-status-danger::before {
  box-shadow: 0 0 0 4px rgba(240, 77, 66, 0.14);
}

.metric-status-waiting::before {
  box-shadow: 0 0 0 4px rgba(152, 164, 183, 0.14);
}

.metric-status-normal {
  color: #2fca67 !important;
}

.metric-status-low {
  color: #2f86b7 !important;
}

.metric-status-caution {
  color: #ffb300 !important;
}

.metric-status-danger {
  color: #f04d42 !important;
}

.metric-status-waiting {
  color: #98a4b7 !important;
}

.section-block {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-kicker {
  margin: 0 0 4px;
  color: #69758f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.section-head h2 {
  font-size: 0.98rem;
  color: #4b5a77;
}

.section-badge,
.section-pill {
  padding: 9px 14px;
  border-radius: 999px;
  background: white;
  color: #6b7791;
  box-shadow: var(--shadow-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.form-block,
.empty-state,
.alert-card {
  box-shadow: var(--shadow-soft);
}

.home-weight-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.home-weight-main {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 17px 76px 17px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(29, 44, 101, 0.96), rgba(38, 60, 128, 0.9));
  color: white;
}

.home-weight-icon {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
}

.home-weight-main span,
.home-weight-grid span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-weight-main strong {
  font-size: 1.92rem;
  line-height: 1;
}

.home-weight-main small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.home-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.home-weight-grid div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
  background: #f6f8fc;
}

.home-weight-grid span {
  color: #8a94a9;
  font-size: 0.68rem;
}

.home-weight-grid strong {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 900;
}

.alert-card,
.form-block,
.record-item,
.empty-state {
  border-radius: 20px;
  background: white;
}

.alert-card {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 13px 14px;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.alert-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff2bf;
  color: #f0b100;
}

.alert-copy {
  flex: 1;
}

.alert-copy strong {
  display: block;
  font-size: 0.94rem;
  color: #455470;
}

.alert-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.goals-screen {
  margin-top: 24px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
  border-radius: 22px;
  background: #f1f3f7;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.goals-topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 16px 18px;
  background: var(--navy);
  color: white;
}

.goals-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
}

.goals-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.goals-back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.goals-intro,
.history-intro {
  padding: 18px 22px 8px;
}

.goals-intro h2,
.history-intro h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.35rem;
}

.goals-intro p,
.history-intro p {
  margin: 4px 0 0;
  color: #8a94a9;
  font-weight: 700;
}

.goal-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0 14px;
  scrollbar-width: none;
}

.goal-tabs::-webkit-scrollbar {
  display: none;
}

.goal-tab {
  flex: 0 0 auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  border: 1px solid #e6eaf2;
  border-radius: 999px;
  background: white;
  color: #657087;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.goal-tab.is-active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.goals-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px 18px;
}

.goal-card {
  display: block;
  padding: 0 18px;
  border: 1px solid rgba(29, 44, 101, 0.06);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(50, 76, 125, 0.09);
  overflow: hidden;
}

.goal-card.is-active {
  display: block;
}

.goal-card-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 80px;
  gap: 10px;
  align-items: start;
  padding: 20px 0 16px;
}

.goal-card-copy h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.12rem;
  line-height: 1.2;
}

.goal-summary-label {
  display: block;
  margin-top: 12px;
  color: #8a94a9;
  font-size: 0.76rem;
  font-weight: 800;
}

.goal-summary-value,
.goal-current-value {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.goal-summary-value.target-status-normal {
  color: #2fca67;
}

.goal-summary-value.target-status-low {
  color: #2f86b7;
}

.goal-summary-value.target-status-caution {
  color: #ffb300;
}

.goal-summary-value.target-status-danger {
  color: #f04d42;
}

.goal-summary-value.target-status-waiting {
  color: #7f8aa0;
}

.goal-progress-ring {
  --goal-progress: 0;
  --goal-color: #9aa6ba;
  width: 80px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--goal-color) calc(var(--goal-progress) * 1%), #e8eef8 0);
  transition: background 180ms ease;
}

.goal-progress-ring[data-status="achieved"] {
  --goal-color: #29b864;
}

.goal-progress-ring[data-status="close"] {
  --goal-color: #facc15;
}

.goal-progress-ring[data-status="needs-attention"] {
  --goal-color: #e4544f;
}

.goal-progress-ring[data-status="no-data"] {
  --goal-color: #9aa6ba;
}

.goal-progress-ring[data-status="no-goal"] {
  --goal-color: #9aa6ba;
}

.goal-progress-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: white;
}

.goal-progress-ring div {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.goal-progress-ring span {
  display: block;
  width: 58px;
  max-width: 58px;
  color: var(--goal-color);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
}

.goal-edit-toggle {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  border: 0;
  border-top: 1px solid #e9edf4;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.goal-edit-toggle span:last-child {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.goal-card.is-editing .goal-edit-toggle span:last-child {
  transform: rotate(90deg);
}

.goal-editor {
  display: none;
  gap: 14px;
  padding: 4px 0 18px;
}

.goal-card.is-editing .goal-editor {
  display: grid;
}

.goal-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.goal-card-save,
.goal-card-reset {
  min-height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.goal-card-save {
  background: var(--navy);
  color: white;
}

.goal-card-reset {
  background: #eef3fb;
  color: var(--navy);
}

.goal-card-save:disabled,
.goal-card-reset:disabled {
  cursor: wait;
  opacity: 0.68;
}

.goal-unit-picker {
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f6;
}

.goal-input-grid {
  display: grid;
  gap: 0;
}

.goal-input-stack {
  grid-template-columns: 1fr;
}

.goal-number-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 6px 12px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid #edf0f6;
  border-radius: 0;
  background: white;
}

.goal-number-field:not(:first-child) {
  padding-top: 14px;
}

.goal-card > .goal-number-field {
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.goal-input-grid .goal-number-field:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.goal-number-field span:first-child {
  grid-column: 1 / -1;
  color: #8a94a9;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.goal-number-field input {
  width: 100%;
  grid-column: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  color: var(--navy);
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.goal-number-field input::placeholder {
  color: #d8dee8;
  opacity: 1;
}

.goal-number-field input:focus {
  box-shadow: none;
}

.goal-number-field strong {
  grid-column: 2;
  padding-bottom: 9px;
  color: #7f8aa0;
  font-size: 0.95rem;
  font-weight: 900;
}

.goal-number-field strong span:first-child {
  display: none;
}

.goal-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.goal-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.red-goal {
  color: #f05258;
  background: #fff0f1;
}

.blue-goal {
  color: #4d7cff;
  background: #edf3ff;
}

.orange-goal {
  color: #ff953a;
  background: #fff2e6;
}

.goals-save {
  margin-top: 4px;
  min-height: 56px;
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(29, 44, 101, 0.18);
}

@media (max-width: 390px) {
  .goal-card-summary {
    grid-template-columns: 38px minmax(0, 1fr) 74px;
    gap: 8px;
  }

  .goal-progress-ring {
    width: 74px;
  }
}

.form-block {
  padding: 0 0 16px;
  overflow: hidden;
}

#add-record {
  background: #f1f3f7;
}

.measurement-topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px 1fr 58px;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px 20px 0 0;
  background: var(--navy);
  color: white;
}

.measurement-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
}

.measurement-close,
.measurement-demo {
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

.measurement-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.measurement-close svg,
.measurement-meta svg,
.notes-title svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.measurement-demo {
  pointer-events: none;
  visibility: hidden;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0.8;
}

.health-form {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 18px;
}

.measurement-intro {
  padding: 4px 6px 2px;
}

.measurement-intro h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.24rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.measurement-intro p {
  max-width: 300px;
  margin: 5px 0 0;
  color: #8a94a9;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.measurement-save-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(49, 207, 114, 0.22);
  border-radius: 18px;
  background: #eaf9f0;
  color: #1b8f49;
  font-size: 0.92rem;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(49, 207, 114, 0.12);
}

.measurement-save-feedback::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #31cf72;
  box-shadow: 0 0 0 6px rgba(49, 207, 114, 0.12);
}

.measurement-save-feedback[hidden] {
  display: none;
}

.measurement-sync-status {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff5dd;
  color: #795900;
  font-size: .85rem;
  line-height: 1.4;
}
.measurement-sync-status[data-state="synced"] { background: #eaf9f0; color: #167346; }
.measurement-sync-status button { display: block; margin-top: 8px; min-height: 44px; padding: 8px 14px; border-radius: 12px; }
.measurement-sync-status[hidden], .measurement-sync-status button[hidden] { display: none; }

.profile-phone-actions { display: grid; gap: 12px; min-width: 0; }
.profile-phone-field { display: grid; gap: 10px; min-width: 0; }
.profile-phone-field > label { color: #748098; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.edit-info-form .profile-phone-row { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 5px; border: 1px solid #e1e6ef; border-radius: 16px; background: #f7f9fc; }
.edit-info-form .profile-phone-row #edit-phone-country { flex: 0 0 74px; width: 74px; min-width: 0; height: 44px; padding: 0 3px; border: 0; border-radius: 9px; background: transparent; font-size: 12px; letter-spacing: normal; }
.edit-info-form .profile-phone-row #edit-phone-national { flex: 1 1 0; width: 0; min-width: 0; height: 44px; padding: 0 2px; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
.edit-info-form .profile-phone-row #phone-save { flex: 0 0 auto; max-width: 88px; min-height: 44px; padding: 4px 9px; font-size: 12px; line-height: 1.2; border-radius: 10px; box-shadow: none; }
.profile-phone-row:focus-within { border-color: #9aaed2; }
.profile-phone-actions small, .edit-info-form label > small { font-size: .8rem; line-height: 1.5; color: #748098; }
#profile-email-help { text-transform: none; letter-spacing: normal; font-weight: 400; }
.profile-phone-actions button { min-height: 44px; padding: 12px 16px; border-radius: 14px; background: #edf2ff; color: #182450; font: inherit; font-weight: 700; }
.profile-phone-actions button:disabled { opacity: .55; }
#phone-support { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; color: #182450; font-size: .8rem; font-weight: 700; }
#phone-status { font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; margin: 0; }
#phone-support[hidden], #phone-status[hidden], #phone-save[hidden] { display: none; }

.measurement-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 2px;
  scrollbar-width: none;
}

.measurement-tabs::-webkit-scrollbar {
  display: none;
}

.measurement-tab {
  flex: 0 0 auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  border: 1px solid #e6eaf2;
  border-radius: 999px;
  background: white;
  color: #657087;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.measurement-tab.is-active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.measurement-card {
  display: none;
  padding: 20px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.measurement-card.is-active {
  display: grid;
  gap: 10px;
}

.measurement-card[hidden],
.heart-rate-companion-card[hidden] {
  display: none !important;
}

.heart-rate-companion-card {
  display: none;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.heart-rate-companion-card.is-active {
  display: grid;
}

.manual-heart-rate-field {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.heart-rate-companion-card .manual-heart-rate-field > span[data-i18n="metric.heartRate"] {
  color: #8a94a9;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ocr-scan-card {
  display: block;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e8edf7;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8faff, #ffffff);
}

.ocr-scan-summary {
  min-height: 68px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  list-style: none;
  cursor: pointer;
}

.ocr-scan-summary::-webkit-details-marker {
  display: none;
}

.ocr-scan-summary-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eef2ff;
  color: var(--navy);
}

.ocr-scan-summary-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ocr-scan-summary-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ocr-scan-summary-copy strong {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.15;
}

.ocr-scan-summary-copy small {
  color: #7b879b;
  font-size: 0.69rem;
  font-weight: 800;
}

.ocr-scan-summary-action {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f8;
  color: #56647d;
  font-size: 0.62rem;
  font-weight: 950;
}

.ocr-scan-chevron {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #71809a;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.ocr-scan-card[open] .ocr-scan-chevron {
  transform: rotate(180deg);
}

.ocr-scan-card[open] .ocr-scan-summary {
  border-bottom: 1px solid #edf1f7;
}

.ocr-scan-content {
  display: grid;
  gap: 10px;
  padding: 11px 12px 13px;
}

.ocr-scan-description {
  margin: 0;
  color: #6f7c92;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.4;
}

.ocr-scan-status {
  color: #7b879b;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.3;
}

.ocr-capture-guide {
  grid-column: 1 / -1;
  margin: -4px 0 2px;
  color: #66738d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.bp-scanner-model-picker {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dde5f2;
  border-radius: 14px;
  background: #fff;
}

.bp-scanner-model-picker > span:first-child {
  color: #66738d;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bp-internal-model-select,
.bp-internal-only {
  display: none !important;
}

.bp-scanner-model-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.bp-scanner-model-option {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 2px solid #e2e8f3;
  border-radius: 13px;
  background: #f8faff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.bp-scanner-model-option img {
  width: 58px;
  height: 58px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
  background: #fff;
}

.bp-scanner-model-option.is-active {
  border-color: var(--navy);
  background: #f2f5ff;
  box-shadow: 0 0 0 2px rgba(31, 48, 117, 0.1);
}

.bp-scanner-model-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.bp-scanner-model-copy strong {
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.25;
  white-space: normal;
}

.bp-scanner-model-copy small {
  color: #738097;
  font-size: 0.64rem;
  font-weight: 850;
}

.bp-scanner-model-check {
  position: static;
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 950;
  box-shadow: 0 2px 8px rgba(8, 17, 54, 0.28);
}

.bp-scanner-model-option.is-active .bp-scanner-model-check {
  display: grid;
}

.bp-scanner-model-option.is-coming-soon {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.72;
}

.bp-scanner-coming-soon {
  position: static;
  max-width: 92px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(12, 20, 54, 0.88);
  color: #fff;
  font-size: 0.52rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

#bp-scanner-model-status {
  display: none;
  color: #64806e;
}

.bp-scanner-model-picker.is-unavailable #bp-scanner-model-status {
  color: #b55b35;
}

.bp-scan-source-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ocr-scan-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.ocr-library-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #dce4f1;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.ocr-library-button:disabled,
.ocr-scan-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.ocr-library-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ocr-scan-button:disabled {
  opacity: 0.68;
  cursor: wait;
}

.ocr-scan-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#bp-ocr-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.ocr-scan-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f2f5fb;
}

.ocr-scan-button.is-scanning svg {
  animation: ocrPulse 0.9s ease-in-out infinite;
}

.ocr-crop-workbench {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.ocr-crop-workbench[hidden],
.ocr-processed-canvas[hidden] {
  display: none;
}

.ocr-preview-canvas,
.ocr-processed-canvas {
  width: 100%;
  border: 1px solid #dce4f1;
  border-radius: 14px;
  background: #0f1734;
  touch-action: none;
}

.ocr-processed-canvas {
  max-height: 220px;
  object-fit: contain;
  background: white;
}

.ocr-control-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bp-training-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #cfd8ea;
  border-radius: 12px;
  background: #f8faff;
}

.bp-training-panel[hidden] {
  display: none;
}

.bp-training-intro {
  margin: 0;
  color: #526179;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.bp-training-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bp-training-panel label {
  display: grid;
  gap: 6px;
  color: #8a96ad;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bp-training-panel input {
  width: 100%;
  border: 1px solid #dce4f1;
  border-radius: 10px;
  padding: 10px 8px;
  color: #1d2b66;
  font: inherit;
  font-weight: 900;
  min-width: 0;
}

.bp-training-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bp-training-status {
  margin: 0;
  color: #7f8aa4;
  font-size: 0.78rem;
  font-weight: 800;
}

.ocr-tool-button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #eef2f8;
  color: #536079;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.ocr-tool-button.is-primary {
  background: var(--navy);
  color: white;
}

.ocr-scan-result {
  grid-column: 1 / -1;
  max-height: 150px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #e6ebf4;
  border-radius: 12px;
  background: white;
  color: #4f5d76;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

@keyframes ocrPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

.unit-picker {
  display: grid;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f6;
}

.unit-picker span {
  color: #8a94a9;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.unit-picker select {
  min-height: 44px;
  border: 1px solid #e7ebf3;
  border-radius: 14px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 14px;
  font-weight: 900;
  outline: none;
}

.glucose-meal-picker {
  padding-top: 0;
}

.glucose-meal-picker select {
  min-height: 52px;
}

.large-field {
  display: grid;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f6;
}

.large-field:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.large-field > span {
  color: #8a94a9;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.large-field > span[data-i18n^="metric."] {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.large-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.large-input-row input {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--navy);
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.large-input-row input::placeholder {
  color: #d5dbe5;
}

.large-input-row input:focus {
  box-shadow: none;
}

.large-input-row strong {
  padding-bottom: 9px;
  color: #727d92;
  font-size: 0.95rem;
}

.measurement-meta {
  min-height: 72px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.measurement-meta > span:last-child {
  min-width: 0;
}

.measurement-meta small {
  display: block;
  margin-bottom: 4px;
  color: #8a94a9;
  font-size: 0.75rem;
  font-weight: 900;
}

.measurement-meta input {
  width: 100%;
  min-width: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
  cursor: pointer;
}

.measurement-meta input:focus {
  box-shadow: none;
}

.measurement-meta input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.meta-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4f6fb;
  color: var(--navy);
}

.notes-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.notes-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6b82;
  font-size: 0.85rem;
  font-weight: 900;
}

.notes-card textarea {
  min-height: 82px;
  border: 0;
  background: #f5f6fa;
  resize: vertical;
}

.measurement-save {
  margin-top: 8px;
  min-height: 56px;
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(29, 44, 101, 0.18);
}

.measurement-commit-panel {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.measurement-date-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0 14px;
  border-radius: var(--app-card-radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(50, 76, 125, 0.08);
}

.measurement-date-time .measurement-meta {
  min-width: 0;
  min-height: 68px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 44, 101, 0.06);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(50, 76, 125, 0.08);
}

.measurement-date-time .meta-icon {
  width: 34px;
  height: 34px;
  align-self: center;
}

.measurement-date-time .measurement-meta small {
  margin: 0 0 3px;
  font-size: 0.68rem;
  line-height: 1;
}

.measurement-date-time .measurement-meta input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 22px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}

.measurement-date-time .measurement-date-card input {
  font-size: 0.72rem;
}

.measurement-commit-panel .notes-card {
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(29, 44, 101, 0.06);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(50, 76, 125, 0.08);
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.measurement-commit-panel .notes-card:focus-within {
  border-color: rgba(29, 44, 101, 0.28);
  box-shadow: 0 12px 26px rgba(50, 76, 125, 0.12);
}

.measurement-commit-panel .notes-title {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f3f5fb;
  color: var(--navy);
}

.measurement-commit-panel .notes-title svg {
  width: 18px;
  height: 18px;
}

.measurement-commit-panel .notes-card textarea {
  width: 100%;
  min-height: 34px;
  max-height: 72px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 0.84rem;
  line-height: 1.3;
  transition: min-height 160ms ease;
}

.measurement-commit-panel .notes-card textarea:focus {
  min-height: 54px;
  outline: none;
}

.notes-count {
  color: #8a94a9;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.notes-count b {
  font-weight: inherit;
}

.measurement-commit-panel .measurement-save {
  min-height: 50px;
  margin-top: 0;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(29, 44, 101, 0.18);
}

@media (max-width: 360px) {
  .measurement-date-time {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .measurement-date-time .measurement-meta {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 8px;
  }

  .measurement-date-time .meta-icon {
    width: 30px;
    height: 30px;
  }

  .measurement-date-time .measurement-meta input {
    font-size: 0.72rem;
  }
}

/* Add Measurement: an explicit current-type picker replaces the scrolling pills. */
.phone-frame .measurement-type-picker {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid #dce5f1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 25px rgba(30, 57, 111, 0.08);
}

.phone-frame .measurement-type-picker-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eef4ff;
  color: var(--ouson-blue);
}

.phone-frame .measurement-type-picker-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-frame .measurement-type-picker-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.phone-frame .measurement-type-picker-copy > span {
  color: #78859d;
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phone-frame .measurement-type-picker-copy select {
  width: 100%;
  min-height: 30px;
  padding: 0 34px 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--ouson-navy);
  box-shadow: none;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.phone-frame .measurement-type-picker-copy select:focus-visible {
  outline: 2px solid rgba(30, 91, 220, 0.32);
  outline-offset: 4px;
}

/* Native-app text should not show browser selection handles; form content stays editable. */
.phone-frame {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.phone-frame input,
.phone-frame textarea,
.phone-frame [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.home-checkin-block[hidden] {
  display: none !important;
}

.home-checkin-block .alert-card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.alert-card-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px 13px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.alert-complete {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  margin-right: 14px;
  border: 1px solid rgba(28, 44, 101, 0.14);
  border-radius: 50%;
  background: #f3f6fc;
  color: var(--navy);
  cursor: pointer;
}

.alert-complete svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alert-copy strong {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.86rem;
}

.password-verification-step {
  display: grid;
  gap: 14px;
}

.password-verification-step[hidden],
.password-form[hidden],
.password-code-field[hidden] {
  display: none !important;
}

.password-email-summary {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid #e4e9f2;
  border-radius: 16px;
  background: #f7f9fd;
}

.password-email-summary span {
  color: #7c879b;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.password-email-summary strong {
  color: var(--navy);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.password-verification-step > p {
  margin: 0;
  font-size: 0.82rem;
}

.password-change-status {
  min-height: 1.2em;
  margin: 0 !important;
  color: #64718a !important;
  font-size: 0.76rem !important;
}

.password-change-status[data-tone="success"] {
  color: #278b57 !important;
}

.password-change-status[data-tone="error"] {
  color: #c74646 !important;
}

.password-resend {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #7d889d;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

select {
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: rgba(29, 44, 101, 0.35);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.primary-btn {
  min-height: 50px;
  border-radius: 16px;
  background: var(--navy);
  color: white;
  font-weight: 700;
}

.history-screen {
  position: relative;
  margin-top: 24px;
  padding-bottom: 22px;
  border-radius: 22px;
  background: #f1f3f7;
  box-shadow: inset 0 0 0 1px rgba(29, 44, 101, 0.04);
  overflow: hidden;
}

.history-topbar {
  min-height: 118px;
  padding: 28px 26px 24px;
  background: var(--navy);
  color: white;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}

.history-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
}

.history-back {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.history-back svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0 18px;
  scrollbar-width: none;
}

.history-tabs::-webkit-scrollbar {
  display: none;
}

.history-tab {
  flex: 0 0 auto;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border: 1px solid #e6eaf2;
  border-radius: 999px;
  background: white;
  color: #657087;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.history-tab.is-active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.history-trend-card {
  margin: 18px 22px 28px;
  padding: 26px 22px 20px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.trend-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.trend-card-head p {
  margin: 0 0 10px;
  color: #7f8ba0;
  font-size: 1rem;
  font-weight: 800;
}

.trend-card-head strong {
  display: block;
  color: var(--navy);
  font-size: 2.3rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.trend-card-head strong span {
  color: #9aa6ba;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.history-status {
  padding: 9px 13px;
  border-radius: 8px;
  font-weight: 900;
}

.history-status.metric-status-normal {
  background: #dff8e9;
}

.history-status.metric-status-low {
  background: #e1f0f8;
}

.history-status.metric-status-caution {
  background: #fff4c4;
}

.history-status.metric-status-danger {
  background: #ffe4df;
}

.history-status.metric-status-waiting {
  background: #eef2f7;
}

.trend-legend-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  color: #9aa6ba;
  font-weight: 700;
}

.history-legend-series {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.history-range-control {
  margin-left: auto;
  flex: 0 0 auto;
}

.history-range-control select,
.history-month-control select {
  min-height: 34px;
  border: 1px solid #dce5f3;
  border-radius: 10px;
  background: #f7f9fd;
  color: #53627e;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 30px 0 10px;
}

.trend-legend-row span,
.trend-legend-row strong,
.export-option strong {
  letter-spacing: 0;
  text-transform: none;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.systolic-dot {
  background: #31cf72;
}

.diastolic-dot {
  background: #aab3c4;
}

#history-trend-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 16px;
}

.week-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 8px;
  color: #9aa6ba;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.week-labels span:nth-child(6) {
  color: inherit;
  font-weight: inherit;
}

.history-list-head {
  margin: 0 0 14px;
  padding: 12px 22px 4px;
  text-align: center;
}

.history-list-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  text-align: center;
}

.records-list {
  display: grid;
  gap: 14px;
  padding: 0 22px 16px;
}

.record-item {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.record-status-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f8f9fc;
}

.record-status-dot::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #31cf72;
  box-shadow: 0 0 18px rgba(49, 207, 114, 0.32);
}

.record-item.is-warning .record-status-dot::after {
  background: #ff953a;
  box-shadow: 0 0 18px rgba(255, 149, 58, 0.32);
}

.record-item.is-low .record-status-dot::after {
  background: #2f86b7;
  box-shadow: 0 0 18px rgba(47, 134, 183, 0.3);
}

.record-item.is-danger .record-status-dot::after {
  background: #f04d42;
  box-shadow: 0 0 18px rgba(240, 77, 66, 0.3);
}

.record-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.record-date {
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 900;
}

.record-date span {
  color: #9aa6ba;
  font-size: 0.86rem;
  font-weight: 700;
}

.record-time {
  margin: 6px 0 0;
  color: #6f7b92;
  line-height: 1.35;
  font-size: 1rem;
  font-weight: 700;
}

.record-notes {
  margin: 5px 0 0;
  color: #7d889c;
  line-height: 1.35;
  font-size: 0.82rem;
  font-weight: 700;
}

.record-metrics {
  display: none;
}

.metric-pill {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f3f5fa;
  color: #58657f;
  font-size: 0.83rem;
  font-weight: 700;
}

.delete-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff2f1;
  color: #f1523f;
}

.delete-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  margin: 0 22px 16px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.history-export-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(73px + env(safe-area-inset-bottom, 0px));
  z-index: 17;
  min-height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #182450;
  color: #ffffff;
  box-shadow: 0 -8px 24px rgba(24, 36, 80, 0.18);
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.phone-frame.is-history-screen .history-export-dock {
  display: inline-flex;
}

.phone-frame.is-history-screen .app-content {
  padding-bottom: calc(138px + env(safe-area-inset-bottom, 0px));
}

.history-export-dock svg,
.export-back svg,
.download-report-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-export-dock:active {
  transform: scale(0.985);
}

/* History prioritizes recent readings; averages stay available as secondary context. */
#timeline.history-screen {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

#timeline .history-intro {
  padding: 18px 22px 12px;
}

#timeline .history-intro h2 {
  font-size: 1.12rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

#timeline .history-intro p {
  margin-top: 4px;
  color: #7f8ba6;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.34;
}

#timeline .history-type-picker {
  margin: 2px 22px 18px;
}

#timeline .history-tabs {
  padding-top: 8px;
  padding-bottom: 14px;
}

.history-latest-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 4px 22px 22px;
  padding: 18px;
  border: 1px solid rgba(90, 132, 218, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(42, 72, 128, 0.08);
  backdrop-filter: blur(14px);
}

.history-summary-stack {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.history-summary-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.history-summary-divider {
  height: 1px;
  background: #e7edf6;
}

.history-three-average-row[hidden],
.history-summary-divider[hidden] {
  display: none;
}

.history-latest-card[hidden] {
  display: none;
}

.history-latest-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0f1;
  color: #ef3f49;
}

.history-latest-icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-latest-card[data-metric="temperature"] .history-latest-icon {
  background: #fff4e7;
  color: #f19132;
}

.history-latest-card[data-metric="oxygen"] .history-latest-icon {
  background: #eaf9f0;
  color: #29b865;
}

.history-latest-card[data-metric="glucose"] .history-latest-icon {
  background: #fff6df;
  color: #e4a91c;
}

.history-latest-card[data-metric="weight"] .history-latest-icon {
  background: #edf3ff;
  color: #4d7cff;
}

.history-latest-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.history-latest-copy > span,
.history-latest-copy time {
  color: #7887a4;
  font-size: 0.76rem;
  font-weight: 700;
}

.history-latest-copy .history-latest-context,
.history-latest-copy .history-latest-heart-rate,
.record-heart-rate {
  color: #536a95;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.3;
}

.history-latest-reading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.history-latest-reading strong {
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.history-latest-reading small {
  color: #7483a0;
  font-size: 0.78rem;
  font-weight: 800;
}

.history-latest-status,
.record-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.1;
}

.history-latest-status {
  padding: 9px 12px;
  font-size: 0.72rem;
  text-align: center;
}

.history-latest-status.metric-status-normal,
.record-status-pill.metric-status-normal {
  background: #e7f9ef;
  color: #18a85b;
}

.history-latest-status.metric-status-low,
.record-status-pill.metric-status-low {
  background: #e8f3fb;
  color: #2f86b7;
}

.history-latest-status.metric-status-caution,
.record-status-pill.metric-status-caution {
  background: #fff2df;
  color: #f08b20;
}

.history-latest-status.metric-status-danger,
.record-status-pill.metric-status-danger {
  background: #ffe9ea;
  color: #eb3942;
}

.history-latest-status.metric-status-waiting,
.record-status-pill.metric-status-waiting {
  background: #eef2f7;
  color: #7d899e;
}

#timeline .history-list-head {
  margin: 0 22px 10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

#timeline .history-list-head h2 {
  color: #5f687a;
  font-size: 0.98rem;
  font-weight: 800;
  text-align: left;
}

.history-month-control {
  flex: 0 0 auto;
}

.history-month-control select {
  max-width: 180px;
}

#timeline .records-list {
  gap: 10px;
  padding: 0 22px 20px;
}

#timeline .record-item {
  min-height: 104px;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr) auto;
  gap: 12px;
  padding: 15px 14px;
  border: 1px solid rgba(29, 44, 101, 0.035);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(42, 72, 128, 0.07);
}

.record-status-pill {
  justify-content: center;
  padding: 9px 11px;
  font-size: 0.72rem;
}

.record-status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 10%, transparent);
}

.record-reading-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.record-reading-value {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.record-reading-value strong {
  color: var(--navy);
  font-size: 1.34rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.record-reading-value span {
  color: #7584a0;
  font-size: 0.7rem;
  font-weight: 800;
}

.record-metric-detail,
.record-heart-rate,
#timeline .record-time,
#timeline .record-notes {
  margin: 0;
  color: #7584a0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
}

.record-heart-rate[hidden],
.history-latest-context[hidden],
.history-latest-heart-rate[hidden] {
  display: none;
}

#timeline .record-notes {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#timeline .delete-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff0f1;
  color: #ef3f49;
}

.record-chevron {
  color: #71809c;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
}

#timeline .history-average-card {
  margin: 6px 22px 22px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(29, 44, 101, 0.06);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(42, 72, 128, 0.06);
}

#timeline .history-average-card .trend-card-head p {
  margin-bottom: 6px;
  font-size: 0.76rem;
}

#timeline .history-average-card .trend-card-head strong {
  font-size: 1.42rem;
}

#timeline .history-average-card .trend-card-head strong span {
  font-size: 0.72rem;
}

#timeline .history-average-card .history-status {
  padding: 7px 10px;
  font-size: 0.68rem;
}

#timeline .history-average-card .trend-legend-row {
  gap: 6px;
  margin-top: 12px;
  font-size: 0.68rem;
}

#timeline .history-average-card .legend-dot {
  width: 7px;
  height: 7px;
}

#timeline .history-average-card #history-trend-chart {
  margin-top: 8px;
}

#timeline .history-average-card .week-labels {
  margin-top: 3px;
  font-size: 0.66rem;
}

.phone-frame.is-history-screen .history-export-dock {
  left: 22px;
  right: 22px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  min-height: 48px;
  border: 2px solid #182450;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  color: #182450;
  box-shadow: 0 8px 24px rgba(24, 36, 80, 0.1);
  backdrop-filter: blur(14px);
}

.phone-frame.is-history-screen .app-content {
  padding-bottom: calc(154px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 380px) {
  .history-latest-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .history-latest-icon {
    width: 52px;
    height: 52px;
  }

  .history-summary-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .history-summary-row .history-latest-status {
    justify-self: start;
  }

  #timeline .history-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-month-control,
  .history-month-control select {
    width: 100%;
    max-width: none;
  }

  #timeline .record-item {
    grid-template-columns: minmax(70px, auto) minmax(0, 1fr) auto;
    gap: 9px;
    padding-inline: 12px;
  }

  .record-status-pill {
    padding-inline: 9px;
  }

  .record-chevron {
    display: none;
  }
}

@media (max-width: 430px) {
  #timeline .record-item {
    grid-template-columns: minmax(62px, auto) minmax(0, 1fr) auto;
  }

  .record-chevron {
    display: none;
  }

  .record-status-pill {
    max-width: 78px;
    padding-inline: 9px;
  }
}

.export-page {
  margin-top: 24px;
  padding-bottom: 28px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.export-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.export-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
}

.export-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.report-preview {
  padding: 26px 22px;
  background: #e8eaef;
}

.report-paper {
  width: 220px;
  min-height: 275px;
  margin: 0 auto;
  padding: 22px 18px;
  background: white;
  box-shadow: 0 18px 36px rgba(31, 42, 70, 0.12);
}

.report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--navy);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.report-head span {
  text-align: right;
  color: #8793a8;
}

.report-logo-image {
  display: block;
  width: 76px;
  height: auto;
}

.report-paper h3 {
  margin: 24px 0 4px;
  text-align: center;
  color: #2d374d;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.report-paper p {
  margin: 0 0 20px;
  text-align: center;
  color: #7c879b;
  font-size: 0.58rem;
}

.mini-chart {
  height: 48px;
  margin-bottom: 18px;
  border-radius: 4px;
  background:
    linear-gradient(160deg, transparent 42%, rgba(29, 44, 101, 0.78) 43%, rgba(29, 44, 101, 0.78) 48%, transparent 49%),
    linear-gradient(180deg, #f2f5fa, #e8eef7);
}

.report-table {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  font-size: 0.55rem;
  color: #6e7a8f;
}

.report-table span {
  font-weight: 900;
}

.report-table strong {
  color: #46536b;
}

.report-table em {
  font-style: normal;
  font-weight: 900;
}

.export-section {
  padding: 20px 22px 0;
}

.export-section h3 {
  margin: 0 0 12px;
  color: #8d98ab;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.export-section-head h3 {
  margin: 0;
}

.export-select-all {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 44, 101, 0.08);
  color: var(--navy);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.export-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.export-pill {
  min-height: 44px;
  width: 100%;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: #6e7a8f;
  box-shadow: var(--shadow-soft);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.export-pill.is-active {
  background: var(--navy);
  color: white;
}

.custom-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.custom-date-range[hidden] {
  display: none;
}

.custom-date-range label {
  display: grid;
  gap: 8px;
  color: #8d98ab;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-date-range input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: white;
  color: var(--navy);
  padding: 0 12px;
  font-size: 1rem;
  font-weight: 800;
  outline: none;
  box-shadow: var(--shadow-soft);
}

.report-inclusions,
.report-type-options {
  display: grid;
  gap: 10px;
}

.report-inclusion,
.report-type-option {
  display: grid;
  grid-template-columns: auto 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.report-inclusion {
  grid-template-columns: 40px 1fr;
  min-height: 76px;
  padding: 16px;
  border-radius: 20px;
}

.report-type-option:has(input:checked) {
  border-color: rgba(29, 44, 101, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.report-type-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.report-inclusion div,
.report-type-option div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-inclusion strong,
.report-type-option strong {
  color: #4f5d76;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.report-inclusion small,
.report-type-option small {
  color: #8a94a9;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.export-options {
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.export-option {
  min-height: 70px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f6;
  color: #4f5d76;
}

.export-option:last-child {
  border-bottom: 0;
}

.option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.option-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blue-option {
  color: #4d7cff;
  background: #edf3ff;
}

.green-option {
  color: #2fbf67;
  background: #eaf9f0;
}

.coral-option {
  color: #f1523f;
  background: #fff0ee;
}

.gold-option {
  color: #f3ad00;
  background: #fff6dc;
}

.purple-option {
  color: #a36cff;
  background: #f4edff;
}

.export-option input {
  accent-color: var(--navy);
}

.download-report-btn {
  width: calc(100% - 44px);
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 22px 0;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.24);
  font-weight: 900;
  cursor: pointer;
}

.notifications-page {
  margin-top: 24px;
  min-height: 650px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.notifications-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.notifications-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.notifications-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.notifications-back svg,
.notification-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-section {
  padding: 20px 22px 0;
}

.notification-section h3 {
  margin: 0 0 10px;
  color: #8d98ab;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notification-card {
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.notification-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f6;
  color: #4f5d76;
  cursor: pointer;
}

.notification-row.has-arrow {
  grid-template-columns: 42px 1fr auto auto;
}

.notification-row.reminder-time-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px 14px;
}

.notification-row.reminder-time-row .measurement-reminder-groups {
  grid-column: 1 / -1;
}

.measurement-reminder-groups {
  display: grid;
  overflow: hidden;
  border: 1px solid #e8edf5;
  border-radius: 18px;
  background: #fff;
}

.measurement-reminder-group + .measurement-reminder-group {
  border-top: 1px solid #edf1f6;
}

.measurement-reminder-summary {
  width: 100%;
  min-height: 64px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--navy);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.measurement-reminder-summary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.measurement-reminder-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f1f5ff;
  color: #245fd5;
}

.measurement-reminder-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.measurement-reminder-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.measurement-reminder-copy strong {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
}

.measurement-reminder-copy small {
  overflow: hidden;
  color: #8995a8;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.measurement-reminder-count {
  color: #71809b;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.measurement-reminder-chevron {
  color: #71809b;
  font-size: 1.25rem;
  line-height: 1;
  transform: translateY(-2px);
  transition: transform 160ms ease;
}

.measurement-reminder-group.is-expanded .measurement-reminder-chevron {
  transform: rotate(180deg) translateY(1px);
}

.measurement-reminder-editor {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
  background: #fbfcff;
}

.notification-row:last-child {
  border-bottom: 0;
}

.notification-row .switch input:checked + .switch-slider {
  background: var(--navy);
}

.notification-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4f6fb;
  color: var(--navy);
}

.pressure-alert {
  color: #f1523f;
  background: #fff0ee;
}

.pulse-alert {
  color: var(--navy);
  background: #eef3ff;
}

.oxygen-alert {
  color: #657089;
  background: #f0f2f6;
}

.reminder-alert {
  color: var(--navy);
  background: #eef3ff;
}

.system-alert {
  color: #4d5c82;
  background: #f3f6fb;
}

.notification-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.notification-copy strong {
  color: #48546b;
  font-size: 0.98rem;
  font-weight: 900;
}

.notification-copy small {
  color: #8995a8;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.reminder-time-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #e7ebf3;
  border-radius: 15px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 12px;
  font-size: 1rem;
  font-weight: 900;
  outline: none;
}

.reminder-times {
  display: grid;
  gap: 10px;
}

.reminder-time-field {
  display: grid;
  grid-template-columns: 28px minmax(132px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8f9fc;
  cursor: pointer;
}

.reminder-time-field .reminder-time-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf3ff;
  color: #647493;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.reminder-time-remove {
  min-width: 64px;
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: #fff0f1;
  color: #d94349;
  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--ouson-type-control-weight, 700);
  cursor: pointer;
}

.reminder-time-add {
  min-height: 44px;
  border: 1px solid #d7e1f3;
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: var(--ouson-type-control-weight, 700);
  cursor: pointer;
}

.reminder-time-add:disabled,
.reminder-time-field.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notification-arrow {
  color: #c5ccd8;
  font-size: 1.6rem;
  line-height: 1;
}

.notification-status {
  min-height: 18px;
  margin: 10px 34px 0;
  color: var(--navy);
  text-align: center;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.news-page {
  margin-top: 24px;
  min-height: 650px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.news-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.news-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.18rem;
}

.news-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.news-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-hero-card {
  margin: 18px 22px 0;
  padding: 22px 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 12%, rgba(47, 202, 103, 0.16), transparent 30%),
    white;
  box-shadow: var(--shadow-soft);
}

.news-kicker {
  color: #8d98ab;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-hero-card h1 {
  margin: 8px 0 6px;
  color: var(--navy);
  font-size: 1.46rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.news-hero-card p,
.news-card p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.news-list {
  display: grid;
  gap: 12px;
  padding: 18px 22px 0;
}

.news-card {
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.news-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.news-card.is-featured {
  background: linear-gradient(135deg, rgba(29, 44, 101, 0.98), rgba(55, 77, 148, 0.92));
  color: white;
}

.news-card.is-featured h3,
.news-card.is-featured p,
.news-card.is-featured small {
  color: white;
}

.news-tag {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 900;
}

.news-card.is-featured .news-tag {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.news-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
}

.news-card small {
  color: #9aa5b7;
  font-size: 0.76rem;
  font-weight: 800;
}

.edit-info-page {
  margin-top: 24px;
  min-height: 680px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.edit-info-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.edit-info-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.edit-info-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.edit-info-back svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edit-info-card {
  margin: 18px;
  padding: 22px 18px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.edit-avatar-block {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.edit-avatar-block button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.edit-info-form {
  display: grid;
  gap: 14px;
}

.edit-info-form label {
  display: grid;
  gap: 8px;
  color: #657089;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.edit-info-form input,
.edit-info-form select,
.edit-info-form textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.94rem;
  font-weight: 800;
  outline: none;
}

.edit-info-form textarea {
  min-height: 88px;
  padding-top: 14px;
  resize: none;
  line-height: 1.4;
}

.edit-info-form input:focus,
.edit-info-form select:focus,
.edit-info-form textarea:focus {
  border-color: rgba(29, 44, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

.edit-info-form input[readonly] {
  border-color: #e1e6ef;
  background: #eef2f7;
  color: #7b879b;
  cursor: not-allowed;
}

.edit-info-form input[readonly]:focus {
  border-color: #e1e6ef;
  box-shadow: none;
}

.edit-info-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.edit-birth-selects {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
}

.edit-info-form .edit-birth-selects select {
  min-width: 0;
  padding: 0 9px;
  font-size: 0.84rem;
  letter-spacing: -0.02em;
  text-transform: none;
}

.edit-info-save {
  width: 100%;
  min-height: 58px;
  margin-top: 8px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.24);
  font-weight: 900;
  cursor: pointer;
}

.help-page {
  margin-top: 24px;
  min-height: 720px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.help-hero {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 22px 18px 28px;
  border-radius: 0 0 28px 28px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 34px rgba(29, 44, 101, 0.16);
}

.help-hero h2 {
  margin: 0;
  text-align: center;
  font-size: 1.18rem;
}

.help-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.help-back svg,
.help-section h3 svg,
.help-category-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.help-section {
  padding: 24px 18px 0;
}

.help-section h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
}

.help-section h3 svg {
  color: #7b879b;
}

.help-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-category-grid article,
.help-category-card {
  min-height: 150px;
  display: grid;
  grid-template-rows: 56px 38px 20px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: 18px;
  border: 0;
  background: white;
  box-shadow: var(--shadow-soft);
  text-align: center;
  cursor: pointer;
}

.help-category-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4f6fb;
  color: var(--navy);
}

.help-category-grid strong,
.help-category-card strong {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.15;
}

.help-category-grid small,
.help-category-card small {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c879b;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
}

.manual-page {
  margin-top: 24px;
  min-height: 720px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.manual-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.manual-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.08rem;
}

.manual-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.manual-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.manual-hero-card {
  margin: 18px 18px 0;
  padding: 22px 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 12%, rgba(77, 124, 255, 0.16), transparent 30%),
    white;
  box-shadow: var(--shadow-soft);
}

.manual-kicker {
  color: #8d98ab;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.manual-hero-card h1 {
  margin: 8px 0 6px;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.manual-hero-card p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.manual-section {
  padding: 20px 18px 0;
}

.manual-section h3 {
  margin: 0 0 10px;
  color: #8d98ab;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.manual-list {
  display: grid;
  gap: 10px;
}

.manual-item {
  min-height: 82px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  color: var(--navy);
  text-decoration: none;
}

button.manual-item {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.manual-product-image {
  width: 58px;
  height: 58px;
  padding: 5px;
  border-radius: 16px;
  background: #f4f7fb;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(29, 44, 101, 0.05);
}

.manual-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.manual-item-copy b {
  overflow: hidden;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-item-copy small {
  color: #8d98ab;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.manual-item strong {
  justify-self: end;
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
}

.features-section {
  display: grid;
  gap: 12px;
  padding: 20px 18px 0;
}

.feature-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eef3ff;
  color: var(--navy);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.16;
}

.feature-card p {
  margin: 0;
  color: #748097;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
}

.guide-page .manual-hero-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(29, 44, 101, 0.12), transparent 32%),
    white;
}

.guide-detail-hero {
  position: relative;
}

.guide-library-section > h3 {
  margin-bottom: 6px;
}

.guide-media-note {
  margin: 0 0 14px;
  color: #7b879d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.guide-media-grid {
  display: grid;
  gap: 14px;
}

.guide-media-card {
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.09);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.guide-media-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef2f8;
}

.guide-media-content {
  padding: 14px;
}

.guide-media-content h4 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 0.93rem;
  font-weight: 900;
  line-height: 1.3;
}

.guide-media-content h4 span {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
}

.guide-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.guide-media-action {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: 0;
  border-radius: 13px;
  text-decoration: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

.guide-media-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-video-action {
  background: var(--navy);
  color: #fff;
}

.guide-video-action svg {
  fill: currentColor;
  stroke: none;
}

.guide-image-action {
  background: #edf2fb;
  color: var(--navy);
}

.guide-media-actions > :only-child {
  grid-column: 1 / -1;
}

.guide-media-empty {
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  color: #748097;
  font-weight: 800;
  text-align: center;
}

.guide-image-modal[hidden] {
  display: none;
}

.guide-image-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
}

.guide-image-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 18, 45, 0.72);
}

.guide-image-modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 18, 48, 0.34);
}

.guide-image-modal-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid rgba(29, 44, 101, 0.1);
  color: var(--navy);
}

.guide-image-modal-topbar strong {
  font-size: 0.9rem;
  line-height: 1.25;
}

.guide-image-modal-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #edf2fb;
  color: var(--navy);
  font-size: 1.55rem;
  line-height: 1;
}

.guide-image-stage {
  min-height: 180px;
  max-height: calc(100dvh - 110px);
  overflow: auto;
  display: grid;
  place-items: center;
  background: #f4f7fb;
}

.guide-image-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-image-stage p {
  padding: 30px 20px;
  color: #748097;
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

body.guide-modal-open {
  overflow: hidden;
}

.guide-accordion-list {
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.guide-item {
  border-bottom: 1px solid rgba(29, 44, 101, 0.08);
}

.guide-item:last-child {
  border-bottom: 0;
}

.guide-item summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.guide-item summary::-webkit-details-marker {
  display: none;
}

.guide-item summary::after {
  content: "";
  width: 9px;
  height: 9px;
  justify-self: end;
  border-right: 2px solid #8b96aa;
  border-bottom: 2px solid #8b96aa;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.guide-item[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.guide-icon {
  width: 22px;
  height: 22px;
  color: #708099;
}

.guide-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-item strong {
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
}

.guide-item p {
  margin: -4px 16px 16px 50px;
  color: #6f7b90;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.guide-item-caution .guide-icon {
  color: var(--danger);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-list summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  color: #4f5d76;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "⌄";
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4f6fb;
  color: #8793a8;
  font-size: 1.1rem;
}

.faq-list details[open] summary::after {
  content: "⌃";
}

.faq-list p {
  margin: 0;
  padding: 0 18px 18px;
  color: #6e7a8f;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.contact-page {
  margin-top: 24px;
  min-height: 620px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.contact-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.contact-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.12rem;
}

.contact-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.contact-back svg,
.contact-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-card {
  margin: 22px 18px 0;
  padding: 28px 22px;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.contact-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eaf9f0;
  color: #2fbf67;
  box-shadow: 0 14px 28px rgba(49, 207, 114, 0.16);
}

.contact-kicker {
  color: #8d98ab;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-card h1 {
  margin: 10px 0 10px;
  color: var(--navy);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.contact-card p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.48;
}

.contact-hours {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  padding: 16px;
  border-radius: 18px;
  background: #f6f8fc;
  color: #6e7a8f;
}

.contact-hours span,
.contact-hours small {
  font-size: 0.78rem;
  font-weight: 800;
}

.contact-hours strong {
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 900;
}

.whatsapp-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 18px;
  background: #25d366;
  color: white;
  box-shadow: 0 18px 30px rgba(37, 211, 102, 0.24);
  font-weight: 900;
  text-decoration: none;
}

.devices-page {
  margin-top: 24px;
  min-height: 760px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.devices-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.devices-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.14rem;
}

.devices-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.devices-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.devices-hero-card,
.device-form,
.registered-devices {
  margin: 18px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.devices-hero-card {
  padding: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(29, 44, 101, 0.1), transparent 32%),
    white;
}

.devices-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.devices-hero-card h1 {
  margin: 14px 0 10px;
  color: var(--navy);
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.devices-hero-card p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.48;
}

.device-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.device-form.is-hidden {
  display: none;
}

.device-add-toggle {
  width: calc(100% - 36px);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 18px 18px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 34px rgba(29, 44, 101, 0.14);
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
}

.device-add-toggle.is-active {
  background: #eef3ff;
  color: var(--navy);
}

.device-registration-check {
  display: grid;
  gap: 12px;
}

.device-registration-check h3 {
  margin: 0;
  color: #657089;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.device-check-options {
  display: grid;
  gap: 10px;
}

.device-check-options label {
  min-height: 68px;
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 14px !important;
  padding: 13px 14px;
  border: 1px solid #e7ebf3;
  border-radius: 18px;
  background: #f8f9fc;
  color: #4f5d76;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

.device-check-options input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--navy);
}

.device-check-options strong,
.device-check-options small {
  display: block;
}

.device-check-options strong {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.18;
}

.device-check-options small {
  margin-top: 3px;
  color: #7c879b;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.28;
}

.device-full-fields {
  display: none;
  gap: 14px;
}

.device-form.is-new-warranty .device-full-fields {
  display: grid;
}

.device-form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #eef1f6;
  border-radius: 20px;
  background: #fbfcff;
}

.device-form-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 900;
}

.device-information-card {
  background: white;
}

.device-model-preview {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #eef1f6;
  border-radius: 18px;
  background: #f8f9fc;
}

.device-model-preview img {
  width: 58px;
  height: 58px;
  padding: 5px;
  border-radius: 16px;
  background: white;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(29, 44, 101, 0.05);
}

.device-model-preview strong {
  display: block;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
}

.device-model-preview small {
  color: #7b879b;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.device-form label {
  display: grid;
  gap: 8px;
  color: #657089;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.device-form input,
.device-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.94rem;
  font-weight: 800;
  outline: none;
}

.device-form input:focus,
.device-form select:focus {
  border-color: rgba(29, 44, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

.device-form-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.device-help-field { display: grid; gap: 8px; min-width: 0; }
.device-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 36px; }
.device-field-heading label { min-width: 0; letter-spacing: 0.02em; }
.device-field-help {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #edf3ff;
  color: #2863bc;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.device-help-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  margin: auto;
  padding: 20px;
  border: 1px solid #dfe7f7;
  border-radius: 22px;
  background: #fff;
  color: #1d2c65;
  overflow-y: auto;
}
.device-help-dialog::backdrop { background: rgba(12, 24, 49, 0.6); }
.device-help-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.device-help-header h2 { margin: 0; font-size: 20px; }
.device-help-dialog button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  background: #edf3ff;
  color: #1d2c65;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.device-help-dialog p { color: #657089; font-size: 14px; line-height: 1.5; }
.device-help-image-scroll {
  width: 100%;
  max-height: 50dvh;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid #e7ebf3;
  border-radius: 8px;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}
.device-help-image-scroll img { display: block; width: 100%; max-width: none; height: auto; }
.device-help-image-scroll.is-enlarged img { width: 1800px; min-width: 100%; }
.device-help-image-scroll.is-enlarged img[src$="order-number.webp"] { width: 960px; }
.device-help-dialog .device-help-footnote { margin-bottom: 0; font-size: 12px; }

.device-form-three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.device-phone-field {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.device-consent-row {
  display: grid !important;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px !important;
  color: #6e7a8f !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.35;
  text-transform: none !important;
}

.device-consent-row input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--navy);
}

.device-extension-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dfe7f7;
  border-radius: 20px;
  background: linear-gradient(135deg, #f5f8ff, #fbfcff);
}

.device-extension-toggle {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px !important;
  color: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

.device-extension-toggle input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-top: 2px;
  padding: 0;
  accent-color: var(--navy);
}

.device-extension-toggle strong,
.device-extension-toggle small {
  display: block;
}

.device-extension-toggle strong {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
}

.device-extension-toggle small {
  margin-top: 4px;
  color: #738098;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.42;
}

.device-extension-card:has(#device-extended-warranty:checked) {
  border-color: rgba(29, 44, 101, 0.28);
  box-shadow: 0 10px 24px rgba(29, 44, 101, 0.08);
}

.warranty-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef3ff, #f7faff);
}

.warranty-card span {
  color: #71809a;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warranty-card strong {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.warranty-card small {
  color: #6e7a8f;
  font-size: 0.82rem;
  font-weight: 800;
}

.device-save {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.24);
  font-weight: 900;
  cursor: pointer;
}

.registered-devices {
  padding: 20px;
}

.registered-devices h3 {
  margin: 0 0 12px;
  color: #8d98ab;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.device-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding: 0 0 2px;
}

.device-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e6ebf4;
  border-radius: 999px;
  background: white;
  color: #6e7a8f;
  box-shadow: 0 8px 16px rgba(38, 50, 80, 0.05);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.device-tab.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}

.devices-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 8px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.devices-list::-webkit-scrollbar {
  display: none;
}

.device-item,
.devices-empty {
  padding: 16px;
  border-radius: 18px;
  background: #f8f9fc;
}

.device-item {
  flex: 0 0 min(88%, 340px);
  display: grid;
  gap: 12px;
  border: 1px solid #eef1f6;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.devices-empty {
  flex: 1 0 100%;
}

.device-item-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 12px;
}

.device-item-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.device-item-image {
  width: 46px;
  height: 46px;
  padding: 4px;
  border-radius: 14px;
  background: white;
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(29, 44, 101, 0.06);
}

.device-item-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.device-item strong {
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
}

.device-item span,
.device-item small,
.devices-empty {
  color: #6e7a8f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.device-status-pill {
  width: max-content;
  margin-top: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff6df;
  color: #a86a00;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.device-status-pill[data-status="verified"] {
  background: #e9f8ef;
  color: #238a4f;
}

.device-status-pill[data-status="rejected"] {
  background: #fff2f1;
  color: #d84332;
}

.device-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.device-info-grid small {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 14px;
  background: white;
}

.device-info-grid small span {
  color: #99a3b5;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.device-info-grid small strong {
  overflow-wrap: anywhere;
  color: #4f5d76;
  font-size: 0.78rem;
  line-height: 1.25;
}

.device-info-grid .device-warranty-row {
  grid-column: 1 / -1;
  background: #eef8f1;
}

.device-info-grid .device-warranty-row strong {
  color: #2fbf67;
}

.device-info-grid .device-expiry-row {
  grid-column: 1 / -1;
  background: #f4f7fd;
}

.device-info-grid .device-extension-row {
  grid-column: 1 / -1;
  background: #f4f6fb;
}

.device-info-grid .device-extension-row[data-status="pending"] {
  background: #fff8e7;
}

.device-info-grid .device-extension-row[data-status="approved"] {
  background: #eef8f1;
}

.device-info-grid .device-extension-row[data-status="rejected"] {
  background: #fff2f1;
}

.device-info-grid .device-extension-row[data-status="approved"] strong {
  color: #238a4f;
}

.device-info-grid .device-extension-row[data-status="pending"] strong {
  color: #9a6b00;
}

.device-info-grid .device-extension-row[data-status="rejected"] strong {
  color: #c94335;
}

.device-delete {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.device-delete {
  background: #fff2f1;
  color: #f1523f;
}

.device-support-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: #f3f5f8;
  color: #778297;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.35;
}

.device-support-symbol {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe4ec;
  color: #6f7a8e;
  font-size: 0.78rem;
  font-weight: 900;
}

.device-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-page {
  margin-top: 24px;
  min-height: 720px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.privacy-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.privacy-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
}

.privacy-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.privacy-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-hero-card,
.privacy-content-card,
.privacy-contact-card {
  margin: 18px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.privacy-hero-card {
  padding: 24px 22px;
  background:
    radial-gradient(circle at 88% 10%, rgba(49, 207, 114, 0.18), transparent 32%),
    white;
}

.privacy-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.privacy-hero-card h1 {
  margin: 14px 0 10px;
  color: var(--navy);
  font-size: 1.75rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.privacy-hero-card p,
.privacy-hero-card small,
.privacy-content-card p,
.privacy-contact-card p {
  color: #6e7a8f;
  font-weight: 700;
  line-height: 1.48;
}

.privacy-hero-card p {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.privacy-hero-card small {
  font-size: 0.75rem;
}

.privacy-content-card {
  padding: 4px 20px;
}

.privacy-content-card article {
  padding: 18px 0;
  border-bottom: 1px solid #eef1f6;
}

.privacy-content-card article:last-child {
  border-bottom: 0;
}

.privacy-content-card h3,
.privacy-contact-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
}

.privacy-content-card p,
.privacy-contact-card p {
  margin: 0;
  font-size: 0.86rem;
}

.privacy-contact-card {
  padding: 20px;
}

.privacy-contact-card button {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.password-page {
  margin-top: 24px;
  min-height: 620px;
  padding-bottom: 84px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.password-topbar {
  min-height: 86px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 18px 20px;
  background: var(--navy);
  color: white;
}

.password-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.1rem;
}

.password-back {
  width: 42px;
  height: 42px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.password-back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-card {
  margin: 18px;
  padding: 24px 20px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.password-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.password-card h1 {
  margin: 14px 0 8px;
  color: var(--navy);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.password-card p {
  margin: 0 0 20px;
  color: #6e7a8f;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.48;
}

.password-form {
  display: grid;
  gap: 14px;
}

.password-form label {
  display: grid;
  gap: 8px;
  color: #657089;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.password-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #e7ebf3;
  border-radius: 16px;
  background: #f8f9fc;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.94rem;
  font-weight: 800;
  outline: none;
}

.password-form input:focus {
  border-color: rgba(29, 44, 101, 0.42);
  box-shadow: 0 0 0 4px rgba(29, 44, 101, 0.08);
}

.password-rules {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: #f6f8fc;
}

.password-rules span {
  color: #6e7a8f;
  font-size: 0.8rem;
  font-weight: 800;
  transition: color 160ms ease;
}

.password-rules span::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: #cfd6e3;
  box-shadow: 0 0 0 4px rgba(207, 214, 227, 0.22);
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.password-rules span.is-met {
  color: #223064;
}

.password-rules span.is-met::before {
  background: #2fbf67;
  box-shadow: 0 0 0 4px rgba(47, 191, 103, 0.14);
}

.password-save {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  box-shadow: 0 18px 30px rgba(29, 44, 101, 0.24);
  font-weight: 900;
  cursor: pointer;
}

.profile-page {
  margin-top: 24px;
  min-height: 680px;
  border-radius: 22px;
  background: #f1f3f7;
  overflow: hidden;
  border: 1px solid rgba(29, 44, 101, 0.06);
  box-shadow: var(--shadow-soft);
}

.profile-hero {
  min-height: 108px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 10px;
  margin: 14px 14px 0;
  padding: 20px 18px;
  border-radius: 24px;
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
}

.profile-hero h2 {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
}

.profile-menu {
  width: 46px;
  height: 46px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: white;
  cursor: pointer;
}

.profile-menu svg,
.profile-photo-action svg,
.profile-row svg,
.profile-signout svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-card-main {
  position: relative;
  margin: 18px 18px 0;
  padding: 26px 18px 24px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.profile-photo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
}

.profile-photo {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffefc2, #ffd48b);
  border: 5px solid #f7f8fc;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar {
  overflow: hidden;
}

.avatar-portrait-profile {
  width: 68px;
  height: 68px;
}

.avatar-portrait-profile .avatar-hair {
  width: 42px;
  height: 22px;
  background: #c3834c;
}

.avatar-portrait-profile .avatar-face {
  top: 14px;
  width: 30px;
  height: 30px;
  background: #f0c8a5;
}

.avatar-portrait-profile .avatar-body {
  width: 48px;
  height: 22px;
  background: #2d6f82;
}

.profile-photo-action {
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 42px;
  height: 42px;
  border: 3px solid white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: white;
  cursor: pointer;
}

.profile-photo-action svg {
  width: 16px;
  height: 16px;
}

.profile-card-main h1 {
  margin: 0;
  color: var(--navy);
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}

.profile-card-main p {
  margin: 6px 0 0;
  color: #6f7b92;
  font-size: 0.98rem;
  font-weight: 700;
}

.profile-management {
  padding: 20px 18px 70px;
}

.profile-menu-section {
  margin-top: 14px;
}

.profile-section-label {
  margin: 0 0 9px 4px;
  color: #69758f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-action-card {
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.profile-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid #eef1f6;
  background: white;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.profile-toggle-row {
  cursor: pointer;
}

.profile-toggle-row .switch {
  justify-self: end;
}

.profile-row:last-child {
  border-bottom: 0;
}

.profile-row-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f5f6fa;
  color: var(--navy);
}

.profile-row span:nth-child(2) {
  font-size: 0.92rem;
  font-weight: 900;
}

.profile-row strong {
  color: #c8ced8;
  font-size: 1.45rem;
  font-weight: 300;
}

.profile-language-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid #eef1f6;
  background: white;
}

.profile-language-copy {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}

.profile-language-copy strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 900;
}

.profile-language-copy small {
  display: block;
  margin-top: 2px;
  color: #8792a8;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.3;
}

.language-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: #f1f4f9;
}

.language-option {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #69758f;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.language-option.is-active {
  background: var(--navy);
  color: white;
  box-shadow: 0 10px 18px rgba(30, 44, 106, 0.18);
}

.language-option:active {
  transform: scale(0.97);
}

.profile-signout {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid rgba(241, 82, 63, 0.24);
  border-radius: 18px;
  background: white;
  color: #f1523f;
  box-shadow: var(--shadow-soft);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

/* Compact profile directory layout. */
.profile-page {
  padding-bottom: 0;
}

.profile-card-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 2px 14px 0;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(50, 76, 125, 0.08);
}

.profile-photo-wrap {
  width: 52px;
  height: 52px;
  margin: 0;
}

.profile-photo {
  width: 52px;
  height: 52px;
  border: 0;
  background: #f2f5fb;
}

.avatar-portrait-profile {
  width: 42px;
  height: 42px;
}

.avatar-portrait-profile .avatar-hair {
  width: 28px;
  height: 15px;
}

.avatar-portrait-profile .avatar-face {
  top: 9px;
  width: 21px;
  height: 21px;
}

.avatar-portrait-profile .avatar-body {
  width: 32px;
  height: 15px;
}

.profile-photo-action {
  right: -4px;
  bottom: -3px;
  width: 23px;
  height: 23px;
  border-width: 2px;
}

.profile-photo-action svg {
  width: 11px;
  height: 11px;
}

.profile-identity-action {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.profile-identity-copy {
  min-width: 0;
}

.profile-identity-copy strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-copy small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #7d889d;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-chevron {
  color: var(--navy);
  font-size: 1.45rem;
  font-weight: 500;
}

.profile-management {
  padding: 4px 14px 8px;
}

.profile-menu-section {
  margin-top: 13px;
}

.profile-section-label {
  margin: 0 0 6px 2px;
  font-size: 0.64rem;
  letter-spacing: 0.11em;
}

.profile-action-card {
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(50, 76, 125, 0.07);
}

.profile-row {
  min-height: 50px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 7px 12px;
}

.profile-row-icon {
  width: 28px;
  height: 28px;
  background: #f2f5fb;
}

.profile-row-icon svg,
.profile-row svg {
  width: 17px;
  height: 17px;
}

.profile-row span:nth-child(2) {
  font-size: 0.82rem;
}

.profile-row strong {
  color: var(--navy);
  font-size: 1.25rem;
}

.profile-language-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 7px 12px;
}

.profile-language-copy {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.profile-language-copy strong {
  font-size: 0.82rem;
}

.language-segment {
  width: min(168px, 46vw);
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.72fr) minmax(0, 0.9fr);
  gap: 3px;
  padding: 4px;
  border-radius: 8px;
}

.language-option {
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.profile-signout {
  min-height: 48px;
  gap: 10px;
  margin-top: 13px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 0.84rem;
}

.profile-signout svg {
  width: 17px;
  height: 17px;
}

/* Profile footer: keep the account exit action and external brand links in the
   same card language as the rest of the Profile directory. */
.phone-frame.is-profile-screen .profile-signout {
  border-radius: 24px;
}

.profile-footer-info {
  margin-top: 14px;
  padding-bottom: 14px;
}

.profile-app-version {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin: 0 0 16px;
  color: #7d889d;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.35;
}

.profile-app-version strong {
  color: #65718a;
  font-weight: 800;
}

.profile-social-section {
  text-align: left;
}

.profile-social-section h3 {
  margin: 0 0 8px 2px;
  color: #69758f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.profile-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-social-link {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(208, 219, 237, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  box-shadow: 0 8px 20px rgba(50, 76, 125, 0.07);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: var(--ouson-type-control-weight, 800);
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-social-link img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

.profile-social-link:focus-visible {
  outline: 3px solid rgba(28, 99, 226, 0.22);
  outline-offset: 2px;
}

.profile-social-link:active {
  transform: scale(0.98);
  border-color: rgba(29, 44, 101, 0.24);
  box-shadow: 0 4px 12px rgba(50, 76, 125, 0.08);
}

@media (max-width: 350px) {
  .profile-social-link {
    gap: 7px;
    padding-inline: 10px;
    font-size: 0.69rem;
  }
}

@media (max-width: 360px) {
  .language-segment {
    width: 148px;
  }

  .language-option {
    padding-inline: 5px;
    font-size: 0.63rem;
  }
}

.phone-frame.screen-router-ready.is-profile-screen .app-content {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 76px;
  border: 0;
  border-top: 1px solid rgba(226, 232, 244, 0.95);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 14px 32px rgba(29, 44, 101, 0.13);
  padding: 10px 20px calc(8px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(14px);
}

.nav-item {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 52px;
  background: transparent;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  border: 0;
  border-radius: 18px;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav-item::before {
  display: none;
}

.nav-item:not(.nav-item-add).is-active {
  color: var(--navy);
  transform: translateY(-2px);
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-glyph {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-item:not(.nav-item-add).is-active .nav-glyph {
  background: var(--navy);
  color: white;
  box-shadow: 0 8px 18px rgba(29, 44, 101, 0.2);
  transform: translateY(-1px);
}

.nav-item-add {
  transform: translateY(-2px);
  color: var(--navy);
  font-weight: 900;
}

.nav-item-add .nav-glyph {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  border: 0;
  box-shadow: 0 13px 26px rgba(29, 44, 101, 0.32);
}

.nav-item-add::before {
  display: none;
}

.nav-item-add svg {
  width: 28px;
  height: 28px;
}

.nav-item-add.is-active .nav-glyph {
  background: var(--navy);
  box-shadow: 0 14px 28px rgba(29, 44, 101, 0.36);
  animation: nav-add-pop 260ms cubic-bezier(0.18, 0.92, 0.28, 1.2);
}

.nav-item:not(.nav-item-add).is-active .nav-glyph,
.nav-item:not(.nav-item-add).is-active span:last-child {
  animation: nav-active-pop 220ms cubic-bezier(0.18, 0.92, 0.28, 1.2);
}

@keyframes nav-active-pop {
  0% {
    transform: translateY(2px) scale(0.9);
  }
  100% {
    transform: translateY(-1px) scale(1);
  }
}

@keyframes nav-add-pop {
  0% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.export-actions-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(7, 15, 34, 0.48);
  backdrop-filter: blur(10px);
}

.export-actions-modal[hidden] {
  display: none;
}

.export-actions-card {
  position: relative;
  width: min(360px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 24px 70px rgba(7, 15, 34, 0.28);
}

.export-actions-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f2f5fa;
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.export-actions-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f2f5fa;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-actions-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.3rem;
}

.export-actions-card p {
  margin: 10px 0 18px;
  color: #7a859a;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.export-actions-card p strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.export-action-primary,
.export-action-secondary {
  width: 100%;
  min-height: 50px;
  border-radius: 18px;
  font-weight: 900;
  cursor: pointer;
}

.export-action-primary {
  border: 0;
  background: var(--navy);
  color: white;
  box-shadow: 0 12px 24px rgba(29, 44, 101, 0.18);
}

.export-action-secondary {
  margin-top: 10px;
  border: 1px solid #e2e7f1;
  background: #f7f9fd;
  color: var(--navy);
}

.avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 15, 34, 0.62);
}

.avatar-crop-modal[hidden] {
  display: none;
}

body.bp-scan-loading-open {
  overflow: hidden;
}

.scan-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 15, 34, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scan-loading-overlay[hidden] {
  display: none;
}

.scan-loading-dialog {
  width: min(320px, 100%);
  padding: 30px 24px;
  text-align: center;
  border: 1px solid rgba(29, 44, 101, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 15, 34, 0.36);
}

.scan-loading-dialog h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.2;
}

.scan-loading-dialog p {
  margin: 10px 0 0;
  color: #66728d;
  font-weight: 750;
  line-height: 1.45;
}

.scan-loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border: 4px solid #e2e7f1;
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: bp-scan-spin 0.8s linear infinite;
}

@keyframes bp-scan-spin {
  to {
    transform: rotate(360deg);
  }
}

.capture-retake-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  padding: 20px;
}

.capture-retake-modal[hidden] {
  display: none;
}

.capture-retake-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 15, 34, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.capture-retake-dialog {
  position: relative;
  width: min(390px, 100%);
  max-height: min(680px, calc(100dvh - 40px));
  overflow-y: auto;
  padding: 26px 22px 20px;
  border: 1px solid rgba(29, 44, 101, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(7, 15, 34, 0.36);
}

.capture-retake-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #fff0ed;
  color: #c84432;
}

.capture-retake-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capture-retake-kicker {
  display: block;
  margin-bottom: 5px;
  color: #c84432;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.capture-retake-dialog h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.15;
}

.capture-retake-dialog > p {
  margin: 10px 0 16px;
  color: #606d84;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.capture-retake-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 15px 16px 15px 38px;
  border: 1px solid #e2e7f1;
  border-radius: 16px;
  background: #f7f9fd;
  color: #35435e;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.35;
}

.capture-retake-steps li::marker {
  color: var(--navy);
  font-weight: 950;
}

.capture-retake-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.capture-retake-primary,
.capture-retake-secondary {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  font-weight: 950;
  cursor: pointer;
}

.capture-retake-primary {
  border: 0;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 12px 24px rgba(29, 44, 101, 0.2);
}

.capture-retake-secondary {
  border: 1px solid #e2e7f1;
  background: #fff;
  color: var(--navy);
}

.scan-confirm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dce3ef;
  border-radius: 50%;
  background: #f6f8fc;
  color: var(--navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scan-confirm-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.scan-confirm-close:active {
  transform: scale(0.96);
}

.scan-confirm-close:focus-visible {
  outline: 3px solid rgba(35, 55, 119, 0.24);
  outline-offset: 2px;
}

.scan-confirm-kicker {
  color: #397858;
}

.scan-confirm-dialog > h2 {
  padding-right: 52px;
}

.scan-confirm-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 16px;
  background: #f7f9fd;
}

.scan-confirm-value {
  display: grid;
  justify-items: center;
  min-width: 0;
  padding: 18px 10px 16px;
}

.scan-confirm-value + .scan-confirm-value {
  border-left: 1px solid #dfe6f1;
}

.scan-confirm-value span {
  color: #78849a;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.scan-confirm-value strong {
  color: var(--navy);
  font-size: clamp(2.2rem, 12vw, 3.25rem);
  line-height: 1.05;
}

.scan-confirm-value small {
  color: #68758c;
  font-size: 0.72rem;
  font-weight: 800;
}

body.bp-retake-modal-open {
  overflow: hidden;
}

.bp-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 98;
  display: grid;
  background: #080b12;
}

.bp-camera-modal[hidden] {
  display: none;
}

.bp-camera-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #080b12;
  color: #fff;
}

.bp-camera-header {
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) 18px 14px;
  background: rgba(8, 11, 18, 0.92);
}

.bp-camera-header > div {
  display: grid;
  gap: 2px;
}

.bp-camera-header span {
  color: #aeb8ca;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bp-camera-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
}

.bp-camera-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bp-camera-close svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.bp-camera-model-badge {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  letter-spacing: 0 !important;
}

.bp-camera-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #151a24;
}

.bp-camera-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bp-camera-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 32px;
  background: #171d29;
  color: #fff;
  text-align: center;
}

.bp-camera-placeholder[hidden] {
  display: none;
}

.bp-camera-placeholder span {
  color: #aeb8ca;
  font-size: 0.84rem;
  line-height: 1.45;
}

.bp-monitor-guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0 35%, rgba(3, 7, 15, 0.48) 82%);
}

.bp-monitor-product-guide {
  position: relative;
  height: min(76%, 650px);
  aspect-ratio: 530 / 730;
  /* The BSX556 LCD center sits at 63.018% of the guide asset width. */
  transform: translateX(-13.018%);
}

.bp-monitor-product-guide[data-model="BSX516"] {
  width: min(94%, 620px);
  height: auto;
  aspect-ratio: 751 / 894;
  transform: none;
}

/* Match the iOS guide proportions; do not crop or digitally zoom the video. */
.platform-android .bp-monitor-product-guide {
  height: min(76%, 650px);
}

.platform-android .bp-monitor-product-guide[data-model="BSX516"] {
  width: min(94%, 620px);
  height: auto;
}

@media (max-width: 390px) {
  .platform-android .bp-camera-header {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    row-gap: 7px;
  }

  .platform-android .bp-camera-close {
    grid-row: 1 / 3;
  }

  .platform-android .bp-camera-header > div {
    grid-column: 2;
    min-width: 0;
  }

  .platform-android .bp-camera-header h2 {
    white-space: nowrap;
  }

  .platform-android .bp-camera-model-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
    padding: 6px 9px;
    font-size: 0.6rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
}

.bp-monitor-product-guide[data-model="BSX516"] > img {
  opacity: 0.34;
}

.bp-monitor-product-guide > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.34;
  filter: saturate(0.42) brightness(1.42) contrast(0.9);
}

.bp-monitor-lcd-guide {
  position: absolute;
  left: 42.264%;
  top: 17.26%;
  width: 41.509%;
  height: 35.342%;
  border: 2px solid #69adff;
  background: rgba(36, 112, 214, 0.06);
  box-shadow: 0 0 0 1px rgba(4, 11, 24, 0.42), 0 0 18px rgba(68, 146, 255, 0.24);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.bp-monitor-product-guide[data-model="BSX516"] .bp-monitor-lcd-guide {
  left: 20.506%;
  top: 13.647%;
  width: 49.534%;
  height: 56.823%;
}

.bp-camera-stage.is-holding .bp-monitor-lcd-guide {
  border-color: #ffd76a;
  background: rgba(255, 199, 65, 0.08);
  box-shadow: 0 0 0 1px rgba(4, 11, 24, 0.42), 0 0 22px rgba(255, 199, 65, 0.3);
}

.bp-camera-stage.is-ready .bp-monitor-lcd-guide {
  border-color: #65e59c;
  background: rgba(59, 205, 124, 0.1);
  box-shadow: 0 0 0 1px rgba(4, 11, 24, 0.42), 0 0 24px rgba(59, 205, 124, 0.38);
}

.bp-monitor-lcd-guide i {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #7ebcff;
  border-style: solid;
}

.bp-monitor-lcd-guide i:nth-child(1) {
  left: -3px;
  top: -3px;
  border-width: 4px 0 0 4px;
}

.bp-monitor-lcd-guide i:nth-child(2) {
  right: -3px;
  top: -3px;
  border-width: 4px 4px 0 0;
}

.bp-monitor-lcd-guide i:nth-child(3) {
  right: -3px;
  bottom: -3px;
  border-width: 0 4px 4px 0;
}

.bp-monitor-lcd-guide i:nth-child(4) {
  left: -3px;
  bottom: -3px;
  border-width: 0 0 4px 4px;
}

.bp-camera-live-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  width: max-content;
  max-width: calc(100% - 36px);
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(8, 11, 18, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.bp-camera-stage.is-holding .bp-camera-live-hint {
  background: rgba(84, 61, 6, 0.86);
}

.bp-camera-stage.is-ready .bp-camera-live-hint {
  background: rgba(7, 86, 47, 0.9);
}

.bp-camera-actions {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 20px max(18px, env(safe-area-inset-bottom));
  background: #080b12;
}

.bp-camera-library,
.bp-camera-help {
  min-height: 42px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 850;
}

.bp-camera-library {
  border: 0;
  background: transparent;
}

.bp-camera-help {
  display: grid;
  place-items: center;
  text-align: center;
}

.bp-camera-auto-indicator {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: auto;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  opacity: 0.72;
  pointer-events: none;
}

.bp-camera-auto-indicator span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #69adff;
  box-shadow: 0 0 0 10px rgba(105, 173, 255, 0.16);
  animation: bp-camera-auto-pulse 1.4s ease-in-out infinite;
}

.bp-camera-stage.is-holding + .bp-camera-actions .bp-camera-auto-indicator span {
  background: #ffd76a;
  box-shadow: 0 0 0 10px rgba(255, 215, 106, 0.18);
}

.bp-camera-stage.is-ready + .bp-camera-actions .bp-camera-auto-indicator span {
  background: #65e59c;
  box-shadow: 0 0 0 10px rgba(101, 229, 156, 0.2);
}

@keyframes bp-camera-auto-pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.62;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

body.bp-camera-open {
  overflow: hidden;
}

.avatar-crop-card {
  width: min(360px, 100%);
  padding: 18px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 24px 70px rgba(7, 15, 34, 0.28);
}

.avatar-crop-head {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.avatar-crop-head h2 {
  margin: 0;
  color: var(--navy);
  text-align: center;
  font-size: 1.08rem;
}

.avatar-crop-head button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f2f5fa;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
}

#avatar-crop-apply {
  background: var(--navy);
  color: white;
}

.avatar-crop-preview {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef2f7;
  box-shadow: 0 0 0 8px #f7f8fc, 0 0 0 10px rgba(29, 44, 101, 0.08);
}

.avatar-crop-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.avatar-crop-preview img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform-origin: center;
  user-select: none;
}

.avatar-crop-controls {
  display: grid;
  gap: 14px;
}

.avatar-crop-controls label {
  display: grid;
  gap: 8px;
}

.avatar-crop-controls span {
  color: #7f8ba0;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.avatar-crop-controls input {
  width: 100%;
  accent-color: var(--navy);
}

/* Unified in-app page headers. */
.account-topbar,
.goals-topbar,
.measurement-topbar,
.history-topbar,
.export-topbar,
.notifications-topbar,
.news-topbar,
.edit-info-topbar,
.help-hero,
.manual-topbar,
.contact-topbar,
.devices-topbar,
.privacy-topbar,
.password-topbar,
.profile-hero {
  min-height: 88px;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 18px 20px;
}

.account-topbar h2,
.goals-topbar h2,
.measurement-topbar h2,
.history-topbar h2,
.export-topbar h2,
.notifications-topbar h2,
.news-topbar h2,
.edit-info-topbar h2,
.help-hero h2,
.manual-topbar h2,
.contact-topbar h2,
.devices-topbar h2,
.privacy-topbar h2,
.password-topbar h2,
.profile-hero h2 {
  margin: 0;
  text-align: center;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.goals-back,
.measurement-close,
.history-back,
.export-back,
.notifications-back,
.news-back,
.edit-info-back,
.help-back,
.manual-back,
.contact-back,
.devices-back,
.privacy-back,
.password-back,
.profile-menu {
  flex-shrink: 0;
}

/* Lightweight app-style page titles, matching the headerless Home direction. */
.account-topbar,
.goals-topbar,
.measurement-topbar,
.history-topbar,
.export-topbar,
.notifications-topbar,
.news-topbar,
.edit-info-topbar,
.help-hero,
.manual-topbar,
.contact-topbar,
.devices-topbar,
.privacy-topbar,
.password-topbar,
.profile-hero {
  min-height: 54px !important;
  margin: 0 !important;
  padding: 4px 6px 14px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--navy) !important;
  box-shadow: none !important;
}

.account-topbar h2,
.goals-topbar h2,
.measurement-topbar h2,
.history-topbar h2,
.export-topbar h2,
.notifications-topbar h2,
.news-topbar h2,
.edit-info-topbar h2,
.help-hero h2,
.manual-topbar h2,
.contact-topbar h2,
.devices-topbar h2,
.privacy-topbar h2,
.password-topbar h2,
.profile-hero h2 {
  color: var(--navy);
  font-size: 1.08rem;
}

.account-back,
.goals-back,
.measurement-close,
.history-back,
.export-back,
.notifications-back,
.news-back,
.edit-info-back,
.help-back,
.manual-back,
.contact-back,
.devices-back,
.privacy-back,
.password-back,
.profile-menu {
  color: var(--navy) !important;
}

.goals-shell,
.measurement-shell,
.goals-screen,
.history-screen,
.form-block,
#add-record,
.history-page,
.export-page,
.notifications-page,
.news-page,
.edit-info-page,
.help-page,
.manual-page,
.contact-page,
.devices-page,
.privacy-page,
.password-page,
.profile-page {
  margin-top: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.goals-screen,
.history-screen,
.export-page,
.notifications-page,
.news-page,
.edit-info-page,
.help-page,
.manual-page,
.contact-page,
.devices-page,
.privacy-page,
.password-page,
.profile-page {
  min-height: 0 !important;
}

@media (max-width: 430px) {
  html,
  body,
  .phone-frame {
    font-size: 16px;
  }

  .app-stage {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand-strip {
    display: none;
  }

  .top-shell {
    min-height: 62px;
    margin: calc(env(safe-area-inset-top, 0px) + 8px) 14px 0;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .top-icon,
  .avatar {
    width: 38px;
    height: 38px;
  }

  .header-icon {
    width: 20px;
    height: 20px;
  }

  .top-brand {
    gap: 2px;
    padding: 0 8px;
  }

  .brand-logo-image {
    width: min(100%, 122px);
  }

  .brand-support {
    font-size: 0.48rem;
    letter-spacing: 0.16em;
  }

  .phone-frame.screen-router-ready.is-home-screen .app-content {
    height: 100%;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .welcome-panel h1 {
    font-size: 1.64rem;
  }

  .home-checkin-block {
    margin-top: 14px;
  }

  .section-block {
    margin-top: 18px;
  }

  .stats-grid {
    gap: 12px;
    margin-top: 16px;
  }

  .health-card {
    grid-template-rows: 48px 1fr;
    border-radius: 16px;
  }

  .card-top {
    min-height: 48px;
    padding: 10px 38px 10px 14px;
    font-size: 0.9rem;
  }

  .card-corner-icon {
    right: 12px;
    width: 22px;
    height: 22px;
  }

  .card-body {
    min-height: 150px;
    grid-template-rows: minmax(70px, auto) minmax(28px, auto) 28px;
    row-gap: 5px;
    padding: 12px 14px 12px;
  }

  .card-body strong {
    font-size: 1.66rem;
  }

  .goal-chip {
    padding: 6px 8px;
  }

  .home-weight-card {
    gap: 12px;
    padding: 14px;
  }

  .side-drawer {
    width: min(82vw, 320px);
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .measurement-meta {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .measurement-meta input {
    font-size: 16px;
  }

  .custom-date-range {
    grid-template-columns: 1fr;
  }

  .reminder-time-field {
    grid-template-columns: 28px minmax(126px, 1fr) auto;
    gap: 8px;
  }

  .device-form {
    margin-inline: 14px;
    padding: 18px;
  }

  .device-registration-check h3 {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .device-check-options label {
    min-height: 62px;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 12px !important;
    padding: 12px;
  }

  .device-check-options input {
    width: 16px;
    height: 16px;
    min-height: 16px;
  }

  .device-check-options strong {
    font-size: 0.8rem;
  }

  .device-check-options small {
    font-size: 0.68rem;
  }

  .large-input-row input,
  .goal-number-field input {
    font-size: 2.3rem;
  }
}

@media (max-width: 430px) {
  .brand-strip.app-logo-strip,
  .screen-logo-strip {
    min-height: 24px;
    padding-bottom: 8px;
  }

  .app-top-logo {
    width: 76px;
    max-height: 16px;
    transform: translateX(4px);
  }
}

/* Cross-platform mobile stability for Android Chrome, iOS Safari, and installed PWA mode. */
html,
body {
  width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  max-width: 100%;
  line-height: normal;
}

button,
label,
select,
input[type="checkbox"],
input[type="radio"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
  color-scheme: light;
}

input[type="checkbox"],
input[type="radio"],
.switch,
.switch-slider,
.row-icon,
.notification-icon,
.card-corner-icon,
.option-icon,
.avatar,
.top-icon {
  flex: 0 0 auto;
}

.app-content,
.app-screen,
.welcome-panel,
.section-head,
.health-card,
.card-top,
.card-body,
.goal-chip,
.home-weight-card,
.home-weight-main,
.home-weight-grid > *,
.alert-card,
.alert-copy,
.settings-row,
.row-label,
.goal-card,
.goal-card-head,
.measurement-card,
.ocr-scan-card,
.large-field,
.large-input-row,
.measurement-meta,
.notes-card,
.history-trend-card,
.history-card,
.log-card,
.log-content,
.export-page,
.export-section,
.report-type-option,
.notification-row,
.notification-copy,
.manual-item,
.manual-copy,
.device-card,
.device-copy,
.device-check-options label {
  min-width: 0;
}

.goal-tab,
.measurement-tab,
.history-tab,
.device-tab,
.export-pill,
.card-top span:first-child,
.large-input-row strong,
.goal-number-field strong,
.reminder-time-input {
  white-space: nowrap;
}

.goal-tabs,
.measurement-tabs,
.history-tabs,
.device-tabs {
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.goal-tabs::before,
.measurement-tabs::before,
.history-tabs::before {
  content: "";
  flex: 0 0 var(--tab-leading-space);
  margin-inline-end: -12px;
}

.goal-tabs {
  margin-inline: calc(0px - var(--app-inline-gutter));
  padding-inline: 0;
  --tab-leading-space: calc(var(--app-inline-gutter) + 16px);
}

.measurement-tabs {
  margin-inline: calc(-16px - var(--app-inline-gutter));
  padding-inline: 0;
  --tab-leading-space: calc(16px + var(--app-inline-gutter));
}

.history-tabs {
  margin-inline: calc(0px - var(--app-inline-gutter));
  padding-inline: 0;
  --tab-leading-space: calc(var(--app-inline-gutter) + 22px);
}

.device-tabs {
  gap: 12px;
  margin-inline: 0;
  padding-inline: 2px;
  scroll-padding-inline: 2px;
}

.goal-tabs::-webkit-scrollbar,
.measurement-tabs::-webkit-scrollbar,
.history-tabs::-webkit-scrollbar,
.device-tabs::-webkit-scrollbar {
  display: none;
}

.goal-tab,
.measurement-tab,
.history-tab,
.device-tab,
.export-pill {
  box-shadow: none;
}

.goal-tab.is-active,
.measurement-tab.is-active,
.history-tab.is-active,
.device-tab.is-active,
.export-pill.is-active {
  box-shadow: none;
}

.card-body strong,
.large-input-row input,
.goal-number-field input,
.home-weight-main strong,
.history-value,
.log-content strong {
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  min-height: 46px;
  line-height: 1.2;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  min-height: 1.2em;
  text-align: left;
}

@media (max-width: 640px), (display-mode: standalone) {
  :root {
    --app-inline-gutter: max(14px, env(safe-area-inset-left), env(safe-area-inset-right));
  }

  .app-stage {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    place-items: stretch;
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-content {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .phone-frame.screen-router-ready:not(.is-home-screen):not(.is-auth-screen) .app-content {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  }

  .side-drawer {
    width: min(78vw, 292px);
  }

  .drawer-scroll {
    padding: 14px 12px 24px;
  }

  .settings-row {
    min-height: 54px;
    gap: 10px;
    padding: 12px 14px;
  }

  .goal-tab,
  .measurement-tab,
  .history-tab {
    min-height: 46px;
    padding-inline: 18px;
    font-size: 0.94rem;
  }

  .history-list-head {
    padding-inline: 14px;
  }

  .device-tab {
    min-height: 38px;
    padding-inline: 12px;
  }

  .large-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .notification-row,
  .notification-row.has-arrow,
  .notification-row.reminder-time-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 14px;
  }

  .notification-row.has-arrow {
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
  }

  .notification-icon {
    width: 38px;
    height: 38px;
  }

  .reminder-time-field {
    grid-template-columns: 28px minmax(122px, 1fr) auto;
  }

  .reminder-time-remove {
    min-width: 56px;
  }
}

/* iOS installed PWAs add a large Home Indicator safe area. Keep the nav visually lower like native apps. */
@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) {
    .bottom-nav {
      min-height: 78px;
      padding: 8px 18px max(14px, calc(env(safe-area-inset-bottom, 0px) * 0.55));
    }

    .nav-item {
      min-height: 48px;
      gap: 2px;
    }

    .nav-item-add {
      transform: translateY(-5px);
    }

    .phone-frame.screen-router-ready.is-home-screen .app-content {
      padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px));
    }

    .phone-frame.screen-router-ready:not(.is-home-screen):not(.is-auth-screen) .app-content {
      padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
    }
  }
}

/* Two-step OUSON Health sign-in flow. */
#sign-in.signin-page {
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 24%, rgba(31, 98, 232, 0.42), transparent 30%),
    radial-gradient(circle at 86% 34%, rgba(20, 68, 174, 0.48), transparent 34%),
    linear-gradient(180deg, #071948 0%, #09276c 56%, #f4f7fc 56%, #f4f7fc 100%);
  font-family: inherit;
}

#sign-in .signin-hero {
  position: relative;
  min-height: clamp(430px, 58svh, 510px);
  align-items: center;
  justify-content: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 34px) 24px 110px;
  text-align: center;
}

#sign-in .signin-step-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 24px);
  left: 18px;
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

#sign-in .signin-step-back svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sign-in .signin-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(8px, 2svh, 18px);
  color: #fff;
}

#sign-in .signin-brand img {
  width: clamp(104px, 29vw, 126px);
  height: clamp(104px, 29vw, 126px);
  display: block;
  border-radius: 23%;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 11, 51, 0.28);
}

#sign-in .signin-brand-tagline,
#create-account .account-brand-tagline,
#forgot-password-page .forgot-password-brand span {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

#sign-in .signin-copy {
  margin-top: clamp(36px, 5.2svh, 52px);
}

#sign-in .signin-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.05rem, 9.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#sign-in .signin-copy p {
  max-width: none;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

#sign-in .signin-email-copy,
#sign-in .signin-email-panel {
  display: none;
}

#sign-in .signin-card {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  margin: -92px auto 0;
  padding: 30px 24px 28px;
  border: 1px solid rgba(224, 231, 242, 0.82);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 24px 48px rgba(30, 47, 93, 0.15);
}

#sign-in .signin-email-option {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid #dfe6f1;
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 650;
  text-align: left;
  box-shadow: 0 8px 18px rgba(30, 49, 92, 0.06);
  cursor: pointer;
}

#sign-in .signin-email-option-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #173984, #0d286d);
  color: #fff;
}

#sign-in .signin-email-option-icon svg,
#sign-in .signin-option-arrow {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sign-in .signin-option-arrow {
  width: 21px;
  height: 21px;
  justify-self: end;
}

#sign-in .signin-divider {
  margin: 28px 4px 22px;
  color: #7a86a0;
  font-size: 0.78rem;
  font-weight: 600;
}

#sign-in .signin-divider::before,
#sign-in .signin-divider::after {
  background: #dfe5ef;
}

#sign-in .social-login-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

#sign-in .social-login,
#sign-in .apple-login {
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #dfe6f1;
  border-radius: 15px;
  background: #fff;
  color: #111936;
  box-shadow: none;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
}

#sign-in .social-login > span:last-child {
  width: auto;
  height: auto;
}

#sign-in .google-mark svg {
  width: 22px;
  height: 22px;
}

#sign-in .apple-mark {
  color: #000;
  font-size: 1.38rem;
}

#sign-in .signin-legal {
  margin: 28px 0 0;
  color: #7b879f;
  font-size: 0.88rem;
  font-weight: 500;
}

#sign-in .signin-legal button {
  color: #073aab;
  font-weight: 700;
}

#sign-in .signin-panel {
  gap: 17px;
}

#sign-in .signin-form label {
  gap: 8px;
  color: #25365f;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#sign-in .signin-form input {
  min-height: 58px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 500;
}

#sign-in .signin-password-wrap {
  position: relative;
  display: block;
}

#sign-in .signin-password-wrap input {
  padding-right: 52px;
}

#sign-in .signin-password-toggle {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #526486;
  cursor: pointer;
}

#sign-in .signin-password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sign-in .signin-row {
  margin-top: 18px;
}

#sign-in .remember-row {
  color: #1f2d54 !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
}

#sign-in .remember-row input {
  width: 18px;
  min-height: 18px;
}

#sign-in .link-button {
  color: #064fc2;
  font-size: 0.82rem;
  font-weight: 600;
}

#sign-in .signin-primary {
  min-height: 54px;
  margin-top: 22px;
  border-radius: 15px;
  background: linear-gradient(90deg, #0a2e91, #082270);
  box-shadow: 0 12px 24px rgba(10, 42, 133, 0.2);
  font-size: 0.96rem;
  font-weight: 700;
}

#sign-in .signin-options-return {
  width: 100%;
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: #064fc2;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

#sign-in.is-email-step .signin-step-back {
  display: grid;
}

#sign-in.is-email-step .signin-options-copy,
#sign-in.is-email-step .signin-options-panel {
  display: none;
}

#sign-in.is-email-step .signin-email-copy,
#sign-in.is-email-step .signin-email-panel {
  display: block;
}

#sign-in.is-email-step .signin-copy {
  margin-top: clamp(38px, 5svh, 50px);
}

#sign-in.is-email-step .signin-copy h1 {
  font-size: clamp(1.95rem, 8.6vw, 2.45rem);
}

#sign-in.is-email-step .signin-hero {
  min-height: clamp(430px, 56svh, 495px);
}

#sign-in.is-email-step .signin-card {
  margin-top: -74px;
  padding-top: 28px;
}

html.platform-android #sign-in.signin-page {
  height: auto;
  min-height: 100%;
  background-attachment: scroll;
}

html.platform-android #sign-in .apple-login {
  display: none !important;
}

@media (max-height: 760px) {
  #sign-in .signin-hero,
  #sign-in.is-email-step .signin-hero {
    min-height: 410px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
  }

  #sign-in .signin-brand img {
    width: 92px;
    height: 92px;
  }

  #sign-in .signin-copy,
  #sign-in.is-email-step .signin-copy {
    margin-top: 26px;
  }

  #sign-in .signin-copy h1 {
    font-size: 1.9rem;
  }

  #sign-in .signin-copy p {
    margin-top: 10px;
    font-size: 0.88rem;
  }

  #sign-in .signin-card {
    margin-top: -76px;
    padding: 22px 18px;
  }

  #sign-in .signin-email-option {
    min-height: 64px;
  }

  #sign-in .signin-divider {
    margin: 20px 4px 16px;
  }

  #sign-in .social-login,
  #sign-in .apple-login {
    min-height: 52px;
  }

  #sign-in .signin-legal {
    margin-top: 20px;
  }

  #sign-in.is-email-step .signin-form input {
    min-height: 50px;
  }

  #sign-in.is-email-step .signin-panel {
    gap: 12px;
  }

  #sign-in.is-email-step .signin-row {
    margin-top: 14px;
  }

  #sign-in.is-email-step .signin-primary {
    min-height: 49px;
    margin-top: 16px;
  }
}

/* OUSON Health account creation flow. */
#create-account.create-account-page {
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0 0 calc(26px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 22%, rgba(31, 98, 232, 0.42), transparent 30%),
    radial-gradient(circle at 86% 33%, rgba(20, 68, 174, 0.48), transparent 34%),
    linear-gradient(180deg, #071948 0%, #09276c 64%, #f4f7fc 64%, #f4f7fc 100%);
  color: var(--navy);
  font-family: inherit;
}

#create-account .account-topbar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 16px;
  z-index: 4;
  min-height: 44px;
  display: block;
}

#create-account .account-topbar::after {
  display: none;
}

#create-account .account-back {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

#create-account .account-back svg {
  width: 25px;
  height: 25px;
}

#create-account .account-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 28px);
  color: #fff;
}

#create-account .account-brand img {
  width: 108px;
  height: 108px;
  display: block;
  border-radius: 23%;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 11, 51, 0.28);
}

#create-account .account-intro {
  max-width: 360px;
  margin: 0 auto;
  padding: 24px 24px 104px;
  color: #fff;
  text-align: center;
}

#create-account .account-intro h1 {
  margin: 0;
  font-size: clamp(1.85rem, 8vw, 2.24rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#create-account .account-intro p {
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.91rem;
  font-weight: 500;
  line-height: 1.48;
}

#create-account .account-form {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  margin: -74px auto 0;
  padding: 24px 22px 22px;
  border: 1px solid rgba(224, 231, 242, 0.88);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 24px 48px rgba(30, 47, 93, 0.15);
}

#create-account .account-field-grid {
  gap: 16px;
}

#create-account .account-form label {
  gap: 8px;
  color: #25365f;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

#create-account .account-form input[type="text"],
#create-account .account-form input[type="email"],
#create-account .account-form input[type="tel"],
#create-account .account-form input[type="password"] {
  min-height: 58px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  padding: 0 16px;
  font-size: 0.94rem;
  font-weight: 500;
  box-shadow: 0 7px 18px rgba(30, 49, 92, 0.035);
}

#create-account .account-form input::placeholder {
  color: #8e98ac;
  opacity: 1;
}

#create-account .account-preferences {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e4e9f1;
}

#create-account .account-preferences h3 {
  margin-bottom: 6px;
  color: #526486;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

#create-account .preference-row {
  min-height: 72px;
  padding: 10px 0;
  border-top: 0;
}

#create-account .preference-icon {
  background: #edf3ff;
  color: #123889;
}

#create-account .preference-row strong {
  color: #20345f;
  font-size: 0.88rem;
  font-weight: 700;
}

#create-account .preference-row small {
  color: #7d8ba5;
  font-size: 0.72rem;
  font-weight: 500;
}

#create-account .medical-disclaimer-auth {
  margin: 8px 0 0;
  border-color: #b9d1fb;
  border-radius: 16px;
  background: #f2f7ff;
  box-shadow: none;
}

#create-account .medical-disclaimer-auth strong {
  color: #17336f;
  font-size: 0.82rem;
}

#create-account .medical-disclaimer-auth p {
  color: #60708f;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.42;
}

#create-account .terms-row {
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 10px !important;
  margin-top: 16px;
  color: #71809c !important;
  font-size: 0.76rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none;
}

#create-account .terms-row input {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0 !important;
  border-width: 1.5px;
  border-radius: 5px;
}

#create-account .terms-row input:checked::after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border-width: 0 2px 2px 0;
}

#create-account .terms-row a {
  color: #0754c9;
  text-decoration: none;
}

#create-account .account-primary {
  min-height: 56px;
  margin-top: 18px;
  border-radius: 15px;
  background: linear-gradient(90deg, #0a2e91, #082270);
  box-shadow: 0 12px 24px rgba(10, 42, 133, 0.2);
  font-size: 0.96rem;
  font-weight: 700;
}

#create-account .account-switch {
  margin: 24px 0 0;
  padding: 0 16px;
  color: #7b879f;
  font-size: 0.86rem;
  font-weight: 500;
}

#create-account .account-switch button {
  color: #073aab;
  font-weight: 700;
}

#create-account.is-verifying-signup .account-intro,
#create-account.is-verifying-signup .account-form,
#create-account.is-verifying-signup .account-switch {
  display: none;
}

#create-account.is-verifying-signup {
  background:
    radial-gradient(circle at 18% 22%, rgba(31, 98, 232, 0.42), transparent 30%),
    radial-gradient(circle at 86% 33%, rgba(20, 68, 174, 0.48), transparent 34%),
    linear-gradient(180deg, #071948 0%, #09276c 54%, #f4f7fc 54%, #f4f7fc 100%);
}

#create-account .signup-verification-panel {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  margin: 52px auto 0;
  padding: 30px 22px 24px;
  border: 1px solid rgba(224, 231, 242, 0.88);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 24px 48px rgba(30, 47, 93, 0.15);
  text-align: center;
}

#create-account .signup-verification-panel[hidden] {
  display: none;
}

#create-account .signup-verification-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #edf3ff;
  color: #0b42b4;
}

#create-account .signup-verification-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#create-account .signup-verification-kicker {
  margin: 0 0 8px;
  color: #7584a1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

#create-account .signup-verification-panel h2 {
  margin: 0;
  color: #142762;
  font-size: 1.45rem;
  line-height: 1.2;
}

#create-account .signup-verification-copy {
  margin: 12px auto 22px;
  color: #71809c;
  font-size: 0.88rem;
  line-height: 1.5;
}

#create-account .signup-verification-copy strong {
  display: block;
  color: #20345f;
  overflow-wrap: anywhere;
}

#create-account .signup-verification-form label {
  display: block;
  margin-bottom: 8px;
  color: #526486;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

#create-account #signup-verification-code {
  width: 100%;
  min-height: 64px;
  padding: 0 14px;
  border: 1px solid #d6e0f0;
  border-radius: 16px;
  background: #f7f9fd;
  color: #102b72;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-align: center;
}

#create-account .signup-verification-form .account-primary {
  width: 100%;
}

#create-account .signup-verification-panel .auth-inline-status {
  margin: 14px 0 0;
}

#create-account .signup-verification-secondary,
#create-account .signup-verification-link {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: transparent;
  color: #0b45bd;
  font-size: 0.86rem;
  font-weight: 700;
}

#create-account .signup-verification-link {
  margin-top: 12px;
  color: #71809c;
}

@media (max-height: 760px) {
  #create-account .account-brand {
    padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  }

  #create-account .account-brand img {
    width: 92px;
    height: 92px;
  }

  #create-account .account-intro {
    padding-top: 18px;
    padding-bottom: 88px;
  }

  #create-account .account-form {
    margin-top: -62px;
    padding: 20px 18px;
  }
}

/* Standalone password recovery flow. */
#forgot-password-page.forgot-password-page {
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0 0 calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 24%, rgba(31, 98, 232, 0.42), transparent 30%),
    radial-gradient(circle at 86% 34%, rgba(20, 68, 174, 0.48), transparent 34%),
    linear-gradient(180deg, #071948 0%, #09276c 58%, #f4f7fc 58%, #f4f7fc 100%);
  color: var(--navy);
  font-family: inherit;
}

#forgot-password-page .forgot-password-hero {
  position: relative;
  min-height: clamp(420px, 55svh, 490px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 34px) 24px 100px;
  text-align: center;
}

#forgot-password-page .forgot-password-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 24px);
  left: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  cursor: pointer;
}

#forgot-password-page .forgot-password-back svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#forgot-password-page .forgot-password-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#forgot-password-page .forgot-password-brand img {
  width: clamp(104px, 29vw, 126px);
  height: clamp(104px, 29vw, 126px);
  display: block;
  border-radius: 23%;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 11, 51, 0.28);
}

#forgot-password-page .forgot-password-copy {
  margin-top: clamp(34px, 4.8svh, 48px);
  color: #fff;
}

#forgot-password-page .forgot-password-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 8.8vw, 2.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

#forgot-password-page .forgot-password-copy p {
  max-width: 350px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
}

#forgot-password-page .forgot-password-card {
  position: relative;
  z-index: 2;
  width: calc(100% - 32px);
  margin: -78px auto 0;
  padding: 28px 22px 24px;
  border: 1px solid rgba(224, 231, 242, 0.86);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 24px 48px rgba(30, 47, 93, 0.15);
}

#forgot-password-page .forgot-password-form,
#forgot-password-page .recovery-code-form {
  display: grid;
  gap: 16px;
}

#forgot-password-page label {
  display: grid;
  gap: 8px;
  color: #25365f;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#forgot-password-page input {
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#forgot-password-page input::placeholder {
  color: #8e98ac;
  opacity: 1;
}

#forgot-password-page .forgot-password-primary,
#forgot-password-page .forgot-password-secondary {
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
}

#forgot-password-page .forgot-password-primary {
  background: linear-gradient(90deg, #0a2e91, #082270);
  color: #fff;
  box-shadow: 0 12px 24px rgba(10, 42, 133, 0.2);
}

#forgot-password-page .forgot-password-secondary {
  border: 1px solid #cfdaf0;
  background: #fff;
  color: #123889;
}

#forgot-password-page .forgot-password-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  color: #7a86a0;
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
}

#forgot-password-page .forgot-password-divider::before,
#forgot-password-page .forgot-password-divider::after {
  content: "";
  height: 1px;
  background: #dfe5ef;
}

#forgot-password-page .auth-inline-status {
  margin: 18px 0 0;
}

#forgot-password-page .forgot-password-return {
  width: 100%;
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: #064fc2;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 650;
  cursor: pointer;
}

@media (max-height: 760px) {
  #forgot-password-page .forgot-password-hero {
    min-height: 400px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
  }

  #forgot-password-page .forgot-password-brand img {
    width: 92px;
    height: 92px;
  }

  #forgot-password-page .forgot-password-copy {
    margin-top: 26px;
  }

  #forgot-password-page .forgot-password-card {
    margin-top: -68px;
    padding: 22px 18px;
  }
}

/* Stronger page-title hierarchy so secondary section titles do not compete with the main screen title. */
.goals-topbar,
.measurement-topbar,
.history-topbar,
.export-topbar,
.notifications-topbar,
.news-topbar,
.edit-info-topbar,
.help-hero,
.manual-topbar,
.contact-topbar,
.devices-topbar,
.privacy-topbar,
.password-topbar,
.profile-hero {
  position: relative;
  min-height: 66px !important;
  padding: 8px 8px 16px !important;
}

.goals-topbar::after,
.measurement-topbar::after,
.history-topbar::after,
.export-topbar::after,
.notifications-topbar::after,
.news-topbar::after,
.edit-info-topbar::after,
.help-hero::after,
.manual-topbar::after,
.contact-topbar::after,
.devices-topbar::after,
.privacy-topbar::after,
.password-topbar::after,
.profile-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 44, 101, 0.18), rgba(29, 44, 101, 0.72), rgba(29, 44, 101, 0.18));
  transform: translateX(-50%);
}

.goals-topbar h2,
.measurement-topbar h2,
.history-topbar h2,
.export-topbar h2,
.notifications-topbar h2,
.news-topbar h2,
.edit-info-topbar h2,
.help-hero h2,
.manual-topbar h2,
.contact-topbar h2,
.devices-topbar h2,
.privacy-topbar h2,
.password-topbar h2,
.profile-hero h2 {
  color: var(--navy) !important;
  font-size: clamp(1.28rem, 5.2vw, 1.55rem) !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.035em !important;
  text-shadow: 0 8px 22px rgba(29, 44, 101, 0.1);
}

.goals-intro h2,
.history-intro h2,
.measurement-intro h2 {
  font-size: 1.12rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.goals-intro p,
.history-intro p,
.measurement-intro p {
  font-size: 0.84rem;
  line-height: 1.34;
}

@media (max-width: 430px) {
  .goals-topbar,
  .measurement-topbar,
  .history-topbar,
  .export-topbar,
  .notifications-topbar,
  .news-topbar,
  .edit-info-topbar,
  .help-hero,
  .manual-topbar,
  .contact-topbar,
  .devices-topbar,
  .privacy-topbar,
  .password-topbar,
  .profile-hero {
    min-height: 62px !important;
    padding-top: 6px !important;
  }

  .goals-topbar h2,
  .measurement-topbar h2,
  .history-topbar h2,
  .export-topbar h2,
  .notifications-topbar h2,
  .news-topbar h2,
  .edit-info-topbar h2,
  .help-hero h2,
  .manual-topbar h2,
  .contact-topbar h2,
  .devices-topbar h2,
  .privacy-topbar h2,
  .password-topbar h2,
  .profile-hero h2 {
    font-size: clamp(1.22rem, 5vw, 1.46rem) !important;
  }
}

body :is(
  .profile-card,
  .settings-card,
  .signin-card,
  .health-card,
  .home-weight-card,
  .alert-card,
  .goal-card,
  .measurement-card,
  .ocr-scan-card,
  .measurement-meta,
  .notes-card,
  .history-trend-card,
  .history-latest-card,
  .history-average-card,
  .history-card,
  .log-card,
  .notification-card,
  .news-hero-card,
  .news-card,
  .edit-info-card,
  .help-category-card,
  .manual-hero-card,
  .feature-card,
  .contact-card,
  .devices-hero-card,
  .device-card,
  .device-information-card,
  .warranty-card,
  .privacy-hero-card,
  .privacy-content-card,
  .privacy-contact-card,
  .password-card,
  .profile-card-main,
  .profile-action-card,
  .profile-language-card,
  .export-actions-card,
  .report-type-option,
  .avatar-crop-card
) {
  border-radius: var(--app-card-radius);
}

.measurement-commit-panel .measurement-save,
.goals-save,
.goal-card-save,
.goal-card-reset {
  border-radius: 18px;
}

.measurement-commit-panel .measurement-date-time .measurement-meta,
.measurement-commit-panel .notes-card {
  border-radius: var(--app-card-radius);
}

/* Keep the single real save action visible on Add Measurement screens. */
.measurement-save-dock {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 17;
  min-height: 54px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 2px solid var(--navy);
  border-radius: 18px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 28px rgba(24, 36, 80, 0.28);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.phone-frame.is-add-record-screen .measurement-save-dock {
  display: inline-flex;
}

.phone-frame.is-add-record-screen .measurement-commit-panel .measurement-save {
  display: none;
}

.phone-frame.is-add-record-screen .app-content {
  padding-bottom: calc(158px + env(safe-area-inset-bottom, 0px)) !important;
}

.measurement-save-dock svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.measurement-save-dock:active {
  transform: scale(0.985);
}

.measurement-save-dock:disabled {
  cursor: wait;
  opacity: 0.72;
}

/* Goals v240: metric-specific status cards replace misleading progress rings. */

.phone-frame.is-goals-screen .goals-intro {
  display: grid;
  gap: 12px;
  padding: 4px 22px 14px;
}

.phone-frame.is-goals-screen .goals-intro p {
  margin: 0;
  font-size: 0.78rem;
}

.goal-data-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dfe6f1;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
}

.goal-data-view button {
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #748097;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  cursor: pointer;
}

.goal-data-view button.is-active {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 5px 14px rgba(29, 44, 101, 0.18);
}

.phone-frame.is-goals-screen .goals-form {
  gap: 12px;
  padding-inline: 14px;
}

.goal-card-summary {
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 18px 0 14px;
}

.goal-card-copy {
  min-width: 0;
}

.goal-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goal-card-copy .goal-card-heading h3 {
  min-width: 0;
  font-size: 1rem;
  line-height: 1.22;
}

.goal-status-chip {
  flex: 0 0 auto;
  max-width: 124px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef2f7;
  color: #6f7b91;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.goal-status-chip[data-status="good"] {
  border-color: rgba(35, 160, 91, 0.18);
  background: #eaf8f0;
  color: #238c53;
}

.goal-status-chip[data-status="caution"] {
  border-color: rgba(216, 151, 25, 0.2);
  background: #fff7df;
  color: #a66b00;
}

.goal-status-chip[data-status="alert"] {
  border-color: rgba(204, 72, 67, 0.18);
  background: #fff0ef;
  color: #be403c;
}

.goal-status-chip[data-status="neutral"] {
  border-color: rgba(52, 92, 172, 0.16);
  background: #eef3ff;
  color: #345cac;
}

.goal-status-chip[data-status="no-data"],
.goal-status-chip[data-status="no-goal"] {
  border-color: #e1e7f0;
  background: #f3f5f9;
  color: #7b879b;
}

.goal-value-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 10px;
  margin-top: 14px;
}

.goal-value-grid > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e8edf5;
  border-radius: 13px;
  background: #f8faff;
}

.goal-value-grid .goal-summary-label {
  min-height: 2.3em;
  margin: 0;
  color: #7d899f;
  font-size: 0.6rem;
  line-height: 1.15;
}

.goal-value-grid .goal-current-value,
.goal-value-grid .goal-summary-value {
  margin-top: 5px;
  color: var(--navy);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.goal-value-grid .goal-current-value {
  font-size: 1.04rem;
}

.goal-status-detail {
  margin: 10px 2px 0;
  color: #66738a;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.38;
}

.goal-status-detail[hidden] {
  display: none;
}

.goal-card[data-goal-panel="temperature"] .goal-editor {
  display: none !important;
}

.goal-edit-toggle {
  min-height: 48px;
  font-size: 0.84rem;
}

@media (max-width: 360px) {
  .goal-card {
    padding-inline: 14px;
  }

  .goal-card-summary {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  .goal-card-heading {
    display: grid;
  }

  .goal-status-chip {
    justify-self: start;
  }

  .goal-value-grid {
    grid-template-columns: 1fr;
  }

  .goal-value-grid .goal-summary-label {
    min-height: 0;
  }
}

/* OUSON Health App design language v250
   A single visual system shared by Home, Goals, Add, History, Profile and support pages. */

:root {
  --ouson-navy: #10246b;
  --ouson-navy-deep: #071b58;
  --ouson-blue: #0d63df;
  --ouson-blue-soft: #edf5ff;
  --ouson-green: #19ae5e;
  --ouson-green-soft: #eaf8f0;
  --ouson-amber: #d78b08;
  --ouson-amber-soft: #fff7df;
  --ouson-red: #e14f4f;
  --ouson-red-soft: #fff0f0;
  --ouson-ink-muted: #68748f;
  --ouson-line: #dfe7f3;
  --ouson-surface: rgba(255, 255, 255, 0.96);
  --ouson-radius-sm: 13px;
  --ouson-radius-md: 17px;
  --ouson-radius-lg: 21px;
  --ouson-shadow: 0 10px 28px rgba(28, 56, 112, 0.09);
  --ouson-shadow-button: 0 10px 20px rgba(16, 36, 107, 0.22);
}

html,
body,
button,
input,
select,
textarea {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    Inter,
    "Avenir Next",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

body {
  color: var(--ouson-navy);
  font-feature-settings: "kern", "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-content {
  --app-inline-gutter: 18px;
  padding-inline: var(--app-inline-gutter);
}

.screen-logo-strip,
.app-logo-strip {
  padding-top: 14px;
  padding-bottom: 8px;
}

.screen-logo-strip img,
.app-logo-strip img,
.brand-logo {
  width: 92px;
  max-height: 31px;
  object-fit: contain;
}

.welcome-panel {
  position: relative;
  padding: 20px 58px 6px 0;
  background: transparent;
  box-shadow: none;
}

.welcome-panel h1 {
  margin: 0;
  color: var(--ouson-navy);
  font-size: clamp(1.72rem, 7vw, 2.05rem);
  font-weight: 820;
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.welcome-subtitle {
  margin: 9px 0 0;
  color: var(--ouson-ink-muted);
  font-size: 0.86rem;
  font-weight: 520;
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.home-notification-button {
  position: absolute;
  top: 20px;
  right: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(219, 228, 242, 0.92);
  border-radius: 50%;
  background: #fff;
  color: var(--ouson-navy);
  box-shadow: var(--ouson-shadow);
  cursor: pointer;
}

.home-notification-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-notification-button > span {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f0183c;
}

.home-checkin-block {
  margin-top: 14px;
}

.home-checkin-block .section-head {
  margin-bottom: 8px;
}

.home-checkin-block .section-kicker {
  margin-bottom: 2px;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
}

.home-checkin-block .section-head h2 {
  color: var(--ouson-navy);
  font-size: 0.83rem;
}

.alert-card {
  min-height: 68px;
  overflow: hidden;
  border: 1px solid var(--ouson-line);
  border-radius: var(--ouson-radius-md);
  background: var(--ouson-surface);
  box-shadow: var(--ouson-shadow);
}

.alert-card-main {
  min-width: 0;
  padding: 12px 8px 12px 12px;
}

.alert-icon {
  width: 39px;
  height: 39px;
  border-radius: 13px;
  background: var(--ouson-amber-soft);
  color: #e2a415;
}

.alert-copy strong {
  color: var(--ouson-navy);
  font-size: 0.8rem;
  line-height: 1.2;
}

.alert-copy p {
  margin-top: 3px;
  color: #8a95aa;
  font-size: 0.67rem;
}

.alert-complete {
  width: 42px;
  margin-right: 10px;
  border-radius: 12px;
  color: var(--ouson-green);
}

.home-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 10px;
}

.home-overview-heading h2 {
  margin: 0;
  color: var(--ouson-navy);
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.home-overview-heading button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ouson-blue);
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.stats-grid {
  gap: 12px;
  margin-top: 0;
}

.health-card {
  grid-template-rows: 47px 1fr;
  overflow: hidden;
  border: 1px solid rgba(219, 228, 242, 0.96);
  border-radius: var(--ouson-radius-md);
  background: var(--ouson-surface);
  box-shadow: var(--ouson-shadow);
}

.card-top {
  min-height: 47px;
  padding: 10px 42px 10px 14px;
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: -0.018em;
}

.card-corner-icon {
  right: 13px;
  width: 23px;
  height: 23px;
}

.health-card[data-status="normal"] .card-top {
  background: linear-gradient(135deg, #22ad59, #55ca71);
}

.health-card[data-status="low"] .card-top {
  background: linear-gradient(135deg, #3b82be, #71b2f0);
}

.health-card[data-status="caution"] .card-top {
  background: linear-gradient(135deg, #e5a115, #f1bf45);
}

.health-card[data-status="danger"] .card-top {
  background: linear-gradient(135deg, #d94747, #ef6f6f);
}

.health-card[data-status="waiting"] .card-top {
  background: linear-gradient(135deg, #73819d, #9ba8bd);
}

.card-body {
  min-height: 180px;
  display: grid;
  grid-template-rows: minmax(55px, auto) auto auto minmax(34px, auto);
  align-content: start;
  row-gap: 8px;
  padding: 16px 14px 13px;
}

.card-body strong {
  align-self: center;
  color: var(--ouson-navy);
  font-size: clamp(1.46rem, 6.35vw, 1.76rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.card-body small {
  justify-self: start;
  width: fit-content;
  min-height: 26px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef4fb;
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.05;
}

.card-body small::before {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
}

.metric-status-normal {
  background: var(--ouson-green-soft) !important;
}

.metric-status-low {
  background: var(--ouson-blue-soft) !important;
}

.metric-status-caution {
  background: var(--ouson-amber-soft) !important;
}

.metric-status-danger {
  background: var(--ouson-red-soft) !important;
}

.health-card[data-status="normal"] .metric-status-waiting {
  color: #118943;
  background: var(--ouson-green-soft) !important;
}

.health-card[data-status="low"] .metric-status-waiting {
  color: #0968c9;
  background: var(--ouson-blue-soft) !important;
}

.health-card[data-status="caution"] .metric-status-waiting {
  color: #a26800;
  background: var(--ouson-amber-soft) !important;
}

.health-card[data-status="danger"] .metric-status-waiting {
  color: #bb3434;
  background: var(--ouson-red-soft) !important;
}

.home-recorded-time {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ouson-ink-muted);
  font-size: 0.62rem;
  font-weight: 560;
  line-height: 1.25;
}

.home-recorded-time[hidden] {
  display: none !important;
}

.phone-frame.screen-router-ready:not(.is-home-screen) .home-checkin-block,
.phone-frame.screen-router-ready:not(.is-home-screen) .home-overview-heading {
  display: none !important;
}

.home-recorded-time::before {
  content: "";
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1.7px solid currentColor;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) 50% 27% / 1px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 66% 62% / 4px 1px no-repeat;
  opacity: 0.9;
}

.goal-chip {
  align-self: end;
  padding: 9px 0 0;
  border-top: 1px solid var(--ouson-line);
  border-radius: 0;
  background: transparent;
  color: var(--ouson-ink-muted);
  font-size: 0.59rem;
  font-weight: 560;
}

.goal-chip b {
  color: var(--ouson-navy);
  font-size: clamp(0.58rem, 2.35vw, 0.68rem);
  font-weight: 780;
}

.home-weight-block {
  margin-top: 16px;
}

.home-weight-block .section-head {
  margin-bottom: 8px;
}

.home-weight-block .section-kicker {
  display: none;
}

.home-weight-block .section-head h2 {
  color: var(--ouson-navy);
  font-size: 1rem;
  font-weight: 820;
}

.section-badge,
.section-pill {
  padding: 7px 11px;
  border: 1px solid var(--ouson-line);
  box-shadow: none;
  font-size: 0.65rem;
}

.home-weight-card {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ouson-line);
  border-radius: var(--ouson-radius-lg);
  background: var(--ouson-surface);
  box-shadow: var(--ouson-shadow);
}

.home-weight-main {
  min-height: 112px;
  align-content: start;
  padding: 4px 0 0;
  border-radius: 0;
  background: transparent;
  color: var(--ouson-navy);
}

.home-weight-main span,
.home-weight-grid span {
  color: var(--ouson-ink-muted);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.home-weight-main strong {
  margin-top: 4px;
  color: var(--ouson-navy);
  font-size: 1.8rem;
  font-weight: 760;
}

.home-weight-main small {
  margin-top: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ouson-ink-muted);
  box-shadow: none;
  font-size: 0.62rem;
  font-weight: 560;
}

.home-weight-icon {
  display: none;
}

.home-weight-grid {
  align-content: stretch;
  gap: 6px;
}

.home-weight-grid > div {
  min-height: 0;
  padding: 8px 9px;
  border: 1px solid var(--ouson-line);
  border-radius: 11px;
  background: #f8faff;
}

.home-weight-grid strong {
  color: var(--ouson-navy);
  font-size: 0.72rem;
}

.goals-topbar,
.measurement-topbar,
.history-topbar,
.profile-topbar,
.support-topbar,
.notifications-topbar,
.settings-topbar {
  padding-top: 14px;
  padding-bottom: 8px;
}

.goals-topbar h2,
.measurement-topbar h2,
.history-topbar h2,
.profile-topbar h2,
.support-topbar h2,
.notifications-topbar h2,
.settings-topbar h2 {
  color: var(--ouson-navy);
  font-size: clamp(1.4rem, 6vw, 1.72rem);
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.goal-data-view {
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--ouson-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--ouson-shadow);
}

.goal-data-view button {
  min-height: 42px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 760;
}

.goal-data-view button.is-active {
  background: linear-gradient(135deg, var(--ouson-navy-deep), #18368e);
  box-shadow: var(--ouson-shadow-button);
}

.goal-card,
.measurement-card,
.history-trend-card,
.history-card,
.history-latest-card,
.profile-card,
.profile-card-main,
.settings-card,
.settings-section,
.notifications-card,
.support-card,
.manual-card,
.device-card,
.export-section,
.form-block,
.notes-card,
.date-card,
.time-card {
  border: 1px solid var(--ouson-line);
  border-radius: var(--ouson-radius-lg);
  background: var(--ouson-surface);
  box-shadow: var(--ouson-shadow);
}

.goal-card {
  padding-inline: 16px;
}

.goal-card-summary {
  grid-template-columns: 43px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.goal-icon {
  width: 43px;
  height: 43px;
  border-radius: 50%;
}

.goal-status-chip {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 0.61rem;
}

.goal-value-grid > div {
  border-color: var(--ouson-line);
  background: #f8faff;
}

.goal-edit-toggle {
  color: var(--ouson-navy);
}

.measurement-tabs {
  gap: 10px;
}

.measurement-tab {
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ouson-line);
  background: #fff;
  color: var(--ouson-navy);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 740;
}

.measurement-tab svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--ouson-blue);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.measurement-tab.is-active {
  border-color: var(--ouson-navy);
  background: linear-gradient(135deg, var(--ouson-navy-deep), #18368e);
  color: #fff;
  box-shadow: var(--ouson-shadow-button);
}

.measurement-tab.is-active svg {
  stroke: currentColor;
}

.measurement-card {
  padding: 18px;
}

.ocr-scan-card {
  border-color: var(--ouson-line);
  border-radius: var(--ouson-radius-md);
  background: #fbfcff;
}

.ocr-scan-summary {
  min-height: 66px;
  border-radius: inherit;
}

.large-field,
.large-input-row,
.measurement-meta,
.notes-card,
.date-card,
.time-card,
.settings-row,
.notification-row,
.manual-item {
  border-color: var(--ouson-line);
}

input,
select,
textarea {
  border-color: var(--ouson-line);
  border-radius: var(--ouson-radius-sm);
  background: #fbfcff;
}

.measurement-save-dock,
.account-primary,
.primary-action,
.profile-primary,
.save-button {
  border: 0;
  background: linear-gradient(135deg, var(--ouson-navy-deep), #173589);
  color: #fff;
  box-shadow: var(--ouson-shadow-button);
}

.history-tab.is-active,
.goal-tab.is-active,
.device-tab.is-active,
.export-pill.is-active {
  background: linear-gradient(135deg, var(--ouson-navy-deep), #173589);
  color: #fff;
}

.history-trend-card,
.history-latest-card,
.log-card {
  overflow: hidden;
}

.profile-card-main h1,
.profile-card h2,
.settings-card h2,
.support-card h2 {
  color: var(--ouson-navy);
  letter-spacing: -0.025em;
}

.bottom-nav {
  min-height: 78px;
  padding: 8px 17px calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(220, 228, 240, 0.96);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -7px 24px rgba(31, 58, 108, 0.06);
  backdrop-filter: blur(18px);
}

.nav-item {
  gap: 2px;
  min-height: 54px;
  color: #65708a;
  font-size: 0.66rem;
  font-weight: 630;
}

.nav-item:not(.nav-item-add).is-active {
  color: var(--ouson-navy);
  transform: none;
}

.nav-glyph {
  width: 25px;
  height: 25px;
  border-radius: 0;
}

.nav-item:not(.nav-item-add).is-active .nav-glyph {
  background: transparent;
  color: var(--ouson-navy);
  box-shadow: none;
  transform: none;
}

.nav-item-add {
  gap: 2px;
  transform: translateY(-8px);
  color: #5f6b84;
}

.nav-item-add .nav-glyph {
  width: 52px;
  height: 52px;
  background: linear-gradient(145deg, var(--ouson-navy-deep), #14368f);
  box-shadow: 0 12px 24px rgba(16, 36, 107, 0.3);
}

.nav-item-add svg {
  width: 27px;
  height: 27px;
}

@media (max-width: 380px) {
  .app-content {
    --app-inline-gutter: 15px;
  }

  .welcome-panel h1 {
    font-size: 1.65rem;
  }

  .stats-grid {
    gap: 10px;
  }

  .card-body {
    min-height: 174px;
    padding-inline: 12px;
  }

  .card-body strong {
    font-size: 1.55rem;
  }

  .home-recorded-time {
    font-size: 0.57rem;
  }

  .goal-chip {
    gap: 5px;
  }

  .home-weight-card {
    grid-template-columns: 1fr;
  }
}

/* Home overview status pills keep their semantic colour after preview/data refreshes. */
.health-card[data-status="normal"] .card-body > small,
.health-card[data-status="normal"] .card-body > small.metric-status-waiting {
  color: #118943 !important;
  background: var(--ouson-green-soft) !important;
}

.health-card[data-status="low"] .card-body > small,
.health-card[data-status="low"] .card-body > small.metric-status-waiting {
  color: #0968c9 !important;
  background: var(--ouson-blue-soft) !important;
}

.health-card[data-status="caution"] .card-body > small,
.health-card[data-status="caution"] .card-body > small.metric-status-waiting {
  color: #9b6300 !important;
  background: var(--ouson-amber-soft) !important;
}

.health-card[data-status="danger"] .card-body > small,
.health-card[data-status="danger"] .card-body > small.metric-status-waiting {
  color: #b83232 !important;
  background: var(--ouson-red-soft) !important;
}

.health-card .card-body > small::before {
  background: currentColor !important;
}

/* Home reference fidelity v251
   Keep the overview as one continuous dashboard: greeting, four vitals, then weight. */
.phone-frame.is-home-screen .home-checkin-block {
  display: none !important;
}

.phone-frame.is-home-screen .app-content {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 255, 255, 0.96), transparent 30%),
    radial-gradient(circle at 93% 16%, rgba(255, 255, 255, 0.8), transparent 29%),
    linear-gradient(145deg, #f1f8ff 0%, #e9f5ff 52%, #f6fbff 100%);
}

.phone-frame.is-home-screen .brand-strip.app-logo-strip {
  min-height: 42px;
  padding: 18px 0 6px;
}

.phone-frame.is-home-screen .welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  column-gap: 16px;
  padding: 22px 0 4px;
}

.phone-frame.is-home-screen .welcome-panel h1 {
  grid-column: 1;
  max-width: 300px;
  font-size: clamp(1.78rem, 7.3vw, 2.08rem);
  font-weight: 730;
  line-height: 1.06;
  letter-spacing: -0.048em;
}

.phone-frame.is-home-screen .welcome-subtitle {
  grid-column: 1 / -1;
  margin-top: 8px;
  font-size: 0.87rem;
  font-weight: 480;
  line-height: 1.38;
}

.phone-frame.is-home-screen .home-notification-button {
  position: relative;
  top: auto;
  right: auto;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  width: 46px;
  height: 46px;
}

.phone-frame.is-home-screen .home-overview-heading {
  margin: 21px 0 12px;
}

.phone-frame.is-home-screen .home-overview-heading h2 {
  font-size: 1.02rem;
  font-weight: 730;
}

.phone-frame.is-home-screen .home-overview-heading button {
  font-size: 0.82rem;
  font-weight: 650;
}

.phone-frame.is-home-screen .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.phone-frame.is-home-screen .health-card {
  grid-template-rows: 45px 1fr;
  min-width: 0;
  border: 0;
  border-radius: 17px;
  box-shadow: 0 9px 25px rgba(40, 71, 123, 0.09);
}

.phone-frame.is-home-screen .card-top {
  min-height: 45px;
  padding: 10px 42px 10px 14px;
  font-size: clamp(0.72rem, 3vw, 0.82rem);
  font-weight: 590;
  line-height: 1.12;
}

.phone-frame.is-home-screen .card-corner-icon {
  right: 13px;
  width: 25px;
  height: 25px;
}

.phone-frame.is-home-screen .card-body {
  min-height: 170px;
  grid-template-rows: minmax(49px, auto) auto auto minmax(32px, auto);
  row-gap: 8px;
  padding: 16px 14px 13px;
}

.phone-frame.is-home-screen .home-metric-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  font-weight: 650;
  letter-spacing: -0.045em;
}

.phone-frame.is-home-screen .home-metric-value > span:first-child {
  font-size: clamp(1.75rem, 7.45vw, 2.08rem);
  line-height: 1;
}

.phone-frame.is-home-screen .home-metric-unit {
  flex: 0 1 auto;
  font-size: clamp(0.56rem, 2.55vw, 0.7rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.phone-frame.is-home-screen .card-body > small {
  min-height: 25px;
  padding: 6px 9px;
  font-size: 0.68rem;
  font-weight: 650;
}

.phone-frame.is-home-screen #steps-status {
  gap: 5px;
  padding-inline: 7px;
  font-size: clamp(0.54rem, 2.2vw, 0.64rem);
  white-space: nowrap;
}

.phone-frame.is-home-screen .home-recorded-time {
  font-size: 0.61rem;
  font-weight: 500;
}

.phone-frame.is-home-screen .goal-chip {
  padding-top: 9px;
  font-size: 0.59rem;
  font-weight: 500;
}

.phone-frame.is-home-screen .goal-chip b {
  font-size: clamp(0.56rem, 2.25vw, 0.65rem);
  font-weight: 690;
}

.phone-frame.is-home-screen .home-weight-block {
  margin-top: 14px;
}

.phone-frame.is-home-screen .home-weight-card {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  min-height: 128px;
  padding: 16px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 9px 25px rgba(40, 71, 123, 0.09);
}

.phone-frame.is-home-screen .home-weight-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
}

.phone-frame.is-home-screen .home-weight-title {
  color: var(--ouson-navy);
  font-size: 0.94rem;
  font-weight: 690;
}

.phone-frame.is-home-screen .home-weight-main strong {
  margin: 7px 0 0;
  font-size: 1.9rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
}

.phone-frame.is-home-screen .home-weight-main small {
  margin-top: 6px;
  font-size: 0.59rem;
}

.phone-frame.is-home-screen .home-weight-delta {
  margin-top: 6px;
  color: var(--ouson-ink-muted);
  font-size: 0.57rem;
  line-height: 1.25;
}

.phone-frame.is-home-screen .home-weight-delta b {
  color: #10a84b;
  font-weight: 650;
}

.phone-frame.is-home-screen .home-weight-chart {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.phone-frame.is-home-screen .home-weight-chart > span {
  align-self: flex-end;
  color: var(--ouson-blue);
  font-size: 0.68rem;
  font-weight: 650;
}

.phone-frame.is-home-screen .home-weight-chart > span b {
  margin-left: 4px;
  font-size: 1rem;
}

.phone-frame.is-home-screen .home-weight-chart svg {
  width: 100%;
  height: 76px;
  overflow: visible;
}

.phone-frame.is-home-screen .home-weight-gridline {
  fill: none;
  stroke: #d7e1f0;
  stroke-width: 1;
}

.phone-frame.is-home-screen .home-weight-line {
  fill: none;
  stroke: #0d65df;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.phone-frame.is-home-screen .home-weight-points circle {
  fill: #0d65df;
  stroke: #fff;
  stroke-width: 1.5;
}

/* Keep legacy weight metadata available to scripts and assistive technology
   without letting later theme rules turn it into a visible second row. */
.phone-frame.is-home-screen .home-weight-card > .visually-hidden {
  display: none !important;
}

/* Five equal navigation slots; the centre action is intentionally icon-only. */
.bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 0;
  padding-inline: 14px;
}

.bottom-nav .nav-item {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.bottom-nav .nav-item-add {
  gap: 0;
  transform: translateY(-6px);
}

.bottom-nav .nav-item-add .nav-glyph {
  margin-inline: auto;
}

@media (max-width: 380px) {
  .phone-frame.is-home-screen .welcome-panel h1 {
    font-size: 1.68rem;
  }

  .phone-frame.is-home-screen .card-body {
    min-height: 166px;
    padding-inline: 12px;
  }

  .phone-frame.is-home-screen .home-weight-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

/* Goals cards stay lightweight; editing happens in a focused bottom sheet. */
.phone-frame.is-goals-screen .goal-card {
  overflow: visible;
}

.phone-frame.is-goals-screen .goal-card-heading-actions {
  min-width: 102px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
  max-width: 132px;
}

.phone-frame.is-goals-screen .goal-edit-toggle {
  width: auto;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid #dce6f5;
  border-radius: 999px;
  background: #f5f9ff;
  color: var(--ouson-blue);
  box-shadow: none;
  font-size: 0.6rem;
  font-weight: 760;
  line-height: 1;
}

.phone-frame.is-goals-screen .goal-edit-toggle svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-frame.is-goals-screen .goal-edit-toggle span:last-child {
  display: inline;
  font-size: 0.6rem;
  line-height: 1;
  transform: none;
}

.phone-frame.is-goals-screen .goal-card.is-editing .goal-edit-toggle span:last-child {
  transform: none;
}

.phone-frame.is-goals-screen .goal-edit-toggle:active {
  transform: translateY(1px);
}

.phone-frame.is-goals-screen .goal-card.is-editing {
  z-index: 70;
}

.phone-frame.is-goals-screen .goal-card.is-editing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(12, 26, 63, 0.4);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.phone-frame.is-goals-screen .goal-editor,
.phone-frame.is-goals-screen .goal-card[data-goal-panel="temperature"] .goal-editor {
  display: none !important;
}

.phone-frame.is-goals-screen .goal-card.is-editing .goal-editor {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 91;
  max-height: min(66vh, 590px);
  display: grid !important;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid #dce6f5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(11, 31, 80, 0.28);
  animation: goal-sheet-in 180ms ease-out both;
}

@keyframes goal-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phone-frame.is-goals-screen .goal-editor-header {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -2px -2px 2px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid #e5ebf4;
  background: #fff;
}

.phone-frame.is-goals-screen .goal-editor-header > div {
  display: grid;
  gap: 3px;
}

.phone-frame.is-goals-screen .goal-editor-kicker {
  color: var(--ouson-blue);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.phone-frame.is-goals-screen .goal-editor-header strong {
  color: var(--ouson-navy);
  font-size: 1.12rem;
  font-weight: 760;
  line-height: 1.2;
}

.phone-frame.is-goals-screen .goal-editor-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5fb;
  color: #687895;
}

.phone-frame.is-goals-screen .goal-editor-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.phone-frame.is-goals-screen .goal-editor .goal-unit-picker {
  margin: 0;
}

.phone-frame.is-goals-screen .goal-editor .unit-picker select {
  min-height: 48px;
}

.phone-frame.is-goals-screen .goal-editor .goal-input-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-frame.is-goals-screen .goal-editor .goal-number-field {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #dfe7f2;
  border-radius: 16px;
  background: #f8faff;
}

.phone-frame.is-goals-screen .goal-editor .goal-number-field input {
  font-size: 1.8rem;
}

.phone-frame.is-goals-screen .goal-editor-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  margin: 2px -2px -2px;
  padding: 12px 2px 2px;
  border-top: 1px solid #e5ebf4;
  background: #fff;
}

body.is-goal-editor-open {
  overflow: hidden;
}

body.is-goal-editor-open .phone-frame.is-goals-screen #goals {
  animation: none !important;
  transform: none !important;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-card-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .phone-frame.is-goals-screen .goal-card-heading-actions {
    min-width: 88px;
  }

  .phone-frame.is-goals-screen .goal-edit-toggle {
    padding-inline: 8px;
  }

  .phone-frame.is-goals-screen .goal-edit-toggle span {
    display: none;
  }
}

/* OUSON semantic typography v294
   Home is the reference: restrained display weight, readable card hierarchy,
   and consistent labels across every primary app screen. */
:root {
  --ouson-type-display-weight: 730;
  --ouson-type-title-weight: 690;
  --ouson-type-value-weight: 650;
  --ouson-type-control-weight: 650;
  --ouson-type-body-weight: 480;
  --ouson-type-label-weight: 560;
  --ouson-type-tight: -0.035em;
}

.goals-topbar h2,
.measurement-topbar h2,
.history-topbar h2,
.export-topbar h2,
.notifications-topbar h2,
.news-topbar h2,
.edit-info-topbar h2,
.help-hero h2,
.manual-topbar h2,
.contact-topbar h2,
.devices-topbar h2,
.privacy-topbar h2,
.password-topbar h2,
.profile-hero h2,
.profile-topbar h2,
.support-topbar h2,
.settings-topbar h2 {
  font-size: clamp(1.4rem, 6vw, 1.72rem) !important;
  font-weight: var(--ouson-type-display-weight) !important;
  line-height: 1.1 !important;
  letter-spacing: var(--ouson-type-tight) !important;
  text-shadow: none !important;
}

.goals-intro h2,
.history-intro h2,
.measurement-intro h2,
.section-head h2,
.profile-card-main h1,
.profile-card h2,
.settings-card h2,
.support-card h2 {
  font-weight: var(--ouson-type-title-weight) !important;
  letter-spacing: -0.025em !important;
}

.goals-intro p,
.history-intro p,
.measurement-intro p,
.welcome-subtitle,
.profile-identity-copy small,
.profile-language-copy small {
  font-weight: var(--ouson-type-body-weight) !important;
}

.goal-card-heading h3,
.trend-card-head p,
.history-latest-copy strong,
.profile-identity-copy strong,
.profile-language-copy strong,
.profile-row > span:nth-child(2),
.home-weight-title {
  font-weight: var(--ouson-type-title-weight) !important;
  letter-spacing: -0.022em !important;
}

.goal-current-value,
.goal-summary-value,
.trend-card-head strong,
.history-latest-copy b,
.log-value,
.profile-card-main strong {
  font-weight: var(--ouson-type-value-weight) !important;
  letter-spacing: -0.03em !important;
}

.goal-summary-label,
.goal-status-detail,
.history-intro p,
.trend-legend-row,
.history-card-meta,
.profile-section-label {
  font-weight: var(--ouson-type-label-weight) !important;
}

.goal-data-view button,
.goal-status-chip,
.goal-edit-toggle,
.measurement-type-picker-copy select,
.history-type-picker .measurement-type-picker-copy select,
.ocr-scan-summary-copy strong,
.primary-btn,
.measurement-save,
.profile-signout,
.language-option {
  font-weight: var(--ouson-type-control-weight) !important;
}

.profile-section-label {
  letter-spacing: 0.08em !important;
}

/* Goals card hierarchy v295
   Status belongs to the latest reading; editing belongs to the target. */
.phone-frame.is-goals-screen .goal-data-view {
  gap: 0;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(190, 205, 228, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 12px 28px rgba(31, 58, 112, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.phone-frame.is-goals-screen .goal-data-view button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #657390;
  font-size: 0.76rem;
  font-weight: var(--ouson-type-control-weight);
  letter-spacing: -0.015em;
  box-shadow: none;
}

.phone-frame.is-goals-screen .goal-data-view button.is-active {
  background: #10246b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 36, 107, 0.22);
}

.phone-frame.is-goals-screen .goal-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.phone-frame.is-goals-screen .goal-card-heading-actions {
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}

.phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
  max-width: 126px;
}

.phone-frame.is-goals-screen .goal-card-chevron {
  color: #10246b;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 0.85;
}

.phone-frame.is-goals-screen .goal-value-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-frame.is-goals-screen .goal-value-grid > div {
  display: flex;
  min-width: 0;
  min-height: 108px;
  flex-direction: column;
  padding: 12px;
  border-radius: 16px;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-label {
  min-height: 0;
  margin-bottom: 8px;
  line-height: 1.28;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value,
.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  display: block;
  margin: 0;
  line-height: 1.05;
}

.phone-frame.is-goals-screen .goal-reading-status {
  align-self: flex-start;
  display: inline-flex;
  min-height: 22px;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 3px 0;
  color: #657390;
  font-size: 0.63rem;
  font-weight: 750;
  line-height: 1.15;
  white-space: normal;
}

.phone-frame.is-goals-screen .goal-reading-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8da1c1;
  content: "";
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="normal"] {
  color: #2e9e55;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="normal"]::before {
  background: #32ad5b;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="low"] {
  color: #e44848;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="low"]::before {
  background: #ff3b43;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="caution"] {
  color: #3477d8;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="caution"]::before {
  background: #67a4ff;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="danger"] {
  color: #d2573f;
}

.phone-frame.is-goals-screen .goal-reading-status[data-status="danger"]::before {
  background: #e05f46;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle {
  align-self: flex-start;
  min-height: 26px;
  margin-top: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1263dd;
  font-size: 0.65rem;
  box-shadow: none;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle svg {
  width: 14px;
  height: 14px;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle:active {
  transform: translateY(1px);
  box-shadow: none;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .phone-frame.is-goals-screen .goal-value-grid > div {
    min-height: 104px;
    padding: 10px;
  }

  .phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle span {
    display: inline;
  }
}

/* Goals readability and interaction v298
   Keep the single overall status in the card header and reserve both cells
   for large, senior-friendly values. */
.phone-frame.is-goals-screen .goal-card-heading {
  align-items: center;
}

.phone-frame.is-goals-screen .goal-card-heading-actions {
  margin-left: auto;
  align-self: center;
}

.phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
  flex: 0 1 auto;
  max-width: 132px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.65rem;
}

.phone-frame.is-goals-screen .goal-reading-status {
  display: none;
}

.phone-frame.is-goals-screen .goal-value-grid > div {
  min-height: 116px;
  justify-content: flex-start;
  padding: 13px 12px;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-label {
  margin-bottom: 10px;
  font-size: 0.64rem;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value {
  margin-top: auto;
  margin-bottom: auto;
  font-size: clamp(1.3rem, 5.8vw, 1.68rem);
  font-weight: 700 !important;
  line-height: 1.04;
  letter-spacing: -0.045em !important;
  overflow-wrap: normal;
  word-break: normal;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  margin-top: auto;
  font-size: clamp(1.14rem, 5vw, 1.42rem);
  font-weight: 690 !important;
  line-height: 1.08;
  letter-spacing: -0.04em !important;
  overflow-wrap: normal;
  word-break: normal;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle {
  margin-top: 9px;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
    max-width: 106px;
    font-size: 0.59rem;
  }

  .phone-frame.is-goals-screen .goal-value-grid > div {
    min-height: 112px;
  }

  .phone-frame.is-goals-screen .goal-value-grid .goal-current-value {
    font-size: 1.28rem;
  }

  .phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
    font-size: 1.08rem;
  }
}

/* Goals value alignment and larger edit action v299
   Both comparison cells use the same three rows so wrapped values cannot
   shift the labels or action baseline. */
.phone-frame.is-goals-screen .goal-value-grid {
  align-items: stretch;
}

.phone-frame.is-goals-screen .goal-value-grid > div {
  display: grid;
  min-height: 136px;
  grid-template-rows: 30px minmax(52px, 1fr) 32px;
  align-content: stretch;
  row-gap: 4px;
  padding: 12px;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-label {
  display: flex;
  min-height: 30px;
  align-items: flex-start;
  margin: 0;
  line-height: 1.2;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value,
.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  align-self: stretch;
  margin: 0;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.phone-frame.is-goals-screen .goal-reading-status {
  display: flex;
  min-height: 32px;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle {
  align-self: end;
  min-height: 32px;
  margin: 0;
  padding: 5px 2px;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-value-grid > div {
    min-height: 130px;
    grid-template-rows: 28px minmax(50px, 1fr) 30px;
    padding: 10px;
  }

  .phone-frame.is-goals-screen .goal-value-grid .goal-summary-label {
    min-height: 28px;
  }

  .phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle {
    min-height: 30px;
    font-size: 0.72rem;
  }
}

/* Goals compact reference layout v300
   Scale the complete card system together so headings, values, actions and
   spacing share one rhythm instead of competing for attention. */
.phone-frame.is-goals-screen .goals-intro {
  gap: 9px;
  padding: 2px 22px 12px;
}

.phone-frame.is-goals-screen .goals-intro p {
  font-size: 0.72rem;
  line-height: 1.3;
}

.phone-frame.is-goals-screen .goal-data-view {
  padding: 3px;
  box-shadow:
    0 10px 24px rgba(31, 58, 112, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.phone-frame.is-goals-screen .goal-data-view button {
  min-height: 42px;
  font-size: 0.72rem;
}

.phone-frame.is-goals-screen .goals-form {
  gap: 10px;
  padding-inline: 14px;
}

.phone-frame.is-goals-screen .goal-card {
  padding-inline: 13px;
  border-radius: 22px;
}

.phone-frame.is-goals-screen .goal-card-summary {
  grid-template-columns: 46px minmax(0, 1fr) !important;
  gap: 11px !important;
  padding: 10px 0 9px;
}

.phone-frame.is-goals-screen .goal-icon {
  width: 46px;
  height: 46px;
}

.phone-frame.is-goals-screen .goal-icon svg {
  width: 24px;
  height: 24px;
}

.phone-frame.is-goals-screen .goal-card-copy .goal-card-heading h3 {
  font-size: 0.96rem;
  line-height: 1.15;
}

.phone-frame.is-goals-screen .goal-card-heading-actions {
  gap: 5px;
}

.phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
  max-width: 112px;
  min-height: 27px;
  padding: 5px 9px;
  font-size: 0.59rem;
  line-height: 1.08;
}

.phone-frame.is-goals-screen .goal-card-chevron {
  font-size: 1.2rem;
}

.phone-frame.is-goals-screen .goal-value-grid {
  gap: 9px;
  margin-top: 7px;
}

.phone-frame.is-goals-screen .goal-value-grid > div {
  display: grid;
  min-height: 76px;
  grid-template-rows: minmax(15px, auto) minmax(26px, auto) 19px;
  align-content: stretch;
  row-gap: 2px;
  padding: 8px 10px;
  border-radius: 14px;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-label {
  min-height: 0;
  align-items: flex-start;
  margin: 0;
  font-size: 0.59rem;
  line-height: 1.12;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value,
.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  display: flex;
  min-width: 0;
  align-items: center;
  align-self: stretch;
  margin: 0;
  padding: 0;
  overflow: visible;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value {
  font-size: clamp(1.06rem, 4.6vw, 1.24rem);
  line-height: 1;
  letter-spacing: -0.04em !important;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  font-size: clamp(0.94rem, 4.05vw, 1.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em !important;
}

.phone-frame.is-goals-screen .goal-reading-status {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  align-self: end;
  gap: 5px;
  margin: 0;
  padding: 1px 0;
  visibility: visible;
  font-size: 0.58rem;
  line-height: 1;
  white-space: nowrap;
}

.phone-frame.is-goals-screen .goal-reading-status::before {
  width: 7px;
  height: 7px;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle {
  min-height: 20px;
  align-self: end;
  margin: 0;
  padding: 1px 0;
  gap: 4px;
  font-size: 0.61rem;
  line-height: 1;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-edit-toggle svg {
  width: 12px;
  height: 12px;
}

.phone-frame.is-goals-screen .goal-status-detail {
  min-height: 15px;
  margin: 5px 1px 0;
  font-size: 0.61rem;
  line-height: 1.25;
}

.phone-frame.is-goals-screen .goals-guidance-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid rgba(132, 164, 218, 0.18);
  border-radius: 15px;
  background: rgba(238, 246, 255, 0.86);
  color: #617394;
  font-size: 0.61rem;
  font-weight: 560;
  line-height: 1.25;
}

.phone-frame.is-goals-screen .goals-guidance-note > span:first-child {
  color: #2774df;
  font-size: 0.78rem;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-card-summary {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 9px !important;
  }

  .phone-frame.is-goals-screen .goal-icon {
    width: 42px;
    height: 42px;
  }

  .phone-frame.is-goals-screen .goal-card-heading-actions .goal-status-chip {
    max-width: 96px;
    padding-inline: 7px;
    font-size: 0.55rem;
  }

  .phone-frame.is-goals-screen .goal-value-grid > div {
    min-height: 78px;
    grid-template-rows: minmax(15px, auto) minmax(27px, auto) 19px;
    padding: 8px 9px;
  }

  .phone-frame.is-goals-screen .goal-value-grid .goal-current-value {
    font-size: 1.04rem;
  }

  .phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
    font-size: 0.91rem;
  }
}

/* Goals readability: keep the measurement prominent while units stay quiet and contained. */
.phone-frame.is-goals-screen .goal-value-grid .goal-current-value,
.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  min-width: 0;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-current-value .goal-value-unit {
  flex: 0 0 auto;
  margin-left: 2px;
  color: #71809a;
  font-size: 0.34em;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.phone-frame.is-goals-screen .goal-value-grid .goal-summary-value .goal-value-unit {
  flex: 0 0 auto;
  margin-left: 2px;
  color: #71809a;
  font-size: 0.36em;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

/* v336: Home now uses the same in-screen logo strip as every routed page. */
.phone-frame.is-home-screen .brand-strip.app-logo-strip {
  display: none !important;
}

.home-overview-screen > .screen-logo-strip {
  margin: 0;
}

/* Keep the two blood-pressure summary rows on one consistent,
   collision-free grid. */
.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] {
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-icon {
  width: 50px;
  height: 50px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-summary-stack {
  gap: 10px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-summary-row {
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-copy {
  gap: 4px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-copy > span,
.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-copy time {
  font-size: 0.7rem;
  line-height: 1.2;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-reading {
  gap: 4px;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-reading strong {
  font-size: 1.46rem;
  line-height: 1;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-reading small {
  flex: 0 0 auto;
  font-size: 0.67rem;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-status {
  width: 72px;
  justify-content: center;
  padding: 8px 7px;
  font-size: 0.66rem;
}

.phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-heart-rate {
  font-size: 0.66rem;
}

@media (max-width: 360px) {
  .phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 9px;
    padding: 14px;
  }

  .phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-icon {
    width: 44px;
    height: 44px;
  }

  .phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-summary-row {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 6px;
  }

  .phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-reading strong {
    font-size: 1.32rem;
  }

  .phone-frame.is-history-screen .history-latest-card[data-metric="pressure"] .history-latest-status {
    width: 66px;
    padding-inline: 5px;
    font-size: 0.61rem;
  }
}

.phone-frame.is-goals-screen [data-goal-editor="temperature"][hidden] {
  display: none !important;
}

/* Export report: one continuous page with a docked share action above navigation. */
.phone-frame.is-export-screen .app-content {
  padding-bottom: calc(138px + env(safe-area-inset-bottom, 0px));
}

.phone-frame.is-export-screen .export-page {
  min-height: 100%;
  margin: 0;
  padding: 0 0 28px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.phone-frame.is-export-screen .export-topbar {
  min-height: 66px !important;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  padding: 6px 14px 16px !important;
  background: transparent;
  color: var(--navy);
}

.phone-frame.is-export-screen .export-back {
  width: 40px;
  height: 40px;
  color: var(--navy);
}

.phone-frame.is-export-screen .report-preview {
  margin: 0 14px 12px;
  padding: 16px;
  border: 1px solid rgba(132, 164, 218, 0.13);
  border-radius: 24px;
  background: rgba(238, 243, 250, 0.9);
}

.phone-frame.is-export-screen .report-paper {
  width: min(100%, 238px);
  min-height: 270px;
  padding: 20px 17px;
  border-radius: 3px;
  box-shadow: 0 14px 32px rgba(31, 42, 70, 0.1);
}

.phone-frame.is-export-screen .export-section {
  margin: 0 14px 12px;
  padding: 15px;
  border: 1px solid rgba(132, 164, 218, 0.13);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 10px 24px rgba(38, 73, 126, 0.055);
}

.phone-frame.is-export-screen .export-pills {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(132, 164, 218, 0.14);
  border-radius: 999px;
  background: #f5f7fb;
}

.phone-frame.is-export-screen .export-pill {
  min-width: 0;
  min-height: 38px;
  padding: 7px 5px;
  border-radius: 999px;
  font-size: 0.66rem;
  line-height: 1.05;
}

.download-report-btn {
  position: absolute;
  right: 14px;
  bottom: calc(79px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  z-index: 17;
  display: none;
  width: auto;
  min-height: 50px;
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 13px 25px rgba(29, 44, 101, 0.22);
  font-size: 0.82rem;
}

.phone-frame.is-export-screen .download-report-btn {
  display: inline-flex;
}

.export-actions-card .export-action-secondary {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

/* Release safety: concise medical context across capture, results, and support. */
.medical-disclaimer {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(65, 112, 190, 0.14);
  border-radius: 18px;
  background: rgba(239, 246, 255, 0.9);
  color: #53627d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.medical-disclaimer strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 0.76rem;
}

.medical-disclaimer p {
  margin: 0;
}

.medical-disclaimer-icon {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #1768e8;
  color: #fff;
  font-weight: 800;
  font-style: normal;
}

.medical-disclaimer-compact {
  margin: 10px 0;
  padding: 11px 12px;
  border-radius: 15px;
  font-size: 0.64rem;
}

.medical-disclaimer-auth {
  margin: 14px 0;
}

.features-page > .medical-disclaimer {
  margin: 0 14px 14px;
}

.goals-form > .medical-disclaimer {
  margin: 0 8px 18px;
}

.profile-row-danger {
  color: #b63d46;
}

.profile-row-danger .profile-row-icon {
  background: #fff0f1;
  color: #c8434c;
}

.edit-account-panel {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(24, 42, 91, 0.1);
}

.edit-account-panel .profile-section-label {
  margin: 0 0 10px;
}

body.is-modal-open {
  overflow: hidden;
}

.account-delete-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 22px;
}

.account-delete-modal[hidden] {
  display: none;
}

.account-delete-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(13, 26, 62, 0.56);
  backdrop-filter: blur(7px);
}

.account-delete-dialog {
  position: relative;
  width: min(100%, 430px);
  max-height: min(82vh, 620px);
  overflow: auto;
  padding: 25px 22px 22px;
  border: 1px solid rgba(132, 164, 218, 0.22);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(10, 28, 72, 0.3);
}

.account-delete-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 9px;
  border: 0;
  border-radius: 50%;
  background: #f1f4fa;
  color: #718099;
}

.account-delete-close svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.account-delete-kicker {
  display: block;
  margin: 0 48px 7px 0;
  color: #c8434c;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.account-delete-dialog h2 {
  margin: 0 42px 10px 0;
  color: var(--navy);
  font-size: 1.28rem;
}

.account-delete-dialog > p {
  margin: 0 0 18px;
  color: #65718a;
  font-size: 0.75rem;
  line-height: 1.55;
}

#delete-account-form label span {
  display: block;
  margin-bottom: 6px;
  color: #6f7b91;
  font-size: 0.66rem;
  font-weight: 750;
}

#delete-account-confirmation,
#delete-account-code {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(196, 67, 76, 0.22);
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
}

#delete-account-code {
  border-color: rgba(44, 72, 145, 0.18);
  letter-spacing: 0.24em;
}

#delete-account-code:disabled {
  background: #f5f7fb;
  color: #8a96aa;
}

.account-delete-verification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 13px 0 12px;
  padding: 12px;
  border: 1px solid rgba(44, 72, 145, 0.12);
  border-radius: 16px;
  background: #f6f8fc;
}

.account-delete-verification-copy {
  min-width: 0;
}

.account-delete-verification-copy strong,
.account-delete-verification-copy span {
  display: block;
}

.account-delete-verification-copy strong {
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
}

.account-delete-verification-copy span {
  color: #718099;
  font-size: 0.62rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-delete-send-code {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(33, 70, 166, 0.18);
  border-radius: 12px;
  background: #fff;
  color: #1745b5;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 800;
}

.account-delete-send-code:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.account-delete-code-field {
  display: block;
}

.account-delete-status {
  min-height: 1.2em;
  margin: 9px 0;
  color: #b83e45;
  font-size: 0.64rem;
}

.account-delete-status[data-tone="success"] {
  color: #238451;
}

.account-delete-actions {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 10px;
}

.account-delete-cancel,
.account-delete-button {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  font-weight: 800;
}

.account-delete-cancel {
  background: #f1f4fa;
  color: var(--navy);
}

.account-delete-button {
  background: #c8434c;
  color: #fff;
}

.account-delete-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

/* Release polish: keep the export action comfortably clear of the app navigation. */
.phone-frame.is-export-screen .app-content {
  padding-bottom: calc(184px + env(safe-area-inset-bottom, 0px));
}

.phone-frame.is-export-screen .download-report-btn {
  right: 22px;
  bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  left: 22px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 17px;
  box-shadow: 0 14px 28px rgba(24, 36, 80, 0.24);
  font-size: 0.86rem;
}

/* Personal info uses the same separate-card language as Profile and Account. */
.edit-info-page {
  min-height: 100%;
  margin-top: 0;
  padding: 0 18px calc(110px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.edit-info-topbar {
  margin: 0 -18px 18px;
}

.edit-info-card {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.edit-avatar-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 15px;
  margin: 0;
  padding: 17px;
  border: 1px solid rgba(125, 154, 205, 0.13);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(35, 64, 111, 0.09);
}

.edit-avatar-block .profile-photo {
  width: 78px;
  height: 78px;
}

.edit-avatar-copy {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.edit-avatar-copy strong,
.edit-info-section-heading strong {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

.edit-avatar-copy > span,
.edit-info-section-heading span {
  color: #77839a;
  font-size: 0.69rem;
  line-height: 1.45;
}

.edit-avatar-block .edit-avatar-copy button {
  min-height: 36px;
  margin-top: 6px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.edit-info-form {
  display: grid;
  gap: 13px;
  padding: 18px 17px;
  border: 1px solid rgba(125, 154, 205, 0.13);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(35, 64, 111, 0.09);
}

.edit-info-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

.edit-info-section-heading > div {
  display: grid;
  gap: 4px;
}

.edit-info-form label > span:first-child {
  margin-bottom: 6px;
  color: #6f7c94;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-info-form input,
.edit-info-form select {
  min-height: 50px;
  border-color: rgba(121, 151, 203, 0.18);
  border-radius: 15px;
  background: #f8faff;
  font-size: 0.78rem;
}

.edit-info-form input[readonly] {
  background: #f1f4f9;
  color: #737f94;
}

.edit-info-split {
  grid-template-columns: 1fr;
  gap: 13px;
}

.edit-birth-selects {
  grid-template-columns: 1.18fr 0.9fr 0.9fr;
  gap: 8px;
}

.edit-info-save {
  min-height: 52px;
  margin-top: 2px;
  border-radius: 16px;
}

.edit-account-panel {
  margin: 0;
  padding: 17px;
  border: 1px solid rgba(125, 154, 205, 0.13);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(35, 64, 111, 0.09);
}

.edit-account-panel .profile-section-label {
  margin: 0 0 10px;
}

.edit-account-panel .profile-action-card {
  border: 1px solid rgba(125, 154, 205, 0.12);
  box-shadow: none;
}

@media (max-width: 390px) {
  .edit-info-page {
    padding-inline: 14px;
  }

  .edit-info-topbar {
    margin-inline: -14px;
  }

  .edit-avatar-block,
  .edit-info-form,
  .edit-account-panel {
    padding: 15px;
  }
}

/* v320: History and Export share the original compact white action treatment. */
.history-export-dock,
.download-report-btn {
  position: absolute;
  right: 22px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  left: 22px;
  z-index: 17;
  width: auto;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--navy);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(24, 36, 80, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.history-export-dock {
  display: none;
}

.phone-frame.is-history-screen .history-export-dock {
  display: inline-flex;
}

.phone-frame.is-history-screen .history-export-dock,
.phone-frame.is-export-screen .download-report-btn {
  right: 22px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  left: 22px;
  width: auto;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--navy);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(24, 36, 80, 0.1);
  font-size: 0.82rem;
  backdrop-filter: blur(14px);
}

.history-export-dock svg,
.download-report-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* v340: Save Measurement and Export Report share one dock-action footprint.
   Their fill treatment still communicates primary versus secondary action. */
.measurement-save-dock,
.history-export-dock {
  right: 22px;
  left: 22px;
  width: auto;
  min-height: 48px;
  padding: 0 16px;
  border-width: 2px;
  border-radius: 15px;
  font-size: 0.82rem;
}

.measurement-save-dock svg,
.history-export-dock svg {
  width: 18px;
  height: 18px;
}

.phone-frame.is-history-screen .app-content,
.phone-frame.is-export-screen .app-content {
  padding-bottom: calc(154px + env(safe-area-inset-bottom, 0px));
}

.edit-info-save-panel {
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.edit-info-save-panel .edit-info-save {
  min-height: 52px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.edit-info-save-panel .edit-info-save svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.edit-info-save:disabled {
  cursor: wait;
  opacity: 0.72;
}

/* Keep the Edit screen's three content groups visually separate like the reference. */
.phone-frame.is-edit-info-screen .edit-info-card {
  gap: 14px;
}

.phone-frame.is-edit-info-screen .edit-account-panel {
  margin-bottom: 8px;
}

/* v323: normalize subpage spacing and typography to the Home visual system. */
.notifications-page,
.news-page,
.edit-info-page,
.help-page,
.manual-page,
.contact-page,
.devices-page,
.privacy-page,
.password-page {
  padding-bottom: 18px !important;
}

.edit-info-page {
  padding: 0 18px 18px !important;
}

#timeline > .medical-disclaimer-compact {
  width: auto;
  margin: 10px 22px 14px;
}

.notification-section h3,
.reminder-time-field > span,
.news-kicker,
.manual-kicker,
.contact-kicker,
.edit-info-form label > span:first-child,
.device-form label,
.device-form-section h3,
.privacy-badge {
  font-weight: var(--ouson-type-label-weight);
}

.notification-copy strong,
.news-card h3,
.edit-avatar-copy strong,
.edit-info-section-heading strong,
.help-category-grid strong,
.help-category-card strong,
.manual-hero-card h1,
.manual-section h3,
.manual-item-copy b,
.manual-item strong,
.contact-card h1,
.device-registration-check h3,
.device-model-preview strong,
.device-check-options strong,
.device-extension-toggle strong,
.device-item strong,
.privacy-hero-card h1,
.privacy-content-card h3,
.privacy-contact-card h3,
.password-card h1 {
  font-weight: var(--ouson-type-title-weight);
}

.notification-copy small,
.notification-status,
.news-hero-card p,
.news-card p,
.edit-avatar-copy > span,
.edit-info-section-heading span,
.help-category-grid small,
.help-category-card small,
.manual-hero-card p,
.manual-item-copy small,
.contact-card p,
.device-check-options small,
.device-model-preview small,
.device-extension-toggle small,
.device-item span,
.device-item small,
.privacy-hero-card p,
.privacy-hero-card small,
.privacy-content-card p,
.privacy-contact-card p,
.password-verification-step > p {
  font-weight: var(--ouson-type-body-weight);
}

.notification-copy strong {
  color: var(--navy);
  font-size: 0.9rem;
  letter-spacing: -0.018em;
}

.notification-copy small {
  font-size: 0.72rem;
  line-height: 1.35;
}

.notification-section h3 {
  font-size: 0.69rem;
}

.reminder-time-field {
  grid-template-columns: 28px minmax(132px, 1fr) auto;
}

.reminder-time-input {
  min-width: 154px;
  padding: 0 8px 0 13px;
  font-size: 0.9rem;
  font-weight: var(--ouson-type-control-weight);
  font-variant-numeric: tabular-nums;
}

.edit-avatar-block button,
.edit-info-form input,
.edit-info-form select,
.edit-info-form textarea,
.edit-info-save,
.device-add-toggle,
.device-save,
.privacy-contact-card button,
.password-resend {
  font-weight: var(--ouson-type-control-weight);
}

@media (max-width: 390px) {
  .edit-info-page {
    padding: 0 14px 18px !important;
  }
}

/* v337: one shared header rhythm for every signed-in app screen.
   Older page-specific rules used a 4px logo nudge and mixed 62/64px
   title bars, which made otherwise centred headers feel inconsistent. */
.app-screen:not(#sign-in):not(#create-account):not(#forgot-password-page)
  > .screen-logo-strip {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 14px 20px 8px;
  align-items: center;
  justify-content: center;
}

.app-screen:not(#sign-in):not(#create-account):not(#forgot-password-page)
  > .screen-logo-strip
  .app-top-logo {
  display: block;
  width: 92px;
  height: auto;
  max-height: 31px;
  margin: 0;
  object-fit: contain;
  transform: none !important;
}

:is(
  .goals-topbar,
  .measurement-topbar,
  .history-topbar,
  .export-topbar,
  .notifications-topbar,
  .news-topbar,
  .edit-info-topbar,
  .help-hero,
  .manual-topbar,
  .contact-topbar,
  .devices-topbar,
  .privacy-topbar,
  .password-topbar,
  .profile-hero
) {
  box-sizing: border-box;
  width: 100%;
  min-height: 64px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 6px 8px 16px !important;
  display: grid;
  place-items: center;
}

:is(
  .goals-topbar,
  .measurement-topbar,
  .history-topbar,
  .export-topbar,
  .notifications-topbar,
  .news-topbar,
  .edit-info-topbar,
  .help-hero,
  .manual-topbar,
  .contact-topbar,
  .devices-topbar,
  .privacy-topbar,
  .password-topbar,
  .profile-hero
) > h2 {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  width: min(100%, 250px);
  margin: 0 !important;
  text-align: center;
}

:is(
  .goals-topbar,
  .measurement-topbar,
  .history-topbar,
  .export-topbar,
  .notifications-topbar,
  .news-topbar,
  .edit-info-topbar,
  .help-hero,
  .manual-topbar,
  .contact-topbar,
  .devices-topbar,
  .privacy-topbar,
  .password-topbar,
  .profile-hero
) > .back-action {
  position: absolute;
  top: 50%;
  left: 8px;
  margin: -8px 0 0;
  transform: translateY(-50%);
}

/* Keep every routed-page back/close control in the title row. Without this,
   Grid auto-placement creates a second row for page-specific button classes
   and pushes the title accent away from the heading. */
:is(
  .goals-topbar,
  .measurement-topbar,
  .history-topbar,
  .export-topbar,
  .notifications-topbar,
  .news-topbar,
  .edit-info-topbar,
  .help-hero,
  .manual-topbar,
  .contact-topbar,
  .devices-topbar,
  .privacy-topbar,
  .password-topbar
) > :is(
  .goals-back,
  .measurement-close,
  .history-back,
  .export-back,
  .notifications-back,
  .news-back,
  .edit-info-back,
  .help-back,
  .manual-back,
  .contact-back,
  .devices-back,
  .privacy-back,
  .password-back
) {
  position: absolute;
  top: 50%;
  left: 8px;
  margin: -8px 0 0;
  transform: translateY(-50%);
}

/* Profile Settings keeps an 18px content gutter below its header. Let only
   the title bar span that gutter so its back action shares the same screen
   edge baseline as the other signed-in subpages. */
.edit-info-page > .edit-info-topbar {
  width: calc(100% + 36px);
  margin: 0 -18px !important;
}

/* v338: range-based health goals */
.phone-frame.is-goals-screen .goal-range-groups {
  display: grid;
  gap: 14px;
}

.phone-frame.is-goals-screen .goal-range-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.phone-frame.is-goals-screen .goal-range-group legend {
  margin: 0 0 8px;
  padding: 0;
  color: #71809b;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phone-frame.is-goals-screen .goal-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.phone-frame.is-goals-screen .goal-range-fields .goal-number-field,
.phone-frame.is-goals-screen .goal-range-fields .goal-number-field:not(:first-child) {
  min-width: 0;
  margin: 0;
  padding: 12px 13px !important;
  border: 1px solid #dfe7f2 !important;
  border-radius: 16px;
  background: #f8faff;
}

.phone-frame.is-goals-screen .goal-range-fields .goal-number-field input {
  min-width: 0;
  width: 100%;
  font-size: 1.55rem;
}

.phone-frame.is-goals-screen .goal-target-cell {
  grid-template-rows: minmax(15px, auto) minmax(26px, auto) 19px;
}

.phone-frame.is-goals-screen .goal-target-cell .goal-summary-value {
  flex-wrap: wrap;
  gap: 0 2px;
  font-size: clamp(0.72rem, 3.25vw, 0.9rem);
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .phone-frame.is-goals-screen .goal-range-fields {
    gap: 8px;
  }

  .phone-frame.is-goals-screen .goal-range-fields .goal-number-field,
  .phone-frame.is-goals-screen .goal-range-fields .goal-number-field:not(:first-child) {
    padding: 10px 11px !important;
  }

  .phone-frame.is-goals-screen .goal-range-fields .goal-number-field input {
    font-size: 1.35rem;
  }
}

/* Compact shared chrome: preserve system safe areas, remove only app spacing.
   Keep dock offsets tied to the navigation height on iOS and Android. */
.phone-frame.screen-router-ready:not(.is-auth-screen) .app-content,
.phone-frame.screen-router-ready:not(.is-home-screen):not(.is-auth-screen) .app-content {
  padding-top: calc(env(safe-area-inset-top, 0px) + 4px);
  padding-bottom: calc(var(--app-nav-height) + 16px) !important;
}

.app-screen:not(#sign-in):not(#create-account):not(#forgot-password-page)
  > .screen-logo-strip {
  min-height: 32px;
  padding-top: 6px;
}

.bottom-nav {
  height: var(--app-nav-height);
  min-height: var(--app-nav-height);
  padding: 3px 10px calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: none;
}

.bottom-nav .nav-item {
  height: 44px;
  min-height: 44px;
  padding: 0 4px;
  align-content: center;
  gap: 2px;
  font-size: 10px;
  line-height: 12px;
}

.bottom-nav .nav-glyph {
  width: 22px;
  height: 22px;
}

.bottom-nav .nav-glyph svg {
  width: 22px;
  height: 22px;
}

.bottom-nav .nav-item-add {
  transform: none;
}

.bottom-nav .nav-item-add .nav-glyph {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: none;
}

.bottom-nav .nav-item-add.is-active .nav-glyph {
  box-shadow: none;
  animation: none;
}

.bottom-nav .nav-item-add:active {
  transform: scale(0.95);
}

.phone-frame .measurement-save-dock,
.phone-frame.is-history-screen .history-export-dock,
.phone-frame.is-export-screen .download-report-btn {
  bottom: calc(var(--app-nav-height) + 12px);
}

.phone-frame.screen-router-ready:is(.is-add-record-screen, .is-history-screen, .is-export-screen) .app-content {
  padding-bottom: calc(var(--app-nav-height) + 78px) !important;
}

/* A single metadata card, with full-width native date and time controls. */
.measurement-commit-panel .measurement-date-time .measurement-meta {
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 12px 0;
  gap: 10px;
  min-height: 68px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.measurement-commit-panel .measurement-date-time .measurement-time-card {
  border-top: 1px solid var(--line);
}

.measurement-date-time .measurement-meta > span:last-child {
  min-width: 0;
}

.measurement-commit-panel .measurement-date-time .measurement-meta input {
  min-height: 32px;
  font-size: 0.9rem;
  padding: 0;
}

/* Reminder editors must shrink within their card, including native time inputs.
   Keep the remove action on its own row when nested cards leave little room. */
.measurement-reminder-groups,
.measurement-reminder-group,
.measurement-reminder-editor,
.reminder-times,
.reminder-time-field {
  min-width: 0;
  max-width: 100%;
}

.measurement-reminder-summary {
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 6px 10px;
}

.measurement-reminder-summary .measurement-reminder-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.measurement-reminder-summary .measurement-reminder-copy {
  grid-column: 2;
  grid-row: 1;
}

.measurement-reminder-summary .measurement-reminder-count {
  grid-column: 2;
  grid-row: 2;
  white-space: normal;
}

.measurement-reminder-summary .measurement-reminder-count:empty {
  display: none;
}

.measurement-reminder-summary .measurement-reminder-chevron {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.reminder-time-field {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
}

.reminder-time-field .reminder-time-input {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.reminder-time-remove {
  min-height: 44px;
  padding: 0 10px;
}

@media (max-width: 430px) {
  .reminder-time-field {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .reminder-time-remove {
    grid-column: 2;
    justify-self: end;
  }
}

/* Compact Android Home content, without scaling the WebView, controls, or scanner. */
@media (max-width: 400px) {
  .platform-android .phone-frame.is-home-screen .welcome-panel h1 {
    font-size: 1.5rem;
    line-height: 1.12;
  }

  .platform-android .phone-frame.is-home-screen .home-notification-button {
    width: 44px;
    height: 44px;
  }

  .platform-android .phone-frame.is-home-screen .home-overview-heading {
    margin-top: 16px;
  }

  .platform-android .phone-frame.is-home-screen .health-card {
    grid-template-rows: 40px 1fr;
  }

  .platform-android .phone-frame.is-home-screen .card-top {
    min-height: 40px;
    padding: 8px 34px 8px 12px;
  }

  .platform-android .phone-frame.is-home-screen .card-corner-icon {
    width: 21px;
    height: 21px;
    right: 10px;
  }

  .platform-android .phone-frame.is-home-screen .card-body {
    min-height: 150px;
    grid-template-rows: minmax(40px, auto) auto auto minmax(28px, auto);
    row-gap: 6px;
    padding: 12px 12px 10px;
  }

  .platform-android .phone-frame.is-home-screen .home-metric-value > span:first-child {
    font-size: clamp(1.65rem, 7.2vw, 1.85rem);
  }

  .platform-android .phone-frame.is-home-screen .goal-chip {
    padding-top: 7px;
  }
}

/* v339: Cross-platform text-metrics guard.
   A 1.0 line box can clip the ascenders/descenders of Inter, SF and the
   CJK system fonts used by native WebViews. Keep real text on safe leading;
   icons and decorative chevrons retain their compact geometry. */
:is(
  .signin-hero h1,
  .account-intro h1,
  .welcome-panel h1,
  .news-hero-card h1,
  .manual-hero-card h1,
  .devices-hero-card h1,
  .privacy-hero-card h1,
  .profile-hero h2,
  .goals-topbar > h2,
  .measurement-topbar > h2,
  .history-topbar > h2,
  .export-topbar > h2,
  .notifications-topbar > h2,
  .news-topbar > h2,
  .edit-info-topbar > h2,
  .help-hero > h2,
  .manual-topbar > h2,
  .contact-topbar > h2,
  .devices-topbar > h2,
  .privacy-topbar > h2,
  .password-topbar > h2,
  .card-body strong,
  .home-metric-value > span:first-child,
  .home-weight-main strong,
  .trend-card-head strong,
  .history-latest-reading strong,
  .record-reading-value strong,
  .scan-confirm-value strong,
  .goal-value-grid .goal-current-value,
  .goal-value-grid .goal-summary-value
) {
  line-height: 1.16 !important;
  overflow-clip-margin: 0.12em;
}

:is(
  .card-body small,
  .home-weight-main small,
  .goal-editor-kicker,
  .goal-reading-status,
  .goal-status-chip,
  .device-status-pill,
  .profile-section-label,
  .measurement-date-time .measurement-meta small
) {
  line-height: 1.28 !important;
  overflow-clip-margin: 0.12em;
}

:is(
  .goal-edit-toggle,
  .export-pill,
  .language-option,
  .profile-signout,
  .bp-scanner-coming-soon
) {
  line-height: 1.2 !important;
  overflow-clip-margin: 0.12em;
}

/* Native date/time controls are replaced elements and WebKit clips their
   internal value even when the surrounding card is tall enough. Give the
   value and its label independent vertical breathing room. */
.measurement-date-time .measurement-meta > span:last-child {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  overflow: visible;
}

.measurement-date-time .measurement-meta small {
  display: block;
  margin: 0;
  padding-block: 1px;
}

.measurement-commit-panel .measurement-date-time .measurement-meta input {
  min-height: 36px;
  padding-block: 3px;
  line-height: 1.35;
}
