/*
 * JFcall v2 (7 Oct 2026). One design language with JF Coach V2 and jamiefitness.au:
 * Inter, soft white tiles on the #F5F7FB canvas with a sky wash, grouped rows inside
 * tiles, tinted pill buttons, iOS segmented controls, white sheets on a blurred scrim.
 * Rebuilt from scratch. Every id/class the JS reads or toggles is still styled here;
 * presentation only, no behaviour lives in this file. No em dashes.
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var-latin.woff2?v=2026-10-07-r2-3100e775e861') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;
  --ink: #222326;
  --ink-2: rgba(31, 32, 37, .60);
  --ink-3: rgba(31, 32, 37, .40);
  --cap: #8A8F99;
  --canvas: #F5F7FB;
  --tile: #FFFFFF;
  --card: #EBF0F8;
  --chip: rgba(31, 32, 37, .06);
  --chip-2: rgba(31, 32, 37, .10);
  --track: #E7EBF2;
  --hair: #ECEEF2;
  --scrim: rgba(22, 28, 45, .34);
  --glass: rgba(255, 255, 255, .86);
  /* JFcall sits in the sky section, same as Home and Challenge in JF Coach V2 */
  --sky: #D3E3F5;
  --tint: #E3EDF8;
  --accent: #4DA3FF;
  --deep: #185CA6;
  /* one colour, one meaning */
  --go: #2BB56B;          /* call, answer, success */
  --go-deep: #1E8A50;
  --stop: #FF5E3A;        /* hang up, decline, missed, errors */
  --stop-deep: #C7391B;
  --warn: #F5A524;
  --warn-deep: #9A6200;
  --ai: #8C7CF6;          /* JF Whisper, Shorten */
  --ai-deep: #5B4BC4;
  --teal: #1FC7A6;
  --hs: #FF7A59;          /* HubSpot */
  --r-tile: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --sh-tile: 0 1px 0 rgba(0, 0, 0, .03), 0 1px 3px rgba(30, 40, 70, .05);
  --sh-float: 0 16px 40px -18px rgba(30, 40, 70, .35), 0 0 0 1px rgba(255, 255, 255, .7) inset;
  --sh-key: 0 1px 0 rgba(0, 0, 0, .03), 0 2px 6px -2px rgba(30, 40, 70, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* legacy names still written by JS (inline styles, waveform bars, settings.js) */
  --mint: var(--accent);
  --inbound: var(--teal);
  --ice: var(--accent);
  --white: var(--tile);
  --muted: var(--cap);
  --muted-light: var(--ink-2);
  --line: var(--hair);
  --bg-light: var(--canvas);
  --teal-600: var(--chip-2);
  --teal-700: var(--deep);
  --teal-800: var(--deep);
  --red: var(--stop);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink: #FFFFFF;
  --ink-2: rgba(255, 255, 255, .62);
  --ink-3: rgba(255, 255, 255, .38);
  --cap: rgba(255, 255, 255, .50);
  --canvas: #15161B;
  --tile: #22242B;
  --card: #1C1E24;
  --chip: rgba(255, 255, 255, .08);
  --chip-2: rgba(255, 255, 255, .14);
  --track: #2C2F37;
  --hair: rgba(255, 255, 255, .07);
  --scrim: rgba(0, 0, 0, .55);
  --glass: rgba(34, 36, 43, .86);
  --sky: #1B2638;
  --tint: #1E2A3C;
  --accent: #5AAEFF;
  --deep: #9CCBFF;
  --go-deep: #6FE0A0;
  --stop-deep: #FF9B83;
  --warn-deep: #FFC870;
  --ai-deep: #B9AEFF;
  --sh-tile: 0 1px 0 rgba(255, 255, 255, .02);
  --sh-float: 0 18px 44px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  --sh-key: 0 1px 0 rgba(255, 255, 255, .03);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  font-family: var(--font);
  font-weight: 500;
  color: var(--ink);
  background: var(--canvas);
  overflow: hidden;
  /* selectable by default (names, numbers, messages); controls opt out below */
  user-select: text;
  -webkit-tap-highlight-color: transparent;
}
body {
  display: flex; flex-direction: column; height: 100vh;
  background:
    linear-gradient(180deg, var(--sky) 0, color-mix(in srgb, var(--sky) 45%, var(--canvas)) 96px, var(--canvas) 230px) no-repeat,
    var(--canvas);
}
button, .tab, .subtab, .key, .row-call, .row-hs, .dir, .row-meta { user-select: none; }
button { font-family: inherit; font-weight: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
audio { display: none; }
svg { flex: 0 0 auto; }
button > svg, .row-call > svg, .row-hs > svg, .row-play > svg, .cc-ic > svg, .reply-icon > svg, .dir > svg { display: block; margin: auto; }
input, textarea, select { font-family: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
:where(button, a, input, textarea, select, [role="button"]):focus-visible { outline: 2.5px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--chip-2); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* press feedback, one curve everywhere */
:where(.key, .call-btn, .hangup-btn, .answer-btn, .decline-btn, .cc, .icon-btn, .tab, .pc-close, .pc-keep, .pc-quicktag, .tm-item, .reply-complete, .msg-new, .mt-send, .vmdrop-item, .jfs-btn, .jf-bug-send, .row):active { transform: scale(.96); }
:where(.key, .call-btn, .hangup-btn, .answer-btn, .decline-btn, .cc, .icon-btn, .tab, .pc-close, .pc-keep, .reply-complete, .msg-new, .mt-send, .vmdrop-item, .jfs-btn, .jf-bug-send) { transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), opacity .18s var(--ease); }

/* ------------------------------------------------------------------ alert toast */
.jf-assigned-notification {
  position: fixed; z-index: 80; top: 8px; left: 10px; width: calc(100% - 20px); min-height: 62px;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px;
  border-radius: 20px; background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  color: var(--ink); box-shadow: var(--sh-float); text-align: left;
  transform: translateY(calc(-100% - 18px)); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .25s var(--ease);
}
.jf-assigned-notification.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.jf-assigned-icon {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; place-content: center; flex: 0 0 auto;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.jf-assigned-notification.missed .jf-assigned-icon { color: var(--stop); background: color-mix(in srgb, var(--stop) 14%, transparent); }
.jf-assigned-notification.due .jf-assigned-icon { color: var(--go-deep); background: color-mix(in srgb, var(--go) 14%, transparent); }
.jf-assigned-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Small circle X on every pop-up (Jamie, 21 Oct): close without opening anything. */
.jf-assigned-close { flex: 0 0 auto; margin-left: auto; align-self: center; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: color-mix(in srgb, var(--ink-2) 12%, transparent); cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease); }
.jf-assigned-close:hover, .jf-assigned-close:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink-2) 20%, transparent); }
.jf-assigned-close > svg { display: block; }
.jf-assigned-copy strong { font-size: 14.5px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jf-assigned-copy > span { color: var(--ink-2); font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 6px 14px; flex: 0 0 auto; color: var(--ink);
}
.agent { display: flex; align-items: center; gap: 10px; min-width: 0; }
#agentAvatar, .agent-name { display: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  background: #141742 url('jf-mark.png?v=2026-10-07-r2-57d3720c7524') center / 22px no-repeat;
  box-shadow: 0 6px 14px -8px rgba(20, 23, 66, .6);
}
.agent-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-wordmark { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); cursor: default; }
.brand-wordmark b { font-weight: 700; color: inherit; }
.presence {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink-2); letter-spacing: -.005em;
}
/* status reads as coloured words, not a status light */
.presence .dot { display: none; }
.presence .dot.available ~ *, .presence .dot.ready ~ * { color: var(--go-deep); }
.presence .dot.dnd ~ *, .presence .dot.busy ~ *, .presence .dot.away ~ * { color: var(--ink-2); }
.presence .dot.error ~ * { color: var(--stop-deep); }
.presence { cursor: default; }
.presence .caret { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--cap); }
.dot.available, .dot.ready { background: var(--go); }
.dot.dnd, .dot.busy, .dot.away { background: var(--warn); }
.dot.error { background: var(--stop); }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
/* Auto mode: a plain button, green when on. Only shown on call-list sequence call tasks. */
.automode-btn {
  height: 36px; padding: 0 14px 0 12px; border-radius: 18px; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap;
  color: var(--ink-2); background: var(--tile); box-shadow: var(--sh-tile); cursor: pointer;
}
.automode-btn:hover { color: var(--ink); }
.automode-btn[aria-pressed="true"] { color: #fff; background: var(--go-deep); }
.automode-btn[hidden] { display: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; place-content: center;
  color: var(--ink-2); background: var(--tile); box-shadow: var(--sh-tile);
}
.icon-btn:hover { color: var(--ink); }
.presence-menu {
  position: absolute; top: 58px; left: 12px; z-index: 30; min-width: 210px; padding: 6px;
  border-radius: 18px; background: var(--glass); color: var(--ink);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: var(--sh-float); animation: jfPop .28s var(--ease);
}
.presence-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px;
  border-radius: 12px; font-size: 15px; font-weight: 600; text-align: left;
}
.presence-menu button:hover { background: var(--chip); }
.presence-menu .dot { display: none; }
.presence-menu button[data-presence="available"] { color: var(--go-deep); }

.network-status {
  flex: 0 0 auto; margin: 2px 12px 6px; padding: 10px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--stop) 12%, var(--tile)); color: var(--stop-deep);
  font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center;
}

.jf-embedded .brand-mark, .jf-embedded .brand-wordmark { display: none; }
.jf-embedded .presence { font-size: 14px; }

/* ------------------------------------------------------------------ search */
.searchbar {
  position: relative; display: flex; align-items: center; flex: 0 0 auto;
  margin: 6px 12px 8px; padding: 0 6px 0 14px; height: 44px;
  background: var(--tile); border-radius: 16px; box-shadow: var(--sh-tile);
  transition: box-shadow .2s var(--ease);
}
.searchbar:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent), var(--sh-tile); }
.search-ic { color: var(--ink-3); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; font-weight: 500; padding: 0 8px; height: 100%; letter-spacing: -.005em; }
.search-clear { width: 32px; height: 32px; border-radius: 50%; color: var(--ink-2); background: var(--chip); font-size: 18px; line-height: 1; display: grid; place-items: center; place-content: center; }
body.in-call .searchbar, body.incoming .searchbar, body.postcall .searchbar { display: none; }

