:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #171a23;
  --muted: #646b7d;
  --border: #e3e5ec;
  --primary: #4338ca;
  --primary-soft: #eceafd;
  --green: #15803d;
  --green-soft: #dcfce7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --amber: #a16207;
  --amber-soft: #fef3c7;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --gray-soft: #eef0f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --card: #181b24;
    --text: #e8eaf0;
    --muted: #9aa1b2;
    --border: #2a2f3c;
    --primary: #8b85ff;
    --primary-soft: #26244a;
    --green: #4ade80;
    --green-soft: #14321f;
    --red: #f87171;
    --red-soft: #3b1717;
    --amber: #fbbf24;
    --amber-soft: #3a2c0b;
    --blue: #60a5fa;
    --blue-soft: #172a4a;
    --gray-soft: #232733;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 20px; background: var(--card); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand.big { font-size: 20px; justify-content: center; margin-bottom: 8px; }
.logo {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 800;
}
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.tabs a:hover { background: var(--gray-soft); text-decoration: none; }
.tabs a.active { background: var(--primary-soft); color: var(--primary); }

main { max-width: 1280px; margin: 0 auto; padding: 20px 20px 120px; }

.bottomnav { display: none; }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.tight { padding: 0; overflow: hidden; }

/* ---------- forms ---------- */
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 70px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.check:has(span) { align-items: flex-start; }
.check:has(span) input { margin-top: 2px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 400; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

.btn {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--gray-soft); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--primary); }
.btn.green { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.green:hover:not(:disabled) { background: #15803d; }
.btn.red { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.red:hover:not(:disabled) { background: #b91c1c; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 13px 18px; font-size: 16px; }
.btn.block { width: 100%; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--primary-soft); color: var(--primary); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: default; }
.stat.link { cursor: pointer; }
.stat .n { font-size: 24px; font-weight: 700; }
.stat .l { font-size: 12px; color: var(--muted); }

/* ---------- lists ---------- */
.list { display: grid; }
.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }
.item.clickable { cursor: pointer; }
.item.clickable:hover { background: var(--gray-soft); }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.item .right { text-align: right; display: grid; gap: 4px; justify-items: end; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar input[type="search"] { flex: 1 1 200px; }
.toolbar select { width: auto; }

/* ---------- lead detail ---------- */
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) {
  /* Single column on phones: flatten both stacks so the script sits right under the call buttons. */
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-grid > .stack { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
}
.lead-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.lead-head .info { flex: 1; min-width: 220px; }
.lead-head h1 { font-size: 24px; }
.phone-big { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.call-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.outcome { font: inherit; font-size: 13px; font-weight: 600; padding: 10px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.outcome.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.disposition { border: 2px solid var(--primary); }

.script { white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-height: 70vh; overflow: auto; }
.script .sec { display: block; margin-top: 12px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--primary); }
.script .var { background: var(--amber-soft); color: var(--amber); border-radius: 4px; padding: 0 3px; }

.timeline { display: grid; gap: 10px; }
.tl { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.tl .ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-soft); font-size: 13px; }
.tl .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.tl .when { font-size: 12px; color: var(--muted); }

.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.issues li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.score { font-size: 40px; font-weight: 800; line-height: 1; }
.score.good { color: var(--green); } .score.ok { color: var(--amber); } .score.bad { color: var(--red); }
.bullets { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }

/* ---------- callbar ---------- */
.callbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 50;
  width: min(640px, calc(100% - 24px));
  background: #111827; color: #fff; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  display: grid; gap: 10px;
}
.callbar .top { display: flex; align-items: center; gap: 10px; }
.callbar .who { flex: 1; min-width: 0; }
.callbar .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callbar .who span { font-size: 13px; color: #a5b4fc; }
.callbar .btn { border-color: #374151; background: #1f2937; color: #fff; }
.callbar .btn.red { background: #dc2626; border-color: #dc2626; }
.callbar .btn.on { background: #f59e0b; border-color: #f59e0b; color: #111; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; animation: pulse 1.4s infinite; flex: none; }
.pulse.ringing { background: #f59e0b; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { font: inherit; font-size: 18px; font-weight: 700; padding: 10px; border-radius: 10px; border: 0; background: #1f2937; color: #fff; cursor: pointer; }

/* ---------- misc ---------- */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100% - 32px);
}
.toast.error { background: #b91c1c; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.error { color: var(--red); font-size: 14px; min-height: 1em; margin: 0; }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 14px; }
.notice.info { background: var(--blue-soft); color: var(--blue); }
.status-ok { color: var(--green); font-weight: 600; } .status-off { color: var(--red); font-weight: 600; }
code { background: var(--gray-soft); padding: 1px 5px; border-radius: 4px; font-size: 13px; }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(480px, calc(100% - 24px)); background: var(--card); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog form { padding: 20px; display: grid; gap: 12px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 14px; }

.tabs-inline { display: flex; gap: 4px; margin-bottom: 10px; }

/* ---------- timeline tickets ---------- */
.tickets { display: grid; gap: 8px; }
.ticket { --c: var(--muted); --bg: var(--gray-soft); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 10px; padding: 8px 12px; background: var(--card); }
.ticket .t-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 4px; }
.ticket .t-type { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c); background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.ticket .t-ai { font-weight: 700; color: var(--primary); }
.ticket .t-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket .t-body { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket .t-body b { font-weight: 600; }
.ticket .t-body div { color: var(--muted); margin-top: 2px; }
.ticket .t-foot { font-size: 12px; margin-top: 4px; }
.t-call { --c: var(--green); --bg: var(--green-soft); }
.t-vm { --c: var(--blue); --bg: var(--blue-soft); }
.t-note { --c: var(--amber); --bg: var(--amber-soft); }
.t-status { --c: var(--primary); --bg: var(--primary-soft); }
.t-followup { --c: #ea580c; --bg: #ffedd5; }
.t-site { --c: #0891b2; --bg: #cffafe; }
@media (prefers-color-scheme: dark) {
  .t-followup { --c: #fb923c; --bg: #3b1f0b; }
  .t-site { --c: #22d3ee; --bg: #083344; }
}

/* ---------- website mockups ---------- */
.site-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.site-preview .frame-wrap { background: var(--gray-soft); display: flex; justify-content: center; }
.site-preview iframe { width: 100%; height: 76vh; border: 0; background: #fff; display: block; }
.site-preview .frame-wrap.mobile { padding: 16px 0; }
.site-preview .frame-wrap.mobile iframe { width: 390px; max-width: 100%; height: 720px; border-radius: 24px; border: 8px solid #111827; }
.site-preview .empty { min-height: 50vh; display: grid; place-items: center; }
.site-chat { display: flex; flex-direction: column; height: calc(76vh + 50px); }
.site-msgs { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
@media (max-width: 860px) {
  .site-grid { grid-template-columns: minmax(0, 1fr); }
  .site-preview iframe { height: 65vh; }
  .site-chat { height: auto; max-height: 70vh; }
}

/* ---------- voice / screenshots / inspiration picker ---------- */
.btn.recording { background: #dc2626; border-color: #dc2626; color: #fff; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; cursor: pointer; }
.inspo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.pick { display: grid; grid-template-columns: auto 48px 1fr; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-weight: 400; font-size: 13px; cursor: pointer; }
.pick img, .pick .noimg { width: 48px; height: 36px; object-fit: cover; object-position: top; border-radius: 4px; display: grid; place-items: center; background: var(--gray-soft); }
.pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
dialog.wide { width: min(680px, calc(100% - 24px)); }
.site-chat .ai-input { gap: 6px; }

.inspo .shot { position: relative; }
.shot-src { position: absolute; left: 8px; bottom: 8px; background: rgba(17, 24, 39, .8); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.drop { border: 2px dashed var(--border); border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; font-size: 14px; color: var(--text); }
.drop:focus, .drop:hover { border-color: var(--primary); outline: none; background: var(--primary-soft); }

/* ---------- portfolio selection ---------- */
.inspo { position: relative; }
.inspo.picked { outline: 3px solid var(--primary); outline-offset: -1px; }
.pick-mark { position: absolute; top: 10px; left: 10px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(17, 24, 39, .7); border: 2px solid #fff; color: #fff; font-weight: 800; }
.inspo.picked .pick-mark { background: var(--primary); }
.btn.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }

/* ---------- tag field ---------- */
.tags-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.tags-field:focus-within { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.tags-field .tag-list { display: contents; }
.tags-field input { border: 0; outline: 0; padding: 4px; flex: 1 1 140px; min-width: 120px; background: transparent; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 13px; font-weight: 600; }
.tag button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 11px; padding: 2px 4px; }

/* ---------- nav badge ---------- */
.navbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px; vertical-align: 1px; }
.bottomnav .navbadge { position: absolute; margin: -4px 0 0 -6px; }
.bottomnav a span { position: relative; }

/* ---------- AI assistant ---------- */
.ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 24px; box-shadow: 0 6px 20px rgba(67, 56, 202, .4);
}
body.has-callbar .ai-fab { bottom: 120px; }
.ai-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: min(420px, calc(100% - 24px)); height: min(640px, calc(100vh - 100px));
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; overflow: hidden;
}
.ai-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.ai-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-msg.user { justify-self: end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.bot { justify-self: start; background: var(--gray-soft); border-bottom-left-radius: 4px; }
.ai-msg.err { background: var(--red-soft); color: var(--red); }
.ai-actions { display: grid; gap: 4px; margin-top: 8px; }
.ai-actions a, .ai-actions span { display: block; font-size: 13px; padding: 5px 8px; border-radius: 6px; background: var(--card); color: var(--text); }
.ai-input { border-top: 1px solid var(--border); padding: 10px; display: grid; gap: 8px; }
.ai-input textarea { min-height: 54px; }
#aiMic.on { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ---------- incoming call pop-up ---------- */
.incoming {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 90;
  width: min(480px, calc(100% - 24px)); background: var(--card); border: 2px solid #16a34a; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 16px; display: grid; gap: 10px;
}
.incoming .ring { font-size: 13px; font-weight: 700; color: #16a34a; display: flex; align-items: center; gap: 8px; }
.incoming h2 { margin: 0; font-size: 20px; }
.incoming .recent { font-size: 13px; color: var(--muted); display: grid; gap: 3px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal button { font: inherit; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 13px; padding: 0; }
.cal button.other { opacity: .35; }
.cal button.today { border-color: var(--primary); font-weight: 800; }
.cal button.sel { background: var(--primary); color: #fff; border-color: var(--primary); }
.cal .dots { display: flex; gap: 2px; height: 6px; }
.cal .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.cal button.sel .dot { background: #fff; }
.cal .dot.over { background: #dc2626; }
.rem { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.rem:last-child { border-bottom: 0; }
.rem .t { font-weight: 600; }
.rem .s { font-size: 13px; color: var(--muted); }
.section-label { padding: 10px 16px 4px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.section-label.red { color: var(--red); }

/* ---------- inspiration ---------- */
.inspo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.inspo, .inspo .body { min-width: 0; }
.inspo .body { overflow-wrap: anywhere; }
.inspo { display: grid; grid-template-rows: auto 1fr; overflow: hidden; padding: 0; }
.inspo .shot { aspect-ratio: 16 / 10; background: var(--gray-soft); display: grid; place-items: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.inspo .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.inspo .body { padding: 12px; display: grid; gap: 4px; align-content: start; font-size: 13px; }
.inspo .body b { font-size: 15px; }

/* ---------- results map ---------- */
.results-map { height: 380px; isolation: isolate; background: var(--gray-soft); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 12px; font-size: 12px; border-top: 1px solid var(--border); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.map-legend i.ring { background: transparent; border: 2px solid var(--primary); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); }
.leaflet-popup-content { margin: 12px 14px; font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pop { display: grid; gap: 4px; }
.pop .btn { color: var(--text); }
.pop .btn.primary { color: #fff; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tabs { display: none; }
  .topbar { padding: 10px 16px; }
  main { padding: 14px 12px 150px; }
  .results-map { height: 300px; }
  .ai-fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; width: 50px; height: 50px; }
  body.has-callbar .ai-fab { bottom: calc(170px + env(safe-area-inset-bottom)); }
  .ai-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 82vh; border-radius: 16px 16px 0 0; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(7, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--card); border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a { display: grid; justify-items: center; font-size: 10px; color: var(--muted); font-weight: 600; padding: 4px 0; }
  .bottomnav a span { font-size: 20px; line-height: 1.2; }
  .bottomnav a.active { color: var(--primary); }
  .bottomnav a:hover { text-decoration: none; }
  .callbar { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .item { padding: 12px; gap: 10px; }
  .item .right .hide-sm { display: none; }
  .kv { grid-template-columns: 90px minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 10px; }
  .stat .n { font-size: 20px; }
  .lead-head h1 { font-size: 20px; }
}

/* Coming-next placeholders */
.soon-mark { font-size: .85em; }
.soon-dot { position: absolute; font-style: normal; font-size: 10px; margin: -4px 0 0 -6px; }
.soon-dim { opacity: .72; }
.soon-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 2px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.soon-item:hover { background: var(--gray-soft); }
.dropzone { border: 2px dashed var(--border); border-radius: 14px; padding: 28px 16px; text-align: center; cursor: pointer; }
.portal-preview { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; }
