/* ═══════════════════════════════════════════════════════════
   SBI Life SmartCare — Personal Details  (pi.css)
   Breakpoints: 320 · 375 · 485 · 560 · 680 · 725 · 1023 · 1440 · 1440+
   Rule: .single rows are ALWAYS full width
         .double / .triple / .pi-nominee-fields stay 2-up / multi-up
         at every breakpoint (no collapse on phone)
   ═══════════════════════════════════════════════════════════ */

/* ───────────────  1. RESET  ─────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ───────────────  2. DESIGN TOKENS  ─────────────── */
:root {
  --brand-primary: #291f75;
  --brand-accent: #d92157;
  --brand-gradient: linear-gradient(135deg, #d92157 0%, #291f75 100%);
  --brand-3: #4a38d4;
  --accent-mid: #e84472;

  --white: #fff;
  --surface-2: #f6f7fb;

  --ink: #0d0d1a;
  --ink-2: #4a4a6a;
  --ink-3: #8888a8;

  --green: #146b3e;
  --orange: #b45309;
  --red: #c0392b;

  --border-color: rgba(13, 13, 26, 0.09);
  --border: 1px solid var(--border-color);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;

  --sh-sm: 0 2px 8px rgba(13, 13, 26, 0.06);

  /* responsive gutters — single source of truth */
  --page-x: 36px;
  --header-h: 62px;
  --bottom-nav-h: 68px;
}

/* ───────────────  3. BASE  ─────────────── */
html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  font-family:
    "DM Sans",
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--surface-2);
  color: var(--ink);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden; /* hard stop for horizontal scroll */
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select {
  font-family: inherit;
}

a {
  -webkit-tap-highlight-color: transparent;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════
   4. DESKTOP HEADER  (≥1024px only)
   ═══════════════════════════════════════════ */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-h);
  background: var(--white);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--page-x);
  gap: 20px;
  box-shadow: 0 1px 4px rgba(13, 13, 26, 0.07);
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup__logo {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-lockup__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-lockup__label {
  font-size: 16px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 600;
}

/* ── nav ── */
.nav-pills {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 0 24px;
  min-width: 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}

.nav-pill:hover {
  background: var(--surface-2);
  color: var(--brand-primary);
}

.nav-pill.active {
  background: none;
  color: #334155;
  font-weight: 500;
}

.desktop-header-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── header actions ── */
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 27px;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  font-size: 16px;
  position: relative;
  transition: background 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--brand-accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

.user-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: var(--border);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.user-pill:hover {
  background: rgba(41, 31, 117, 0.12);
}

.user-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-3), var(--accent-mid));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}

.user-name {
  display: none;
}

/* ═══════════════════════════════════════════
   5. PAGE TITLE STRIP
   ═══════════════════════════════════════════ */
.pi-page-topbar {
  width: 100%;
}

.pi-page-topbar-inner {
  width: 100%;
  background: var(--brand-gradient);
  padding: 16px var(--page-x);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pi-page-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* ═══════════════════════════════════════════
   6. PAGE MAIN
   ═══════════════════════════════════════════ */
.pi-page-main {
  padding: 28px var(--page-x) 48px;
  margin: 0 auto;
  width: 100%;
  max-width: 1440px;
}

.pi-info-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* two cards per row on desktop, collapse to one on tablet */
.pi-info-grid-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.pi-info-grid-row .pi-info-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pi-info-grid-row .pi-info-card-body {
  flex: 1;
}

.pi-info-grid-row--equal {
  align-items: stretch;
}

.pi-info-grid-row--equal .pi-info-card {
  height: 100%;
}

.pi-info-grid-row--equal .pi-info-card--center .pi-info-card-body {
  justify-content: flex-start;
  gap: 25px;
}

/* ═══════════════════════════════════════════
   7. CARD
   ═══════════════════════════════════════════ */
.pi-info-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  min-width: 0;
}

.pi-info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.pi-info-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
  min-width: 0;
}

.pi-info-card-title img {
  height: 22px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.pi-info-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(217, 33, 87, 0.25);
  background: var(--brand-primary);
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}

.pi-info-edit-btn:hover {
  background: #1e1657;
}

.pi-info-edit-btn:active {
  transform: scale(0.97);
}

.pi-info-edit-btn i {
  font-size: 10px;
}

.pi-info-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ═══════════════════════════════════════════
   8. FIELD GRIDS
   ─────────────────────────────────────────
   .single  → ALWAYS 1 column (full-width row)
   .double  → ALWAYS 2 columns (at every bp)
   .triple  → ALWAYS 3 columns
   ═══════════════════════════════════════════ */
.pi-info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px 24px;
}