/* ------------------------------------------------------------------ screens */
.screens { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; animation: jfRise .32s var(--ease); }
@keyframes jfRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes jfPop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes jfSheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes jfFade { from { opacity: 0; } to { opacity: 1; } }

/* ---- keypad ---- */
#screen-keypad { padding: 0 18px 6px; justify-content: space-between; }
.dial-display { position: relative; flex: 0 0 auto; container-type: inline-size; text-align: center; padding: 10px 42px 2px; min-height: 76px; display: flex; flex-direction: column; justify-content: center; }
.kp-hs {
  position: absolute; top: 10px; right: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; place-content: center; color: var(--ink-3); background: transparent; opacity: .55;
  transition: opacity .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.kp-hs.on { opacity: 1; color: var(--hs); background: color-mix(in srgb, var(--hs) 13%, transparent); }
.dial-name { font-size: 15px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; line-height: 1.3; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dial-number {
  font-size: min(var(--dn, 36px), 11.6cqi); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: var(--ink);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.dial-number.placeholder { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink-3); }
.dial-sub { font-size: 13px; font-weight: 600; color: var(--deep); margin-top: 4px; min-height: 16px; }
.dial-sub:empty { min-height: 0; margin: 0; }
#timerDisplay { font-variant-numeric: tabular-nums; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px; padding: 4px 6px; justify-items: center; }
.key {
  width: 66px; height: 66px; border-radius: 50%; background: var(--tile); box-shadow: var(--sh-key);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.key:hover { background: color-mix(in srgb, var(--tint) 55%, var(--tile)); }
.key:active { background: var(--tint); }
.key .d { font-size: 27px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.key .l { font-size: 9.5px; font-weight: 650; letter-spacing: .1em; color: var(--ink-3); margin-top: 3px; min-height: 9px; }
.keypad.small { gap: 8px 18px; }
.keypad.small .key { width: 56px; height: 56px; }
.keypad.small .key .d { font-size: 22px; }

.keypad-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 0 2px; }
.msg-quick-btn, .back-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.msg-quick-btn { justify-self: end; margin-right: 18px; }
.back-btn { justify-self: start; margin-left: 18px; }
.msg-quick-btn:hover, .back-btn:hover { background: var(--chip); color: var(--ink); }
.call-btn {
  width: 66px; height: 66px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; place-content: center;
  background: var(--go); color: #fff;
  box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--go) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.call-btn:hover { background: color-mix(in srgb, var(--go) 88%, #000); }
.call-btn.dormant { opacity: .4; pointer-events: none; filter: grayscale(1); }
.mode-banner { flex: 0 0 auto; min-height: 18px; padding: 4px 8px 0; text-align: center; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--ink-3); }
.mode-banner.live { color: var(--go-deep); font-weight: 600; }
.mode-banner.clickable-banner { color: var(--deep); font-weight: 650; cursor: pointer; text-decoration: none; }
.mode-banner.clickable-banner::after { content: ' \203A'; }

/* ---- grouped lists (calls, contacts, voicemail, messages) ---- */
.list { display: flex; flex-direction: column; padding: 2px 12px 16px; }
.list-empty { text-align: center; color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 1.5; padding: 44px 24px; }
.list > .list-empty:only-child, .reply-list > .list-empty:only-child { margin: 8px 0; padding: 40px 24px; background: var(--tile); border-radius: var(--r-tile); box-shadow: var(--sh-tile); }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px;
  padding: 10px 12px 10px 14px; background: var(--tile); cursor: pointer;
}
.list > .row:nth-child(1 of .row) { border-top-left-radius: var(--r-tile); border-top-right-radius: var(--r-tile); }
.list > .row:nth-last-child(1 of .row) { border-bottom-left-radius: var(--r-tile); border-bottom-right-radius: var(--r-tile); box-shadow: var(--sh-tile); }
.list > .row + .row::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--hair); }
.row:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
.row .row-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center;
  background: var(--tint); color: var(--deep); font-size: 14px; font-weight: 650; letter-spacing: -.01em;
}
.row .dir { width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto; display: grid; place-items: center; place-content: center; }
.row .dir svg { width: 18px; height: 18px; }
.dir.outbound { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.dir.inbound { color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); }
.dir.missed { color: var(--stop); background: color-mix(in srgb, var(--stop) 13%, transparent); }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-name { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-name.missed { color: var(--stop-deep); }
.row-sub { margin-top: 2px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { flex: 0 0 auto; text-align: right; font-size: 12.5px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.row-call, .row-hs, .row-play {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center; cursor: pointer;
}
.row-call { color: var(--go-deep); background: color-mix(in srgb, var(--go) 14%, transparent); }
.row-hs { color: var(--hs); background: color-mix(in srgb, var(--hs) 13%, transparent); }
.row-play { color: var(--deep); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.row-play svg { width: 13px; height: 13px; }
@media (hover: hover) {
  /* hover actions float over the time instead of reserving width, so names get the full row */
  .row .row-call, .row .row-hs {
    position: absolute; top: 50%; margin-top: -17px; right: 12px; opacity: 0; transform: scale(.9); pointer-events: none;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
  }
  .row .row-hs { right: 52px; }
  .row .row-call { background: color-mix(in srgb, var(--go) 16%, var(--tile)); }
  .row .row-hs { background: color-mix(in srgb, var(--hs) 14%, var(--tile)); }
  .row:hover .row-call, .row:hover .row-hs, .row:focus-within .row-call, .row:focus-within .row-hs { opacity: 1; transform: none; pointer-events: auto; }
  .row:has(.row-call):hover .row-meta, .row:has(.row-call):focus-within .row-meta { opacity: 0; }
  .row:has(.row-call):hover .row-main, .row:has(.row-call):focus-within .row-main { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 24px)); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent calc(100% - 24px)); }
  .row:has(.row-play) .row-call, .row:has(.row-play) .row-hs { position: static; margin-top: 0; }
  .row .row-meta { transition: opacity .18s var(--ease); }
}

/* ---- sub tabs: the iOS white thumb on a grey track ---- */
.subtabs, .reply-seg, .theme-seg {
  display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--track);
}
.subtabs { margin: 2px 12px 10px; flex: 0 0 auto; position: sticky; top: 0; z-index: 2; }
.subtab, .reply-seg button, .theme-seg button {
  flex: 1; min-height: 34px; padding: 0 6px; border-radius: 11px; white-space: nowrap;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; color: var(--ink-2);
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.subtab.active, .reply-seg button.active, .theme-seg button.active {
  background: var(--tile); color: var(--ink);
  box-shadow: 0 1px 2px rgba(30, 40, 70, .10), 0 3px 8px -4px rgba(30, 40, 70, .18);
}
:root[data-theme="dark"] :is(.subtab, .reply-seg button, .theme-seg button).active { background: #3A3D46; }
.subtab:hover:not(.active), .reply-seg button:hover:not(.active), .theme-seg button:hover:not(.active) { color: var(--ink); }

/* ---- Replies ---- */
#screen-replies { padding: 0; overflow: hidden; }
.reply-toolbar { display: flex; align-items: center; gap: 8px; padding: 2px 12px 10px; flex: 0 0 auto; }
.reply-seg { flex: 1; }
/* New-task dot on Messages / Calls (Jamie, 22 Oct 2026): cleared when that section is opened */
.reply-seg button { position: relative; }
.reply-seg button.has-new::after {
  content: ''; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: #2F80ED; animation: jfNewDot 1.6s ease-out infinite; pointer-events: none;
}
@keyframes jfNewDot { 0% { box-shadow: 0 0 0 0 rgba(47, 128, 237, .55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(47, 128, 237, 0); } }
.reply-refresh { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; place-content: center; flex: 0 0 auto; color: var(--ink-2); background: var(--tile); box-shadow: var(--sh-tile); }
.reply-refresh:hover { color: var(--ink); }
.reply-refresh.loading svg { animation: jfSpin .8s linear infinite; }
.reply-open-tabs:disabled { opacity: .45; cursor: default; }
.jf-mobile .reply-open-tabs { display: none; }
@keyframes jfSpin { to { transform: rotate(360deg); } }
.reply-status { margin: 0 12px 10px; padding: 10px 14px; border-radius: 16px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--deep); background: var(--tint); }
.reply-status.error { color: var(--stop-deep); background: color-mix(in srgb, var(--stop) 11%, var(--tile)); }
.reply-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 16px; display: flex; flex-direction: column; }
.reply-row {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 78px;
  padding: 14px 12px 14px 14px; background: var(--tile); text-align: left; cursor: pointer;
  transition: background .18s var(--ease), opacity .18s var(--ease);
}
.reply-list > .reply-row:first-child { border-top-left-radius: var(--r-tile); border-top-right-radius: var(--r-tile); }
.reply-list > .reply-row:last-child { border-bottom-left-radius: var(--r-tile); border-bottom-right-radius: var(--r-tile); box-shadow: var(--sh-tile); }
.reply-list > .reply-row + .reply-row::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--hair); }
.reply-row:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
.reply-row.syncing { opacity: .62; cursor: wait; }
.reply-row.stale { opacity: .55; }
.reply-row:disabled { cursor: wait; }
.reply-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; place-content: center; flex: 0 0 auto; align-self: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.reply-icon.callback { color: var(--go-deep); background: color-mix(in srgb, var(--go) 14%, transparent); }
.reply-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reply-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.reply-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.reply-due { flex: 0 0 auto; font-size: 12.5px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.reply-due.overdue { color: var(--stop-deep); font-weight: 650; }
.reply-sub { display: flex; align-items: baseline; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.reply-type { flex: 0 0 auto; font-weight: 600; color: var(--deep); }
.reply-icon.callback + .reply-main .reply-type { color: var(--go-deep); }
/* Today (21 Oct 2026): meetings in the accent colour, plain tasks neutral. Task names are free text. */
/* Now line between past and upcoming Today items (21 Oct 2026). */
.day-now { position: relative; display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 12px 0 14px; background: var(--tile); }
.day-now::after { content: ''; flex: 1; height: 2px; border-radius: 1px; background: var(--stop); }
.day-now-time { font-size: 12px; font-weight: 700; letter-spacing: -.005em; color: var(--stop-deep); font-variant-numeric: tabular-nums; }
.reply-list > .day-now:first-child { border-top-left-radius: var(--r-tile); border-top-right-radius: var(--r-tile); }
.reply-list > .day-now:last-child { border-bottom-left-radius: var(--r-tile); border-bottom-right-radius: var(--r-tile); box-shadow: var(--sh-tile); }
/* HubSpot logo after the name in Today rows: hugs the name, the time stays right. */
.day-row .reply-name, .reply-row.has-hs .reply-name { flex: 0 1 auto; }
.day-row .reply-due, .reply-row.has-hs .reply-due { margin-left: auto; }
.day-hs { flex: 0 0 auto; align-self: center; display: grid; place-items: center; width: 22px; height: 22px; margin: -2px -4px -2px -4px; border-radius: 7px; color: var(--hs); opacity: .9; transition: background .18s var(--ease), opacity .18s var(--ease); }
.day-hs > svg { display: block; }
.day-hs:hover, .day-hs:focus-visible { opacity: 1; background: color-mix(in srgb, var(--hs) 14%, transparent); }
.reply-icon.todo { color: var(--ink-2); background: color-mix(in srgb, var(--ink-2) 10%, transparent); }
.day-row .reply-type { font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.reply-num { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.reply-num::before { content: '\00a0\00b7\00a0'; color: var(--ink-3); }
.reply-meta { display: flex; min-width: 0; font-size: 12.5px; line-height: 1.3; }
.reply-owner, .reply-sync { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.reply-sync { color: var(--deep); font-weight: 600; }
.reply-actions { flex: 0 0 auto; display: flex; align-items: center; }
.reply-complete {
  height: 32px; padding: 0 14px; border-radius: 128px; font-size: 13px; font-weight: 650; letter-spacing: -.005em; white-space: nowrap;
  color: var(--go-deep); background: color-mix(in srgb, var(--go) 14%, transparent);
}
.reply-complete:hover { background: color-mix(in srgb, var(--go) 22%, transparent); }
.reply-complete:disabled { cursor: wait; opacity: .55; }
/* narrow phones: Complete becomes a round tick so the number fits in full */
@media (max-width: 430px) {
  .reply-complete { width: 40px; height: 40px; padding: 0; font-size: 0; display: grid; place-items: center; place-content: center; }
  .reply-complete::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
  .reply-complete:disabled::before { animation: jfBreathe 1s var(--ease) infinite; }
  .reply-complete.day-join { width: auto; height: 32px; padding: 0 14px; font-size: 13px; }
  .reply-complete.day-join::before { content: none; }
}

/* ---- Messages: inbox ---- */
#screen-messages { padding: 0; }
.msg-inbox { position: absolute; inset: 0; display: flex; flex-direction: column; }
.msg-inbox .list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 84px; }
.msg-new {
  position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; place-content: center; color: var(--deep);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 15%, var(--tile)) 0%, color-mix(in srgb, var(--accent) 27%, var(--tile)) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 14px 28px -14px color-mix(in srgb, var(--accent) 90%, transparent);
}
.msg-conv .row-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-conv.unread .row-name { font-weight: 700; }
.msg-conv.unread .row-sub { color: var(--ink); }
.msg-conv.unread .row-meta { color: var(--accent); font-weight: 700; }
.unread-dot { display: none; }

/* ---- Messages: thread ---- */
.msg-thread { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--canvas); }
.mt-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; flex: 0 0 auto; background: var(--canvas); box-shadow: 0 1px 0 var(--hair); }
.mt-back { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center; font-size: 0; color: var(--ink); background: var(--tile); box-shadow: var(--sh-tile); }
.mt-back svg { margin-left: -2px; }
.mt-who { flex: 1; min-width: 0; }
.mt-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.mt-num { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mt-toinput { width: 100%; height: 38px; border: 0; border-radius: 12px; padding: 0 12px; font-size: 15px; background: var(--tile); box-shadow: var(--sh-tile); outline: 0; }
.mt-ac { position: absolute; left: 12px; right: 12px; top: 58px; z-index: 12; max-height: 260px; overflow-y: auto; padding: 6px; border-radius: 18px; background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7); box-shadow: var(--sh-float); }
.mt-ac .ac-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.mt-ac .ac-row:hover { background: var(--chip); }
.mt-ac .ac-av { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center; background: var(--tint); color: var(--deep); font-size: 12.5px; font-weight: 650; }
.mt-ac .ac-name { font-size: 14.5px; font-weight: 600; }
.mt-ac .ac-sub { font-size: 12.5px; color: var(--ink-2); }
.mt-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.mt-act { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: var(--ink-2); background: var(--tile); box-shadow: var(--sh-tile); }
#mtCall { color: var(--go-deep); }
#mtHubspot:not(:disabled) { color: var(--hs); }
.mt-act:disabled { opacity: .4; cursor: not-allowed; }
.mt-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.mt-empty { margin: auto; padding: 26px 16px; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.mt-day { align-self: center; margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: -.005em; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 20px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; animation: jfRise .28s var(--ease); }
.bubble.in { align-self: flex-start; background: var(--tile); color: var(--ink); border-bottom-left-radius: 7px; box-shadow: var(--sh-tile); }
.bubble.out { align-self: flex-end; background: linear-gradient(180deg, #5AA8FF, #3D8CF5); color: #fff; border-bottom-right-radius: 7px; }
.bub-meta { font-size: 11px; font-weight: 500; opacity: .62; margin-top: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.bubble.pending { opacity: .6; }
.callrow { align-self: center; width: min(92%, 320px); display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 18px; background: var(--tile); box-shadow: var(--sh-tile); font-size: 13.5px; color: var(--ink); }
.callrow.playable { cursor: pointer; min-height: 48px; }
.callrow .cr-head { display: flex; align-items: center; gap: 9px; }
.callrow .cr-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; place-content: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.callrow.missed .cr-ic { color: var(--stop); background: color-mix(in srgb, var(--stop) 13%, transparent); }
.callrow.vm .cr-ic { color: var(--ai); background: color-mix(in srgb, var(--ai) 14%, transparent); }
.callrow .cr-label { font-weight: 600; letter-spacing: -.005em; }
.callrow.missed .cr-label { color: var(--stop-deep); }
.callrow .cr-time { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.callrow .cr-play { width: 30px; height: 30px; min-width: 30px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: #fff; background: var(--accent); }
.callrow.playing .cr-play { background: var(--stop); }
.callrow .cr-norec { font-size: 12.5px; color: var(--ink-3); }
.callrow .cr-audio { display: block; width: 100%; height: 32px; }
.callrow .cr-transcript { font-size: 13px; line-height: 1.45; color: var(--ink-2); border-top: 1px solid var(--hair); padding-top: 6px; }
.callrow .cr-td { margin-top: 2px; }
.callrow .cr-tsum { font-size: 12.5px; font-weight: 650; color: var(--deep); cursor: pointer; user-select: none; list-style: none; }
.mt-notice { align-self: center; max-width: 92%; padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 500; line-height: 1.35; text-align: center; color: var(--ink-2); background: var(--chip); animation: jfFade .2s var(--ease); }
.mt-notice.error { font-weight: 600; color: var(--stop-deep); background: color-mix(in srgb, var(--stop) 11%, var(--tile)); }

.mt-whisper { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; flex: 0 0 auto; }
.mt-whisper-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 128px; font-size: 13px; font-weight: 650; color: var(--ai-deep); background: color-mix(in srgb, var(--ai) 14%, var(--tile)); }
.mt-whisper-btn:hover { background: color-mix(in srgb, var(--ai) 22%, var(--tile)); }
.mt-whisper-btn:disabled { opacity: .6; cursor: default; }
.mt-whisper[data-mode="recording"] .mt-whisper-btn { color: var(--stop-deep); background: color-mix(in srgb, var(--stop) 14%, var(--tile)); }
.mt-whisper[data-mode="recording"] .mt-whisper-btn svg { animation: jfBreathe 1.2s var(--ease) infinite; }
@keyframes jfBreathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: .7; } }
.mt-whisper-status { min-width: 0; font-size: 12.5px; color: var(--ink-2); }
.mt-whisper-status[data-kind="err"] { color: var(--stop-deep); }
.mt-whisper-status[data-kind="ok"] { color: var(--go-deep); }
.mt-whisper-status[data-kind="rec"] { color: var(--stop-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.mt-composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); flex: 0 0 auto; }
.mt-composer textarea { flex: 1; min-height: 42px; max-height: 110px; resize: none; border: 0; outline: 0; border-radius: 21px; padding: 11px 16px; font-size: 15px; line-height: 1.35; background: var(--tile); box-shadow: var(--sh-tile); transition: box-shadow .2s var(--ease); }
.mt-composer textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent), var(--sh-tile); }
.mt-send { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center; color: #fff; background: var(--accent); box-shadow: 0 10px 20px -12px var(--accent); }
.mt-send:disabled { opacity: .45; }
.mt-meter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 0 18px 8px; flex: 0 0 auto; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.mt-meter-stat { font-weight: 650; font-variant-numeric: tabular-nums; }
.mt-meter-hint { flex: 1 1 auto; min-width: 0; color: var(--ink-3); }
.mt-meter.warn .mt-meter-stat, .mt-meter.warn .mt-meter-hint { color: var(--warn-deep); }
.mt-shorten { flex: 0 0 auto; margin-left: auto; height: 28px; padding: 0 12px; border-radius: 128px; font-size: 12.5px; font-weight: 650; color: var(--ai-deep); background: color-mix(in srgb, var(--ai) 15%, var(--tile)); }
.mt-shorten[disabled] { opacity: .7; cursor: default; }
.mt-shorten.flash { animation: jfNudge 1.6s var(--ease) infinite; }
@keyframes jfNudge { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ai) 0%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ai) 22%, transparent); } }
.mt-shorten .spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: jfSpin .7s linear infinite; }
.mt-shorten-panel { flex: 0 0 auto; margin: 0 12px 10px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--ai) 8%, var(--tile)); box-shadow: var(--sh-tile); }
.mt-shorten-head { font-size: 13px; font-weight: 650; color: var(--ai-deep); margin-bottom: 4px; }
.mt-shorten-text { font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.mt-shorten-text .seg { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.mt-shorten-actions { display: flex; gap: 8px; margin-top: 10px; }
.mt-shorten-accept, .mt-shorten-keep { height: 36px; padding: 0 16px; border-radius: 128px; font-size: 13.5px; font-weight: 650; }
.mt-shorten-accept { color: var(--ai-deep); background: color-mix(in srgb, var(--ai) 20%, var(--tile)); }
.mt-shorten-keep { color: var(--ink); background: var(--chip); }

/* ---- Settings ---- */
.settings { padding: 2px 12px 24px; }
.settings-group { margin-bottom: 18px; }
.settings-label { margin: 6px 4px 8px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); text-transform: none; }
.settings-group > .settings-row, .settings-group > .toggle-row, .vmdrop-settings, .jfs-tile {
  background: var(--tile);
}
.settings-row {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 50px; padding: 0 14px; font-size: 15px; font-weight: 500; text-align: left;
}
.settings-group > .settings-label + .settings-row, .settings-group > .settings-row:first-child { border-top-left-radius: 18px; border-top-right-radius: 18px; }
.settings-group > .settings-row:last-child, .settings-group > .settings-row:has(+ :not(.settings-row)) { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; box-shadow: var(--sh-tile); }
.settings-group > .settings-row:not(:has(+ .settings-row)) { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; box-shadow: var(--sh-tile); }
.settings-row + .settings-row::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--hair); }
.settings-row span { color: var(--ink); }
.settings-row strong { font-weight: 500; color: var(--ink-2); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.settings-row:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
button.settings-row strong::after { content: ' \203A'; }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 50px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; border-radius: 30px; background: var(--track); transition: background .25s var(--ease); cursor: pointer; }
.slider::before { content: ''; position: absolute; width: 26px; height: 26px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: transform .25s var(--ease); }
.switch input:checked + .slider { background: var(--go); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2.5px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.theme-seg { margin: 0; }
.vmdrop-settings { display: flex; flex-direction: column; margin: 0; border-radius: 18px 18px 0 0; overflow: hidden; }
.vmdrop-set-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 10px 0 14px; }
.vmdrop-set-row + .vmdrop-set-row::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--hair); }
.vmdrop-set-name { font-size: 15px; font-weight: 500; }
.vmdrop-empty { padding: 14px; font-size: 14px; color: var(--ink-2); }
.vmdrop-play, .vmdrop-rec-btn {
  height: 32px; padding: 0 14px; border-radius: 128px; font-size: 13px; font-weight: 650;
  color: var(--deep); background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.vmdrop-record-row { display: flex; align-items: center; gap: 10px; border-radius: 0 0 18px 18px; background: var(--tile); box-shadow: var(--sh-tile); }
.vmdrop-record-row::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--hair); }
.vmdrop-rec-status { font-size: 13px; color: var(--ink-2); }
.vmdrop-set-actions { display: flex; align-items: center; gap: 8px; }
.vmdrop-del { height: 32px; padding: 0 14px; border-radius: 128px; font-size: 13px; font-weight: 650; color: var(--stop); background: color-mix(in srgb, var(--stop) 12%, transparent); }
.vmdrop-del:disabled { opacity: .6; cursor: default; }

