/* ============================================================
   Counsel (light) + Midnight (dark) — David Camp design system.
   ALL color is driven by CSS custom properties. Base :root = Counsel.
   System dark applies via @media unless the user forced a theme; the
   L/D/A toggle stamps :root[data-theme="light|dark"], which always wins.
   ============================================================ */
:root {
  /* surfaces */
  --bg: #f3f3ee;          /* paper ground */
  --card: #ffffff;        /* card surface */
  --card-2: #f4f5f1;      /* secondary surface */
  --field: #ffffff;       /* input surface */
  --line: #e3e4dd;        /* hairline */
  --line-2: #eceae2;      /* lighter hairline */
  /* ink */
  --ink: #16203a;         /* deep navy text */
  --ink-2: #3f4a5c;       /* secondary text */
  --muted: #5a6478;       /* muted */
  --navy: #16203a;        /* legacy alias → heading ink */
  --navy-600: #2b4a6b;    /* avatar tile bg */
  --navy-700: #0b5e47;    /* legacy alias → accent-2 */
  /* accent — emerald */
  --accent: #0e7a5c;
  --accent-2: #0b5e47;
  --accent-soft: #e7f1ec;
  --accent-ink: #0c5c46;  /* text/icon on soft accent */
  --btn-ink: #ffffff;     /* text on accent/gold/red fills */
  /* roles */
  --gold: #b0832a;
  --green: #12916e;
  --red: #c0452f;
  --tint-green-bg: #e3f1ea; --tint-green-ink: #0c6b4e; --tint-green-line: #cbe4d7;
  --tint-gold-bg:  #f4ecd6; --tint-gold-ink:  #8a5a11; --tint-gold-line:  #ecdcb0;
  --tint-red-bg:   #f6e2dc; --tint-red-ink:   #a63a26; --tint-red-line:   #eecabf;
  /* effects */
  --glass: rgba(243,243,238,.86);
  --backdrop: rgba(20,27,46,.42);
  --scrim: rgba(11,15,25,.62);
  --lock-bg: linear-gradient(160deg, #0e7a5c 0%, #0b3b30 62%, #0a2b28 100%);
  --shadow: 0 1px 2px rgba(20,27,46,.05), 0 6px 20px rgba(20,27,46,.07);
  --shadow-lg: 0 12px 40px rgba(20,27,46,.18);
  --radius: 15px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

/* Midnight token values, shared by system-dark (pre-JS) and forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #12141c; --card: #1b1e29; --card-2: #232733; --field: #232733;
    --line: #2a2e3d; --line-2: #242835;
    --ink: #e9ebf4; --ink-2: #c4c9d8; --muted: #969bb0;
    --navy: #e9ebf4; --navy-600: #3b3f70; --navy-700: #b3a6ff;
    --accent: #8f7ff2; --accent-2: #b3a6ff; --accent-soft: #262247; --accent-ink: #b3a6ff; --btn-ink: #14161f;
    --gold: #e0b24d; --green: #37e0c8; --red: #ff6b78;
    --tint-green-bg: #14332b; --tint-green-ink: #37e0c8; --tint-green-line: #1f4a40;
    --tint-gold-bg: #33290f; --tint-gold-ink: #e0b24d; --tint-gold-line: #4d3f1c;
    --tint-red-bg: #3a1f22; --tint-red-ink: #ff8f99; --tint-red-line: #59303a;
    --glass: rgba(18,20,28,.82); --backdrop: rgba(0,0,0,.58); --scrim: rgba(0,0,0,.66);
    --lock-bg: linear-gradient(160deg, #232733 0%, #161822 70%, #12141c 100%);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px rgba(0,0,0,.42);
    --shadow-lg: 0 16px 44px rgba(0,0,0,.55);
    color-scheme: dark;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #12141c; --card: #1b1e29; --card-2: #232733; --field: #232733;
  --line: #2a2e3d; --line-2: #242835;
  --ink: #e9ebf4; --ink-2: #c4c9d8; --muted: #969bb0;
  --navy: #e9ebf4; --navy-600: #3b3f70; --navy-700: #b3a6ff;
  --accent: #8f7ff2; --accent-2: #b3a6ff; --accent-soft: #262247; --accent-ink: #b3a6ff; --btn-ink: #14161f;
  --gold: #e0b24d; --green: #37e0c8; --red: #ff6b78;
  --tint-green-bg: #14332b; --tint-green-ink: #37e0c8; --tint-green-line: #1f4a40;
  --tint-gold-bg: #33290f; --tint-gold-ink: #e0b24d; --tint-gold-line: #4d3f1c;
  --tint-red-bg: #3a1f22; --tint-red-ink: #ff8f99; --tint-red-line: #59303a;
  --glass: rgba(18,20,28,.82); --backdrop: rgba(0,0,0,.58); --scrim: rgba(0,0,0,.66);
  --lock-bg: linear-gradient(160deg, #232733 0%, #161822 70%, #12141c 100%);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 26px rgba(0,0,0,.42);
  --shadow-lg: 0 16px 44px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Map view */
.map-overlay {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; flex-direction: column;
}
.map-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.map-title { font-weight: 700; font-size: 17px; color: var(--ink); }
.map-status { flex: 1; font-size: 12.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.map-close {
  border: none; background: var(--card-2); color: var(--ink-2);
  width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none;
}
.map-canvas { flex: 1; width: 100%; }
.map-geocode {
  border: 1px solid var(--accent); background: var(--accent); color: var(--btn-ink);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.map-geocode:disabled { opacity: .6; }
.leaflet-container { font-family: var(--font); }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 15px; font-weight: 600;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn:active { filter: brightness(.96); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.btn-primary:active { background: var(--accent-2); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-danger { background: var(--card); border-color: var(--tint-red-line); color: var(--red); }
.btn-sm { padding: 8px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* ---------- lock screen ---------- */
.lock {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--lock-bg);
  padding: 24px; z-index: 100;
}
.lock-card {
  width: 100%; max-width: 360px; background: var(--card); border-radius: 20px;
  padding: 32px 26px; text-align: center; box-shadow: var(--shadow-lg);
}
.lock-logo {
  width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.lock-card h1 { margin: 6px 0 2px; font-size: 22px; color: var(--ink); font-family: var(--serif); font-weight: 700; }
.lock-card .muted { margin: 0 0 18px; font-size: 14px; }
/* PIN keypad (house standard 2026-10-20). Colors come from --pk-* set per app on .pin-gate. */
.pin-gate{--pk-size:clamp(64px,min(20vw,10vh),84px);display:flex;flex-direction:column;align-items:center;gap:clamp(8px,1.6vh,16px);touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;color:var(--pk-ink)}
.pin-dots{display:flex;gap:10px}
.pin-dots span{width:14px;height:14px;border-radius:50%;border:2px solid var(--pk-ink);box-sizing:border-box}
.pin-dots span.on{background:var(--pk-ink)}
.pin-gate.busy .pin-dots span.on{animation:pkpulse .9s ease-in-out infinite}
@keyframes pkpulse{50%{opacity:.35}}
.pin-gate.bad .pin-dots{animation:pkshake .35s}
@keyframes pkshake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
.pin-msg{min-height:1.3em;font-size:16px;line-height:1.3;color:var(--pk-muted);text-align:center}
.pin-pad{display:grid;grid-template-columns:repeat(3,var(--pk-size));gap:clamp(8px,1.6vh,16px)}
.pin-pad button{height:var(--pk-size);border-radius:50%;border:1px solid var(--pk-line);background:var(--pk-surface);color:var(--pk-ink);font-family:inherit;font-weight:600;font-size:clamp(26px,4vh,32px);line-height:1;padding:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.pin-pad button:active{background:var(--pk-accent);color:var(--pk-accent-ink)}
.pin-pad button:disabled{opacity:.5}
.pin-pad .pin-del{border:none;background:transparent;font-size:24px}
@media (prefers-reduced-motion:reduce){.pin-gate.busy .pin-dots span.on,.pin-gate.bad .pin-dots{animation:none}}
.pin-gate { --pk-ink: var(--ink); --pk-muted: var(--muted); --pk-line: var(--line); --pk-surface: var(--card-2); --pk-accent: var(--accent); --pk-accent-ink: var(--btn-ink); }
.lock-card { padding: 20px 20px 16px; }
.lock-logo { width: 52px; height: 52px; margin-bottom: 6px; }
.lock-card .muted { margin: 0 0 10px; }
.pin-gate.bad .pin-msg { color: var(--red); }

/* ---------- top bar ---------- */
.app { display: flex; flex-direction: column; min-height: 100%; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--btn-ink);
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.2px; color: var(--ink); font-family: var(--serif); }
.topbar-actions { display: flex; gap: 8px; }
/* theme toggle button (L/D/A cycle) */
.theme-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.theme-btn:active { background: var(--card-2); }

.search-row {
  display: flex; gap: 8px; align-items: center; padding: 0 16px 12px;
}
.search-box {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 12px; color: var(--muted);
}
.search-box input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 11px 0; color: var(--ink); outline: none;
}
.search-clear { border: none; background: transparent; color: var(--muted); font-size: 16px; padding: 6px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.chip.active { background: var(--gold); border-color: var(--gold); color: var(--btn-ink); }
.chip.hill-on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.chip.sort-on { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.chip.seg-on { background: var(--gold); border-color: var(--gold); color: var(--btn-ink); }

/* A–Z quick-scroll rail */
.az-rail {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  width: 20px; max-height: 70vh; z-index: 25;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 0; touch-action: none; user-select: none; -webkit-user-select: none;
}
.az-rail button {
  border: none; background: transparent; color: var(--accent);
  font-size: 10.5px; font-weight: 800; line-height: 1.18; padding: 0; width: 100%;
}
.az-rail button:active { color: var(--accent-2); }
.az-bubble {
  position: fixed; right: 52px; top: 50%; transform: translateY(-50%);
  width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--btn-ink);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
  z-index: 26; box-shadow: var(--shadow-lg); pointer-events: none;
}

/* sort menu */
.sort-menu {
  position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 5px; min-width: 180px;
}
.sort-opt { display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--ink); padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.sort-opt:active { background: var(--card-2); }
.sort-opt.on { color: var(--accent); font-weight: 700; }
.sort-opt.on::after { content: " ✓"; }

/* ---------- main / views ---------- */
.main { flex: 1; padding: 14px 16px calc(86px + var(--safe-bottom)); max-width: 1500px; width: 100%; margin: 0 auto; }
.view { animation: fade .2s ease; }
/* Keep text-heavy views comfortably narrow; the contacts list flexes wide. */
#view-ask, #view-groups, #view-import, #view-cleanup, #view-settings { max-width: 920px; margin: 0 auto; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
.section-head h2 { font-size: 17px; margin: 0; color: var(--ink); }
.count-badge { color: var(--muted); font-size: 13px; font-weight: 600; }

/* alpha section dividers */
.alpha-label {
  font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .8px;
  margin: 18px 4px 8px; text-transform: uppercase;
}
.alpha-label:first-child { margin-top: 4px; }

/* ---------- contact cards ---------- */
.contact-list { display: flex; flex-direction: column; gap: 8px; content-visibility: auto; contain-intrinsic-size: auto 480px; }
.vrow { position: absolute; left: 0; right: 0; }
.vrow-grid { display: grid; gap: 10px; }
.contact-card {
  display: flex; align-items: center; gap: 13px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px;
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s;
}
.contact-card:active { transform: scale(.992); }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff; background: var(--navy-600);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-main { flex: 1; min-width: 0; }
.contact-name { font-weight: 650; font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-name .star { color: var(--gold); margin-left: 5px; font-size: 13px; }
.contact-sub { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.contact-stale { font-size: 12px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.contact-actions { display: flex; gap: 4px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card-2); color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--accent-soft); }
.icon-btn.disabled { color: var(--line); pointer-events: none; background: var(--card); }

/* ---------- upcoming birthdays ---------- */
.bday-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.bday-head { display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: transparent; padding: 12px 14px; }
.bday-head.soon { background: var(--tint-gold-bg); }
.bday-emoji { font-size: 18px; }
.bday-title { font-weight: 650; font-size: 15px; color: var(--ink); }
.bday-count { background: var(--accent-soft); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.bday-caret { margin-left: auto; color: var(--muted); font-size: 13px; }
.bday-body { border-top: 1px solid var(--line-2); }
.bday-row { display: flex; align-items: center; gap: 11px; padding: 9px 14px; border-top: 1px solid var(--line-2); cursor: pointer; }
.bday-row:first-child { border-top: none; }
.bday-row:active { background: var(--card-2); }
.bday-av { width: 38px; height: 38px; font-size: 14px; }
.bday-main { flex: 1; min-width: 0; }
.bday-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.bday-sub { font-size: 12.5px; color: var(--muted); }
.bday-when { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.bday-when.now { color: var(--gold); }

/* ---------- multi-select ---------- */
.link-btn { border: none; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; padding: 0; }
.contact-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.sel-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--btn-ink); font-size: 15px; font-weight: 800; }
.sel-check.on { background: var(--accent); border-color: var(--accent); }
.select-bar { position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-bottom)); z-index: 42; background: var(--glass); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,.10); }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px 4px; }
.sb-link { border: none; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; }
.sb-count { font-size: 14px; font-weight: 700; color: var(--ink); }
.sb-actions { display: flex; gap: 2px; padding: 2px 6px 8px; overflow-x: auto; }
.sb-act { flex: 1; min-width: 56px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: none; background: transparent; color: var(--accent); font-size: 11px; font-weight: 600; padding: 6px 2px; }
.sb-act.danger { color: var(--red); }

/* ---------- empty state ---------- */
.empty {
  text-align: center; padding: 50px 20px; color: var(--muted);
}
.empty svg { color: var(--line); margin-bottom: 12px; }
.empty h3 { color: var(--ink-2); margin: 0 0 6px; font-size: 16px; }
.empty p { margin: 0 0 16px; font-size: 14px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--backdrop); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
}
.modal {
  background: var(--bg); width: 100%; max-width: 680px; max-height: 94vh;
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slideup .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.modal-head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  border-radius: 20px 20px 0 0; z-index: 2;
}
.modal-head h2 { font-size: 17px; margin: 0; color: var(--ink); }
.modal-head .btn-ghost { padding: 6px 8px; }
.modal-x { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); padding: 0; }
.modal-x:active { background: var(--bg); color: var(--ink); }
.modal-body { overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.modal-foot {
  position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}

.add-iphone { margin-bottom: 14px; background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); text-decoration: none; gap: 8px; }
.add-iphone:active { filter: brightness(.97); }
.add-enrich { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); gap: 8px; }
.add-enrich:active { background: var(--accent-2); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.enrich-row { padding: 9px 0; border-top: 1px solid var(--line-2); }
.enrich-row:first-child { border-top: none; }
.enrich-top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.enrich-top .dl { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.enrich-note { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- detail view ---------- */
.detail-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 18px; }
.detail-avatar { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; display:flex; align-items:center; justify-content:center; font-size: 32px; font-weight: 700; color:#fff; background: var(--navy-600); box-shadow: var(--shadow); }
.detail-avatar img { width:100%; height:100%; object-fit: cover; }
.avatar-edit-wrap { position: relative; border: none; background: transparent; padding: 0; cursor: pointer; }
.avatar-edit-badge { position: absolute; right: 2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--btn-ink); display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.avatar-edit-badge svg { width: 15px; height: 15px; }
.detail-name { font-size: 24px; font-weight: 700; margin: 12px 0 2px; color: var(--ink); font-family: var(--serif); }
.detail-title { color: var(--ink-2); font-size: 15px; }
.detail-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: none; background: transparent; color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer;
}
.quick-btn .qi { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); display:flex; align-items:center; justify-content:center; }
.quick-btn.disabled { color: var(--muted); opacity: .45; pointer-events: none; }
.quick-btn.disabled .qi { background: var(--line-2); }
.quick-btn.hill-toggle { color: var(--muted); }
.quick-btn.hill-toggle .qi { background: var(--line-2); }
.quick-btn.hill-toggle.on { color: var(--accent-ink); }
.quick-btn.hill-toggle.on .qi { background: var(--accent-soft); color: var(--accent); }

.detail-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.detail-section h4 { margin: 0; padding: 11px 15px 4px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.field-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 15px; border-top: 1px solid var(--line-2); }
.detail-section h4 + .field-row { border-top: none; }
.field-label { width: 96px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.field-value { flex: 1; font-size: 15px; color: var(--ink); word-break: break-word; }
.field-value a { color: var(--accent); text-decoration: none; }
.field-value a:active { text-decoration: underline; }
.detail-meta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 2px 0 14px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
.form-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px 12px; margin-bottom: 14px; }
.form-section > .fs-title { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 0 4px; }
.field { margin: 10px 0; }
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--field); color: var(--ink); outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr; gap: 10px; }
.grid-bday { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.age-pill { display:inline-block; margin-top: 8px; font-size: 13px; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* photo picker */
.photo-pick { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 14px; }
.photo-drop {
  width: 104px; height: 104px; border-radius: 50%; border: 2px dashed var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--card-2); color: var(--muted); position: relative; cursor: pointer; text-align:center;
}
.photo-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop .ph-hint { font-size: 11px; padding: 0 8px; }
.photo-drop-lg { width: 100%; height: 128px; border-radius: 14px; }
.photo-drop-lg .ph-hint { font-size: 13px; line-height: 1.5; }
.avatar-edit-wrap.dragover .detail-avatar { box-shadow: 0 0 0 3px var(--accent); }
.avatar-drop-hint { position: absolute; inset: 0; border-radius: 50%; display: none; align-items: center; justify-content: center; text-align: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--scrim); pointer-events: none; }
.avatar-edit-wrap.dragover .avatar-drop-hint { display: flex; }
.avatar-edit-wrap.dragover .avatar-edit-badge { opacity: 0; }
.photo-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- tags ---------- */
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: var(--field); }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
.tag-x { border: none; background: transparent; color: var(--accent-ink); font-size: 11px; padding: 0 0 0 2px; opacity: .6; }
.tag-input { border: none; outline: none; flex: 1; min-width: 90px; font-size: 15px; padding: 4px; background: transparent; color: var(--ink); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tag-chip.view { border: 1px solid var(--line); background: var(--card-2); cursor: pointer; }
.tag-chip.view:active { background: var(--accent-soft); }
.filter-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; font-size: 14px; color: var(--ink); }
.filter-banner svg { vertical-align: -2px; }
.filter-clear { border: none; background: transparent; color: var(--accent); font-weight: 700; font-size: 13px; }

