:root {
  --bg: #eef6ff;
  --app-inline-gutter: 18px;
  --app-card-radius: 24px;
  --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);
}

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;
}

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) {
  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: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;
}

.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: 900;
  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-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;
}

.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;
}

.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: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.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 {
  min-height: 22px;
  font-size: 0.78rem;
  line-height: 1.2;
}

.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 .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;
  }
}

.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;
}

.trend-legend-row strong {
  margin-left: auto;
  color: #9aa6ba;
}

.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-tabs {
  padding-top: 8px;
  padding-bottom: 14px;
}

.history-latest-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  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-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-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;
  text-align: left;
}

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

#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,
#timeline .record-time,
#timeline .record-notes {
  margin: 0;
  color: #7584a0;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
}

#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-latest-status {
    grid-column: 2;
  }

  #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 .reminder-time-field {
  grid-column: 1 / -1;
}

.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-time-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #f8f9fc;
  cursor: pointer;
}

.reminder-time-field span {
  color: #8d98ab;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.notification-note {
  margin: 24px 40px 0;
  color: #7c879b;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

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

.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,
.inbox-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,
.inbox-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,
.inbox-topbar h2 {
  margin: 0;
  text-align: center;
  font-size: 1.18rem;
}

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

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

.news-hero-card,
.inbox-summary-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,
.inbox-summary-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,
.inbox-summary-card p,
.news-card p,
.inbox-message p {
  margin: 0;
  color: #6e7a8f;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

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

.news-card,
.inbox-message {
  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,
.inbox-message small {
  color: #9aa5b7;
  font-size: 0.76rem;
  font-weight: 800;
}

.inbox-summary-card {
  display: grid;
  grid-template-columns: 1fr 58px;
  align-items: center;
  gap: 14px;
}

.inbox-summary-card strong {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: white;
  font-size: 1.35rem;
  font-weight: 900;
}

.inbox-message {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.inbox-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(29, 44, 101, 0.1);
}

.inbox-message strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
}

.inbox-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #c8d0dd;
}

.inbox-message.is-unread .inbox-dot {
  background: #2fca67;
  box-shadow: 0 0 0 5px rgba(47, 202, 103, 0.12);
}

.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: 1fr 1fr;
  gap: 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-summary {
  padding: 10px 12px;
  border-radius: 13px;
  background: white;
  color: #64718a;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.35;
}

.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: grid;
  gap: 12px;
}

.device-item,
.devices-empty {
  padding: 16px;
  border-radius: 18px;
  background: #f8f9fc;
}

.device-item {
  display: grid;
  gap: 12px;
  border: 1px solid #eef1f6;
}

.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-edit,
.device-delete {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.device-edit {
  width: auto;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
}

.device-delete {
  background: #fff2f1;
  color: #f1523f;
}

.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;
}

@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;
}

.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,
.inbox-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,
.inbox-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,
.inbox-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,
.inbox-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,
.inbox-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,
.inbox-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,
.inbox-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,
.inbox-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: 1fr;
    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: minmax(0, 1fr);
  }
}

/* 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));
    }
  }
}

/* Sign-in uses a flat, app-like landing layout instead of the rounded in-frame card. */
#sign-in.signin-page {
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 14%, rgba(49, 207, 114, 0.18), transparent 24%),
    linear-gradient(180deg, var(--navy) 0%, #17214b 41%, #f1f3f7 41%, #f1f3f7 100%);
}

#sign-in .signin-hero {
  min-height: clamp(220px, 34svh, 300px);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 24px 72px;
  justify-content: flex-end;
}

#sign-in .signin-hero h1 {
  margin: 7px 0 8px;
  font-size: clamp(1.85rem, 7.8vw, 2.2rem);
}

#sign-in .signin-hero p {
  max-width: 340px;
  font-size: 0.9rem;
  line-height: 1.38;
}

#sign-in .signin-card {
  width: calc(100% - 36px);
  margin: -58px auto 0;
  padding: 16px;
  border-radius: 24px;
}

#sign-in .signin-panel {
  gap: 10px;
}

#sign-in .signin-form label {
  gap: 7px;
  font-size: 0.74rem;
}

#sign-in .signin-form input {
  min-height: 48px;
  border-radius: 15px;
  font-size: 0.9rem;
}

#sign-in .signin-row {
  margin-top: 12px;
}

#sign-in .signin-primary {
  min-height: 52px;
  margin-top: 14px;
  border-radius: 17px;
}

#sign-in .signin-divider {
  margin: 14px 0 10px;
}

#sign-in .social-login {
  min-height: 46px;
  border-radius: 15px;
}

#sign-in .signin-legal {
  margin-top: 12px;
}

#sign-in .signin-security {
  width: calc(100% - 36px);
  grid-template-columns: 34px 1fr;
  gap: 10px;
  margin: 12px auto 0;
  padding: 12px;
  border-radius: 18px;
}

#sign-in .signin-security span {
  width: 34px;
  height: 34px;
}

#sign-in .signin-security p {
  font-size: 0.74rem;
  line-height: 1.32;
}

@media (max-height: 760px) {
  #sign-in .signin-hero {
    min-height: 210px;
    padding-bottom: 62px;
  }

  #sign-in .signin-eyebrow {
    font-size: 0.66rem;
  }

  #sign-in .signin-hero h1 {
    font-size: 1.76rem;
  }

  #sign-in .signin-hero p {
    font-size: 0.8rem;
    line-height: 1.3;
  }

  #sign-in .signin-card {
    margin-top: -50px;
    padding: 14px;
  }

  #sign-in .signin-form input {
    min-height: 44px;
  }

  #sign-in .signin-primary {
    min-height: 48px;
    margin-top: 12px;
  }

  #sign-in .signin-divider {
    margin: 10px 0 8px;
  }

  #sign-in .social-login {
    min-height: 43px;
  }

  #sign-in .signin-security {
    display: none;
  }
}

/* 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,
.inbox-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,
.inbox-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,
.inbox-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,
  .inbox-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,
  .inbox-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,
  .inbox-summary-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;
  }
}