/* settings.js controls (its own injected CSS is retired) */
.settings-group > .jfs-note { margin: 8px 4px 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.settings-group > .jfs-btn, .settings-group > .jfs-select, .settings-group > .jfs-meter { margin-top: 8px; }
.jfs-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 0 16px;
  border-radius: 128px; font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; color: var(--ink); background: var(--chip);
}
.jfs-btn:hover { background: var(--chip-2); }
.jfs-btn.on { color: var(--stop-deep); background: color-mix(in srgb, var(--stop) 13%, transparent); }
#jfsEnableCallSound {
  position: fixed; z-index: 10000; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  width: auto; min-height: 44px; padding: 0 18px 0 14px; gap: 8px; white-space: nowrap;
  color: #fff; background: var(--go); border-radius: 128px; font-size: 14.5px; font-weight: 650;
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--go) 90%, transparent);
  animation: jfPop .3s var(--ease);
}
#jfsEnableCallSound::before { content: ''; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E") center / contain no-repeat; }
#jfsEnableCallSound:active { transform: translateX(-50%) scale(.96); }
.jfs-select {
  display: block; width: 100%; height: 46px; padding: 0 40px 0 14px; border: 0; border-radius: 14px; outline: 0;
  font-size: 15px; font-weight: 500; color: var(--ink); background: var(--tile); box-shadow: var(--sh-tile); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px; background-repeat: no-repeat;
}
.jfs-meter { height: 6px; border-radius: 6px; background: var(--track); overflow: hidden; }
.jfs-meter > div { height: 100%; width: 0; border-radius: 6px; background: var(--go); transition: width .08s linear; }
.jfs-range { width: 52%; accent-color: var(--accent); }
.jfs-num { width: 60px; height: 34px; padding: 0 8px; border: 0; border-radius: 10px; background: var(--chip); font-size: 14px; text-align: center; }
.jfs-kbd { padding: 2px 7px; border-radius: 6px; background: var(--chip); font-size: 12px; font-weight: 650; color: var(--ink); }
.jfs-note { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin: 4px 0; }