.pi-info-row.single {
  grid-template-columns: minmax(0, 1fr);
}

.pi-info-row.double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pi-info-row.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pi-info-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pi-info-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.pi-info-field .val {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.5;
  min-height: 22px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pi-edit-inline {
  font-size: 11px;
  color: var(--brand-accent);
  opacity: 0.75;
  cursor: pointer;
}

.pi-edit-inline:hover {
  opacity: 1;
}

.pi-info-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════
   9. NOMINEE BLOCK
   ═══════════════════════════════════════════ */
.pi-nominee-scroll {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.pi-nominee-scroll::-webkit-scrollbar {
  width: 4px;
}

.pi-nominee-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.pi-nominee-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.pi-nominee-scroll .pi-info-divider {
  height: 2px;
  background: rgba(41, 31, 117, 0.15);
  border-radius: 1px;
  margin: 8px 0;
  flex-shrink: 0;
}

.pi-nominee-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.pi-nominee-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pi-nominee-name-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.pi-nominee-name-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: -8px;
  overflow-wrap: anywhere;
}

.pi-nominee-sub-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--brand-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: rgba(217, 33, 87, 0.08);
  border: 1px solid rgba(217, 33, 87, 0.2);
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* nominee field grid — 2 cols default, 4 on wide desktop.
   Never collapses to 1 column; stays 2-up at 320px. */
.pi-nominee-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
}

.pi-nominee-fields .pi-info-field {
  min-width: 0;
}

/* status pill (kept for future use) */
.pi-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.pi-status--seeded {
  color: var(--green);
  background: rgba(20, 107, 62, 0.1);
  border: 1px solid rgba(20, 107, 62, 0.25);
}

/* ═══════════════════════════════════════════
   10. MOBILE / TABLET HEADER + BOTTOM NAV
   ═══════════════════════════════════════════ */
.mp-mobile-header {
  display: none;
}

.bottom-nav {
  display: none;
}

/* ── Footer ── */
.page-footer {
  background: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 14px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy {
  font-size: 12px;
  color: var(--ink-3);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  text-decoration: underline;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.mobile-footer-links {
  display: none;
}

/* ═══════════════════════════════════════════
   11. RESPONSIVE LADDER
   ═══════════════════════════════════════════ */

/* ── ≥1441px : large desktop, breathe more ── */
@media (min-width: 1441px) {
  :root {
    --page-x: 48px;
  }

  .pi-page-main {
    max-width: 1520px;
  }

  .pi-info-body {
    gap: 20px;
  }

  .pi-info-grid-row {
    gap: 20px;
  }
}

/* ── 1280–1440 : desktop, nominee fields go 4-up ── */
@media (min-width: 1280px) {
  .pi-nominee-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── 1024–1279 : desktop header gets tight — compress it ── */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root {
    --page-x: 24px;
  }

  .main-header {
    padding: 0 20px;
    gap: 14px;
  }

  .nav-pills {
    gap: 6px;
    padding: 0 6px;
  }

  .nav-pill {
    padding: 8px 10px;
    font-size: 13px;
    gap: 3px;
  }

  .desktop-header-icon {
    width: 20px;
    height: 20px;
  }

  .hdr-actions {
    gap: 12px;
  }
}

/* ── ≤1023px : switch to mobile header + bottom nav ── */
@media (max-width: 1023px) {
  :root {
    --page-x: 20px;
    --bottom-nav-h: 68px;
  }

  .main-header {
    display: none;
  }

  /* ── mobile header ── */
  .mp-mobile-header {
    display: block;
    background: #fff;
    padding: 14px 18px 16px;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--border-color);
  }

  .mp-mobile-header .hero-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 10px;
  }

  .mp-mobile-header .hbr-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mp-mobile-header .menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--brand-primary);
    font-size: 15px;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s;
  }

  .mp-mobile-header .brand-logo-text {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    min-width: 0;
  }

  .mp-mobile-header .brand-lockup {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .mp-mobile-header .brand-lockup__logo {
    height: 23px;
    width: auto;
    display: block;
    flex-shrink: 0;
  }

  .mp-mobile-header .brand-lockup__text {
    display: flex;
    flex-direction: column;
    line-height: 1;
  }

  .mp-mobile-header .brand-lockup__label {
    font-size: 12px;
    color: #8487b2;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .mp-mobile-header .hbr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mp-mobile-header .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--ink-2);
    position: relative;
    transition: background 0.2s;
  }

  .mp-mobile-header .icon-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
  }

  .mp-mobile-header .notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    background: var(--brand-accent);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
  }

  /* ── bottom nav ── */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 560px;
    min-height: var(--bottom-nav-h);
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.07);
  }

  .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    min-width: 0;
    transition: color 0.2s;
  }

  .bn-icon-wrap {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }

  .bn-icon-wrap img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
  }

  .page-footer {
    display: none !important;
  }

  .mobile-footer-links {
    display: flex;
    padding: 20px 16px 8px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
  }

  .mobile-footer-links a {
    font-size: 12px;
    color: var(--text-3, #94a3b8);
    font-weight: 500;
  }

  .pi-page-main {
    padding-bottom: calc(
      var(--bottom-nav-h) + 32px + env(safe-area-inset-bottom)
    );
  }
}