/* relationship / interaction history */
.rel-list { margin-top: 6px; }
.rel-item { display: grid; grid-template-columns: 92px 1fr 24px; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.rel-item:first-child { border-top: none; }
.rel-date { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.rel-note { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.rel-del { border: none; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; padding: 0; }
.rel-del:active { color: var(--red); }

/* smart-segment banner + actions */
.segment-banner { background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius-sm); padding: 9px 11px; margin-bottom: 12px; box-shadow: var(--shadow); }
.seg-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); flex-wrap: wrap; }
.seg-top .seg-label { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.seg-top .seg-label svg { vertical-align: -2px; }
.seg-count { background: var(--gold); color: var(--btn-ink); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.seg-top .filter-clear { margin-left: auto; color: var(--muted); }
.seg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.seg-act { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.seg-act:active { background: var(--accent-soft); border-color: var(--accent); }
.seg-act svg { width: 14px; height: 14px; }
.seg-live { text-align: center; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); border-radius: 10px; padding: 10px; margin-top: 4px; }

/* ---------- groups ---------- */
.group-card {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px;
  box-shadow: var(--shadow); margin-bottom: 9px;
}
.group-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.group-main { flex: 1; min-width: 0; }
.group-name { font-weight: 650; font-size: 16px; color: var(--ink); }
.group-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.group-mail-btn {
  border: 1px solid var(--accent); background: var(--accent); color: var(--btn-ink);
  width: 44px; height: 44px; border-radius: 12px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.group-enrich-btn {
  border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent-ink);
  width: 44px; height: 44px; border-radius: 12px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.group-enrich-btn:active { filter: brightness(.95); }
/* group-enrichment progress */
.ge-pct { font-size: 38px; line-height: 1.1; font-weight: 800; text-align: center; color: var(--accent); font-variant-numeric: tabular-nums; margin: 16px 0 10px; }
.ge-bar { height: 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; margin: 0 2px 10px; }
.ge-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .25s linear; }
.ge-now { text-align: center; font-size: 13.5px; font-weight: 600; color: var(--ink); min-height: 19px; }
.ge-eta { text-align: center; font-size: 12.5px; color: var(--muted); min-height: 17px; margin-top: 2px; }
.ge-count { text-align: center; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: none; background: var(--card); color: var(--ink-2); padding: 9px 14px; font-size: 14px; font-weight: 600; }
.seg button.on { background: var(--accent); color: var(--btn-ink); }

/* member picker */
.picker-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--field); }
.picker-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.picker-item:last-child { border-bottom: none; }
/* the name/avatar area opens the contact for editing … */
.pk-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; border: none; background: transparent; padding: 4px 2px; margin: -4px -2px; text-align: left; color: inherit; border-radius: 8px; cursor: pointer; }
.pk-open:active { background: var(--accent-soft); }
.pk-main { min-width: 0; display: flex; flex-direction: column; }
.picker-item .pk-name { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* … and only the checkbox adds/removes them. Padded for an easy tap target. */
.pk-box { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 9px; margin: -9px -4px -9px 0; cursor: pointer; }
.picker-item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.picker-subhead {
  position: sticky; top: 0; z-index: 1; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 7px 12px; border-bottom: 1px solid var(--line-2);
}

/* ---------- import ---------- */
.import-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.import-tile h3 { margin: 0 0 4px; font-size: 16px; display:flex; align-items:center; gap:8px; color: var(--ink); }
.import-tile p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center;
  color: var(--muted); background: var(--card-2); transition: .15s;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.dz-big { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 18px; cursor: pointer; }
.dz-icon { color: var(--accent); }
.dz-big.dragover .dz-icon { color: var(--accent-ink); }
.dz-title { font-size: 16px; font-weight: 650; color: var(--ink); }
.dz-sub { font-size: 12.5px; color: var(--muted); max-width: 280px; }
.dropzone.busy { cursor: default; border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.dz-spinner { color: var(--accent); display: inline-flex; }
.dz-spinner svg { animation: dz-spin .8s linear infinite; }
@keyframes dz-spin { to { transform: rotate(360deg); } }

/* Whole-page drop affordance — dragging a file (vCard, CSV, PDF…) anywhere outside a
   dedicated dropzone (Import tab, photo pickers) shows this instead of doing nothing. */
#global-dropzone {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--backdrop); opacity: 0; transition: opacity .12s ease;
}
#global-dropzone.on { opacity: 1; }
#global-dropzone .gdz-card {
  background: var(--card); border: 2px dashed var(--accent); border-radius: var(--radius);
  padding: 28px 34px; text-align: center; color: var(--ink); box-shadow: var(--shadow-lg);
  transform: scale(.97); transition: transform .12s ease;
}
#global-dropzone.on .gdz-card { transform: scale(1); }
#global-dropzone .gdz-icon { color: var(--accent); margin-bottom: 8px; }
#global-dropzone .gdz-title { font-size: 17px; font-weight: 650; }
#global-dropzone .gdz-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* review */
.review-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.tag-new { background: var(--tint-green-bg); color: var(--tint-green-ink); }
.tag-update { background: var(--tint-gold-bg); color: var(--tint-gold-ink); }
.confidence { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.conf-hi { background: var(--tint-green-bg); color: var(--tint-green-ink); }
.conf-mid { background: var(--tint-gold-bg); color: var(--tint-gold-ink); }
.conf-lo { background: var(--tint-red-bg); color: var(--tint-red-ink); }
.diff-row { display: grid; grid-template-columns: 92px 1fr 1fr; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.diff-row .dl { color: var(--muted); font-size: 12.5px; }
.diff-old { color: var(--muted); text-decoration: line-through; }
.diff-new { color: var(--ink); font-weight: 600; }
.diff-row.changed .diff-new { color: var(--green); }
.diff-input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); font-size: 14px; font-weight: 600; }
.diff-input:focus { outline: none; border-color: var(--accent); }
.diff-row.changed .diff-input { color: var(--green); }
.ai-note { font-size: 13px; color: var(--ink-2); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 9px 11px; margin: 10px 0; line-height: 1.45; }