/* ------------------------------------------------------------------ call screens */
.callscreen {
  position: fixed; inset: 0; z-index: 40; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; padding: 14px 20px 18px;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--sky) 92%, transparent) 0%, transparent 70%),
    var(--canvas);
  animation: jfFade .25s var(--ease);
}
.call-top, .call-contact, .waveform, .call-controls, .call-minicard, .call-hangup-row, .incoming-actions { position: relative; z-index: 1; }
.call-top { width: 100%; display: flex; justify-content: flex-end; min-height: 0; }
.call-contact { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 100%; margin-top: 8px; flex: 0 1 auto; min-height: 0; overflow: hidden; }
/* The avatar's ring (6px) and incoming halo (22px) paint outside this box: clip 24px out, not at the edge (Jamie 15 Oct). */
@supports (overflow-clip-margin: 24px) { .call-contact { overflow: clip; overflow-clip-margin: 24px; } }
.call-controls, .call-hangup-row, .call-minicard, .incoming-actions { flex-shrink: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; place-content: center; font-weight: 650; }
.avatar.lg {
  width: 84px; height: 84px; margin-bottom: 4px; font-size: 30px; letter-spacing: -.02em;
  color: var(--deep); background: var(--tile); box-shadow: 0 18px 34px -20px rgba(24, 92, 166, .55), 0 0 0 6px color-mix(in srgb, var(--tile) 55%, transparent);
}
.avatar.lg:empty { display: none; }
.avatar.lg.pulse { animation: jfHalo 2.4s var(--ease) infinite; }
@keyframes jfHalo {
  0% { box-shadow: 0 18px 34px -20px rgba(24, 92, 166, .55), 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent); }
  70% { box-shadow: 0 18px 34px -20px rgba(24, 92, 166, .55), 0 0 0 22px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 18px 34px -20px rgba(24, 92, 166, .55), 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}