/* ── ≤900px : outer card grid collapses to 1 column ── */
@media (max-width: 900px) {
  .pi-info-grid-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pi-info-grid-row .pi-info-card {
    height: auto;
  }

  .pi-info-grid-row--equal .pi-info-card {
    height: auto;
  }

  .pi-nominee-scroll {
    max-height: 320px;
  }
}

/* ── 726–1023 : tablet tuning for the mobile header ── */
@media (min-width: 726px) and (max-width: 1023px) {
  :root {
    --page-x: 24px;
    --bottom-nav-h: 76px;
  }

  .mp-mobile-header {
    padding: 18px 24px 20px;
  }

  .mp-mobile-header .hero-brand-row {
    min-height: 50px;
    gap: 16px;
  }

  .mp-mobile-header .hbr-left {
    gap: 14px;
  }

  .mp-mobile-header .menu-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 19px;
  }

  .mp-mobile-header .brand-lockup__logo {
    height: 30px;
  }

  .mp-mobile-header .brand-lockup__label {
    font-size: 13px;
  }

  .mp-mobile-header .hbr-actions {
    gap: 12px;
  }

  .mp-mobile-header .icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .mp-mobile-header .icon-btn img {
    width: 22px;
    height: 22px;
  }

  .mp-mobile-header .notif-badge {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    top: -5px;
    right: -5px;
    border-width: 2.5px;
  }

  .bottom-nav {
    height: var(--bottom-nav-h);
    max-width: 560px;
    padding: 0 14px calc(0px + env(safe-area-inset-bottom));
  }

  .bn-item {
    gap: 6px;
    padding: 12px 8px;
    font-size: 14px;
  }

  .bn-icon-wrap {
    width: 32px;
    height: 32px;
  }

  .bn-icon-wrap img {
    width: 28px;
    height: 28px;
  }

  .pi-info-card-body {
    padding: 18px 20px;
  }

  .pi-info-grid-row {
    gap: 16px;
  }
}

/* ── ≤725px : phone-sized mobile header ── */
@media (max-width: 725px) {
  :root {
    --page-x: 16px;
  }

  .bottom-nav {
    max-width: 430px;
  }

  .pi-page-main {
    padding-top: 18px;
  }

  .pi-page-topbar-inner {
    padding: 14px 18px;
  }

  .pi-nominee-scroll {
    max-height: 260px;
  }
}

/* ── ≤680px : tighten card chrome ── */
@media (max-width: 680px) {
  .pi-info-card-body {
    padding: 14px 16px;
    gap: 14px;
  }

  .pi-info-card-header {
    padding: 12px 16px;
  }

  .pi-info-card-title {
    font-size: 13px;
  }

  .pi-info-card-title img {
    height: 20px;
  }

  .pi-info-row {
    gap: 14px 18px;
  }

  .pi-nominee-fields {
    gap: 14px 18px;
  }

  .pi-info-grid-row--equal .pi-info-card--center .pi-info-card-body {
    gap: 18px;
  }
}

/* ── ≤600px : keep .single full-width; keep .double 2-up ── */
@media (max-width: 600px) {
  /* Only .single is guaranteed full width.
     .double / .triple / .pi-nominee-fields stay multi-column
     all the way to 320px. */

  /* kill the hard <br> in addresses so text reflows naturally */
  .pi-info-field .val br {
    display: none;
  }

  .pi-info-field label {
    font-size: 12.5px;
    margin-bottom: 3px;
  }

  .pi-info-field .val {
    font-size: 13px;
  }

  .pi-nominee-name-label,
  .pi-nominee-name-val {
    font-size: 13px;
  }

  .pi-nominee-header-row {
    flex-wrap: wrap;
  }

  .pi-nominee-sub-label {
    margin-right: 0;
  }
}

/* ── ≤560px : tighter gutters + scroll height ── */
@media (max-width: 560px) {
  :root {
    --page-x: 14px;
  }

  .mp-mobile-header {
    padding: 12px 14px 14px;
  }

  .pi-page-topbar-inner {
    padding: 13px 14px;
  }

  .pi-page-title {
    font-size: 15px;
  }

  .pi-nominee-scroll {
    max-height: 240px;
  }

  .pi-info-card {
    border-radius: 16px;
  }

  .pi-info-edit-btn {
    font-size: 10.5px;
    padding: 4px 9px;
  }

  /* paired rows tighten but stay 2-up */
  .pi-info-row.double {
    gap: 14px 14px;
  }

  .pi-nominee-fields {
    gap: 14px 14px;
  }
}

