:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #16181d; --muted: #6b7280; --line: #e3e5e9;
  --primary: #1f6feb; --primary-text: #fff; --danger: #d1242f; --warn: #b4690e;
  --green: #1a9a4b; --yellow: #e6b800; --red: #e0383e; --black: #222;
  --fresh: #e7f6ec; --fresh-text: #136c35; --old: #fff4de; --old-text: #8a5300;
  --expired: #fde8e8; --expired-text: #a11b22; --canceled: #ede9fe; --canceled-text: #5b3cc4;
  --live: #1a9a4b; --ring: #1f6feb; --vm: #b4690e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --card: #181b21; --text: #eceef2; --muted: #9aa1ad; --line: #2a2f38;
    --primary: #4c8dff; --black: #000;
    --fresh: #12301e; --fresh-text: #7ee2a4; --old: #33270f; --old-text: #ffc96b;
    --expired: #3a1517; --expired-text: #ff9da1; --canceled: #261f45; --canceled-text: #c4b5fd;
  }
}
/* Links and the browser's own controls follow the theme (a review, Nov 22: in dark mode, links kept the browser's
   dark blue at about 1.8:1, and date pickers and checkboxes stayed light). Links with a class of their own keep it. */
:root { color-scheme: light dark; }
:where(a) { color: var(--primary); }      /* no weight: any link style of its own (.brand, .btn, menus) still wins */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Phones (Nov 27, 2026): a quick second tap on a button or link never zooms the page (pinching still does). */
a, button, .btn, input, select, textarea, label, summary { touch-action: manipulation; }
/* Touch screens (a tap-size check of every page, Nov 27, 2026): the lines that fold open ("What these results mean",
   "How your CRM works"...) were 18-23px tall, and a template's Edit / Delete 24px: room to tap. */
@media (pointer: coarse) {
  summary { padding-top: 7px; padding-bottom: 7px; }
}
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }   /* the scroll bar's room is always kept */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background .3s;
}
body.flash { background: var(--fresh); }
body.center { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px 40px; }

nav.top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.links { display: flex; gap: 4px; flex-wrap: wrap; }
.links a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.links a.on { color: var(--text); background: var(--bg); font-weight: 600; }
.links a.gear { display: inline-flex; align-items: center; gap: 6px; }
a.qclink { display: none; text-decoration: none; }   /* the dialer on phones only (below) */
.links a.gear svg { flex: none; }
.badge { background: var(--danger); color: #fff; border-radius: 10px; padding: 0 6px; margin-left: 4px; font-size: 12px; }
/* The pages under one tab (Nov 20): a row of small tabs under the menu. */
.subnav { display: flex; gap: 6px; justify-content: center; padding: 10px 12px 2px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; font-size: 14px; padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none;
            background: color-mix(in srgb, var(--card) 75%, transparent); border: 1px solid var(--line); }
.subnav a.on { color: var(--primary-text); background: var(--primary); border-color: var(--primary); font-weight: 600; }
body[data-theme]:not([data-theme="classic"]) .subnav a.on { background: linear-gradient(135deg, #2f6df6, #7c4dff); border-color: transparent; color: #fff; }
/* The questions before a call (Nov 20): "Call anyway?" with Learn more, and the one-time OK (phone.js ask). */
.askbox { width: min(460px, 92vw); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 16px;
          background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .28); }
.askbox::backdrop { background: rgba(15, 17, 21, .55); }
.askbox h3 { margin: 0 0 8px; font-size: 19px; }
.askbox-text { margin: 0; white-space: pre-line; line-height: 1.45; font-size: 15px; }
.askbox-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.askbox-btns { display: flex; gap: 8px; margin-left: auto; }
.askbox-learn { color: var(--primary); font-weight: 600; text-decoration: none; }
.rulesinfo { margin: 6px 0 12px; scroll-margin-top: 72px; }   /* clear of the menu when Learn more opens it */
/* A long page's parts, one tap each (Settings, Nov 23, 2026), across both columns; each part lands clear of the menu. */
.jumpnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 14px; column-span: all; }
.jumpnav:empty { display: none; }
.jumpnav a { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; white-space: nowrap; }
.jumpnav a:hover, .jumpnav a:focus-visible { border-color: var(--primary); color: var(--primary); }
main > section.card[id], .acctpage .form[id], .stats-grid .card[id] { scroll-margin-top: 72px; }
/* The home's badge and "Never called" share a line, and wrap cleanly on a phone (Nov 23, 2026). */
.leadcard > .row.between { flex-wrap: wrap; gap: 4px 10px; }
#lastCall { white-space: nowrap; }
/* Quick Call's search across the card, at 16px so a phone doesn't zoom in (Nov 23, 2026). */
#qFind { display: block; width: 100%; box-sizing: border-box; margin: 6px 0 10px; font-size: 16px; }
.rulesinfo > summary, .rulestable > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: 14px; padding: 4px 0; }
@media (pointer: coarse) { .rulesinfo > summary, .rulestable > summary { padding: 7px 0; } }   /* (after its base rule, or it loses to it) */
.rulestable { margin-top: 6px; }
.rulestable .tablewrap { overflow-x: auto; }
.rulestable table { font-size: 13px; }
.rulestable th, .rulestable td { white-space: nowrap; }    /* one line per state; the table slides sideways on a phone */