.call-name { margin-top: 10px; max-width: 100%; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; overflow-wrap: anywhere; }
.call-number { margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.call-number:empty { display: none; }
.call-status { margin-top: 10px; font-size: 14px; font-weight: 600; letter-spacing: -.005em; color: var(--ink-2); }
.call-status.ringing { color: var(--deep); animation: jfGlimmer 2s var(--ease) infinite; }
@keyframes jfGlimmer { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.call-status[role="button"], .call-status[tabindex] { color: var(--warn-deep); }
.call-timer { margin-top: 4px; font-size: 44px; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.call-timer:empty { display: none; }

.waveform { width: 100%; max-width: 300px; margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wave-label { font-size: 11px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wave-label b { font-weight: 650; color: var(--ink); }
.bars { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; height: 34px; }
.bars .bar { width: 3px; height: 30px; border-radius: 3px; background: var(--accent); transform: scaleY(.18); transform-origin: center bottom; transition: transform .12s linear; }

.call-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 4px; width: 100%; max-width: 340px; margin-top: auto; margin-bottom: 14px; }
.cc { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.cc-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: var(--ink); background: var(--tile); box-shadow: var(--sh-key); transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease); }
.cc:hover .cc-ic { background: color-mix(in srgb, var(--tint) 60%, var(--tile)); }
.cc-l { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: -.005em; white-space: nowrap; }
.cc.on .cc-ic { color: #fff; background: var(--accent); box-shadow: 0 12px 22px -12px var(--accent); }
.cc.on .cc-l { color: var(--ink); }
.cc.rec.on .cc-ic { background: var(--stop); box-shadow: 0 12px 22px -12px var(--stop); }
.cc.flash .cc-ic { animation: jfNudgeWarm .9s var(--ease) infinite; color: var(--warn-deep); background: color-mix(in srgb, var(--warn) 18%, var(--tile)); }
@keyframes jfNudgeWarm { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--warn) 28%, transparent); } }

/* in-call keypad + voicemail drop: light sheets over the call */
.dtmf-pad, .vmdrop-pad {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; background: var(--canvas); animation: jfRise .28s var(--ease);
}
.dtmf-display { min-height: 40px; margin-bottom: 14px; font-size: 32px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink); }
.dtmf-close {
  min-height: 44px; margin-top: 18px; padding: 0 22px; border-radius: 128px; font-size: 14.5px; font-weight: 650; color: var(--ink); background: var(--chip);
}
.vmdrop-head { margin-bottom: 4px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.vmdrop-pad::before { content: 'Plays into the call, then hangs up'; order: 1; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-2); }
.vmdrop-head { order: 0; }
.vmdrop-list { order: 2; display: flex; flex-direction: column; width: 100%; max-width: 320px; border-radius: 20px; overflow: hidden; background: var(--tile); box-shadow: var(--sh-tile); }
.vmdrop-pad .dtmf-close { order: 3; }
.vmdrop-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; font-size: 15px; font-weight: 600; text-align: left; color: var(--ink); background: var(--tile); }
.vmdrop-item::before { content: ''; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--ai) 15%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%238C7CF6' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 14px no-repeat; }
.vmdrop-item + .vmdrop-item::after { content: ''; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--hair); }
.vmdrop-item:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
.vmdrop-item:disabled { opacity: .6; cursor: default; }
.vmdrop-item.suggested { color: var(--go-deep); }
.vmdrop-item.suggested::after { content: 'Suggested'; margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

/* recommended voicemail drop: shown when a "leave voicemail" task reaches a mailbox (23 Oct 2026) */
.vmrec { position: relative; z-index: 1; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 340px; margin: auto 0 14px; padding: 14px; border-radius: 20px; background: var(--tile); box-shadow: var(--sh-tile); animation: jfRise .28s var(--ease); }
.vmrec[hidden] { display: none; }
.vmrec:not([hidden]) + .call-controls { margin-top: 0; }
.vmrec-head { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.vmrec.beep .vmrec-head { color: var(--go-deep); }
.vmrec-drop { width: 100%; min-height: 50px; padding: 0 18px; border-radius: 128px; font-size: 16.5px; font-weight: 700; color: #fff; background: var(--go); box-shadow: 0 12px 22px -14px var(--go); transition: transform .18s var(--ease), opacity .18s var(--ease); }
.vmrec-drop:active { transform: scale(.97); }
.vmrec-drop:disabled { opacity: .7; cursor: default; }
.vmrec-sub { font-size: 12.5px; color: var(--ink-2); text-align: center; }

/* HubSpot card on the call screen */
.call-minicard {
  width: 100%; max-width: 340px; display: flex; align-items: center; gap: 12px; margin: 0 auto 14px; padding: 10px 14px 10px 10px;
  border-radius: 20px; text-decoration: none; color: var(--ink); background: var(--tile); box-shadow: var(--sh-tile);
}
.call-minicard:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
.cmc-avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; place-content: center; font-size: 13.5px; font-weight: 650; color: var(--deep); background: var(--tint); background-size: cover; background-position: center; }
.cmc-main { flex: 1; min-width: 0; text-align: left; }
.cmc-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmc-sub { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmc-open { color: var(--hs); }

.call-hangup-row { width: 100%; display: flex; justify-content: center; }
.hangup-btn, .decline-btn {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: #fff; background: var(--stop);
  box-shadow: 0 16px 28px -14px var(--stop), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.hangup-btn:hover, .decline-btn:hover { background: color-mix(in srgb, var(--stop) 88%, #000); }

/* incoming */
.incoming-screen { justify-content: space-between; }
.incoming-screen .call-contact { margin-top: auto; margin-bottom: auto; }
.incoming-screen .call-status { order: -1; margin: 0 0 18px; color: var(--deep); }
.incoming-actions { display: flex; align-items: flex-start; justify-content: center; gap: 72px; width: 100%; margin: 20px 0 6px; }
.answer-btn {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; place-content: center; color: #fff; background: var(--go);
  box-shadow: 0 16px 28px -14px var(--go), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: jfRingHalo 1.8s var(--ease) infinite;
}
@keyframes jfRingHalo { 0% { box-shadow: 0 16px 28px -14px var(--go), 0 0 0 0 color-mix(in srgb, var(--go) 40%, transparent); } 70%, 100% { box-shadow: 0 16px 28px -14px var(--go), 0 0 0 18px color-mix(in srgb, var(--go) 0%, transparent); } }
.incoming-actions .decline-btn { width: 72px; height: 72px; }
.answer-btn::after, .incoming-actions .decline-btn::after { position: absolute; top: 82px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; animation: none; }
.answer-btn, .incoming-actions .decline-btn { position: relative; }
.answer-btn::after { content: 'Accept'; }
.incoming-actions .decline-btn::after { content: 'Decline'; }
.incoming-actions { padding-bottom: 26px; }
@keyframes jfBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.answer-btn:active, .decline-btn:active, .hangup-btn:active { animation: none; transform: scale(.93); }

/* inbound caller enrichment */
.cc-gym { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; max-width: 300px; font-size: 14px; font-weight: 600; color: var(--deep); }
.cc-gym span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-hslink { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--hs); text-decoration: none; }
.cc-deal {
  position: relative; display: block; width: min(100%, 320px); margin-top: 16px; padding: 14px 16px; text-align: left;
  text-decoration: none; color: inherit; border-radius: 20px; background: var(--tile); box-shadow: var(--sh-tile);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cc-deal:hover { transform: translateY(-1px); box-shadow: var(--sh-float); }
.cc-deal-ext { position: absolute; top: 14px; right: 14px; color: var(--hs); }
.cc-deal-name { padding-right: 22px; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-deal-gym { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.cc-deal-gym span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-deal-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.cc-stage { font-size: 13px; font-weight: 650; color: var(--go-deep); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-trainer { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }

/* ------------------------------------------------------------------ tab bar */
.tabbar {
  position: relative; z-index: 20; display: flex; flex: 0 0 auto; gap: 2px;
  margin: 0 10px 10px; padding: 5px; border-radius: 28px;
  background: var(--tile); box-shadow: var(--sh-float); transition: opacity .2s var(--ease);
}
.tab {
  position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 50px; padding: 5px 2px; border-radius: 22px; color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: -.005em;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--ink); background: var(--chip); }
.tab:hover:not(.active) { color: var(--ink-2); }
.tab .badge {
  position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; place-content: center; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--stop);
  box-shadow: 0 0 0 2px var(--tile);
}
.tab-more { display: none; }
.tabbar:not(.team-open) .tab-team { display: none; }
.tab-expand {
  flex: 0 0 auto; align-self: center; width: 34px; height: 34px; margin: 0 2px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-3); background: transparent;
}
.tab-expand:hover { color: var(--ink-2); background: var(--chip); }
.tab-expand svg { transition: transform .2s var(--ease); }
.tabbar.team-open .tab-expand svg { transform: rotate(180deg); }

/* ------------------------------------------------------------------ post-call wrap-up */
.postcall { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--canvas); }
.postcall::before { content: ''; position: absolute; inset: 0 0 auto; height: 220px; z-index: 0; pointer-events: none; background: linear-gradient(180deg, var(--sky) 0, color-mix(in srgb, var(--sky) 40%, var(--canvas)) 110px, transparent 220px); }
.postcall > * { position: relative; z-index: 1; }
body.postcall .tabbar { visibility: hidden; pointer-events: none; }
.pc-head { padding: 18px 18px 4px; }
.pc-head > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: end; }
.pc-title { grid-column: 1; font-size: 24px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); }
.pc-who { grid-column: 1; margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-dur { grid-column: 2; grid-row: 1 / span 2; align-self: end; font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
#pcCause { grid-column: 1 / -1; margin-top: 8px !important; font-size: 13px !important; font-weight: 500; line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
.pc-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 10px; }
.pc-label { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 6px 8px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); text-transform: none; }
.pc-label small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.pc-tagfield {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border: 0; border-radius: 16px; background: var(--tile); box-shadow: var(--sh-tile); color: var(--ink); text-align: left; cursor: pointer;
  transition: box-shadow .2s var(--ease);
}
.pc-tagfield:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent), var(--sh-tile); }
.pc-tagfield:disabled { opacity: .55; cursor: wait; }
.pc-tagfield::before { content: ''; width: 16px; height: 16px; flex: 0 0 auto; opacity: .45; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.pc-tagchips { flex: 1; min-width: 0; display: block; font-size: 15px; font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-tagchips b { font-weight: 650; color: var(--deep); }
.pc-tagplaceholder { color: var(--ink-3); font-size: 15px; }
.pc-chev { color: var(--ink-3); font-size: 0; }
.pc-chev::after { content: ''; display: block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.pc-quicktags { display: flex; flex-direction: column; margin-top: 10px; border-radius: var(--r-tile); background: var(--tile); box-shadow: var(--sh-tile); overflow: hidden; }
.pc-quicktags[hidden] { display: none; }
.pc-quicktag {
  position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 10px;
  border: 0; background: var(--tile); color: var(--ink); text-align: left; font: 500 15px/1.3 var(--font); letter-spacing: -.005em; cursor: pointer;
}
.pc-quicktag + .pc-quicktag::before { content: ''; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--hair); }
.pc-quicktag:hover { background: color-mix(in srgb, var(--tint) 40%, var(--tile)); }
.pc-quicktag:active { background: color-mix(in srgb, var(--tint) 75%, var(--tile)); }
.pc-quicktag:active .pc-quicktick { transform: scale(.9); }
.pc-quicktag[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 9%, var(--tile)); font-weight: 600; }
.pc-quicktag:disabled { opacity: .5; cursor: wait; }
.pc-quicktag .pc-qlabel { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.pc-quicktag kbd { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; place-content: center; font: 600 11px/1 var(--font); color: var(--ink-3); background: var(--chip); opacity: 0; transition: opacity .2s var(--ease); }
.pc-quicktags:hover kbd, .pc-quicktags:focus-within kbd { opacity: 1; }
:root[data-theme="dark"] .pc-quicktick { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
:root[data-theme="dark"] :is(.pc-tagic, .tm-dot) { color: color-mix(in srgb, var(--tag) 80%, #fff); background: linear-gradient(180deg, color-mix(in srgb, var(--tag) 20%, var(--tile)), color-mix(in srgb, var(--tag) 30%, var(--tile))); }
.pc-quicktick {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; place-content: center; order: 3;
  font-size: 0; color: transparent; box-shadow: inset 0 0 0 2px var(--track); transition: background .18s var(--ease), box-shadow .18s var(--ease);
}
.pc-quicktag[aria-pressed="true"] .pc-quicktick { background: var(--accent); box-shadow: none; color: #fff; }
.pc-quicktick { position: relative; }
.pc-quicktag[aria-pressed="true"] .pc-quicktick::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 5px; border-left: 2.3px solid #fff; border-bottom: 2.3px solid #fff; transform: translate(-50%, -70%) rotate(-45deg); }
.pc-tagic, .tm-dot {
  --tag: var(--accent);
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; place-content: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tag) 13%, var(--tile)), color-mix(in srgb, var(--tag) 22%, var(--tile)));
  color: color-mix(in srgb, var(--tag) 82%, #1F2025);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tag) 14%, transparent);
}
.pc-tagic::before, .tm-dot::before { content: ''; width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12.6V4a1 1 0 0 1 1-1h8.6a1 1 0 0 1 .7.3l8 8a1 1 0 0 1 0 1.4l-8.6 8.6a1 1 0 0 1-1.4 0l-8-8a1 1 0 0 1-.3-.7ZM7.5 9A1.5 1.5 0 1 0 7.5 6a1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 12.6V4a1 1 0 0 1 1-1h8.6a1 1 0 0 1 .7.3l8 8a1 1 0 0 1 0 1.4l-8.6 8.6a1 1 0 0 1-1.4 0l-8-8a1 1 0 0 1-.3-.7ZM7.5 9A1.5 1.5 0 1 0 7.5 6a1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pc-tagerr { display: block; margin: 10px 6px 0; font-size: 13.5px; font-weight: 600; color: var(--stop-deep); }
.pc-chip { display: none; }
.pc-actions { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px)); }
.pc-keep, .pc-close { width: 100%; min-height: 52px; border: 0; border-radius: 128px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; cursor: pointer; }
.pc-close {
  display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--deep);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 15%, var(--tile)) 0%, color-mix(in srgb, var(--accent) 27%, var(--tile)) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent), 0 12px 24px -16px color-mix(in srgb, var(--accent) 90%, transparent);
}
:root[data-theme="dark"] .pc-close, :root[data-theme="dark"] .msg-new { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.pc-close.ready { color: #fff; background: linear-gradient(180deg, #5AA8FF, #3D8CF5); box-shadow: 0 14px 26px -14px #3D8CF5, inset 0 1px 0 rgba(255, 255, 255, .25); }
.pc-keep { align-self: center; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 16px; color: var(--ink-3); background: transparent; font-size: 14px; font-weight: 600; }
.pc-keep::before { content: ''; width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.16 7.8V4.94a2.2 2.2 0 1 0-2.05 0v2.87a6.24 6.24 0 0 0-2.97 1.31L5.3 3.28a2.47 2.47 0 1 0-1.15 1.5l7.72 5.75a6.28 6.28 0 1 0 9.53 5.39 6.29 6.29 0 0 0-3.24-8.12zm-1.03 11.35a3.23 3.23 0 1 1 3.23-3.23 3.23 3.23 0 0 1-3.23 3.23z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.16 7.8V4.94a2.2 2.2 0 1 0-2.05 0v2.87a6.24 6.24 0 0 0-2.97 1.31L5.3 3.28a2.47 2.47 0 1 0-1.15 1.5l7.72 5.75a6.28 6.28 0 1 0 9.53 5.39 6.29 6.29 0 0 0-3.24-8.12zm-1.03 11.35a3.23 3.23 0 1 1 3.23-3.23 3.23 3.23 0 0 1-3.23 3.23z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pc-keep:not(:disabled) { color: var(--hs); background: color-mix(in srgb, var(--hs) 10%, transparent); border-radius: 128px; }
.pc-keep:not(:disabled):hover { background: color-mix(in srgb, var(--hs) 16%, transparent); }
.pc-actions button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.pc-close:disabled { opacity: .7; cursor: wait; }

/* tag picker sheet */
.tagmodal { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: jfFade .2s var(--ease); }
.tm-card { width: 100%; max-height: 86%; display: flex; flex-direction: column; padding: 8px 12px 10px; border-radius: 30px 30px 0 0; background: var(--canvas); box-shadow: 0 -20px 50px -20px rgba(20, 30, 60, .45); animation: jfSheet .38s var(--ease); }
.tm-card::before { content: ''; align-self: center; width: 38px; height: 5px; margin-bottom: 10px; border-radius: 5px; background: var(--chip-2); }
.tm-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.tm-title { font-size: 22px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.tm-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; place-content: center; font-size: 20px; line-height: 1; color: var(--ink-2); background: var(--chip); }
.tm-sub { margin: 2px 4px 12px; font-size: 13.5px; color: var(--ink-2); }
.tm-searchwrap { margin-bottom: 10px; }
.tm-search { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; outline: 0; font-size: 15px; background: var(--tile); box-shadow: var(--sh-tile); }
.tm-search:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent), var(--sh-tile); }
.tm-recent { margin: 2px 6px 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.tm-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 20px; background: var(--tile); box-shadow: var(--sh-tile); }
.tm-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px 6px 10px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.tm-item + .tm-item::before { content: ''; position: absolute; top: 0; left: 54px; right: 0; height: 1px; background: var(--hair); }
.tm-item:hover, .tm-item.kb { background: color-mix(in srgb, var(--tint) 50%, var(--tile)); }
.tm-item.on { font-weight: 600; }
.tm-item.on::after { content: ''; margin-left: auto; width: 10px; height: 5px; border-left: 2.2px solid var(--accent); border-bottom: 2.2px solid var(--accent); transform: rotate(-45deg) translateY(-2px); }
.tm-empty { padding: 22px 12px; text-align: center; color: var(--ink-2); font-size: 14px; }
.tm-empty button { margin-left: 6px; height: 32px; padding: 0 14px; border-radius: 128px; color: var(--deep); background: color-mix(in srgb, var(--accent) 14%, transparent); font: 650 13px/1 var(--font); cursor: pointer; }

/* bug report sheet */
.jf-bug-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: jfFade .2s var(--ease); }
.jf-bug-card { width: 100%; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 30px 30px 0 0; background: var(--canvas); box-shadow: 0 -20px 50px -20px rgba(20, 30, 60, .45); animation: jfSheet .38s var(--ease); display: flex; flex-direction: column; }
.jf-bug-card::before { content: ''; align-self: center; width: 38px; height: 5px; margin-bottom: 12px; border-radius: 5px; background: var(--chip-2); }
.jf-bug-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.jf-bug-title { font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); }
.jf-bug-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; place-content: center; font-size: 20px; line-height: 1; color: var(--ink-2); background: var(--chip); }
.jf-bug-sub { margin: 4px 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.jf-bug-text { width: 100%; min-height: 110px; padding: 12px 14px; border: 0; border-radius: 18px; outline: 0; resize: vertical; font-size: 15px; line-height: 1.4; background: var(--tile); box-shadow: var(--sh-tile); }
.jf-bug-text:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent), var(--sh-tile); }
.jf-bug-send {
  width: 100%; min-height: 50px; margin-top: 12px; border-radius: 128px; font-size: 16px; font-weight: 650; color: var(--deep);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 15%, var(--tile)) 0%, color-mix(in srgb, var(--accent) 27%, var(--tile)) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.jf-bug-send:disabled { opacity: .5; cursor: not-allowed; }