/* ── ≤485px : large-phone fine tuning ── */
@media (max-width: 485px) {
  :root {
    --page-x: 12px;
    --bottom-nav-h: 64px;
  }

  .mp-mobile-header .menu-btn,
  .mp-mobile-header .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .mp-mobile-header .icon-btn img {
    width: 18px;
    height: 18px;
  }

  .mp-mobile-header .brand-lockup__logo {
    height: 21px;
  }

  .mp-mobile-header .brand-lockup__label {
    font-size: 11px;
  }

  .pi-info-card-header {
    padding: 11px 13px;
    gap: 8px;
  }

  .pi-info-card-body {
    padding: 13px 13px;
    gap: 12px;
  }

  .pi-info-card-title {
    font-size: 12.5px;
    gap: 6px;
  }

  .pi-info-card-title img {
    height: 18px;
  }

  .bn-item {
    font-size: 10px;
    padding: 6px 2px;
  }

  .bn-icon-wrap,
  .bn-icon-wrap img {
    width: 24px;
    height: 24px;
  }

  .pi-nominee-scroll {
    max-height: 220px;
  }

  /* paired rows — 2-up preserved, tighter gap */
  .pi-info-row.double {
    gap: 12px 12px;
  }

  .pi-nominee-fields {
    gap: 12px 12px;
  }
}

/* ── ≤375px : small phone ── */
@media (max-width: 375px) {
  :root {
    --page-x: 10px;
  }

  .mp-mobile-header {
    padding: 10px 10px 12px;
  }

  .mp-mobile-header .hbr-left {
    gap: 8px;
  }

  .mp-mobile-header .hbr-actions {
    gap: 4px;
  }

  .mp-mobile-header .menu-btn,
  .mp-mobile-header .icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 13px;
  }

  .mp-mobile-header .brand-lockup {
    gap: 6px;
  }

  .mp-mobile-header .brand-lockup__logo {
    height: 19px;
  }

  .mp-mobile-header .brand-lockup__label {
    font-size: 10px;
    letter-spacing: 0;
  }

  .pi-page-title {
    font-size: 14px;
  }

  .pi-info-card-body {
    padding: 12px 12px;
    gap: 11px;
  }

  .pi-info-field label {
    font-size: 12px;
  }

  .pi-info-field .val {
    font-size: 12.5px;
  }

  .pi-info-edit-btn {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* paired rows — 2-up preserved, tighter gap */
  .pi-info-row.double {
    gap: 12px 10px;
  }

  .pi-nominee-fields {
    gap: 12px 10px;
  }
}

/* ── ≤360px : 320px devices — last line of defence ── */
@media (max-width: 360px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  :root {
    --page-x: 8px;
    --bottom-nav-h: 60px;
  }

  .mp-mobile-header {
    padding: 10px 8px 12px;
  }

  .mp-mobile-header .hero-brand-row {
    gap: 6px;
  }

  .mp-mobile-header .brand-lockup__label {
    display: none; /* logo mark only at 320px */
  }

  .pi-page-topbar-inner {
    padding: 12px 10px;
  }

  .pi-info-card {
    border-radius: 14px;
    width: 100%;
    min-width: 0;
  }

  .pi-info-card-header {
    padding: 10px 11px;
  }

  .pi-info-card-body {
    padding: 11px 11px;
    gap: 10px;
  }

  .pi-info-card-title {
    font-size: 12px;
  }

  .pi-info-card-title img {
    height: 17px;
  }

  .pi-info-field label {
    font-size: 11.5px;
  }

  .pi-info-field .val {
    font-size: 12px;
  }

  .pi-nominee-scroll {
    max-height: 200px;
    padding-right: 2px;
  }

  .pi-nominee-sub-label {
    font-size: 8.5px;
    padding: 2px 7px;
  }

  .bn-item {
    font-size: 10px;
    gap: 2px;
    padding: 6px 1px;
  }

  .bn-icon-wrap,
  .bn-icon-wrap img {
    width: 24px;
    height: 24px;
  }

  /* paired rows — 2-up preserved, tightest gap */
  .pi-info-row.double {
    gap: 10px 8px;
  }

  .pi-nominee-fields {
    gap: 10px 8px;
  }
}

/* ── landscape phones ── */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  .pi-nominee-scroll {
    max-height: 200px;
  }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
