:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6db;
  --card: #fffdf7;
  --ink: #201d18;
  --ink-soft: #5b564c;
  --ink-faint: #948d80;
  --line: #e2dccd;
  --line-strong: #cfc7b4;

  --teal: #0f3d3a;
  --teal-2: #14544f;
  --mint: #8fe3c0;
  --mint-soft: #dff5ea;
  --coral: #e07a5f;
  --coral-soft: #fbe6de;

  --lead: #7b61ff;
  --deal: #e8891a;
  --contact: #12a26a;
  --company: #2f80ed;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;

  --shadow-sm: 0 1px 2px rgba(32, 29, 24, .06), 0 4px 12px rgba(32, 29, 24, .05);
  --shadow-lg: 0 20px 60px -18px rgba(32, 29, 24, .35);
  --r: 16px;
  --r-sm: 11px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(143, 227, 192, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(224, 122, 95, .10), transparent 55%),
    var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
body > *:not(.grain) { position: relative; z-index: 1; }

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(244, 241, 234, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; }
.brand-mark { color: var(--teal); display: grid; place-items: center; }
.brand-title { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -.2px; display: block; line-height: 1.05; }
.brand-sub { font-size: 11.5px; color: var(--ink-soft); letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(143,227,192,.35); }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  transition: .15s ease; box-shadow: var(--shadow-sm);
}
.icon-btn:hover { color: var(--teal); border-color: var(--line-strong); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); }
/* ---------- setup ---------- */
.setup { display: grid; place-items: center; min-height: 60vh; padding: 30px; }
.setup-card {
  max-width: 460px; text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 44px 40px; box-shadow: var(--shadow-lg);
}
.setup-icon { color: var(--coral); width: 78px; height: 78px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--coral-soft); }
.setup-card h1 { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 8px 0 10px; }
.setup-card p { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 0; }
/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 0; max-width: 1280px; margin: 0 auto; }

.rail { padding: 26px 22px 26px 24px; border-right: 1px solid var(--line); align-self: start; position: sticky; top: 76px; }
.rail-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 600; margin: 18px 0 8px; }
.rail-label:first-child { margin-top: 0; }
.seg { display: flex; gap: 4px; background: var(--paper-2); padding: 3px; border-radius: 11px; border: 1px solid var(--line); }
.seg-btn {
  flex: 1; border: 0; background: transparent; color: var(--ink-soft); font-weight: 500;
  font-size: 12.5px; padding: 7px 8px; border-radius: 8px; transition: .15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on { background: var(--card); color: var(--teal); box-shadow: var(--shadow-sm); }
.seg-bound { flex-wrap: wrap; }
.seg-bound .seg-btn { flex: 1 1 auto; font-size: 11.5px; padding: 7px 6px; }

.rail-search { margin-top: 22px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; color: var(--ink-faint); }
.search:focus-within { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(15,61,58,.10); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--ink); }
.search input::placeholder { color: var(--ink-faint); }
.search-clear { border: 0; background: none; color: var(--ink-faint); font-size: 16px; line-height: 1; padding: 0 2px; }
.search-clear:hover { color: var(--ink); }

.rail-count { margin-top: 26px; border-top: 1px dashed var(--line-strong); padding-top: 18px; }
.count-big { font-family: var(--serif); font-weight: 600; font-size: 38px; color: var(--teal); line-height: 1; }
.count-label { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-faint); }

/* ---------- list ---------- */
.list { padding: 26px 34px 60px; min-height: 70vh; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.list-title { font-family: var(--serif); font-weight: 600; font-size: 27px; margin: 0; letter-spacing: -.3px; }
.list-sub { color: var(--ink-soft); font-size: 13.5px; margin: 4px 0 0; }

.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 16px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: .16s ease; animation: cardIn .3s ease both;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }

.dir-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--teal); background: var(--mint-soft);
}
.dir-ic.out { color: var(--coral); background: var(--coral-soft); }