.jf-bug-status { min-height: 18px; margin-top: 10px; text-align: center; font-size: 13.5px; color: var(--ink-2); }
.jf-bug-status.is-ok { color: var(--go-deep); }
.jf-bug-status.is-err { color: var(--stop-deep); }

/* identity picker (index.html builds it) */
.jf-idp { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: jfFade .2s var(--ease); }
.jf-idp-card { width: 100%; max-width: 340px; padding: 22px 16px 14px; border-radius: 28px; background: var(--canvas); box-shadow: var(--sh-float); animation: jfPop .3s var(--ease); }
.jf-idp-card .brand-mark { margin: 0 0 14px 4px; }
.jf-idp-title { margin: 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.025em; color: var(--ink); }
.jf-idp-sub { margin: 6px 4px 14px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.jf-idp-list { border-radius: 20px; overflow: hidden; background: var(--tile); box-shadow: var(--sh-tile); }
.jf-idp-list button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px 0 10px; font-size: 15.5px; font-weight: 600; text-align: left; color: var(--ink); background: var(--tile); }
.jf-idp-list button:hover { background: color-mix(in srgb, var(--tint) 45%, var(--tile)); }
.jf-idp-list button + button::before { content: ''; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--hair); }
.jf-idp-list i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; place-content: center; font-style: normal; font-size: 12.5px; font-weight: 650; color: var(--deep); background: var(--tint); }

/* keyboard hint under Done */
.pc-hint { margin: 2px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.pc-auto { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--go-deep); }
.pc-auto[hidden] { display: none; }
.pc-auto button { font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 0 2px; }
.pc-hint kbd { padding: 1px 6px; border-radius: 5px; background: var(--chip); font: 600 11px/1.4 var(--font); color: var(--ink-2); }
@media (pointer: coarse) { .pc-hint, .pc-quicktag kbd { display: none; } }

/* ------------------------------------------------------------------ PWA install hint */
.jf-pwa-hint {
  position: fixed; z-index: 70; left: 10px; right: 10px; bottom: 84px; display: none; align-items: flex-start; gap: 10px;
  padding: 14px 10px 14px 16px; border-radius: 20px; background: var(--glass); color: var(--ink); text-align: left;
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7); box-shadow: var(--sh-float);
}
html.jf-mobile.jf-standalone .jf-pwa-hint { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
html.jf-mobile.jf-pwa-install .jf-pwa-hint { display: flex; }
html.jf-embedded .jf-pwa-hint { display: none !important; }
.jf-pwa-hint strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.jf-pwa-hint span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.jf-pwa-hint button { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); background: var(--chip); font-size: 16px; line-height: 1; }