.banner { padding: 10px 16px; font-size: 14px; }
.banner.test { background: var(--old); color: var(--old-text); text-align: center; }
.banner.warn { background: var(--old); color: var(--old-text); border-radius: 10px; margin: 8px 0; }
.banner.stop { background: var(--danger); color: #fff; border-radius: 10px; margin: 8px 0; }
.banner.regban { margin: 8px 12px; position: relative; }
.banner.regban:has(.banx) { padding-right: 44px; }
.banx { position: absolute; top: 4px; right: 4px; min-width: 36px; min-height: 36px; border: 0; background: none;
        color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.banner.info { background: var(--card); color: var(--text); border: 1px solid var(--primary); border-radius: 10px; margin: 8px 0; }
/* One upload box, with "Set up your list" under it (Nov 23, 2026). */
.upone { max-width: 820px; margin: 0 auto; }
.uphelp { margin: 8px 0 0; }
/* It worked (an upload, Nov 23, 2026). */
.banner.good { background: #e8f7ee; color: #14532d; border: 1px solid #86d9a4; border-radius: 10px; margin: 8px 0; }
.banner.good a { color: inherit; font-weight: 700; }
@media (prefers-color-scheme: dark) { .banner.good { background: #10301c; color: #b8f0cb; border-color: #2f7a4a; } }
body[data-theme="dark"] .banner.good { background: #10301c; color: #b8f0cb; border-color: #2f7a4a; }
/* An upload on its way: how much went up, then a moving bar while the server reads it. */
.upprog { margin: 10px 0; }
.upbar { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.upbar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.upbar.busy span { width: 100% !important; background: repeating-linear-gradient(45deg, var(--primary) 0 12px,
  color-mix(in srgb, var(--primary) 65%, white) 12px 24px); background-size: 34px 34px; animation: upmove 1s linear infinite; }
@keyframes upmove { from { background-position: 0 0; } to { background-position: 34px 0; } }
.banner.info .linkbtn { font-size: 14px; font-weight: 600; padding: 0 0 0 4px; min-height: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card h2, .card h3 { margin: 0 0 10px; }
.card.empty { text-align: center; }
.login { width: 100%; max-width: 340px; display: grid; gap: 12px; }
.login input { font-size: 18px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

.statusbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }
.audio-toggle { display: flex; gap: 6px; align-items: center; }

.daybanner { border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-weight: 600; }
.daybanner.fresh { background: var(--fresh); color: var(--fresh-text); }
.daybanner.old { background: var(--old); color: var(--old-text); }

.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 8px; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--danger); }

.chip { display: inline-block; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); }
.chip.expired { background: var(--expired); color: var(--expired-text); }
.chip.canceled { background: var(--canceled); color: var(--canceled-text); }

.who { font-size: 28px; margin: 10px 0 2px; line-height: 1.15; }
.address { font-size: 18px; margin: 0 0 12px; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.prices > div { background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.price { font-size: 22px; font-weight: 700; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pricecut { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--warn); }
.pricecut:empty { display: none; }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.stats th, table.stats td { text-align: right; padding: 6px 4px; border-top: 1px solid var(--line); }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
.cblive { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.cblive h4 { margin: 10px 0 6px; }
.noanswer { color: var(--old-text); background: var(--old); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cb .actions { margin-top: 10px; }
.minirow { margin-top: 8px; align-items: center; }
.minirow .muted { min-width: 110px; }
.calls-title { margin: 14px 0 6px; font-size: 16px; }
#showAll { margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.tile { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 28px; font-weight: 600; line-height: 1.2; }
.tile-sub { font-size: 12px; color: var(--muted); }
.daypick input[type=date] { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
table.stats tr.clickable { cursor: pointer; }
table.stats tr.clickable:hover td, table.stats tr.on td { background: var(--bg); }
table.stats.calls td, table.stats.calls th { text-align: left; vertical-align: top; }
/* Talk rate per caller ID line: a small bar (scaled to the best line) beside the percent. */
.ratebar { display: inline-block; width: 64px; height: 8px; margin-right: 8px; vertical-align: middle;
  background: var(--line); border-radius: 4px; overflow: hidden; }
.ratebar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.chip.flag { background: var(--expired); color: var(--expired-text); font-size: 12px; font-weight: 600;
  white-space: normal; border-radius: 10px; display: block; }
table.stats td.nowrap { white-space: nowrap; }
.phonenum { white-space: nowrap; }   /* a phone number never breaks in two on a phone */
/* Wide tables scroll inside their own card on a phone instead of pushing the whole page sideways. */
#days, #dayCalls, #colors, #lines, #hours, #points, #weekdays, #resultsSum, #byType, #byPos { overflow-x: auto; }
/* Stats: best day to call. Tapping a day opens its hours in a tinted box under it. */
.wdbtn { font-size: inherit; font-weight: 600; padding: 0; min-height: 30px; text-align: left; }
.wdbtn .caret { display: inline-block; width: 1em; color: var(--muted); }
/* On a phone the voicemail column steps aside so the pickup rate fits without scrolling. */
@media (max-width: 480px) {
  table.stats.weekdays .vm { display: none; }
  table.stats.weekdays .ratebar { width: 44px; margin-right: 6px; }
}
table.stats.weekdays tr.wdhours > td { padding: 0 0 12px; border-top: 0; }
table.stats.sub { font-size: 13px; background: var(--bg); border-radius: 10px; }
table.stats.sub tr:first-child th { border-top: 0; }
table.stats.sub th:first-child, table.stats.sub td:first-child { padding-left: 10px; }
table.stats.sub th:last-child, table.stats.sub td:last-child { padding-right: 10px; }
.ratebar.pts span { background: linear-gradient(90deg, #ffd23f, #ff8c42); }
/* Upload page → What's loaded: one row per day, a missing file in red. */
.cover { font-size: 14px; }
.cover .gaps { margin: 4px 0 10px; display: grid; gap: 6px; }
.cover .gap { background: var(--expired); color: var(--expired-text); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cover .allgood { background: var(--fresh); color: var(--fresh-text); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.cover table.stats td { white-space: nowrap; vertical-align: top; }
/* What came in each day: a day, then everything from every source, wrapping on a phone. */
.cover table.stats td:last-child, .cover table.stats th:last-child { white-space: normal; text-align: left; overflow-wrap: anywhere; }
.cover .miss { color: var(--danger); font-weight: 700; }
.cover .wait { color: var(--muted); }
table.stats tr.flagrow td { border-top: 0; padding-top: 0; text-align: left; }
/* Stats → Which lines get answered: each window's rate, with its calls under it. */
table.stats.lines td { vertical-align: top; }
table.stats.lines td.lname { min-width: 64px; }
table.stats.lines .lsub { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
table.stats.lines td.low b { color: var(--danger); }
@media (max-width: 440px) { table.stats .numcol { display: none; } .ratebar { width: 40px; } }
.calurl { word-break: break-all; font-size: 13px; background: var(--bg); padding: 8px; border-radius: 8px; display: block; margin: 6px 0; }
.callbest { width: 100%; margin-top: 12px; font-size: 20px; }
.keys { text-align: center; }
@media (hover: none) { .keys { display: none; } }
.tally { margin-top: 8px; font-size: 14px; font-weight: 600; }
.tally:empty { display: none; }
.lvlchip:empty, #status:empty { display: none; }   /* no empty pill while the page loads (a review, Nov 22) */
/* "Calls so far": one line per person on the home, calls by caller ID line. */
.ptally { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.ptally:empty { display: none; }
.ptally .ptitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.ptally .prow { padding: 3px 0; border-top: 1px solid var(--line); }
.ptally .prow:first-of-type { border-top: 0; }
.ptally .plines { color: var(--text); }
.callnewline { width: 100%; margin-top: 8px; font-size: 15px; }
/* The 3-calls-in-24-hours warning: red, with when it lifts. */
.limitwarn { color: var(--danger); font-size: 13px; font-weight: 600; margin: 2px 0 4px; }
.ptally .limit { color: var(--danger); font-weight: 600; }
.stophint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--old); color: var(--old-text); display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.conf { display: block; font-size: 12px; font-weight: 600; }
.conf.green { color: var(--green); } .conf.yellow { color: var(--warn); } .conf.red { color: var(--red); }
.conf.black { color: var(--muted); }
/* Numbers tagged wrong number / disconnected on this home: crossed out. */
.notcalling { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.notcalling:empty { display: none; }
.notcalling .ptitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.notcalling s { font-variant-numeric: tabular-nums; }
.lines { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: normal; }
.linetag { font-weight: 700; margin-right: 6px; }
.minor { margin-top: 8px; }
.minor .btn { flex: 1; font-size: 14px; }
.small-btn { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.tag { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 3px 8px; }

.contact { padding: 8px 0; border-top: 1px solid var(--line); }
.contact:first-child { border-top: 0; padding-top: 0; }
.cname { font-weight: 600; margin-bottom: 4px; }
.phone { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.phone .num { font-size: 18px; font-variant-numeric: tabular-nums; flex: 1; min-width: 140px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); } .dot.black { background: var(--black); box-shadow: 0 0 0 1px var(--muted); }

.btn {
  font: inherit; font-size: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  min-height: 44px;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.warn { border-color: var(--warn); color: var(--warn); }
.btn.big { font-size: 18px; padding: 14px 18px; flex: 1; }
.btn.subtle { color: var(--muted); }
.btn.suggested { outline: 3px solid var(--primary); outline-offset: 2px; font-weight: 700; }

.callpanel { text-align: center; }
.callstate { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.callstate.ringing { color: var(--ring); }
.callstate.live { color: var(--live); }
.callstate.vm { color: var(--vm); }
.callstate.idle { color: var(--muted); }
.callstate.warn { color: var(--warn); font-size: 18px; }

.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* An odd last result button ("Contacted") takes the whole row. */
.results-grid .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.btn.good { border-color: var(--live); color: var(--live); font-weight: 600; }

/* Dialer limited to some days (picked on the Leads page). */
.focusbar { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--primary); background: var(--card); font-size: 14px; }

/* All leads page */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chips.scroller { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.chipbtn { font: inherit; font-size: 14px; white-space: nowrap; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; min-height: 36px; flex: none; }
.chipbtn.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.chipbtn .n { opacity: .75; margin-left: 6px; font-variant-numeric: tabular-nums; }
.leadtools { margin: 2px 0 6px; }
.search { flex: 1; min-width: 0; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.sort { font: inherit; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.summary { margin: 6px 0; font-size: 14px; }
.callthese { width: 100%; margin-top: 6px; }
.showmore { width: 100%; margin: 6px 0 12px; }
.focusnow { margin-top: 10px; font-size: 14px; display: grid; gap: 8px; }
.lead { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; cursor: pointer; }
.lead .lrow1 { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lead .laddr { font-weight: 700; font-size: 17px; }
.lead .lrow1 .chip { flex: none; }
.lead .lmeta { font-size: 14px; color: var(--muted); }
.lead .lmeta b { color: var(--text); }
.lead .cut { color: var(--warn); font-weight: 600; }
.lead .lcalls { font-size: 14px; margin-top: 4px; }
.lead .lfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* Leads page: the box to pick a home for her call list, and the bar with "Call these" */
.lead .lrow1 .laddr { flex: 1 1 auto; min-width: 0; }
.lead .lpick { flex: none; display: flex; align-items: center; padding: 2px 6px 2px 0; margin: -4px 0; cursor: pointer; }
.lead .lpick input { width: 22px; height: 22px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.pickall { margin-top: 4px; }
/* Leads page: the Days / Type / Status buttons, the calendar and the choices with their meaning */
/* Each button has its own fixed slot (two a row), its name above its value: picking another value never moves the
   buttons or what's under them (Stefano, Nov 21, 2026: "it shifts the boxes left and right ... jumping around"). */
.fbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
.fbtn { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k caret" "v caret"; column-gap: 6px;
  align-items: center; width: 100%; min-width: 0; min-height: 48px; padding: 6px 12px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.fbtn[hidden] { display: none; }
.fbtn .fk { grid-area: k; color: var(--muted); font-size: 12px; line-height: 1.2; }
.fbtn b { grid-area: v; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.fbtn > span[aria-hidden] { grid-area: caret; color: var(--muted); }
.fbtn.set { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fbtn[aria-expanded="true"] { background: var(--bg); }
.fpanel { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 6px 0 8px; background: var(--card); }
.fpanel .fhelp { margin: 0 0 8px; }
.calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.calnav { border: 0; background: none; color: var(--text); font-size: 24px; line-height: 1; padding: 4px 14px; cursor: pointer; }
.calnav:disabled { opacity: .25; cursor: default; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calgrid .wd { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.calday { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; padding: 2px 0;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.calday .dn { font-size: 15px; }
.calday .dc { font-size: 11px; min-height: 13px; color: var(--muted); }
.calday.has { color: var(--text); border-color: var(--line); font-weight: 600; }
.calday.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.calday.on .dc { color: var(--primary-text); opacity: .85; }
.calday.today .dn { text-decoration: underline; }
.calday:disabled { cursor: default; opacity: .4; }
.calquick { margin-top: 10px; align-items: center; }
.calquick .chipbtn:disabled { opacity: .4; cursor: default; }
.fopt { display: grid; gap: 2px; width: 100%; text-align: left; margin: 0 0 6px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.fopt.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.fopt .fo1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.fopt .fo1 .n { color: var(--muted); font-weight: 400; }
.fopt .fo2 { font-size: 13px; color: var(--muted); }
.fpanel .fdone { margin-top: 2px; }
.leadacts { margin-top: 6px; }
.focusbar .fundo { font-size: 14px; font-weight: 600; min-height: 32px; }
/* Settings → Phones and computers */
.devices { display: grid; gap: 10px; margin: 8px 0 12px; }
.devrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.devrow.gone { opacity: .7; }
.devhere { align-items: center; }
.pickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(20, 30, 80, .12); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.pickbar .pickin { max-width: 608px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.pickbar .pickcount { font-weight: 700; margin-right: auto; min-width: 0; }
.pickbar .btn { white-space: nowrap; }
@media (max-width: 420px) { .pickbar .btn { padding: 8px 10px; font-size: 15px; } .pickbar .pickcount { font-size: 14px; } }
body.picking main { padding-bottom: 96px; }
.lstate { font-size: 13px; font-weight: 600; color: var(--muted); }
.lstate::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.lstate.ready { color: var(--live); }
.lstate.today { color: var(--ring); }
.lstate.limit { color: var(--warn); }
.lstate.nonumber { color: var(--danger); }
.ldetail { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 14px; cursor: default; }
.ldetail h4 { margin: 10px 0 4px; }
.ldetail .dnum { display: flex; gap: 8px; align-items: center; padding: 3px 0; flex-wrap: wrap; }
.ldetail .dnum .n { font-variant-numeric: tabular-nums; }
.ldetail .dnum .st { margin-left: auto; font-size: 12px; color: var(--muted); }
.ldetail .dnum.dnc .n, .ldetail .dnum.wrong .n { text-decoration: line-through; color: var(--muted); }
.ldetail .dnum.dnc .st, .ldetail .dnum.wrong .st { color: var(--danger); }
/* Stats: best time to call */
.chip.good { background: var(--fresh); color: var(--fresh-text); font-size: 11px; padding: 1px 8px; }
table.stats.hours tr.few td { color: var(--muted); }
table.stats.hours tr.few .ratebar span { opacity: .45; }
.note { width: 100%; margin-top: 10px; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
textarea.note { min-height: 60px; }
/* Notes pad: typed during calls, kept with the home. */
.notescard h3 { margin: 0; }
/* "Saves as you type · also on ...": a fixed line under "Notes" (the status beside "Notes" stays short). */
.noteswhere { margin: 2px 0 6px; }
textarea.notes { min-height: 84px; resize: vertical; line-height: 1.35; }
/* Their email, under the notes (Nov 25, 2026); 16px so a phone doesn't zoom in on it. */
.emailrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.emailinput { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.emailinput.bad { border-color: var(--danger); }
/* A number that is someone's in her CRM (Nov 25, 2026). */
.crmowner { display: block; font-size: 12px; font-weight: 600; color: #0f766e; }
@media (prefers-color-scheme: dark) { .crmowner { color: #5eead4; } }
body[data-theme="dark"] .crmowner { color: #5eead4; }
a.linkbtn { text-decoration: none; }
/* A Call tap on its way (Nov 25, 2026): the call buttons wait, and show it. */
body.calling .callbest, body.calling .phone .call, body.calling #callNewLine { opacity: .6; cursor: progress; }
/* The account pages' own rows of links share the menu's class name (.links): there they're links, blue and underlined
   like "Your card and bills", never grey menu items (Nov 25, 2026). */
.acctpage .links a { color: var(--primary); padding: 0; border-radius: 0; font-size: 15px; text-decoration: underline;
  background: none; }
.acctpage .links { align-items: center; }
.acctpage .links form.inline { margin: 0; }   /* (account.css gives a form.inline 12px on top) */
.acctpage .links .linkbtn { min-height: 0; line-height: inherit; }
/* Same name as someone in her CRM (Nov 25, 2026). */
.samename { margin: 4px 0 10px; font-size: 13px; font-weight: 600; color: #0f766e; }
@media (prefers-color-scheme: dark) { .samename { color: #5eead4; } }
body[data-theme="dark"] .samename { color: #5eead4; }
#emailSaved { white-space: nowrap; }
.notesread { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.cbform label { margin-bottom: -6px; }

.history { margin-top: 12px; }
.history h4 { margin: 8px 0 4px; }
.hrow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px; font-size: 13px; padding: 4px 0; border-top: 1px solid var(--line); }
.hrow span:last-child { grid-column: 1 / -1; }
.hrow span:last-child:empty { display: none; }

.drop { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 14px; padding: 36px 16px; cursor: pointer; color: var(--muted); margin: 12px 0; }
.drop.over { border-color: var(--primary); color: var(--primary); }
.drop input { display: none; }
/* The agents' upload box (Nov 24, 2026): lights up while a file is dragged over it, and shows what was dropped. */
.updrop { gap: 6px; text-align: center; transition: background .15s, border-color .15s; }
.updrop .dropicon { font-size: 30px; line-height: 1; }
.updrop.over { background: color-mix(in srgb, var(--primary) 10%, transparent); border-style: solid; transform: scale(1.01); }
.updrop.picked { border-color: var(--green); color: var(--text); border-style: solid; }
.updrop.busy { opacity: .6; cursor: progress; }
.uppick { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 10px; background: var(--card); }
.uppick[hidden] { display: none; }
.upfiles { list-style: none; padding: 0; margin: 0 0 6px; }
.upfiles li { margin: 4px 0; overflow-wrap: anywhere; }
.uppick .lawful { margin-top: 6px; }
.uppick .lawbox { align-items: flex-start; }
.uppick .lawbox input { margin-top: 2px; }
.upgo { margin-top: 10px; }
.updone { margin: 8px 0; }
.uptip { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 7%, transparent); font-size: 14px; }
.lnodnc { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--warn); margin: 0 0 8px; }
.lnodnc[hidden] { display: none; }
.aiprompt { white-space: pre-wrap; font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 46vh; overflow: auto; margin: 8px 0; user-select: all; }
.checklist { margin: 8px 0; padding-left: 20px; }
/* Each file's line starts with its own mark (✓, or ⚠️ for one that didn't come in): no list bullet too (Nov 24, 2026). */
.results { list-style: none; padding-left: 0; }
.results li { margin: 4px 0; }
.big-num { font-size: 22px; font-weight: 700; }

.field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.field .label { width: 100%; }
.field input[type=number] { font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 160px; }
/* Settings' other boxes look like its number boxes, at 16px so a phone doesn't zoom in (a review, Nov 22: the hard
   stops' choices and "Name in the records" were tiny unstyled controls at 375 px). */
.field input[type=text], .field input:not([type]), .field select {
  font: inherit; font-size: 16px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); max-width: 100%;
}
#types { display: flex; gap: 10px; flex-wrap: wrap; }

.cb.due { border-color: var(--danger); }
.cb input[type=datetime-local] { font: inherit; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(92vw, 420px); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.4); }
/* The first-run tour (Nov 23, 2026). */
dialog.tour { padding: 22px 22px 16px; width: min(92vw, 440px); }
.tour h2 { margin: 0 0 8px; font-size: 22px; }
.tour p { margin: 0 0 10px; }
.tourbig { font-size: 40px; line-height: 1; margin: 0 0 8px !important; }
.tourlist { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; font-size: 15px; }
.tourlist b { display: block; }
.tourrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.tournav { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.tournav .linkbtn { margin-right: auto; }
.tourdots { color: var(--muted); font-size: 11px; letter-spacing: 2px; margin-right: 6px; }
@media (max-width: 420px) {   /* a phone: the dots get their own line, so Back and Next stay side by side */
  .tourdots { flex-basis: 100%; order: -1; text-align: center; margin: 0 0 2px; }
}
/* The tour's last card with game mode on: the rank's badge, its name, and the bar to the next level. */
.tourlevel { text-align: center; }
.tourlevel .tourbadge { display: block; width: 96px; height: 96px; margin: 2px auto 8px; }
.tourlevel .lvbar { height: 12px; margin: 10px 0 8px; }
.tourlevel .tourrow { justify-content: center; }
/* Her CRM on the dialer (Nov 23, 2026): "+ Add to CRM" by the address, and the offer after a good call. */
.crmrow { margin: 4px 0 8px; }
.crmbtn { border: 1px dashed var(--primary); color: var(--primary); background: none; border-radius: 999px; padding: 4px 12px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.crmbtn.in { border-style: solid; color: var(--good, #146c2e); border-color: var(--good, #146c2e); }
.crmoffer { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 10px 14px;
  margin: 0 0 12px; border: 1px solid var(--primary); border-radius: 14px; background: var(--card); }
.crmoffer-btns { display: flex; gap: 10px; align-items: center; }
/* Its stage and a folder, once added (Nov 23, 2026); 16px so a phone doesn't zoom in. */
.crmoffer-more { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crmoffer-others { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }   /* "📞 Call <name>" (Nov 28, 2026) */
.crmoffer-more select { font: inherit; font-size: 16px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); }
.crmoffer-more select.done { border-color: var(--good, #146c2e); color: var(--good, #146c2e); font-weight: 600; }
/* Upload a list (Nov 23, 2026): "Check the file" stands out; a busy line while it works; the matching folded away. */
.btn.check { background: #0f8f6c; border-color: #0f8f6c; color: #fff; }
.btn.check:disabled { opacity: .6; }
.lcheckrow { margin: 12px 0 6px; }
.lbusy { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-weight: 600; }
.lspin { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%;
  display: inline-block; animation: lspin .8s linear infinite; flex: none; }
@keyframes lspin { to { transform: rotate(360deg); } }
.lmatch { margin: 10px 0; }
/* Connect your CRM → Your imports: one row each, its Delete at the end. (The rules lived in the CRM tab's own styles and
   stayed behind when the list moved here: unstyled rows and a bare browser button; a review, Nov 28, 2026.) */
.crm-imp { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crm-imp .btn { flex: none; }
/* The agents' site has no number ratings (Nov 23, 2026): the colored dots by phone numbers go. */
body[data-acct] .dot.green, body[data-acct] .dot.yellow, body[data-acct] .dot.red, body[data-acct] .dot.black { display: none; }
/* Settings and Account on a computer (Nov 23, 2026): two columns, so the page fills the screen instead of one long
   strip down the middle. The cards flow down the first column, then the second. */
@media (min-width: 1000px) {
  main.twocol { column-count: 2; column-gap: 18px; }
  main.twocol > * { break-inside: avoid; }
  main.twocol > .card { margin: 0 0 16px; }
  main.wide .acctpage .formwrap { max-width: none; column-count: 2; column-gap: 22px; }
  main.wide .acctpage .formwrap > * { break-inside: avoid; }
  /* The lines card across both columns, its lines two to a row: a long list in one column left half the page empty
     further down (Stefano, Nov 23, 2026). The end buttons across too. */
  main.wide .acctpage .formwrap > #lines, main.wide .acctpage .formwrap > .actions,
  main.wide .acctpage .formwrap > form.center { column-span: all; }
  main.wide .acctpage #lines .lines { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
}
/* Settings in groups (Nov 28, 2026: "consider reorganizing for quality of life things like settings"): a small label
   over each group of cards. On a phone or a tablet each card folds under its title, with a one-line hint of what's in
   it (a tap opens it; the page keeps open the ones she left open), so Settings is a short list, not ten screens. On a
   computer everything is open, in two columns. The folding is plain CSS, so the page never opens long and then jumps. */
.fieldhelp { width: 100%; display: grid; gap: 6px; }      /* a field's help in short lines, not one long paragraph */
.setgroup { margin: 20px 4px 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
main > .setgroup:first-child { margin-top: 6px; }
.foldhint { display: none; }
#hardStops, #ratingsField { scroll-margin-top: 72px; }
@media (max-width: 999px) {
  main.setfold > .card[data-key] > h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
  main.setfold > .card[data-key] > h2::after { content: ""; flex: none; width: 9px; height: 9px; margin: 4px 6px 0 0;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-135deg); }
  main.setfold > .card[data-key]:not(.open) { padding-top: 13px; padding-bottom: 13px; margin: 8px 0; }
  main.setfold > .card[data-key]:not(.open) > h2 { margin-bottom: 0; }
  main.setfold > .card[data-key]:not(.open) > h2::after { transform: rotate(45deg); margin-top: -4px; }
  main.setfold > .card[data-key]:not(.open) > :not(h2):not(.foldhint) { display: none !important; }
  main.setfold > .card[data-key]:not(.open) > .foldhint { display: block; margin: 3px 0 0; }
}
/* (On a computer the cards flow down two columns, so a group can end one column and start the next: the labels would
   sit oddly there, and every card is open with its own title anyway.) */
@media (min-width: 1000px) { main.twocol > .setgroup { display: none; } }
/* The Account tab's lines (Nov 23, 2026): each with Paused and a note, under its number. */
.lnrow .lnhead { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.lnctl { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0 4px; }
.lnctl .lnpause { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.lnctl .lnnote { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--text); }
@media (pointer: coarse) { .lnctl .lnnote { font-size: 16px; } }   /* an iPhone zooms into anything smaller when tapped */
/* Callbacks (Nov 23, 2026): which day is showing, above the list, with Today / All upcoming. */
.cbhead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; margin: 12px 0 4px; }
.cbhead h2 { margin: 0; font-size: 20px; }
.cbhead .seg { margin: 0; }
.cbday { margin: 16px 0 4px; font-size: 15px; color: var(--muted); }
#lhelp, #pdfhelp { width: min(92vw, 560px); max-height: 88vh; overflow: auto; }
#lhelp .dlgbody, #pdfhelp .dlgbody { padding: 16px 18px; }
#lhelp h3 { margin: 14px 0 4px; }
#lhelp table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 10px; }
#lhelp th, #lhelp td { text-align: left; vertical-align: top; padding: 6px 4px; border-bottom: 1px solid var(--line); }
#lhelp ul { padding-left: 18px; }
.cbform { padding: 16px; display: grid; gap: 10px; }
.cbform input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

@media (max-width: 420px) {
  .who { font-size: 24px; }
  .results-grid { grid-template-columns: 1fr; }
}
/* Between a phone and a computer (481 to 760px wide: a phone turned sideways, a small tablet) the menu wrapped under
   the name onto two or three rows, 84 to 121px of the screen (a re-check, Nov 27, 2026): one row there too. */
@media (min-width: 481px) and (max-width: 760px) {
  nav.top .brand { display: none; }
  .links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; justify-content: space-between; }
  .links::-webkit-scrollbar { display: none; }
  .links a { flex: none; }
}
@media (min-width: 481px) and (max-width: 560px) { .links .gear-word { display: none; } .links a { padding: 6px 8px; } }
/* Phones: a shorter top of the page, so the home and its Call button show without scrolling.
   The menu drops the "Realty Dialer" name (the Dialer link does the same) and the dialer's
   "Read names" button sits beside the call count. */
@media (max-width: 480px) {
  nav.top { padding: 6px 10px; }
  nav.top .brand { display: none; }
  .links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; justify-content: space-between; }
  .links::-webkit-scrollbar { display: none; }
  .links a { padding: 6px 8px; font-size: 14px; flex: none; }
  .links:has(.navgame) { gap: 2px; }
  .links:has(.navgame) a { padding: 6px 5px; }   /* "Stats & Game" (Nov 23, 2026) still fits a 375 px phone */
  /* ...with the badges too (Nov 24, 2026: Follow-ups' and Stats & Game's pushed the gear half off a 375 px screen):
     smaller badges, and a slightly smaller menu on the narrowest phones (fits 360 px with a two-digit badge). */
  .links .badge { margin-left: 2px; padding: 0 4px; font-size: 11px; }
  .links:has(.navgame) { gap: 0; }
  .links:has(.navgame) a { padding: 6px 4px; }
  .links .gear-word { display: none; }
  .subnav { padding: 8px 10px 0; }
  .subnav a { font-size: 13px; padding: 5px 12px; }
  /* The dialer keeps its Call button in view (Nov 20): no small tabs there; Quick Call sits by "Read names". */
  body[data-page="dialer_page"] .subnav { display: none; }
  a.qclink { display: inline-flex; }
  .statusbar .row { display: contents; }
}
@media (max-width: 380px) { .links:has(.navgame) a { font-size: 13px; } }   /* the narrowest phones (Nov 24, 2026) */
/* ...and with the CRM's badge too (Nov 25, 2026): a little less room around each link, so the gear stays in view. */
@media (max-width: 380px) { .links:has(.navgame):has(.badge) a { padding: 6px 3px; } }


/* ---------- Make it fun (Settings): backgrounds, the dialer's filters, points, confetti ---------- */
/* The background is a layer pinned behind the page: it stays put while the page scrolls (also on
   iPhones, which ignore "fixed" page backgrounds) and costs nothing to scroll over. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
body[data-theme="ocean"]::before { background: linear-gradient(160deg, #dbeafe 0%, #e0f2fe 40%, #ede9fe 100%); }
body[data-theme="sunset"]::before { background: linear-gradient(160deg, #ffedd5 0%, #fde2e4 50%, #ede9fe 100%); }
body[data-theme="mint"]::before { background: linear-gradient(160deg, #dcfce7 0%, #ccfbf1 50%, #e0f2fe 100%); }
body[data-theme="candy"]::before { background: linear-gradient(160deg, #fbcfe8 0%, #e9d5ff 50%, #bfdbfe 100%); }
@media (prefers-color-scheme: dark) {
  body[data-theme="ocean"]::before { background: linear-gradient(160deg, #0b1d33 0%, #101a36 50%, #1b1438 100%); }
  body[data-theme="sunset"]::before { background: linear-gradient(160deg, #2a1610 0%, #2a1224 50%, #1c1533 100%); }
  body[data-theme="mint"]::before { background: linear-gradient(160deg, #0a271c 0%, #0b2426 50%, #0c1d2e 100%); }
  body[data-theme="candy"]::before { background: linear-gradient(160deg, #2b0f2a 0%, #22123d 50%, #0f1f3f 100%); }
}
/* Someone picked up (the chime): the whole background flashes green for a moment. */
body.flash::before { background: var(--fresh); }
/* On a colored background, cards float and the main buttons get a little color. */
body[data-theme]:not([data-theme="classic"]) .card,
body[data-theme]:not([data-theme="classic"]) .lead { border-color: transparent; box-shadow: 0 1px 2px rgba(20, 30, 80, .05), 0 8px 24px rgba(20, 30, 80, .08); }
/* (No see-through blur behind the top bar: it made scrolling slow on phones.) */
body[data-theme]:not([data-theme="classic"]) nav.top { background: color-mix(in srgb, var(--card) 94%, transparent); }
body[data-theme]:not([data-theme="classic"]) .btn.primary { background: linear-gradient(135deg, #2f6df6, #7c4dff); border-color: transparent; }
body[data-theme]:not([data-theme="classic"]) .statusbar { color: var(--text); }

/* The background lights up: green glow when someone picks up, a rainbow party after a good call. */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0; }
body.glow::after { background: radial-gradient(circle at 50% 35%, rgba(46, 204, 113, .55), rgba(46, 204, 113, 0) 70%); animation: funGlow 1.8s ease-out; }
body.party::after { background: linear-gradient(120deg, #ff5d8f, #ffd23f, #3bceac, #5b8def, #a06cd5, #ff5d8f); background-size: 300% 300%; animation: funParty 3.2s ease-out; }
@keyframes funGlow { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes funParty { 0% { opacity: 0; background-position: 0% 50%; } 15% { opacity: .35; } 70% { opacity: .25; } 100% { opacity: 0; background-position: 100% 50%; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.pointpop { position: fixed; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 70; pointer-events: none; white-space: nowrap;
  background: var(--card); color: var(--text); font-weight: 800; font-size: 20px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(20, 30, 80, .25); animation: popUp 1.5s ease-out forwards; }
.pointpop.big { font-size: 22px; background: linear-gradient(135deg, #ffd23f, #ff8c42); color: #2a1600; animation-duration: 2.7s; }
.pointpop.high { bottom: 42%; }
@media (max-width: 420px) { .pointpop { font-size: 17px; white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 32px); } }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  22% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60px); } }
@media (prefers-reduced-motion: reduce) { body.glow::after, body.party::after, .pointpop { animation-duration: .01s; } }

/* Pep talk after a run of calls that reached nobody. */
.pepcard { position: relative; display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 36px 10px 12px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 24%, var(--card)), color-mix(in srgb, #ff5d8f 16%, var(--card)));
  border: 1px solid color-mix(in srgb, #ff8c42 45%, transparent); color: var(--text); animation: pepIn .35s ease-out; }
.pepcard .pepemoji { font-size: 26px; line-height: 1.15; }
.pepcard .peptext { flex: 1; min-width: 0; }
.pepcard b { font-size: 16px; }
.pepcard .small { margin-top: 2px; }
.pepcard .fx { position: absolute; top: 2px; right: 0; font: inherit; font-size: 20px; line-height: 1; border: 0; background: transparent; color: var(--muted); padding: 6px 12px; min-height: 40px; cursor: pointer; }
@keyframes pepIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pepcard { animation: none; } }
@media (max-width: 480px) {
  .pepcard { padding: 8px 34px 8px 10px; gap: 8px; }
  .pepcard .pepemoji { font-size: 22px; }
  .pepcard b { font-size: 15px; }
}

/* Points today toward the daily goal. */
.pointsbox { margin-top: 8px; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.pointsbox .pbar { flex: 1; min-width: 90px; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--line) 85%, transparent); overflow: hidden; }
.pointsbox .pbar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffd23f, #ff8c42, #ff5d8f); transition: width .6s ease; }
.pointsbox.done .pbar span { background: linear-gradient(90deg, #3bceac, #2ec4b6, #5b8def); }

/* Combo: calls started within a minute of the last result, and the time left to keep it going. */
.combobox { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 7px 12px 10px; border-radius: 12px; font-size: 14px; color: #2a1600;
  background: linear-gradient(135deg, #ffe08a, #ffb36b 55%, #ff8fab); }
.combobox .cflame { font-size: 20px; line-height: 1; display: inline-block; }
.combobox .ctext { flex: 1; min-width: 0; }
.combobox b { font-size: 16px; margin-right: 2px; }
.combobox .chint { font-weight: 600; }
.combobox .cbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(42, 22, 0, .12); }
.combobox .cbar span { display: block; height: 100%; width: 100%; background: rgba(42, 22, 0, .6); transition: width .25s linear; }
.combobox.paused .cbar span { background: rgba(42, 22, 0, .28); }
.combobox.hurry { background: linear-gradient(135deg, #ffc46b, #ff7a59 55%, #ff5d8f); animation: comboHurry .7s ease-in-out infinite alternate; }
.combobox.bump .cflame { animation: comboBump .5s ease-out; }
.combobox.over { background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.combobox.over .cflame { filter: grayscale(1); opacity: .6; }
@keyframes comboHurry { from { transform: none; } to { transform: scale(1.015); } }
@keyframes comboBump { 0% { transform: scale(1); } 35% { transform: scale(1.6) rotate(-8deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .combobox.hurry, .combobox.bump .cflame { animation: none; } }

/* "Calling only" pills, each with an × to drop it. */
.focusbar .flabel { font-weight: 600; }
.fpill { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 999px; padding: 0 2px 0 12px; font-weight: 700; }
.fpill .fx { font: inherit; font-size: 20px; line-height: 1; border: 0; background: transparent; color: var(--muted); padding: 4px 10px; min-height: 34px; cursor: pointer; }

/* Settings: Cities to call, a dropdown with a box per city; and the background swatches. */
.citynow { margin: 2px 0 8px; font-size: 14px; }
.warntext { color: var(--warn); font-weight: 600; }
.msel { position: relative; }
.msel-btn { width: 100%; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 16px; text-align: left;
  min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); cursor: pointer; }
.msel-btn:disabled { cursor: default; color: var(--muted); }
.msel-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.msel-caret { flex: none; color: var(--muted); transition: transform .15s; }
.msel-btn[aria-expanded="true"] { border-color: var(--primary); }
.msel-btn[aria-expanded="true"] .msel-caret { transform: rotate(180deg); }
/* Opens over the cards below it, but under the sticky menu bar (z-index 5). */
.msel-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 4; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 30, 80, .18); }
.msel-panel .search { display: block; width: 100%; font-size: 16px; }
.msel-list { max-height: min(50vh, 420px); overflow-y: auto; overscroll-behavior: contain; margin: 8px 0; }
.msel-ghead { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; background: var(--card);
  font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px 0; }
.msel-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px; border-radius: 8px; cursor: pointer; }
.msel-opt:hover { background: var(--bg); }
.msel-opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary); }
.msel-name { flex: 1; min-width: 0; }
.msel-n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.msel-none { padding: 8px 6px; margin: 0; }
.msel-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.msel-foot #citySaved { flex: 1; text-align: center; }
@media (prefers-color-scheme: dark) { .msel-panel { box-shadow: 0 12px 32px rgba(0, 0, 0, .55); } }
.linkbtn { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; border: 0; background: none; color: var(--primary); cursor: pointer; padding: 6px 0; min-height: 32px; }
.themes { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { font: inherit; font-size: 13px; width: 84px; border: 2px solid var(--line); border-radius: 14px; padding: 0 0 6px; background: var(--card); color: var(--text); cursor: pointer; overflow: hidden; }
.swatch i { display: block; height: 44px; margin-bottom: 6px; }
.swatch.on { border-color: var(--primary); font-weight: 700; }
.swatch[data-swatch="ocean"] i { background: linear-gradient(160deg, #dbeafe, #e0f2fe, #ede9fe); }
.swatch[data-swatch="sunset"] i { background: linear-gradient(160deg, #ffedd5, #fde2e4, #ede9fe); }
.swatch[data-swatch="mint"] i { background: linear-gradient(160deg, #dcfce7, #ccfbf1, #e0f2fe); }
.swatch[data-swatch="candy"] i { background: linear-gradient(160deg, #fbcfe8, #e9d5ff, #bfdbfe); }
.swatch[data-swatch="classic"] i { background: #f4f5f7; }

/* ---- Result buttons: each result its own color and icon, so the right one is found at a glance. ---- */
:root {
  --r-na-bg: #eef2f7; --r-na-fg: #334155; --r-na-bd: #c5cfdc;
  --r-vm-bg: #fff3dc; --r-vm-fg: #8a5300; --r-vm-bd: #f0c674;
  --r-cb-bg: #efe8ff; --r-cb-fg: #5b3cc4; --r-cb-bd: #c6b3ff;
  --r-ni-bg: #ffe8ec; --r-ni-fg: #a1213a; --r-ni-bd: #f3b1bd;
  --r-ct-bg: #e3f7ec; --r-ct-fg: #136c35; --r-ct-bd: #8fd6ab;
}
@media (prefers-color-scheme: dark) {
  :root {
    --r-na-bg: #1d2633; --r-na-fg: #c8d3e3; --r-na-bd: #344256;
    --r-vm-bg: #33270f; --r-vm-fg: #ffc96b; --r-vm-bd: #6b5220;
    --r-cb-bg: #261f45; --r-cb-fg: #c4b5fd; --r-cb-bd: #4a3c86;
    --r-ni-bg: #3a1720; --r-ni-fg: #ff9daf; --r-ni-bd: #6e2c3b;
    --r-ct-bg: #12301e; --r-ct-fg: #7ee2a4; --r-ct-bd: #2c6a44;
  }
}
.btn.r { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-width: 1.5px;
  transition: transform .08s ease, box-shadow .15s ease; }
.btn.r .ri { font-size: 1.15em; line-height: 1; }
.btn.r:active { transform: scale(.97); }
.btn.r-no_answer { background: var(--r-na-bg); color: var(--r-na-fg); border-color: var(--r-na-bd); }
.btn.r-voicemail { background: var(--r-vm-bg); color: var(--r-vm-fg); border-color: var(--r-vm-bd); }
.btn.r-callback { background: var(--r-cb-bg); color: var(--r-cb-fg); border-color: var(--r-cb-bd); }
.btn.r-not_interested { background: var(--r-ni-bg); color: var(--r-ni-fg); border-color: var(--r-ni-bd); }
.btn.r-contacted { background: var(--r-ct-bg); color: var(--r-ct-fg); border-color: var(--r-ct-bd); }
.btn.r-disconnected { background: var(--card); color: var(--r-na-fg); border-color: var(--r-na-bd); }
.btn.r-relisted { background: var(--card); color: var(--r-cb-fg); border-color: var(--r-cb-bd); }
.btn.r-do_not_call { background: var(--danger); color: #fff; border-color: var(--danger); }
.minor .btn.r { font-weight: 500; }
.btn.r.suggested { outline: 3px solid var(--primary); outline-offset: 2px; box-shadow: 0 4px 14px rgba(47, 109, 246, .25); }

/* ---- The big Call button: a pill that gently pulses while it waits (game mode). ---- */
.callbest { border-radius: 16px; font-weight: 700; min-height: 58px; box-shadow: 0 6px 18px rgba(47, 109, 246, .28); }
body[data-fun="1"] .callbest:not(:disabled) { animation: callPulse 2.6s ease-in-out infinite; }
@keyframes callPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(47, 109, 246, .28), 0 0 0 0 rgba(124, 77, 255, .35); }
  50% { box-shadow: 0 6px 18px rgba(47, 109, 246, .28), 0 0 0 9px rgba(124, 77, 255, 0); }
}

/* ---- Game mode: her level (gold, filling toward the next one) and today's badges. ---- */
.lvlchip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  color: #3b1d00; border: 1px solid #f0c040; white-space: nowrap;
  background: linear-gradient(90deg, #ffd23f var(--lv, 0%), #fff1bf var(--lv, 0%)); }
.badges { flex-basis: 100%; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.daybadge { font-size: 15px; line-height: 1; width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); filter: grayscale(1); opacity: .45; transition: transform .15s ease; }
.daybadge.on { filter: none; opacity: 1; border-color: #f0c040; background: radial-gradient(circle at 50% 35%, #fff7d1, #ffe08a);
  box-shadow: 0 2px 6px rgba(240, 160, 0, .35); }
.daybadge:active { transform: scale(.92); }
.daybadge:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.badgehint { flex-basis: 100%; font-size: 13px; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .daybadge.on { background: radial-gradient(circle at 50% 35%, #5c4710, #3d2f0a); border-color: #b8901f; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-fun="1"] .callbest { animation: none; }
  .btn.r, .daybadge { transition: none; }
}

/* ---- Nov 16: addresses open a Google search; the Appointment set result. ---- */
.addrlink { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.addrlink:hover { text-decoration-color: var(--primary); }
.addrlink .ext, .addrlink span[aria-hidden] { color: var(--muted); font-size: .8em; }
.address .ptype { color: var(--muted); }
:root { --r-ap-bg: #ccf3ee; --r-ap-fg: #075e55; --r-ap-bd: #2bb5a3; }
@media (prefers-color-scheme: dark) { :root { --r-ap-bg: #0d302c; --r-ap-fg: #7ee6d6; --r-ap-bd: #2a8a7e; } }
.btn.r-appointment { background: var(--r-ap-bg); color: var(--r-ap-fg); border-color: var(--r-ap-bd); }

/* ---- The dialer's layout: one column on a phone (in the order a call goes), two on a computer. ---- */
.dgrid { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.dgrid .card { margin: 0; }
.dleft, .dright { display: contents; }
.dgrid .leadcard { order: 1; }
.dgrid .callpanel { order: 2; }
.dgrid .actcard { order: 3; }
.dgrid .notescard { order: 4; }
.dgrid .resultscard { order: 5; }
.dgrid .numberscard { order: 6; }
.dgrid .footcard { order: 7; }
.actcard { padding: 10px 12px; }
.actcard .backhint { margin: 8px 0 0; }
/* "What these results mean" (dialer, Quick Call, the Leads editor): one short line per result. */
.results-help { margin-top: 10px; font-size: 14px; }
.results-help summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.results-help ul { margin: 8px 0 6px; padding-left: 18px; }
.results-help li { margin: 4px 0; line-height: 1.35; }
.results-help p { margin: 6px 0 0; }
.results-help .results-help-rule { padding: 6px 8px; border-radius: 8px; background: rgba(220, 38, 38, .08); }
@media (prefers-color-scheme: dark) { .results-help .results-help-rule { background: rgba(248, 113, 113, .14); } }
#lead > .keys { margin-top: 12px; }
@media (min-width: 1000px) {
  body[data-page="dialer_page"] main { max-width: 1180px; }
  .dgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .dleft, .dright { display: flex; flex-direction: column; gap: 12px; }
  .dgrid .card { order: 0; }   /* each column in page order: the call, then its results, then notes */
  /* The call, its results and the notes stay in view while the home's details scroll. */
  .dright { position: sticky; top: 64px; max-height: calc(100vh - 76px); overflow-y: auto; overscroll-behavior: contain; }
  .resultscard .btn:disabled { opacity: .5; }
  /* A laptop screen fits the call, every result and the notes (Emma, Nov 25, 2026: the notes went out of view when a
     call connected): the results three to a row, and during a call the greyed-out Next property row under the notes. */
  .dright .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dright .results-grid .btn.big { font-size: 15px; padding: 10px 6px; gap: 6px; line-height: 1.2; }
  .dright .callstate { font-size: 19px; margin-bottom: 8px; }
  .dright .callpanel .btn.big { font-size: 16px; padding: 10px 14px; }
  body.oncall .dright .actcard { order: 1; }
  .resultshead { gap: 8px; }
  .notesjump { font-size: 14px; font-weight: 600; padding: 0; min-height: 0; white-space: nowrap; }
  /* "What these results mean" with the results, on the CRM button's line; open, it takes the full width below. */
  .crmrow-call { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .crmrow-call > .results-help { display: block; margin: 0 0 0 auto; }
  .crmrow-call > .results-help[open] { flex-basis: 100%; margin-left: 0; }
  .actcard .results-help { display: none; }
}
/* A phone scrolls the whole page (no Notes link), and keeps "What these results mean" in the card under the call. */
@media (max-width: 999px) { .notesjump { display: none !important; } .crmrow-call > .results-help { display: none; } }
/* Phones and tablets: during a call the result buttons sit pinned at the bottom of the screen. */
.resultscard.pinbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 640px; margin: 0 auto;
  border-radius: 16px 16px 0 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(20, 30, 80, .18);
}
.resultscard.pinbar h3 { display: none; }
.resultscard.pinbar .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.resultscard.pinbar .btn.big { flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.15; padding: 6px 4px; min-height: 54px; }
.resultscard.pinbar .btn.r .ri { font-size: 19px; }
.resultscard.pinbar .minor { margin-top: 6px; gap: 6px; flex-wrap: nowrap; }
.resultscard.pinbar .minor .btn { font-size: 12.5px; min-height: 38px; padding: 4px 6px; gap: 4px; }
body.pinned main { padding-bottom: calc(var(--pin-h, 180px) + 16px); }
@media (prefers-color-scheme: dark) { .resultscard.pinbar { box-shadow: 0 -6px 24px rgba(0, 0, 0, .6); } }

/* ---- Callbacks page: homeowners who called back (until dealt with), and appointments. ---- */
.callsin { border-color: var(--primary); }
.callin, .appt { padding: 10px 0; border-top: 1px solid var(--line); }
.callin:first-child, .appt:first-child { border-top: 0; padding-top: 0; }
.callin.missed b { color: var(--danger); }
.callin.missed .small { color: var(--danger); font-weight: 600; }
.tag.warntag { background: var(--old); color: var(--old-text); }

/* ---- Lists page and "Upload another list" ---- */
.listrow { padding: 10px 0; border-top: 1px solid var(--line); }
.listrow:first-of-type { border-top: 0; }
.listrow.archived { opacity: .6; }
/* The upgrade's math, line by line (Nov 23, 2026). */
.mathbox { width: 100%; max-width: 520px; border-collapse: collapse; margin: 8px 0 10px; font-size: 15px; }
.mathbox td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.mathbox td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.mathbox tr.total td { border-bottom: 0; font-weight: 700; font-size: 17px; }
.lcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin: 6px 0 10px; }
.lcols label { display: grid; gap: 3px; font-size: 13px; font-weight: 600; min-width: 0; }
.lcols select { font: inherit; font-size: 16px; padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  width: 100%; min-width: 0; text-overflow: ellipsis; }
/* Do Not Call columns: two long choices each (whose flag, and what a "Yes" means; Nov 26, 2026), so wider cells. */
#ldnc .lcols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.lsample { overflow-x: auto; font-size: 12px; }
.listup h3 { margin: 14px 0 4px; }

/* ---- Upload page: "I may lawfully call these numbers", ticked for every upload. ---- */
.lawful { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 4px; background: var(--bg); }
.lawbox { display: flex; gap: 10px; align-items: center; font-size: 16px; cursor: pointer; }
.lawbox input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
/* "Keep calling?" past the 30-day limit (Nov 23, 2026; U.renew in util.js) */
dialog.renewdlg { width: min(92vw, 480px); }
.renewdlg h3 { margin: 0; }
.renewdlg p { margin: 0; }
.renewkinds { display: grid; gap: 8px; }
.renewdlg .renewkind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.cbform .renewkind input { width: 20px; height: 20px; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.renewkind:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.renewkinds.one .renewkind { cursor: default; }
.renewkinds.one .renewkind input { display: none; }
.renewdlg .lawbox { font-size: 15px; align-items: flex-start; margin: 0; }
.cbform .lawbox input { padding: 0; margin: 1px 0 0; }
.renewline { margin-top: 4px; }
.renewline .btn, .renewline .linkbtn { margin-left: 4px; vertical-align: middle; }
.renewline .linkbtn, .lmatch .linkbtn { min-height: 0; padding: 0 2px; }
.chip.nolimit { background: var(--fresh); color: var(--fresh-text); }
.lawbox.qknown, .lawbox.lknown { align-items: flex-start; font-size: 15px; margin-top: 10px; }
.lawbox.qknown input, .lawbox.lknown input { margin-top: 1px; }
.lawful .who-in { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); width: min(260px, 100%); margin-top: 4px; }
.drop.off { opacity: .45; }

/* ---- Leads page: Do Not Call shown, the search's matching numbers, and the editor. ---- */
.chip.dnc { background: var(--expired); color: var(--expired-text); font-size: 12px; }
.chip.nocheck { background: var(--old); color: var(--old-text); font-size: 12px; }
.lead .lmatch { font-size: 13px; margin-top: 4px; }
.lead .lmatch .dnc, .lead .lmatch .dnc_list, .lead .lmatch .wrong { color: var(--danger); font-weight: 600; }
.searchnote { margin: 4px 0 0; font-size: 13px; }
.ltools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.edit { margin-top: 12px; border-top: 2px solid var(--primary); padding-top: 8px; }
.edit h4 { margin: 14px 0 6px; }
.edit .erow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.edit .erow:first-of-type { border-top: 0; }
.edit input[type=text], .edit input[type=tel], .edit input[type=datetime-local], .edit select, .edit textarea {
  font: inherit; font-size: 16px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.edit input[type=text], .edit input[type=tel] { flex: 1; min-width: 140px; }
.edit textarea { width: 100%; min-height: 80px; }
.edit .n { font-variant-numeric: tabular-nums; min-width: 128px; }
.edit .st { font-size: 12px; font-weight: 600; }
.edit .st.dnc, .edit .st.wrong { color: var(--danger); }
.edit .lock { font-size: 13px; color: var(--danger); font-weight: 600; }
.edit .box { background: var(--bg); border-radius: 10px; padding: 10px; margin: 6px 0; display: grid; gap: 8px; }
.edit .box label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.edit .hist { font-size: 13px; }
.edit .hist div { padding: 5px 0; border-top: 1px solid var(--line); }
.edit .whoami { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.edit .saved { color: var(--live); font-size: 13px; font-weight: 600; }
.edit .errmsg { color: var(--danger); font-size: 14px; font-weight: 600; }
/* The editor's one message line is at its top, and the editor runs 1,400px on a phone: a refusal ("Tick ... first") or
   "Saved ✓" after a tap further down landed a screen above, so the tap looked dead (a review, Nov 27, 2026). With words
   in it, it follows under the menu while the editor is on screen. */
.edit .errmsg:not(:empty), .edit .saved:not(:empty) { position: sticky; top: 58px; z-index: 4; width: fit-content; max-width: 100%;
  background: var(--card); padding: 5px 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
@media (min-width: 761px) { .edit .errmsg:not(:empty), .edit .saved:not(:empty) { top: 64px; } }

/* ---- Quick Call: call a number she found herself (never on the dialer's list). ---- */
.quickform h2 { margin-bottom: 8px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.quickform label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.quickform label .muted { font-weight: 400; }
.quickform input:not([type=checkbox]), .quickform textarea, .quickform select { font: inherit; font-size: 16px; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.quickform .qwide { margin-top: 8px; }
.quickform .lawbox { display: flex; font-weight: 400; }
#qDial { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 480px) { .qgrid { grid-template-columns: 1fr; } }
.qperson .phone { padding: 4px 0; }
.qperson .lrow1 { flex-wrap: wrap; }          /* a long Call back chip wraps under the name */
.qretick { display: flex; gap: 6px; align-items: center; flex-basis: 100%; }
.qretick input { width: 18px; height: 18px; accent-color: var(--primary); }
.qmore { margin-top: 10px; }
.qmore summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600; padding: 6px 0; }
.qmore[open] summary { margin-bottom: 6px; }
.qline { display: grid; gap: 4px; margin: 10px 0 4px; }
.qline label { font-size: 14px; font-weight: 600; }
.qline p { margin: 0; }
.qhist { list-style: none; margin: 4px 0 2px; padding: 0; font-size: 13px; color: var(--muted); }
.qhist li { padding: 1px 0; }
.qnotes { margin-top: 6px; }
.qnotes summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 0; overflow-wrap: anywhere; }
.qnotes summary .muted { font-weight: 400; }
.qnotes-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-height: 11em; overflow: auto;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); margin: 2px 0 0; }
.qnotes textarea { margin-top: 6px; }
.qnotes textarea[readonly] { opacity: .65; }
.qaddrow { align-items: center; margin-top: 6px; }
/* Stats: the dates the page covers (the card at the top) */
.rangehead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.rangehead h2 { margin: 0; }
.rangecard #rangeChips { margin: 6px 0; }
.rangecustom { margin: 6px 0 2px; align-items: flex-end; }
.rangecustom input[type=date] { font: inherit; font-size: 16px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); display: block; margin-top: 2px; }
/* Her own tags on a home (dialer, under the notes; Leads page) */
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.tagrow #tagChips { display: contents; }
.taginput { flex: 1 1 140px; min-width: 0; font: inherit; font-size: 16px; padding: 6px 12px; border-radius: 999px;
  border: 1px dashed var(--line); background: var(--bg); color: var(--text); }
.tagchip { display: inline-flex; align-items: center; gap: 2px; }
.tagchip .fx { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer; opacity: .7; }
@media (pointer: coarse) { .tagchip .fx { min-width: 36px; min-height: 36px; } }   /* room to tap a folder's × on a phone: it was 27 by 26 (after its base rule) */
/* Callbacks → Everyone who called you */
#incoming a { color: var(--primary); font-weight: 600; text-decoration: none; }
/* Upload another list: what to fix before a file can come in */
.probs { margin: 6px 0 8px 18px; padding: 0; }
.probs li { margin: 2px 0; }
/* A link inside a banner reads in the banner's own color (the default blue vanished in dark mode) */
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }

/* The month calendar (Callbacks and Missed calls, calendar.js; Nov 18, 2026) */
.calcard { padding-bottom: 12px; }
.calhead { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.calmonth { flex: 1; text-align: center; font-size: 17px; }
.calnav { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 36px; height: 36px; font-size: 20px; line-height: 1; cursor: pointer; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calwd { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.calday { min-height: 50px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; }
.calday.past { color: var(--muted); }
.calday.today { border: 2px solid var(--primary); font-weight: 700; color: var(--text); }
.calday.picked { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.caln { font-size: 15px; line-height: 1.2; }
.calc { font-size: 12px; font-weight: 700; line-height: 1.5; border-radius: 10px; padding: 0 7px; background: var(--fresh); color: var(--fresh-text); }
.calday.overdue .calc, .calday.missed .calc { background: var(--expired); color: var(--expired-text); }
.calday.picked .calc { background: var(--primary-text); color: var(--primary); }
.calsum { margin: 10px 2px 0; font-weight: 600; }
.calswitch { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; font-size: 15px; }
@media (max-width: 480px) {
  .calday { min-height: 42px; padding: 3px 1px; gap: 2px; }
  .caln { font-size: 14px; }
  .calc { font-size: 11px; padding: 0 5px; }
  .calnav { width: 32px; height: 32px; }
}
/* Missed calls (Nov 18, 2026): each person who called that day, with each call and her last calls to them. */
.inlist { list-style: none; margin: 6px 0; padding: 0; }
.inlist li { padding: 4px 0; border-top: 1px solid var(--line); }
.inlist li:first-child { border-top: 0; }
.inhist { margin-top: 10px; }
.inhist .inlist { color: var(--muted); }

/* The agents' Leaderboard page (ranks.py): period and place switches, one row per agent, the level bar. */
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.seg .btn.on { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.board { display: grid; gap: 4px; margin-top: 8px; }
.brow { display: grid; grid-template-columns: 2.4em auto minmax(0, 1fr) auto; grid-template-areas: "rank icon name pts" "rank icon level level";
        gap: 0 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.brow.me { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.brank { grid-area: rank; font-weight: 700; font-size: 18px; }
.bname { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blevel { grid-area: level; color: var(--muted); font-size: 13px; }
.bpts { grid-area: pts; font-weight: 700; white-space: nowrap; }
.bicon { grid-area: icon; width: 44px; height: 44px; }
@media (max-width: 480px) { .brow { gap: 0 8px; padding: 8px; } .bicon { width: 38px; height: 38px; } .brank { font-size: 16px; } }
.mylevel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.mylevel .mybadge { width: 96px; height: 96px; }
.mylvname { margin: 0 0 4px; }
.lvlchip .cel-badge { width: 22px; height: 22px; margin: -4px 5px -4px -7px; }
.howpts { margin: 6px 0 2px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: var(--card); }
.howpts summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.howpts ul { margin: 6px 0 4px; padding-left: 20px; }
.howpts li b { display: inline-block; min-width: 3.2em; }
/* The Trophy Room (agents' site): a dark room in every theme, gold trophies on shelves. */
/* The Trophy Room, easy to find (Nov 20): a gold banner on Stats and a chip by the rank on the dialer. */
.trophybanner { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 14px 16px; border-radius: 16px;
  text-decoration: none; color: #f5ecd6; border: 1px solid #4a3a1e;
  background: radial-gradient(ellipse at 20% -20%, #ffe28c40, transparent 60%), linear-gradient(135deg, #2a1f12, #120d08); }
.trophybanner .tb-cup { font-size: 30px; filter: drop-shadow(0 0 10px #ffd23f80); }
.trophybanner .tb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trophybanner .tb-text b { color: #ffe28c; font-size: 17px; }
.trophybanner .tb-text span { color: #d9cba8; font-size: 14px; }
.trophybanner .tb-go { margin-left: auto; font-weight: 700; color: #ffe28c; white-space: nowrap; }
.trophychip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px;
  text-decoration: none; color: #7a4f08; background: linear-gradient(135deg, #fff3c4, #ffd76a); border: 1px solid #e0b23e; }
@media (prefers-color-scheme: dark) { .trophychip { color: #ffe28c; background: #2a1f12; border-color: #6b5326; } }
/* Wider pages on computers (Nov 20: "it should fill the screen better"): pages that ask for it with main class="wide". */
main.wide { max-width: 1560px; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { main.wide { padding-left: 16px; padding-right: 16px; } }
/* Two columns on a computer for pages built as a column pair (the Game tab, Upload). */
@media (min-width: 1000px) {
  .cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .cols2 > div > .card:first-child { margin-top: 0; }
}
/* The Game tab on a phone (Nov 23, 2026): one column, the leaderboard right under the rank, not at the bottom. */
@media (max-width: 999px) {
  .cols2.gamecols { display: flex; flex-direction: column; }
  .cols2.gamecols > div { display: contents; }
  .cols2.gamecols .card { order: 2; }
  .cols2.gamecols .rankcard { order: 0; }
  .cols2.gamecols #leaderboard { order: 1; }
}
.boardname { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.boardname h3 { margin: 8px 0 4px; font-size: 16px; }
.ptdays summary { cursor: pointer; margin-top: 10px; }
/* Follow-ups on a phone (Stefano, Nov 27, 2026: "I'm not loving how shit looks on the phone"): the people to call first,
   the calendar under them, then the link to Missed calls. */
@media (max-width: 999px) {
  .cal-listfirst { display: flex; flex-direction: column; }
  .cal-listfirst > .calcard { order: 1; }
  .cal-listfirst > .callsto { order: 2; }
}
.a2hs { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 0; padding: 8px 12px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; line-height: 1.35; }
.a2hs .linkbtn { flex: none; font-weight: 600; }
.cbmore { margin-top: 8px; }
#cbShowing, #listUp, #lout, #lerr, #lbusy { scroll-margin-top: 72px; }   /* clear of the menu when the page brings them into view */
.cbmore summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 600; padding: 6px 0; }
.cbmore .minirow { margin-top: 4px; }
@media (min-width: 1000px) { .cbmore[open] > summary { display: none; } }   /* a computer: drawn open, nothing to fold */
/* Callbacks and Missed calls on a computer: the calendar on the left, kept in view; the day's people on the right. */
@media (min-width: 1000px) {
  .cal-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .cal-layout > * { grid-column: 2; min-width: 0; }
  .cal-layout > .calcard { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: 64px; align-self: start; }
}
/* Quick Call on a computer: the number to call on the left, the people you added on the right; a call's own cards
   stay full width above them. */
@media (min-width: 1000px) {
  body[data-page="quick_page"] main > .card, body[data-page="quick_page"] main > .statusbar,
  body[data-page="quick_page"] main > #warnings { max-width: 760px; margin-left: auto; margin-right: auto; }
  .quick-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .quick-layout > .card { margin: 12px 0 0; }
}
/* Stats on a computer: two columns that each run on by themselves, so a long card never leaves a gap beside it
   (Nov 23, 2026): the results, the days and two rate tables on the left; the day and the others on the right. The dates
   (Nov 25) sit above both. On a phone: one column, the day's summary second. */
@media (min-width: 1000px) {
  .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .stats-grid .scol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .stats-grid .card { margin: 0; }
}
@media (max-width: 999px) {
  .stats-grid { display: flex; flex-direction: column; }
  .stats-grid .scol { display: contents; }
  .stats-grid .card { margin: 6px 0; }
  .stats-grid .resultsum { order: 1; } #dayCard { order: 2; } #ptsCard { order: 3; } #daysCard { order: 4; }
  #hoursCard { order: 6; } #weekdaysCard { order: 7; } #typeCard { order: 8; }
  #colorsCard { order: 9; } #linesCard { order: 10; }
}
/* The Game tab's ranks: every badge, in color once reached, a shadow until then (Nov 23, 2026). */
.rankstrip { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.rankstrip .rk { width: 40px; height: 40px; padding: 3px; border: 1px solid transparent; border-radius: 10px; background: none;
  cursor: pointer; }
.rankstrip .rk svg { width: 100%; height: 100%; display: block; }
.rankstrip .rk:not(.got) svg { filter: brightness(0) opacity(.2); }
.rankstrip .rk.now { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
/* The tour's ring over the tab each step is about (Nov 23, 2026). */
.tourring { position: fixed; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 3px solid var(--primary); border-radius: 12px; background: var(--card); color: var(--text); font-size: 15px;
  font-weight: 700; pointer-events: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 30%, transparent);
  animation: tourpulse 1.2s ease-in-out infinite; transition: left .25s, top .25s, width .25s; }
.tourring svg { width: 18px; height: 18px; flex: none; }
.tourring .navgame { display: inline; }
/* On a phone the ring shows what the tab shows: one line, no "Settings" by the gear (Nov 27, 2026: on Stefano's iPhone
   "Stats & Game" wrapped and "Settings" ran off the screen). */
.tourring { white-space: nowrap; }
@media (max-width: 480px) { .tourring .gear-word { display: none; } }
@keyframes tourpulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--primary) 14%, transparent); } }
.tourlist li.on { background: color-mix(in srgb, var(--primary) 10%, transparent); border-radius: 8px; padding: 2px 6px; margin: 0 -6px; }
/* Friends (Nov 23, 2026). */
.friendsgrid { display: grid; gap: 0 16px; }
@media (min-width: 1000px) { .friendsgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
/* One column on a phone: the cards keep their usual space between them, not a wider gap where the columns meet. */
@media (max-width: 999px) { .friendsgrid > div + div > .card:first-child { margin-top: 0; } }
/* Her appointments and listings kept from friends (Nov 24, 2026). */
.fprivate { display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--line);
  font-weight: 600; cursor: pointer; }
.fprivate input { width: 18px; height: 18px; flex: none; margin: 0; }
.fprivcard .fprivate:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.fprivnote { margin: 2px 0 0 26px; }
.fcode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 10px 12px; border-radius: 12px;
  background: var(--bg); }
.fcode b { font-size: 20px; letter-spacing: .06em; }
.fask { display: flex; gap: 8px; flex-wrap: wrap; }
.fask input { flex: 1 1 200px; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); text-transform: uppercase; }
.fask input::placeholder { text-transform: none; }
.fperson { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.fperson + .fperson { border-top: 1px solid var(--line); }
.fbadge { width: 40px; height: 40px; flex: none; }
.fbadge svg { width: 100%; height: 100%; display: block; }
.fwho { flex: 1; min-width: 0; }
.fside { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fcard { padding: 10px 0; border-top: 1px solid var(--line); }
.fcard:first-child { border-top: 0; }
.fstats { display: flex; gap: 14px; flex-wrap: wrap; margin: 2px 0 6px 50px; font-size: 14px; }
/* A friend's calls, when they share them (Nov 27, 2026). */
.fcalls { margin: 0 0 6px 50px; font-size: 14px; }
.fcalldays { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px 14px; }
.fcalldays li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.fevents { list-style: none; margin: 0 0 0 50px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.fevents li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.btn.done { opacity: .6; }
.fk { margin: 6px 0; }
.fk.new { font-weight: 600; }
/* Friends' alerts (Nov 23, 2026): new ones marked, a prestige bigger */
.fevents li.new > span { font-weight: 600; }
.fnew { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--primary); color: #fff;
  vertical-align: 1px; }
.fevents li.big > span { font-size: 15px; }
/* A holiday in the streak's week: its icon, counted by itself (Nov 23, 2026). */
.weekdots .wd.hol { font-size: 15px; }
/* A rank's badge up close (Nov 23, 2026). */
.rankzoom { border: none; border-radius: 18px; padding: 22px 26px; text-align: center; max-width: 320px; background: var(--card); color: var(--text); }
.rankzoom::backdrop { background: rgba(0, 0, 0, .45); }
.rankzoom h3 { margin: 6px 0 4px; }
.zoomart { width: 180px; height: 180px; margin: 0 auto; }
.zoomart svg { width: 100%; height: 100%; display: block; }
.zoomart.dim svg { filter: brightness(0) opacity(.2); }
.rankstrip .rk.sel { background: var(--bg); }
.rankpick { min-height: 1.4em; }
@media (prefers-color-scheme: dark) { .rankstrip .rk:not(.got) svg { filter: brightness(0) invert(1) opacity(.16); } }
@media (max-width: 480px) { .rankstrip .rk { width: 36px; height: 36px; } }
/* Leads on a computer: search and filters on the left, kept in view; the leads on the right. */
@media (min-width: 1000px) {
  .leads-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
  .leads-side { position: sticky; top: 64px; max-height: calc(100vh - 76px); overflow-y: auto; }
  .leads-main #list, .leads-main #groups { margin-top: 12px; }
}
.troom { margin: 12px auto; border-radius: 18px; padding: 22px 18px 28px; color: #f5ecd6; border: 1px solid #4a3a1e;
  background: radial-gradient(ellipse at 50% -10%, #ffe28c2e, transparent 60%), linear-gradient(180deg, #1d1610, #0e0b08); }
.troom-head { text-align: center; }
.troom-head h2 { margin: 0 0 4px; color: #ffe28c; font-size: 26px; }
.troom-sum { margin: 0; font-weight: 600; }
.troom-private { margin: 4px 0 0; color: #c9b88f; font-size: 13px; }
/* No. 1 on the left; the trophies grow to fill each shelf. */
.troom-shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 34px 0; margin-top: 22px; }
.troom-trophy { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 8px 20px; background: none; border: 0;
  cursor: pointer; color: inherit; font: inherit; min-width: 0; }
.troom-trophy::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: linear-gradient(180deg, #8a6534, #4a3417); box-shadow: 0 8px 12px #0009; }
.troom-cup { width: min(64%, 170px); aspect-ratio: 120 / 140; transition: transform .25s;
  filter: drop-shadow(0 8px 12px #0009) drop-shadow(0 0 14px #ffd23f40); }
.troom-cup svg { width: 100%; height: 100%; display: block; }
.troom-trophy:hover .troom-cup, .troom-trophy:focus-visible .troom-cup { transform: translateY(-6px) scale(1.05); }
.troom-trophy:focus-visible { outline: 2px solid #ffe28c; outline-offset: 2px; border-radius: 10px; }
.troom-no { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c9b88f; }
.troom-date { font-weight: 700; color: #ffe28c; font-size: 15px; }
.troom-addr { font-size: 13px; color: #d9cba8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A trophy tapped: it comes toward you turning (trophies.html), then its card rises in. */
.troom-dialog { width: min(440px, 92vw); border: 1px solid #4a3a1e; border-radius: 18px; padding: 20px 20px 22px; color: #f5ecd6;
  overflow: visible; background: radial-gradient(ellipse at 50% 0%, #ffe28c26, transparent 60%), #15100b; }
.troom-dialog[open] { animation: troomIn .25s ease-out; }
@keyframes troomIn { from { opacity: 0; } to { opacity: 1; } }
.troom-dialog::backdrop { background: #000c; }
.troom-close { position: absolute; top: 8px; right: 8px; margin: 0; z-index: 1; }
.troom-close .btn { background: transparent; color: #f5ecd6; border: 1px solid #4a3a1e; min-width: 40px; }
.troom-stage { perspective: 900px; }
.troom-dcup { width: 140px; height: 163px; margin: 0 auto 8px; filter: drop-shadow(0 0 18px #ffd23f66); transform-style: preserve-3d; }
.troom-dcup svg { width: 100%; height: 100%; display: block; }
.troom-card { transform-origin: 50% 0; }
.troom-dialog h3 { text-align: center; margin: 0; color: #ffe28c; }
.troom-daddr { text-align: center; margin: 4px 0 14px; font-weight: 600; }
.troom-city { color: #c9b88f; font-weight: 400; }
.troom-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.troom-facts dt { color: #c9b88f; }
.troom-facts dd { margin: 0; overflow-wrap: anywhere; }
/* Many trophies (Stefano, Nov 24, 2026: "u can scroll and it doesnt take like the whole page"): the shelves scroll inside
   the room, the room's top stays. */
/* (Room inside for a glow and the focus ring at the edges; two a shelf on a phone, a lone one across the shelf.) */
.troom-shelf { max-height: min(68vh, 780px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 8px 8px;
  scrollbar-width: thin; scrollbar-color: #8a6534 transparent; }
@media (max-width: 480px) { .troom-shelf { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }
/* Sold: a close ("glow in gold or something to signal it was a close u had"). A steady glow on the shelves (many glowing
   at once stay light on a phone); the open card's trophy pulses. */
.troom-trophy.sold .troom-cup { filter: drop-shadow(0 8px 12px #0009) drop-shadow(0 0 22px #ffd23fcc) drop-shadow(0 0 44px #ffb70388); }
@keyframes troomSold { 50% { filter: drop-shadow(0 0 34px #ffe28c) drop-shadow(0 0 80px #ffb703bb); } }
.troom-soldtag { position: absolute; top: 8px; right: 14%; transform: rotate(8deg); font-size: 11px; font-weight: 900;
  letter-spacing: .12em; text-transform: uppercase; color: #2a1600; background: linear-gradient(135deg, #ffe28c, #ffb703);
  padding: 2px 8px; border-radius: 6px; box-shadow: 0 2px 8px #0008; pointer-events: none; }
.troom-stage { position: relative; }
.troom-dcup.sold { filter: drop-shadow(0 0 26px #ffd23fdd) drop-shadow(0 0 64px #ffb703aa); animation: troomSold 2.4s ease-in-out infinite; }
.troom-stamp { position: absolute; top: 18px; left: 50%; transform: translateX(34px) rotate(-12deg); font-size: 15px; font-weight: 900;
  letter-spacing: .16em; color: #2a1600; background: linear-gradient(135deg, #ffe28c, #ffb703); padding: 3px 10px;
  border-radius: 8px; box-shadow: 0 4px 14px #000a; }
.troom-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 16px;
  text-align: center; }
.troom-acts[hidden] { display: none; }
.troom-acts p { flex-basis: 100%; margin: 0; }
.troom-acts .btn { background: transparent; color: #f5ecd6; border: 1px solid #4a3a1e; }
.troom-acts .btn.danger { background: #b42318; color: #fff; border-color: transparent; }
.troom-acts .troom-soldbtn { background: linear-gradient(135deg, #ffe28c, #ffb703); color: #2a1600; border-color: transparent;
  font-weight: 700; }
.troom-acts .troom-rm { color: #c9b88f; }
.troom-msg { color: #ffb4a8; }
.troom-msg:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .troom-dcup.sold { animation: none; } }
.you p { margin: 6px 0; }
.lvbar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 6px 0; }
.lvbar i { display: block; height: 100%; background: var(--primary); }
.boardlink, .you a, .board a { color: var(--primary); }
#boardCard input:not([type=checkbox]), #boardCard select { font: inherit; font-size: 16px; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); max-width: 100%; }
#boardCard input:not([type=checkbox]) { width: 260px; }

/* Upload: a file's own second box (a list that marks no Do Not Call, Nov 20). */
.sumbox { display: block; margin: 10px 0; padding: 10px 12px; border: 2px solid var(--warn, #c77700); border-radius: 10px; }
.sumbox[hidden] { display: none; }

/* ---- The Game tab (Nov 21, 2026): the rank and the road to Level 50, this week, the trophy case, today's badges,
   how it works, the leaderboard choices and game mode's settings. ---- */
a.lvlchip { text-decoration: none; cursor: pointer; }
.rankhead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.rankhead .rankbadge.cel-badge { width: 104px; height: 104px; }
.rankbadge svg { width: 100%; height: 100%; display: block; }
.rankname { margin: 2px 0 4px; font-size: 26px; line-height: 1.15; }
.ranktext p { margin: 0; }
.lvtrack { height: 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); margin: 16px 0 4px; overflow: hidden; }
.lvfill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f0b429, #ffd166 60%, #ffe8a3); min-width: 6px; }
.lvscale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.weekdots { display: flex; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.wd { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  color: var(--muted); background: var(--bg); border: 2px solid var(--line); }
.wd.good { background: radial-gradient(circle at 50% 35%, #fff7d1, #ffd166); border-color: #e0a81e; color: #6b4a00; }
.wd.today { border-color: var(--primary); }
.wd.later { opacity: .5; }
/* Days off and holidays on the week's dots: kept safe, not lit (Nov 23, 2026) */
.wd.off { border-style: dashed; }
.streakdays { margin: 0 0 2px; font-size: 22px; }   /* "🔥 23-day streak" (Nov 28, 2026) */
.streakrules { margin: 4px 0 8px; padding-left: 18px; }
.streakrules li { margin: 2px 0; }
.daysoff { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.daysoff h3 { margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.offform { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-end; margin: 6px 0; }
.offform label { display: flex; flex-direction: column; gap: 2px; }
.offform label.offwk { flex-direction: row; align-items: center; gap: 6px; }
.offform input[type="date"] { font-size: 16px; padding: 6px 8px; }
.offlist { display: flex; gap: 6px; flex-wrap: wrap; }
.offday { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px;
  border: 1px dashed var(--line); font-size: 13px; }
.offday .linkbtn { font-size: 16px; padding: 0 6px; }
.cups { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 8px 0; }
.cup { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px 12px;
  border-radius: 14px; text-decoration: none; color: #f5ecd6; border: 1px solid #4a3a1e;
  background: radial-gradient(ellipse at 50% -10%, #ffe28c40, transparent 60%), linear-gradient(160deg, #2a1f12, #120d08); }
.cup b { color: #ffe28c; }
.cup .muted { color: #cdbf9c; }
.cupicon { width: 64px; height: 74px; font-size: 40px; display: grid; place-items: center; }
.cupicon svg { width: 100%; height: 100%; }
.cup.sold .cupicon { filter: drop-shadow(0 0 14px #ffd23fcc) drop-shadow(0 0 30px #ffb70380); }   /* a close (Nov 24, 2026) */
.badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.bdg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; }
.bdg .bi { font-size: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg); filter: grayscale(1); opacity: .7; }
.bdg.on .bi { filter: none; opacity: 1; background: radial-gradient(circle at 50% 35%, #fff7d1, #ffe08a); }
.bdg .bt { display: flex; flex-direction: column; min-width: 0; }
.howgame details { border-top: 1px solid var(--line); padding: 8px 0; }
.howgame summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.howgame p, .howgame ul { margin: 8px 0; }
.ptlist { padding-left: 20px; }
.ptlist li b { display: inline-block; min-width: 3.2em; }
.ladder { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 2px; }
.ladder li { display: flex; gap: 10px; align-items: baseline; padding: 5px 10px; border-radius: 8px; }
.ladder li > span:first-of-type { flex: 1; }
.ladder .ladbadge { width: 26px; height: 26px; flex: none; align-self: center; }
.ladder .ladbadge svg { width: 100%; height: 100%; display: block; }
.ladder li.now { background: var(--fresh); color: var(--fresh-text); font-weight: 700; }
.ladder li.now .muted { color: inherit; }
.ladder .you { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.starrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; margin-top: 10px; }
.staricon { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; opacity: .5; filter: grayscale(.7); }
.staricon.got { opacity: 1; filter: none; }
.staricon i { width: 48px; height: 48px; display: block; }
.staricon i svg { width: 100%; height: 100%; display: block; }
.subsettings.dim { opacity: .55; }
@media (max-width: 480px) {
  .rankhead .rankbadge.cel-badge { width: 84px; height: 84px; } .rankname { font-size: 22px; }
  .wd { width: 34px; height: 34px; } .weekdots { gap: 6px; } .staricon i { width: 40px; height: 40px; }
}
@media (prefers-color-scheme: dark) {
  .wd.good { background: radial-gradient(circle at 50% 35%, #5c4710, #3d2f0a); border-color: #b8901f; color: #ffe28c; }
  .bdg.on .bi { background: radial-gradient(circle at 50% 35%, #5c4710, #3d2f0a); }
}

/* A file with listing statuses (Upload → Upload a list, Nov 21, 2026): what it's for, then what it did. */
.statusq { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: var(--bg); }
.statusq h3 { margin: 0 0 6px; }
.statusq p { margin: 6px 0; }
.statusq ul { margin: 6px 0; padding-left: 20px; }
.statusq.done { border-color: var(--fresh-text); }

/* The questions before a call as a banner across the top (Nov 21, 2026): the page stays usable, nothing to close. */
.askbar { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 58px); z-index: 70; display: flex;
  justify-content: center; padding: 0 12px; pointer-events: none; }
.askbar-in { pointer-events: auto; width: 100%; max-width: 680px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 14px; border-radius: 14px; background: #fff7e0; color: #4a3500; border: 1px solid #f0c040;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16); animation: askin .18s ease-out; }
.askbar-words { flex: 1 1 280px; font-size: 14px; line-height: 1.35; }
.askbar-row { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.askbar-learn { font-size: 14px; font-weight: 600; color: #8a5a00; margin-right: 4px; }
.askbar-check { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-weight: 600; cursor: pointer; }
.askbar-check input, .hoursbar .affirm input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.askbar-row .btn:disabled { opacity: .45; }
/* The person on screen is outside calling hours (Nov 21, 2026): a banner above Call, with the day's box. */
.hoursbar { margin: 10px 0 8px; padding: 10px 12px; border-radius: 12px; background: #fff7e0; color: #4a3500;
  border: 1px solid #f0c040; font-size: 14px; line-height: 1.4; display: grid; gap: 8px; }
.hoursbar .affirm { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.hoursbar a { color: #8a5a00; font-weight: 600; }
@keyframes askin { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .askbar-in { animation: none; } }
@media (prefers-color-scheme: dark) {
  .askbar-in, .hoursbar { background: #3a2d0c; color: #ffe8a8; border-color: #8a6a1a; }
  .askbar-learn, .hoursbar a { color: #ffd166; }
}
/* CRM → Connect your CRM (Nov 21, 2026): one card per CRM. */
.conn-intro p { margin: 0 0 8px; }
.conn-warn { border-left: 3px solid var(--old-text); padding-left: 10px; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 12px; }
.conn-card h3 { margin: 0 0 6px; }
.conn-card.on { border-color: var(--primary); }
.conn-who { margin: 4px 0; }
.conn-set { border: 0; padding: 0; margin: 10px 0 6px; }
.conn-set legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 4px; }
.conn-opt { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0; }
.conn-opt input { margin-top: 3px; }
.conn-earlier { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 10px 0; }
.conn-earlier p { margin: 0 0 6px; }
.conn-off { margin-top: 8px; }
.conn-go { margin: 0; display: inline; }
.conn-code { display: grid; gap: 6px; margin-top: 6px; }
.conn-code label { display: grid; gap: 4px; }
.conn-code input { font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.conn-list { margin: 0; padding-left: 18px; }
.conn-list li { margin: 6px 0; }
.conn-log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.conn-log li { padding: 6px 0; border-top: 1px solid var(--line); }
.conn-log li:first-child { border-top: 0; }
.conn-log li.bad { color: var(--danger); }
/* Settings → Refer & earn (Nov 21, 2026). */
.refer-hero h2 { margin-bottom: 6px; }
.refer-steps { margin: 8px 0 12px; padding-left: 18px; }
.refer-steps li { margin: 4px 0; }
.refer-link { margin-top: 10px; }
.refer-row { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.refer-row input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.refer-wait { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.refer-list { list-style: none; margin: 0; padding: 0; }
.refer-list li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.refer-list li:first-child { border-top: 0; }
.refer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* One size for every referral chip (the global .chip.good is a small badge elsewhere). */
.refer-chips .chip { font-size: 13px; padding: 3px 10px; }
.refer-chips .chip.muted { font-weight: 600; }
.refer-total { margin: 10px 0 0; }
/* Upload history (Nov 24, 2026): the kinds as places to jump to, "Renew them all", and the file log folded away. */
.jumps { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0 4px; }
.jumps:empty { display: none; }
.jumplink { font-size: 14px; white-space: nowrap; color: var(--primary); text-decoration: none; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.jumplink:hover { border-color: var(--primary); }
[id^="kind-"] { scroll-margin-top: 70px; }
.renewall { border: 1px solid var(--warn); }
.renewall[hidden] { display: none; }
.filelog > summary { cursor: pointer; list-style: revert; }
.filelog[open] > summary { margin-bottom: 8px; }
.filetable th, .filetable td { text-align: left; vertical-align: top; overflow-wrap: anywhere; }

/* Nov 24, 2026: Delete made easy to find (Leads' picked homes, Upload history), and Settings' city choice. */
.btn.delbtn { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.delbtn:hover { background: var(--danger); color: #fff; }
.deldone { color: var(--green, #1a7f37); font-weight: 600; }
.citymode { display: grid; gap: 6px; margin: 6px 0 8px; }
.citymode label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.citymode input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
@media (max-width: 480px) {
  .pickbar .pickin { flex-wrap: wrap; }
  .pickbar .pickcount { flex-basis: 100%; }
  body.picking main { padding-bottom: 128px; }
}

/* Nov 24, 2026: badges are buttons that open up close, each with how many times it was earned. */
button.bdg { font: inherit; color: inherit; text-align: left; width: 100%; cursor: pointer; background: transparent; }
button.bdg:hover, button.bdg:focus-visible { border-color: var(--primary); }
.bdg .bcount { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.bdg .btimes { font-weight: 800; font-size: 14px; color: var(--text); }
.zoomart.badgeart { width: auto; height: auto; font-size: 96px; line-height: 1.15; }
.zoomart.badgeart.dim { filter: grayscale(1); opacity: .35; }
.badgetimes { font-size: 18px; font-weight: 800; margin: 6px 0 2px; }

/* Nov 24, 2026: going back more than 30 days: her OK under the number, full width. */
#lookbackBox:not([hidden]) { display: block; flex-basis: 100%; width: 100%; margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; }
#lookbackBox label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; line-height: 1.4; }
#lookbackBox input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--primary); }
#lookbackNow { margin: 8px 0 0; }
/* Who going back further is for: her CRM only, or all her leads (Nov 24, 2026). */
#lookbackBox .lookfor { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); }
#lookbackBox .lookfor label { font-weight: 500; align-items: center; }
#lookbackBox .lookfor input { width: 18px; height: 18px; margin: 0; }

/* Leads (Nov 25, 2026): the homes a Delete takes, listed; notes changed on another screen, with what she typed to copy */
.dellist { margin: 6px 0 10px; padding-left: 20px; max-height: 40vh; overflow: auto; }
.notesclash { margin-top: 6px; }
.notesclash label { display: block; margin-top: 6px; }
.notesclash textarea { width: 100%; min-height: 60px; margin-top: 4px; }
/* Settings → 💬 Text templates (Nov 26, 2026): each template a quiet box; its placeholders in blue. */
.tpllist { display: grid; gap: 10px; margin: 8px 0 12px; }
.tplrow { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); min-width: 0; }
.tplhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tplbtns { display: flex; gap: 16px; }
.tplbtns .linkbtn, .tpldel .linkbtn { font-size: 14px; min-height: 0; padding: 2px 0; }
@media (pointer: coarse) { .tplbtns .linkbtn, .tpldel .linkbtn { min-height: 32px; padding: 6px 4px; } }
.tplx { color: var(--danger); }
.tpldel { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.tplbody { margin: 6px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.tplph { color: var(--primary); font-weight: 600; }
.tplfield { display: grid; gap: 4px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tplfield input, .tplfield textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); width: 100%; box-sizing: border-box; }
.tplfield textarea { resize: vertical; }
.tplchips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 2px 0 6px; }
.tplchip { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--primary);
  background: transparent; color: var(--primary); cursor: pointer; }
.tplex { margin: 4px 0 10px; overflow-wrap: anywhere; }
.tplsample { color: var(--text); white-space: pre-line; }
/* Settings → Text & email templates: Your details and the two kinds (Nov 26, 2026). */
.tplme { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 8px 0 14px; }
.tplme h3 { margin: 0 0 2px; font-size: 16px; }
.tplmegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 12px; margin-top: 8px; }
.tpltabs { display: flex; gap: 6px; margin: 4px 0 2px; }
.tpltab { font: inherit; font-size: 14px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); cursor: pointer; }
.tpltab.on { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.tplsubj { margin: 6px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tplmail { white-space: pre-line; max-height: 7.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.anchor { position: relative; top: -70px; display: block; height: 0; }
/* 🗺️ Map next to an address, and 🎤 Talk by the dialer's Notes (Nov 27, 2026). */
.maplink { display: inline-block; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; margin-left: 4px;
  padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.talkbtn { font-size: 13px; font-weight: 600; margin-left: 8px; min-height: 30px; padding: 4px 12px; border-radius: 999px; vertical-align: middle;
  background: color-mix(in srgb, var(--primary) 12%, transparent); }
.talkbtn.on { background: var(--danger); color: #fff; }

/* "Saved ✓" in green wherever a page says it (util.js marks it; Nov 27, 2026). */
.is-saved { color: var(--green) !important; font-weight: 600; }

/* "💬 Text: once you've talked to them" where Text isn't offered yet (the dialer's box, the CRM card; Nov 27, 2026). */
.crmoffer-why { align-self: center; }
.crm-textwhy { display: inline-flex; align-items: center; font-size: 13px; color: var(--muted); padding: 0 4px; }

/* After a good call the dialer stays on that person until "Next lead →" (Nov 27, 2026): the next lead waits, hidden. */
body.wrapup #lead, body.wrapup #empty { display: none !important; }
body.justnext #lead, body.justnext #empty { pointer-events: none; }   /* a double tap on "Next lead →" stops here */
.crmoffer.wrap { border-width: 2px; padding: 14px 16px; }
.crmoffer.wrap #crmOfferText { flex: 1 1 100%; font-size: 17px; line-height: 1.4; }
.crmoffer-next { flex: 1 1 100%; min-height: 52px; font-size: 18px; border-radius: 14px; margin-top: 4px; }

/* ---- The dialer on a phone, cleaned up (Nov 27, 2026: Stefano, "I'm not loving how shit looks on the phone"): a short
   status row, the rank and today's points on one line with a thin bar, a slim day banner and a tighter home card, so
   the Call button shows sooner; Next property, Relisted and Stop calling smaller, on one row where they fit; compact
   notes and numbers. Computers are unchanged. ---- */
.pt-short { display: none; }
@media (max-width: 480px) {
  body[data-page="dialer_page"] main { padding-top: 4px; }
  body[data-page="dialer_page"] .statusbar { margin-top: 4px; gap: 6px 8px; font-size: 13px; }
  body[data-page="dialer_page"] .statusbar #progress { flex: 1 1 100%; line-height: 1.3; }
  body[data-page="dialer_page"] .statusbar .btn.small-btn { padding: 5px 11px; font-size: 13px; border-radius: 999px; min-height: 30px; }
  body[data-page="dialer_page"] .audio-toggle { font-size: 12.5px; gap: 5px; }
  body[data-page="dialer_page"] .audio-toggle input { width: 16px; height: 16px; margin: 0; }
  body[data-page="dialer_page"] .pt-long { display: none; }
  body[data-page="dialer_page"] .pt-short { display: inline; }
  body[data-page="dialer_page"] .pointsbox { margin-top: 6px; gap: 5px 8px; font-size: 13px; }
  body[data-page="dialer_page"] .pointsbox .pbar { flex: 1 1 60px; min-width: 60px; height: 6px; }
  body[data-page="dialer_page"] .badges { margin-top: 0; }
  body[data-page="dialer_page"] .daybanner { margin-top: 8px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
  body[data-page="dialer_page"] .dgrid { gap: 10px; margin-top: 8px; }
  body[data-page="dialer_page"] .leadcard { padding: 14px; }
  body[data-page="dialer_page"] .who { font-size: 25px; margin: 6px 0 2px; }
  body[data-page="dialer_page"] .address { font-size: 16px; margin: 0 0 8px; }
  body[data-page="dialer_page"] .crmrow { margin: 2px 0 6px; }
  body[data-page="dialer_page"] .prices { gap: 6px; margin-bottom: 6px; }
  body[data-page="dialer_page"] .prices > div { padding: 6px 10px; }
  body[data-page="dialer_page"] .price { font-size: 18px; }
  body[data-page="dialer_page"] .callbest { margin-top: 10px; min-height: 54px; font-size: 18px; }
  body[data-page="dialer_page"] .actcard { padding: 10px; }
  body[data-page="dialer_page"] .actcard > .row { gap: 6px; }
  body[data-page="dialer_page"] .actcard > .row > .btn { flex: 1 1 auto; padding: 8px 8px; font-size: 13px; white-space: nowrap; }
  body[data-page="dialer_page"] .actcard .results-help { margin-top: 8px; font-size: 13.5px; }
  body[data-page="dialer_page"] .notescard { padding: 12px 14px; }
  body[data-page="dialer_page"] .noteswhere { font-size: 12.5px; }
  body[data-page="dialer_page"] .numberscard, body[data-page="dialer_page"] .footcard { padding: 12px 14px; }
  body[data-page="dialer_page"] .numberscard h3 { margin: 0 0 6px; font-size: 17px; }
}

/* Phones, every page (Nov 27, 2026: Stefano, "I'm not loving how shit looks on the phone ... clean it up"): tighter
   boxes, calmer headings and a smaller calendar, so each page shows more of what matters. */
@media (max-width: 480px) {
  main { padding: 10px 12px 32px; }
  .card { padding: 14px; margin: 10px 0; }
  .card h2 { font-size: 20px; line-height: 1.25; }
  .card h3 { font-size: 17px; line-height: 1.3; }
  .calday { min-height: 38px; }
  .calday .dn { font-size: 14px; }
  .statusbar { font-size: 13px; }
}

/* A 🔔 notification tapped during a call (static/util.js): a note to open it after, never a page change (Nov 27, 2026). */
.rdopennote { display: block; text-decoration: none; font-weight: 600; font-size: 15px; text-align: center; }   /* in the page (a .banner.info): fixed, it sat on a phone's result buttons, then on the call's status line */