/* settings */
.set-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line-2); }
.set-card .set-row:first-child { border-top: none; }
.set-row .sl { font-size: 15px; color: var(--ink); }
.set-row .ss { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* collapsible settings cards — status always visible, controls expand on tap */
.acc-card { padding: 0; overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: none; background: transparent; text-align: left; color: inherit; }
.acc-head:active { background: var(--card-2); }
.acc-head .ct-icon { font-size: 19px; flex: none; display: inline-flex; }
.acc-title-wrap { flex: 1; min-width: 0; }
.acc-title { font-size: 15px; font-weight: 650; color: var(--ink); }
.acc-status { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.acc-chevron { flex: none; color: var(--muted); font-size: 19px; transition: transform .15s ease; }
.acc-chevron.open { transform: rotate(90deg); color: var(--accent); }
.acc-body { padding: 2px 16px 16px; border-top: 1px solid var(--line-2); }

/* appearance — L/D/A segmented pill */
.theme-pill { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card-2); }
.theme-pill button { border: none; background: transparent; color: var(--ink-2); padding: 8px 16px; font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.theme-pill button.on { background: var(--accent); color: var(--btn-ink); }

/* ---------- business card scanner ---------- */
.card-toggle {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; font-weight: 600;
}
.card-toggle .ct-icon { display: inline-flex; color: var(--muted); }
.card-toggle .ct-state { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.card-toggle.on { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.card-toggle.on .ct-icon, .card-toggle.on .ct-state { color: var(--btn-ink); }
.fav-toggle.on .ct-icon { color: var(--gold); }
.card-shot {
  width: 100%; min-height: 130px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card-2); display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 12px;
}
.card-shot img { width: 100%; height: auto; display: block; }
.review-shot { max-height: 240px; }
.review-shot img { object-fit: contain; max-height: 240px; width: auto; max-width: 100%; margin: 0 auto; }
.card-status { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: 10px; min-height: 18px; }
.card-status.ok { color: var(--green); font-weight: 600; }
.card-status.err { color: var(--red); }
.card-thumb { width: 100%; max-width: 320px; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* hill person markers */
.hillmark { color: var(--muted); margin-left: 5px; display: inline-flex; vertical-align: middle; opacity: .8; }
.hillmark svg { width: 13px; height: 13px; }

/* ---------- ask my contacts (chat) ---------- */
.ask-wrap {
  position: fixed; left: 0; right: 0;
  top: calc(var(--safe-top) + 57px); bottom: calc(60px + var(--safe-bottom));
  display: flex; flex-direction: column; max-width: 720px; margin: 0 auto;
}
.ask-log { flex: 1; overflow-y: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.ask-msg { display: flex; margin: 8px 0; }
.ask-msg.user { justify-content: flex-end; }
.ask-b { max-width: 86%; padding: 10px 13px; border-radius: 15px; font-size: 14.5px; line-height: 1.45; }
.ask-msg.user .ask-b { background: var(--accent); color: var(--btn-ink); border-bottom-right-radius: 4px; }
.ask-msg.ai .ask-b { background: var(--card); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.ask-answer strong { font-weight: 700; }
.ask-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.ask-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line); background: var(--card-2); border-radius: 9px; padding: 7px 11px; text-align: left; }
.ask-contact:active { background: var(--accent-soft); }
.acn { font-weight: 650; font-size: 14px; color: var(--ink); }
.acs { font-size: 12px; color: var(--muted); }
.ask-typing { color: var(--muted); font-size: 14px; }
.ask-input-row { display: flex; gap: 8px; align-items: center; padding: 8px 12px 10px; border-top: 1px solid var(--line); background: var(--card); }
.ask-input-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 11px 16px; font-size: 15px; background: var(--card-2); outline: none; color: var(--ink); }
.ask-input-row input:focus { border-color: var(--accent); }
.ask-send { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: none; background: var(--accent); color: var(--btn-ink); display: flex; align-items: center; justify-content: center; }
.ask-clear { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; }
.ask-empty { text-align: center; padding: 30px 20px; }
.ask-empty-icon { color: var(--accent); }
.ask-empty h3 { margin: 8px 0 0; color: var(--ink); font-size: 18px; font-family: var(--serif); }
.ask-suggest { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 0 auto; }
.ask-chip-q { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 12px; padding: 11px 14px; font-size: 13.5px; text-align: left; box-shadow: var(--shadow); }
.ask-chip-q:active { background: var(--accent-soft); }

/* ---------- tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; background: var(--glass); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: transparent; color: var(--muted); padding: 9px 0 7px; font-size: 11px; font-weight: 600;
}
.tab.active { color: var(--accent); }
.tab.active svg { stroke: var(--accent); }
.tab-icon-wrap { position: relative; display: inline-flex; }
.tab-badge {
  position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: var(--btn-ink); font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ---------- cleanup ---------- */
.cleanup-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.cleanup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tag-dup { background: var(--tint-red-bg); color: var(--tint-red-ink); }
.tag-field { background: var(--tint-gold-bg); color: var(--tint-gold-ink); }
.dup-pair { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.dup-contact { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 9px 11px; background: var(--card-2); }
.dup-contact.keep { border-color: var(--accent); background: var(--accent-soft); }
.dup-contact .dc-main { flex: 1; min-width: 0; }
.dup-contact .dc-name { font-weight: 650; font-size: 15px; color: var(--ink); }
.dup-contact .dc-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 999px; }
.dc-tag.keep { background: var(--accent); color: var(--btn-ink); }
.dc-tag.remove { background: var(--line); color: var(--ink-2); }
.merge-conflict { display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line-2); }
.merge-conflict .mc-label { font-size: 12.5px; color: var(--muted); padding-top: 7px; }
.merge-opt { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 7px 10px; font-size: 14px; margin-bottom: 5px; }
.merge-opt.sel { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.cleanup-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.cleanup-empty h3 { color: var(--ink-2); }

/* headshot queue (LinkedIn on file, no photo) */
.pq-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.pq-row:first-of-type { border-top: none; }
.pq-av { width: 38px; height: 38px; font-size: 14px; }
.pq-btn {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--card-2); color: var(--accent); text-decoration: none; cursor: pointer;
}
.pq-btn:active { background: var(--accent-soft); }
.pq-li { color: #0a66c2; }
:root[data-theme="dark"] .pq-li { color: #70b5f9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .pq-li { color: #70b5f9; } }
.pq-btn svg { width: 18px; height: 18px; }
.pq-x { color: var(--red); font-size: 15px; }

/* ---------- contact watch ---------- */
.topbar-icon { position: relative; padding-left: 9px; padding-right: 9px; }
.topbar-icon .tab-badge { top: -6px; right: -6px; }
.watch-item {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 11px 13px; margin-bottom: 9px; box-shadow: var(--shadow);
}
.watch-item.unseen { border-color: var(--accent); background: var(--accent-soft); }
.watch-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.watch-who { border: none; background: none; padding: 0; font: inherit; font-weight: 750; color: var(--ink); cursor: pointer; text-align: left; }
.watch-date { font-size: 11.5px; color: var(--muted); white-space: nowrap; flex: none; }
.watch-headline { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.watch-summary { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.45; }
.watch-src { margin-top: 5px; font-size: 12px; }
.watch-src a { color: var(--accent); text-decoration: none; }

/* ---------- contact enrichment (review) ---------- */
.enrich-grp { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 11px 13px; margin-bottom: 10px; box-shadow: var(--shadow); }
.enrich-grp.has-change { border-color: var(--gold); background: var(--tint-gold-bg); }
.enrich-grp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 1px; }
.enrich-grp-sub { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.enrich-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; white-space: nowrap; flex: none; }
.enrich-badge.chg { background: var(--tint-gold-bg); color: var(--tint-gold-ink); border: 1px solid var(--tint-gold-line); }
.enrich-badge.fill { background: var(--accent-soft); color: var(--accent-ink); }
.enrich-item { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.enrich-item-top { display: flex; align-items: center; gap: 7px; }
.enrich-item-top .dl { font-weight: 650; font-size: 12.5px; color: var(--ink-2); }
.enrich-val { margin-top: 3px; font-size: 14px; line-height: 1.4; word-break: break-word; }
.enrich-old { color: var(--muted); text-decoration: line-through; }
.enrich-arrow { color: var(--gold); margin: 0 6px; font-weight: 700; }
.enrich-new { color: var(--ink); font-weight: 600; }
.enrich-note { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---------- network / who do I know at… ---------- */
.ask-net-launch { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 11px 14px; border: none; border-bottom: 1px solid var(--line); background: var(--accent-soft); color: var(--ink); flex: none; }
.ask-net-launch:active { filter: brightness(.97); }
.ask-net-ic { font-size: 22px; flex: none; }
.ask-net-t { font-weight: 700; font-size: 14.5px; color: var(--accent-ink); }
.ask-net-s { font-size: 12px; color: var(--ink-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-net-arrow { color: var(--muted); font-size: 20px; flex: none; }
.net-seg { display: flex; gap: 6px; margin-bottom: 10px; }
.net-seg-btn { flex: 1; padding: 9px 4px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.net-seg-btn.on { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.net-search { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 15px; background: var(--card-2); outline: none; color: var(--ink); margin-bottom: 10px; }
.net-search:focus { border-color: var(--accent); }
.net-grp { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 8px; overflow: hidden; box-shadow: var(--shadow); }
.net-grp-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 13px; border: none; background: none; color: var(--ink); }
.net-grp-head.open { background: var(--accent-soft); }
.net-grp-name { flex: 1; min-width: 0; font-weight: 650; font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.net-count { flex: none; min-width: 26px; text-align: center; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 700; }
.net-grp-head.open .net-count { background: var(--card); }
.net-people { padding: 4px 11px 11px; }
.net-people.hidden { display: none; }
.net-person { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-top: 1px solid var(--line-2); cursor: pointer; }
.net-person:active { background: var(--card-2); }
.net-av { width: 34px; height: 34px; font-size: 13px; flex: none; }
.net-person-main { min-width: 0; flex: 1; }
.net-person-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.net-person-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-facets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 10px; }
.net-facet { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); }
.net-why { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.net-why-chip { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-facet.f-domain, .net-why-chip.f-domain { background: var(--tint-green-bg); border-color: var(--tint-green-line); color: var(--tint-green-ink); }
.net-facet.f-group, .net-why-chip.f-group { background: var(--tint-gold-bg); border-color: var(--tint-gold-line); color: var(--tint-gold-ink); }
.net-facet.f-employer, .net-why-chip.f-employer { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-ink); }
.net-brief-btn { width: 100%; margin-top: 8px; }
.net-brief { margin-top: 8px; padding: 10px 12px; background: var(--accent-soft); border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }

/* ---------- smart tagging (review) ---------- */
.at-vocab { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; background: var(--card-2); outline: none; color: var(--ink); resize: vertical; font-family: inherit; line-height: 1.5; }
.at-vocab:focus { border-color: var(--accent); }
.at-grp { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 9px; overflow: hidden; box-shadow: var(--shadow); }
.at-grp-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 13px; border: none; background: none; color: var(--ink); }
.at-grp-head.open { background: var(--accent-soft); }
.at-tag-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.at-grp-acts { display: flex; gap: 8px; padding: 0 11px 11px; }
.at-people { padding: 2px 11px 10px; }
.at-people.hidden { display: none; }
.at-person { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-top: 1px solid var(--line-2); }
.at-person .net-person-main { flex: 1; min-width: 0; cursor: pointer; }
.at-x { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 12px; }
.at-x:active { background: var(--card-2); }

/* copy-to-clipboard buttons */
.copy-btn {
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--accent);
  width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center;
  justify-content: center; margin-left: 8px; vertical-align: middle; cursor: pointer; flex: none;
}
.copy-btn:active { background: var(--accent-soft); }
.field-value.has-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.field-value.has-copy a { overflow-wrap: anywhere; }

/* activity log */
/* Activity Log can grow without bound (every automation run adds an entry) — keep it
   at a fixed glance-height and let IT scroll internally, instead of pushing the rest
   of Settings down the page as history accumulates. */
.act-log { max-height: 340px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.act-row { display: flex; gap: 11px; align-items: flex-start; padding: 10px 13px; border-top: 1px solid var(--line-2); }
.act-row:first-child { border-top: none; }
.act-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px; }
.act-main { flex: 1; min-width: 0; }
.act-summary { font-size: 13.5px; color: var(--ink); line-height: 1.35; }
.act-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; word-break: break-word; }

/* bulk tools: hill finder + company standardizer */
.cand-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-top: 1px solid var(--line-2); }
.cand-row:first-of-type { border-top: none; }
.co-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; box-shadow: var(--shadow); }
.co-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.co-variant { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.co-from { color: var(--red); text-decoration: line-through; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-same { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-done { color: var(--green); font-weight: 600; font-size: 14px; padding: 4px 2px; }

/* google-sheet group preview */
.sheet-preview { margin-top: 10px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.sheet-preview:empty { display: none; }
.sheet-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 11px; border-top: 1px solid var(--line-2); font-size: 13px; }
.sheet-row:first-child { border-top: none; }
.sr-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-email { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }

/* batch-accept by confidence band */
.band-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.band-head { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 9px; }
.band-row { display: flex; flex-wrap: wrap; gap: 8px; }
.band-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card-2); border-radius: 999px; padding: 6px 8px 6px 12px; cursor: pointer; }
.band-btn:active { background: var(--accent-soft); border-color: var(--accent); }
.band-pct { font-size: 13px; font-weight: 650; color: var(--ink); }
.band-n { background: var(--accent); color: var(--btn-ink); font-size: 11.5px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; }
.alloc-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin: 12px 0 4px; }
.alloc-row { padding: 8px 0; border-top: 1px solid var(--line-2); }
.alloc-row:first-of-type { border-top: none; }
.alloc-val { font-size: 14px; color: var(--ink); word-break: break-all; margin-bottom: 6px; }
.alloc-seg { display: flex; flex-wrap: wrap; gap: 5px; }
.alloc-opt { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 600; }
.alloc-opt.on { background: var(--accent); border-color: var(--accent); color: var(--btn-ink); }
.alloc-opt.on.drop { background: var(--muted); border-color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(94px + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--btn-ink); padding: 11px 18px; border-radius: 999px; font-size: 14px;
  z-index: 80; box-shadow: var(--shadow-lg); animation: fade .2s ease; max-width: 90%;
}

/* phones: icon-only topbar action buttons so the bar never overflows (extra theme toggle) */
@media (max-width: 440px) {
  .add-label { display: none; }
  .topbar-actions .btn-sm { padding-left: 10px; padding-right: 10px; }
  .topbar-inner { gap: 8px; }
}

/* ===================================================================
   SSA Org Chart (migrated from Agency People) — uses shared tokens
   =================================================================== */
#view-ssa { padding: 12px 14px 96px; max-width: 960px; margin: 0 auto; }
.ssa-loading { padding: 40px; text-align: center; color: var(--muted); }
.ssa-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ssa-title-wrap { flex: 1; min-width: 0; }
.ssa-title { font-family: var(--serif); font-size: 21px; margin: 0; color: var(--ink); }
.ssa-asof { font-size: 12.5px; color: var(--muted); }
.ssa-actions { display: flex; gap: 8px; flex: none; }
.ssa-guidance { font-size: 12.5px; color: var(--tint-gold-ink); background: var(--tint-gold-bg); border: 1px solid var(--tint-gold-line); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; }
.ssa-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ssa-lg { font-size: 11.5px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.ssa-lg.conf-high { background: var(--card); color: var(--ink); }
.ssa-lg.conf-med { background: var(--tint-gold-bg); color: var(--tint-gold-ink); border-color: var(--tint-gold-line); }
.ssa-lg.conf-low { background: var(--card-2); color: var(--muted); }
.ssa-compiled { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.ssa-banner { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); font-size: 13.5px; }
.ssa-banner.has-changes { background: var(--tint-gold-bg); border-color: var(--tint-gold-line); color: var(--tint-gold-ink); }
.ssa-cluster { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ssa-cluster-head { background: var(--accent); color: var(--btn-ink); padding: 9px 13px; font-weight: 700; font-size: 14px; }
.ssa-cluster-note { padding: 7px 13px; font-size: 12px; color: var(--muted); background: var(--card-2); border-bottom: 1px solid var(--line); }
.ssa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 10px; }
.ssa-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; background: var(--card); transition: box-shadow .12s, border-color .12s; }
.ssa-box:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.ssa-box.is-head { border-width: 2px; border-color: var(--accent); background: var(--accent-soft); }
.ssa-box.conf-med { background: var(--tint-gold-bg); }
.ssa-box.conf-low { background: var(--card-2); }
.ssa-role { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.ssa-name { font-weight: 600; margin-top: 2px; color: var(--ink); word-break: break-word; }
.ssa-name .ssa-plink { color: var(--accent); text-decoration: none; }
.ssa-name .ssa-plink:hover { text-decoration: underline; }
.ssa-vacant { color: var(--red); font-style: italic; font-weight: 500; }
.ssa-acting { color: var(--gold); font-weight: 800; }
.ssa-bnote { font-size: 11.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.ssa-form { display: block; }
.ssa-lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin: 11px 0 3px; }
.ssa-lbl.ssa-chk { display: flex; align-items: center; gap: 8px; }
.ssa-input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); color: var(--ink); font: inherit; }
textarea.ssa-input { resize: vertical; }
.ssa-mini { font-size: 11px; background: var(--accent-soft); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 2px 7px; margin-left: 6px; cursor: pointer; }
.ssa-small { font-size: 12px; }
.ssa-muted { color: var(--muted); }
.ssa-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.ssa-linkrow { font-size: 13.5px; margin-bottom: 8px; }
.ssa-linkbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.ssa-picker-results { margin-top: 10px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.ssa-picker-results:empty { display: none; }
.ssa-picker-row { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.ssa-picker-row:last-child { border-bottom: 0; }
.ssa-picker-row:hover { background: var(--accent-soft); }
.ssa-findings { padding-left: 18px; margin: 6px 0; }
.ssa-findings li { margin-bottom: 9px; font-size: 13.5px; }
@media print {
  body * { visibility: hidden !important; }
  #view-ssa, #view-ssa * { visibility: visible !important; }
  #view-ssa { position: absolute; inset: 0; padding: 0; max-width: none; }
  .ssa-actions, .ssa-banner, .tabbar { display: none !important; }
  .ssa-cluster, .ssa-box { break-inside: avoid; box-shadow: none; }
  .ssa-cluster-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== Birthdays — dedicated section (🎂 topbar button) ===== */
#view-birthdays { padding: 14px 14px 96px; max-width: 720px; margin: 0 auto; }
.bday-page-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 2px 12px; }
.bday-page-title { font-family: var(--serif); font-size: 22px; margin: 0; color: var(--ink); }
.bday-page-sub { font-size: 13px; }
.bday-section-head { padding: 10px 14px 8px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
#view-birthdays .bday-section-head + .bday-body { border-top: none; }

/* Bulk-accept panel in Enrichment Review — the observed-mail batch (DocDesk). */
.enrich-bulk { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.enrich-bulk .btn { font-weight: 600; }

/* Build badge, top-left: sits in the header's 12px top padding, above the logo, below the
   notch (safe-top) and clear of every tap target. Tiny on purpose. Measured: muted ink is
   5.95:1 on the light card, 5.35:1 on the light page, 6.02:1 / 6.66:1 in dark; the failure
   red is 5.08:1 light and 6.03:1 dark. */
.app-version {
  position: fixed; z-index: 250; pointer-events: none;   /* above the full-screen map (200) and the PIN lock (100) */
  top: var(--safe-top);
  left: calc(env(safe-area-inset-left, 0px) + 16px);
  font: 500 9px/9px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2px; color: var(--muted); white-space: nowrap;
}
.app-version.fail { color: var(--red, #b3261e); font-weight: 700; }
/* The PIN screen paints a green (light) or navy (dark) gradient where muted ink would vanish
   (1.12:1 on #0e7a5c). White is 5.31:1 on the green and 14.9:1 on the navy. */
body:has(#lock:not(.hidden)) .app-version:not(.fail) { color: #ffffff; }

/* Phone: the search box gets its own full-width row (2026-10-01). Beside five 40px filter
   buttons it was about 50px wide on a 375px iPhone, so a typed search was unreadable (").X").
   The buttons share the row below, evenly, at the same 42px tap height. Wider screens keep the
   single row. */
@media (max-width: 560px) {
  .search-row { flex-wrap: wrap; row-gap: 8px; }
  .search-row .search-box { flex: 1 1 100%; }
  .search-row .chip { flex: 1 1 0; width: auto; }
}
/* One clear button: the app's own. Safari and Chrome draw a second, native one in a type=search field. */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