/* ------------------------------------------------------------------ phone (standalone / PWA) */
html.jf-mobile, html.jf-mobile body {
  min-width: 320px; position: fixed; top: var(--jf-viewport-offset-top, 0px); left: 0; right: 0; width: 100%;
  height: var(--jf-viewport-height, 100dvh); max-height: var(--jf-viewport-height, 100dvh); min-height: 0; overscroll-behavior: none;
}
html.jf-mobile body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: 0; }
html.jf-mobile { background: var(--canvas); }
.jf-mobile .topbar { min-height: 60px; padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 6px 16px; }
.jf-mobile .presence { min-height: 30px; }
.jf-mobile .icon-btn { width: 42px; height: 42px; }
.jf-mobile .topbar-actions { gap: 10px; }
.jf-mobile #settingsGear { display: flex; }
.jf-mobile .presence-menu { top: calc(62px + env(safe-area-inset-top, 0px)); left: 12px; min-width: 230px; }
.jf-mobile .presence-menu button { min-height: 48px; }
.jf-mobile .searchbar { display: flex; margin: 6px 14px 8px; height: 46px; }
.jf-mobile .searchbar input { font-size: 16px; }
.jf-mobile .search-clear { width: 36px; height: 36px; }
.jf-mobile .screens { min-height: 0; }
.jf-mobile #screen-keypad { padding: 0 max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); }
.jf-mobile .dial-display { padding: 8px 46px 2px; min-height: 76px; }
.jf-mobile .dial-number { --dn: clamp(32px, 10.5vw, 44px); }
.jf-mobile .dial-number.placeholder { font-size: 23px; }
.jf-mobile .kp-hs { top: 8px; right: 0; width: 44px; height: 44px; }
/* keys size from the visible height as well as the width, so the call button never ends up
   under the tab bar on a short phone (about 370px of the height is chrome around the pad) */