.card-main { min-width: 0; }
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dir-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--teal); }
.dir-tag.out { color: var(--coral); }
.card-subject {
  font-family: var(--serif); font-weight: 500; font-size: 16.5px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.1px;
}
.card-party { color: var(--ink-soft); font-size: 12.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-party b { color: var(--ink); font-weight: 600; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.date { font-size: 11.5px; color: var(--ink-faint); }
.bind-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.bind-chip .d { width: 7px; height: 7px; border-radius: 2px; }
.bind-chip.empty { color: var(--ink-faint); background: var(--paper-2); border-color: var(--line); font-weight: 500; }

.card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.btn-mini {
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--teal);
  font-weight: 600; font-size: 12px; padding: 7px 12px; border-radius: 9px; white-space: nowrap;
  transition: .15s ease;
}
.btn-mini:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-mini.out { color: var(--coral); }
.btn-mini.out:hover { background: var(--coral); border-color: var(--coral); color: #fff; }

@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.list-empty { text-align: center; padding: 70px 20px; color: var(--ink-faint); }
.list-empty svg { color: var(--line-strong); margin-bottom: 12px; }
.list-empty p { font-size: 15px; }

.load-more { text-align: center; margin-top: 22px; }
.btn {
  border-radius: 11px; padding: 10px 18px; font-weight: 600; font-size: 13.5px; transition: .15s ease;
  border: 1px solid transparent;
}
.btn.primary { background: var(--teal); color: #f4f1ea; }
.btn.primary:hover:not(:disabled) { background: var(--teal-2); transform: translateY(-1px); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--card); color: var(--ink-soft); border-color: var(--line-strong); }
.btn.ghost:hover { color: var(--teal); border-color: var(--teal-2); }
.btn.wide { width: 100%; justify-content: center; }

.list-skeleton { display: flex; flex-direction: column; gap: 12px; }
.skel-card { height: 96px; border-radius: var(--r); background: linear-gradient(100deg, var(--paper-2) 30%, var(--card) 50%, var(--paper-2) 70%); background-size: 200% 100%; animation: sk 1.2s ease infinite; opacity: .7; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- scrims, drawer, modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(24, 21, 16, .42); backdrop-filter: blur(3px); z-index: 40; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 50;
  background: var(--card); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slideIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-dir { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--teal); }
.drawer-dir.out { color: var(--coral); }
.drawer-scroll { overflow-y: auto; padding: 20px; }
.drawer-subject { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 2px 0 16px; }
.drawer-meta { display: flex; flex-direction: column; gap: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-bottom: 16px; }
.meta-line { display: flex; gap: 12px; font-size: 13px; }
.meta-k { color: var(--ink-faint); width: 118px; flex-shrink: 0; }
.meta-v { color: var(--ink); font-weight: 500; word-break: break-word; }
.meta-v.link { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.drawer-body { margin-top: 18px; }
.drawer-body-k { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 600; margin-bottom: 8px; }
.drawer-body-text { font-size: 14px; line-height: 1.6; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  z-index: 50; animation: modalIn .26s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-faint); font-weight: 600; }
.modal-mail { font-family: var(--serif); font-weight: 600; font-size: 17px; margin-top: 4px; max-width: 400px; }
.modal-current { display: flex; align-items: center; gap: 10px; padding: 13px 22px; border-bottom: 1px dashed var(--line-strong); }
.cur-k { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.cur-chip { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; border: 1px solid; }
.cur-chip.empty { color: var(--ink-soft); background: var(--paper-2); border-color: var(--line); font-weight: 500; }
.acquire { padding: 18px 22px 0; }
.acquire-label { font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.entity-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); font-weight: 600; font-size: 12.5px; padding: 7px 14px; border-radius: 9px; transition: .15s; }
.tab:hover { border-color: var(--line-strong); }
.tab.is-on { background: var(--teal); color: #f4f1ea; border-color: var(--teal); }
.acquire-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; color: var(--ink-faint); background: var(--paper-2); }
.acquire-search:focus-within { border-color: var(--teal-2); background: var(--card); box-shadow: 0 0 0 3px rgba(15,61,58,.10); }
.acquire-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--ink); }
.entity-results { margin-top: 12px; max-height: 30vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.entity-hint { padding: 18px 16px; color: var(--ink-faint); font-size: 13px; text-align: center; }
.entity-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: .12s; background: var(--card);
}
.entity-row:last-child { border-bottom: 0; }
.entity-row:hover { background: var(--mint-soft); }
.entity-row.is-selected { background: var(--mint-soft); box-shadow: inset 3px 0 0 var(--teal); }
.entity-name { font-weight: 600; font-size: 13.5px; }
.entity-type { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.entity-check { color: var(--teal); font-weight: 700; }
.entity-loading { padding: 16px; text-align: center; color: var(--ink-faint); font-size: 13px; }
.entity-none { padding: 18px 14px; text-align: center; color: var(--ink-faint); font-size: 13px; }

.modal-note { margin: 16px 22px 0; font-size: 12px; line-height: 1.5; color: var(--ink-faint); background: var(--mint-soft); border: 1px solid rgba(15,61,58,.18); border-radius: 11px; padding: 10px 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; background: var(--teal); color: #f4f1ea;
  border-radius: 12px; padding: 12px 18px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease; max-width: 420px;
}
.toast.err { background: var(--coral); }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex-shrink: 0; }
.toast.err .t-dot { background: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .rail { position: static; border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .rail-search, .rail-count { grid-column: 1 / -1; }
  .rail-count { margin-top: 14px; }
  .list { padding: 20px 16px 50px; }
  .card { grid-template-columns: 40px 1fr; }
  .card-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
  .topbar { padding: 12px 14px; }
  .brand-sub, .mailbox-chip { display: none; }
}

# login button inside the setup card
#loginBtn { margin-top: 18px; }

/* ===== lead detail tab mode ===== */
body.tab-mode .rail { display: none; }
body.tab-mode .layout { grid-template-columns: 1fr; max-width: 860px; }
body.tab-mode .list { padding: 22px 26px 40px; }

.tab-head { display: flex; align-items: center; justify-content: flex-end; margin: -6px 0 14px; }
.tab-link { color: var(--teal-2); font-size: 13px; text-decoration: none; border-bottom: 1px dashed var(--teal-2); }
.tab-link:hover { color: var(--teal); }

.deleted-banner {
  display: block;
  background: var(--mint-soft, #e7f3ee);
  border: 1px solid #bcdccd;
  color: var(--teal);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.origin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--coral);
  border: 1px solid var(--coral);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--coral-soft);
}