.jf-mobile { --kp-key: clamp(46px, min(20vw, calc(var(--jf-viewport-height, 100dvh) * .236 - 96px)), 78px); }
.jf-mobile .keypad { width: min(100%, 340px); margin: 0 auto; gap: clamp(4px, calc(var(--jf-viewport-height, 100dvh) * .018), 14px) clamp(14px, 7vw, 30px); padding: 4px; }
.jf-mobile .key { width: var(--kp-key); height: var(--kp-key); }
.jf-mobile .key .d { font-size: calc(var(--kp-key) * .4); }
.jf-mobile .keypad-actions { width: min(100%, 340px); margin: 0 auto; }
.jf-mobile .msg-quick-btn, .jf-mobile .back-btn { width: 52px; height: 52px; }
.jf-mobile .call-btn { width: 72px; height: 72px; }
.jf-mobile .mode-banner { min-height: 20px; }
.jf-mobile .mode-banner.jf-banner-quiet { visibility: hidden; }
.jf-mobile .list, .jf-mobile .reply-list, .jf-mobile .settings { padding-left: 14px; padding-right: 14px; }
.jf-mobile .subtabs { margin-left: 14px; margin-right: 14px; }
.jf-mobile .reply-toolbar { padding-left: 14px; padding-right: 14px; }
.jf-mobile .row { min-height: 68px; }
.jf-mobile .reply-row { min-height: 82px; padding-top: 15px; padding-bottom: 15px; }
.jf-mobile .reply-name { font-size: 16.5px; }
.jf-mobile .reply-sub { font-size: 14px; }
.jf-mobile .row-call, .jf-mobile .row-hs { width: 40px; height: 40px; opacity: 1; transform: none; }
.jf-mobile .subtab, .jf-mobile .reply-seg button { min-height: 38px; font-size: 14.5px; }
.jf-mobile .reply-refresh { width: 44px; height: 44px; }
.jf-mobile .reply-complete { min-height: 36px; }
.jf-mobile .msg-new { width: 58px; height: 58px; bottom: 18px; right: 18px; }
.jf-mobile .mt-head { min-height: 62px; padding: 8px 14px 10px; }
.jf-mobile .mt-back, .jf-mobile .mt-act, .jf-mobile .mt-send { width: 44px; height: 44px; min-width: 44px; }
.jf-mobile .mt-body { padding: 12px 12px; }
.jf-mobile .bubble { max-width: 86%; font-size: 16px; line-height: 1.42; }
.jf-mobile .mt-whisper-btn { height: 40px; padding: 0 16px; font-size: 14px; }
.jf-mobile .mt-composer { padding: 8px 12px max(10px, env(safe-area-inset-bottom, 0px)); position: relative; z-index: 2; }
.jf-mobile .mt-composer textarea { min-height: 44px; max-height: min(132px, 28dvh); font-size: 16px; }
.jf-mobile .mt-meter { padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
.jf-mobile .mt-shorten, .jf-mobile .mt-shorten-accept, .jf-mobile .mt-shorten-keep { min-height: 40px; }
.jf-mobile .mt-shorten-actions { flex-wrap: wrap; }
.jf-mobile .settings { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.jf-mobile .settings-row { min-height: 54px; font-size: 16px; }
.jf-mobile .theme-seg button { min-height: 40px; }
.jf-mobile .jfs-btn, .jf-mobile .jfs-select { min-height: 48px; font-size: 16px; }
.jf-mobile .tabbar { margin: 0 12px max(10px, env(safe-area-inset-bottom, 0px)); padding: 5px max(5px, env(safe-area-inset-right, 0px)) 5px max(5px, env(safe-area-inset-left, 0px)); }
html.jf-mobile.jf-standalone .tabbar { margin-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
.jf-mobile .tab { min-width: 44px; min-height: 54px; }
.jf-mobile .tab span:not(.badge) { font-size: 11.5px; }
.jf-mobile .tab-replies { display: flex; }
.jf-mobile .tab-more { display: none; }
/* iOS band: the band is painted with the page colour, which is the canvas everywhere now */
html.jf-mobile.jf-ios-band, html.jf-mobile.jf-ios-band body { background-color: var(--canvas); }
html.jf-mobile.jf-ios-band .tabbar { margin-bottom: 8px; }
html.jf-mobile.jf-ios-band .mt-composer { padding-bottom: 8px; }
html.jf-mobile.jf-ios-band .mt-meter { padding-bottom: 8px; }
html.jf-mobile.jf-ios-band .callscreen { padding-bottom: 14px; }
.jf-mobile .callscreen {
  position: fixed; inset: 0; width: 100%; height: var(--jf-viewport-height, 100dvh); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
.jf-mobile .call-name { font-size: 30px; }
.jf-mobile .call-timer { font-size: 52px; }
.jf-mobile .avatar.lg { width: 96px; height: 96px; font-size: 34px; }
.jf-mobile .call-controls { max-width: 380px; gap: 16px 4px; }
.jf-mobile .cc-ic { width: 60px; height: 60px; }
.jf-mobile .hangup-btn { width: 74px; height: 74px; }
.jf-mobile .incoming-actions { gap: clamp(64px, 22vw, 104px); }
.jf-mobile .answer-btn, .jf-mobile .incoming-actions .decline-btn { width: 76px; height: 76px; }
.jf-mobile .answer-btn::after, .jf-mobile .incoming-actions .decline-btn::after { top: 86px; }
.jf-mobile .dtmf-pad, .jf-mobile .vmdrop-pad {
  position: fixed; inset: 0; min-height: 0; overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
@media (orientation: portrait) {
  .jf-mobile .vmdrop-pad { justify-content: center; }
  .jf-mobile .vmdrop-list { min-height: 0; overflow-y: auto; flex: 0 1 auto; }
}
.jf-mobile .vmdrop-item { min-height: 56px; }
.jf-mobile .postcall, .jf-mobile .tagmodal { position: fixed; inset: 0; width: 100%; height: var(--jf-viewport-height, 100dvh); }
.jf-mobile .postcall { padding-top: env(safe-area-inset-top, 0px); }
.jf-mobile .pc-body { padding: 8px 14px 10px; }
.jf-mobile .pc-tagfield { min-height: 50px; }
.jf-mobile .pc-quicktag { min-height: 54px; font-size: 16px; }
.jf-mobile .pc-close { min-height: 56px; font-size: 17px; }
.jf-mobile .pc-actions { padding: 10px 14px max(16px, env(safe-area-inset-bottom, 0px)); }
.jf-mobile .tm-card { max-height: calc(var(--jf-viewport-height, 100dvh) - env(safe-area-inset-top, 0px) - 20px); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
.jf-mobile .tm-x, .jf-mobile .jf-bug-x { width: 44px; height: 44px; }
.jf-mobile .tm-search { height: 48px; font-size: 16px; }
.jf-mobile .tm-item { min-height: 52px; font-size: 16px; }
.jf-mobile .jf-bug-text { font-size: 16px; }
.jf-mobile #screen-history .row-hs, .jf-mobile #screen-voicemail .row-hs { display: none; }
html.jf-mobile.jf-thread-open .searchbar, html.jf-mobile.jf-thread-open .tabbar, html.jf-mobile.jf-thread-open .topbar { display: none; }
html.jf-thread-open .searchbar { display: none; }
html.jf-mobile.jf-thread-open .mt-head { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
@media (pointer: coarse) {
  .row-call, .row-hs { opacity: 1; }
  .icon-btn, .presence, .search-clear, .kp-hs, .msg-quick-btn, .mt-back, .mt-act, .mt-send, .reply-refresh, .dtmf-close, .tm-x { min-width: 44px; min-height: 44px; }
}
@media (max-height: 650px) {
  .jf-mobile .dial-display { min-height: 52px; padding-top: 2px; }
  .jf-mobile .dial-number { --dn: 30px; }
  .jf-mobile .key .l { display: none; }
  .jf-mobile .call-btn { width: 60px; height: 60px; }
  .jf-mobile .msg-quick-btn, .jf-mobile .back-btn { width: 44px; height: 44px; }
  .jf-mobile .topbar { min-height: 52px; padding-bottom: 2px; }
  .jf-mobile .searchbar { height: 42px; margin-top: 2px; margin-bottom: 6px; }
  .jf-mobile .tab { min-height: 48px; }
  .jf-mobile { --kp-key: clamp(44px, min(20vw, calc(var(--jf-viewport-height, 100dvh) * .25 - 78px)), 78px); }
  .jf-mobile .avatar.lg { width: 66px; height: 66px; font-size: 24px; }
  .jf-mobile .call-name { font-size: 25px; }
  .jf-mobile .call-timer { font-size: 40px; }
  .jf-mobile .call-controls { margin-bottom: 8px; }
}
/* very short phone web views (keyboard-sized windows, small landscape-ish tabs) */
@media (max-height: 520px) and (orientation: portrait) {
  .jf-mobile .topbar { min-height: 48px; padding-top: calc(4px + env(safe-area-inset-top, 0px)); }
  .jf-mobile .searchbar { height: 38px; margin: 2px 14px 4px; }
  .jf-mobile .dial-display { min-height: 40px; padding-top: 0; }
  .jf-mobile .dial-number { --dn: 24px; }
  .jf-mobile .dial-number.placeholder { font-size: 18px; }
  .jf-mobile .keypad { row-gap: 3px; padding: 2px 4px; }
  .jf-mobile { --kp-key: 44px; }
  .jf-mobile .call-btn { width: 52px; height: 52px; }
  .jf-mobile .msg-quick-btn, .jf-mobile .back-btn { width: 40px; height: 40px; }
  .jf-mobile .keypad-actions { padding-top: 2px; }
  .jf-mobile .mode-banner { min-height: 14px; font-size: 11px; padding-top: 0; }
  .jf-mobile .tab { min-height: 44px; }
}
/* the HubSpot iframe can be short: compress the keypad and call screens so the call,
   hang-up and Done buttons are always on screen without scrolling */
@media (max-height: 640px) {
  .topbar { padding-top: 8px; padding-bottom: 4px; }
  .searchbar { height: 40px; margin-top: 4px; margin-bottom: 6px; }
  .dial-display { min-height: 52px; padding-top: 2px; }
  .dial-number { --dn: 30px; }
  .dial-number.placeholder { font-size: 20px; }
  .keypad { gap: 6px 22px; padding: 2px 6px; }
  .key { width: 56px; height: 56px; }
  .key .d { font-size: 24px; }
  .key .l { margin-top: 1px; }
  .call-btn { width: 56px; height: 56px; }
  .keypad-actions { padding-top: 4px; }
  .tab { min-height: 46px; }
  .call-controls { gap: 8px 4px; margin-bottom: 10px; }
  .cc-ic { width: 50px; height: 50px; }
  .avatar.lg { width: 66px; height: 66px; font-size: 24px; }
  .call-name { font-size: 23px; margin-top: 8px; }
  .call-timer { font-size: 36px; }
  .hangup-btn { width: 60px; height: 60px; }
  .call-minicard { margin-bottom: 10px; padding-top: 7px; padding-bottom: 7px; }
  .pc-head { padding-top: 12px; }
  .pc-dur { font-size: 30px; }
  .pc-quicktag { min-height: 44px; }
}
@media (max-height: 560px) {
  .dial-display { min-height: 42px; }
  .dial-number { --dn: 26px; }
  .keypad { gap: 4px 24px; }
  .key { width: 47px; height: 47px; }
  .key .d { font-size: 21px; }
  .key .l { display: none; }
  .call-btn { width: 50px; height: 50px; }
  .msg-quick-btn, .back-btn { width: 40px; height: 40px; }
  .mode-banner { min-height: 14px; font-size: 11px; padding-top: 2px; }
  .tab { min-height: 42px; gap: 0; }
  .tab span:not(.badge) { font-size: 10.5px; }
  .waveform { display: none !important; }
  .call-minicard { display: none !important; }
  .call-contact { margin-top: 2px; }
  .callscreen:not(.incoming-screen) .avatar.lg { display: none; }
  .avatar.lg { width: 56px; height: 56px; font-size: 21px; }
  .callscreen { padding-top: 10px; padding-bottom: 12px; }
  .pc-hint { display: none; }
}
/* short landscape phone: two deliberate regions, nothing critical depends on scroll */
@media (orientation: landscape) and (max-height: 500px) {
  .jf-mobile .topbar { min-height: 46px; padding-top: max(4px, env(safe-area-inset-top, 0px)); padding-bottom: 2px; }
  .jf-mobile .searchbar { height: 40px; margin-top: 2px; margin-bottom: 4px; }
  .jf-mobile .tabbar { margin-bottom: max(6px, env(safe-area-inset-bottom, 0px)); padding: 3px; }
  .jf-mobile .tab { min-height: 42px; flex-direction: row; justify-content: center; gap: 6px; }
  .jf-mobile .tab .badge { position: static; margin-left: 2px; box-shadow: none; }
  .jf-mobile #screen-keypad {
    display: grid; grid-template-columns: minmax(190px, .9fr) minmax(230px, 1.1fr); grid-template-rows: minmax(0, 1fr) auto auto;
    column-gap: clamp(8px, 3vw, 24px); padding: 2px max(10px, env(safe-area-inset-right, 0px)) 2px max(10px, env(safe-area-inset-left, 0px)); overflow: hidden;
  }
  .jf-mobile .dial-display { grid-column: 1; grid-row: 1; align-self: center; min-height: 44px; padding: 0 44px; }
  .jf-mobile .dial-number { --dn: 26px; max-height: 56px; overflow: hidden; }
  .jf-mobile .dial-number.placeholder { font-size: 19px; }
  .jf-mobile .dial-sub { min-height: 10px; margin-top: 1px; font-size: 11px; }
  .jf-mobile #screen-keypad > .keypad { grid-column: 2; grid-row: 1 / 4; align-self: center; width: min(100%, 240px); gap: 4px 16px; padding: 0; }
  .jf-mobile #screen-keypad .key { width: 46px; height: 46px; }
  .jf-mobile #screen-keypad .key .d { font-size: 21px; }
  .jf-mobile #screen-keypad .key .l { display: none; }
  .jf-mobile .keypad-actions { grid-column: 1; grid-row: 2; width: min(100%, 220px); padding: 0; }
  .jf-mobile .call-btn { width: 54px; height: 54px; }
  .jf-mobile .back-btn, .jf-mobile .msg-quick-btn { width: 44px; height: 44px; margin: 0; }
  .jf-mobile .mode-banner { grid-column: 1; grid-row: 3; min-height: 12px; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .jf-mobile .callscreen {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 1fr); grid-template-rows: minmax(0, 1fr) auto;
    column-gap: clamp(12px, 4vw, 32px); align-items: center; overflow: hidden;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  }
  .jf-mobile .call-top { position: absolute; top: 4px; right: 4px; }
  .jf-mobile .callscreen .call-contact { grid-column: 1; grid-row: 1 / 3; align-self: stretch; justify-content: center; max-width: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px; margin: 0; }
  .jf-mobile .callscreen .avatar.lg { width: 50px; height: 50px; font-size: 18px; }
  .jf-mobile .call-name { font-size: 23px; margin-top: 4px; }
  .jf-mobile .call-status { margin-top: 3px; }
  .jf-mobile .call-timer { font-size: 30px; margin-top: 3px; }
  .jf-mobile .waveform { display: none; }
  .jf-mobile .call-controls { grid-column: 2; grid-row: 1; align-self: center; grid-template-columns: repeat(5, minmax(44px, 1fr)); width: 100%; max-width: 330px; margin: 0 auto; gap: 4px; }
  .jf-mobile .cc { min-width: 44px; min-height: 58px; gap: 3px; }
  .jf-mobile .cc-ic { width: 46px; height: 46px; }
  .jf-mobile .call-minicard { grid-column: 1; grid-row: 2; display: none; }
  .jf-mobile .call-hangup-row { grid-column: 2; grid-row: 2; align-self: end; }
  .jf-mobile .hangup-btn { width: 58px; height: 58px; }
  .jf-mobile .incoming-screen .call-contact { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .jf-mobile .incoming-actions { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0; gap: clamp(44px, 10vw, 84px); }
  .jf-mobile .answer-btn, .jf-mobile .incoming-actions .decline-btn { width: 64px; height: 64px; }
  .jf-mobile .dtmf-pad, .jf-mobile .vmdrop-pad {
    display: grid; grid-template-columns: minmax(230px, 1fr) minmax(140px, .7fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 24px; align-items: center; overflow: hidden;
    padding: max(6px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  }
  .jf-mobile .vmdrop-pad::before { display: none; }
  .jf-mobile .dtmf-display, .jf-mobile .vmdrop-head { grid-column: 1; grid-row: 1; margin: 0 0 2px; font-size: 22px; min-height: 24px; text-align: center; }
  .jf-mobile .dtmf-pad .keypad { grid-column: 1; grid-row: 2; width: min(100%, 220px); gap: 2px 12px; padding: 0; }
  .jf-mobile .dtmf-pad .key { width: 44px; height: 44px; }
  .jf-mobile .dtmf-pad .dtmf-close, .jf-mobile .vmdrop-pad .dtmf-close { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center; min-width: 120px; min-height: 48px; margin: 0; }
  .jf-mobile .vmdrop-list { grid-column: 1; grid-row: 2; align-self: stretch; overflow-y: auto; min-height: 0; }
  .jf-mobile .vmdrop-item { min-height: 44px; }
  .jf-mobile .pc-head { padding-top: 8px; padding-bottom: 4px; }
  .jf-mobile .pc-actions { flex-direction: row; padding-top: 8px; }
  .jf-mobile .pc-actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Predictive wrap-up: one quiet line, using the existing sheet typography. */
.pc-predictreason { margin: 0 0 8px; font: inherit; font-size: 12px; line-height: 1.35; color: var(--muted, #5f6e88); }

/* Shared Team navigation uses the existing segmented control on every surface. */
#teamSubtabs { position: static; margin-top: 0; }
#teamSubtabs[hidden], html.jf-thread-open #teamSubtabs { display: none; }