.del-lead-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 2px 2px;
  padding: 12px 14px;
  border: 1px solid var(--coral);
  border-radius: 12px;
  background: var(--coral-soft);
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.del-lead-row input { margin-top: 2px; accent-color: var(--coral); width: 16px; height: 16px; flex: none; }

/* ===== adaptive modal: fits any viewport incl. small placement iframes ===== */
.modal { max-height: calc(100vh - 28px); overflow: hidden; }
.modal-head, .modal-current, .modal-note, .del-lead-row, .modal-actions { flex: none; }
.acquire { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 8px; }
.entity-results { flex: 1 1 auto; min-height: 96px; max-height: none; }

/* drawer as an inset card inside small iframes */
body.tab-mode .drawer {
  top: 10px; right: 10px; bottom: 10px;
  width: min(440px, calc(100vw - 20px));
  border: 1px solid var(--line); border-radius: 16px;
}

/* compact chrome in the lead tab */
body.tab-mode .topbar { padding: 8px 14px; }
body.tab-mode .brand-sub { display: none; }
body.tab-mode .brand-mark svg { width: 24px; height: 24px; }
body.tab-mode .list { padding: 16px 18px 28px; }
body.tab-mode .list-title { font-size: 22px; }
body.tab-mode .modal { border-radius: 14px; }
body.tab-mode .modal-head { padding: 14px 16px 10px; }
body.tab-mode .modal-mail { font-size: 15px; max-width: 300px; }
body.tab-mode .modal-current { padding: 10px 16px; }
body.tab-mode .acquire { padding: 12px 16px 4px; }
body.tab-mode .entity-results { min-height: 80px; }
body.tab-mode .modal-note { margin: 12px 16px 0; }
body.tab-mode .del-lead-row { margin: 10px 16px 0; padding: 10px 12px; font-size: 12.5px; }
body.tab-mode .modal-actions { padding: 12px 16px 14px; }
body.tab-mode .tab-head { margin: -4px 0 10px; }

/* small screens: shrink modal paddings everywhere */
@media (max-height: 560px) {
  .modal-head { padding: 12px 16px 8px; }
  .modal-current { padding: 8px 16px; }
  .acquire { padding: 10px 16px 2px; }
  .modal-note { margin: 10px 16px 0; }
  .del-lead-row { margin: 8px 16px 0; padding: 8px 10px; }
  .modal-actions { padding: 10px 16px 12px; }
  .entity-results { min-height: 72px; }
}

/* ===== modal anchored to the top (short placement iframes) =====
   Was vertically centered: when the iframe is low the centered box
   overflowed both edges and the bottom buttons got clipped. */
.modal { top: 14px; transform: translateX(-50%); overflow-y: auto; }
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translateX(-50%); }
}
.entity-results { min-height: 72px; }

/* very low viewports: modal becomes a near-fullscreen sheet */
@media (max-height: 480px) {
  .modal {
    top: 6px; left: 6px; right: 6px; width: auto; transform: none;
    max-height: calc(100vh - 12px);
    animation: none;
  }
}

/* ===== tab mode: overlays render inline (in-flow), never clipped ===== */
body.tab-mode .scrim { display: none !important; }
body.tab-mode .modal {
  position: static; transform: none; width: auto; max-height: none;
  margin: 0 0 18px; animation: none; box-shadow: var(--shadow-sm);
}
body.tab-mode .drawer {
  position: static; width: auto; max-height: none; transform: none;
  border: 1px solid var(--line); border-radius: 16px;
  margin: 0 0 18px; box-shadow: var(--shadow-sm); animation: none;
}
body.tab-mode .entity-results { max-height: 260px; }

/* ===== tab mode: the app scrolls INSIDE itself, frame height irrelevant ===== */
body.tab-mode { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
body.tab-mode .topbar { flex: none; }
body.tab-mode .layout {
  flex: 1 1 auto; min-height: 0; width: 100%;
  display: flex; flex-direction: column; grid-template-columns: none;
}
body.tab-mode .list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* ===== automation settings ===== */
.auto-select {
  width: 100%; border: 0; outline: 0; background: transparent;
  font-size: 13.5px; color: var(--ink); padding: 2px 0;
}

/* automation settings grid */
.auto-grid { display: flex; flex-direction: column; gap: 8px; }
.auto-row { display: grid; grid-template-columns: 86px 1fr 1fr; gap: 8px; align-items: center; }
.auto-head { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-faint); font-weight: 600; }
.auto-name { font-size: 13px; font-weight: 600; }
@media (max-width: 640px) {
  .auto-row { grid-template-columns: 1fr; gap: 4px; }
  .auto-head { display: none; }
}
