/* Layout: fixed purple-tinted sidebar (logo, sections, Jenna status) beside a scrolling work area; on phones the sidebar becomes a top nav strip. Contacts open in a right-hand drawer. */
:root {
  --bg: #faf9fd;
  --surface: #ffffff;
  --sunken: #f1eef9;
  --side: #f5f1fd;
  --fg: #1a1530;
  --muted: #6b6585;
  --line: #e4e0f0;
  --accent: #6d28d9;
  --accent-ink: #ffffff;
  --accent-soft: #efe8fc;
  --good: #1b8a5a;
  --good-soft: #def3e9;
  --warn: #b36b00;
  --warn-soft: #fbeed6;
  --bad: #c2362f;
  --bad-soft: #fbe3e1;
  --shadow: 0 10px 30px rgba(30, 20, 60, .12);
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120f1c; --surface: #1a1626; --sunken: #221d31; --side: #161222; --fg: #ece9f5; --muted: #a39cba;
    --line: #2f2942; --accent: #a78bfa; --accent-ink: #160f2b; --accent-soft: #2a2045;
    --good: #4cc48d; --good-soft: #14301f; --warn: #f0b04a; --warn-soft: #33260e;
    --bad: #f07a72; --bad-soft: #3a1b19; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120f1c; --surface: #1a1626; --sunken: #221d31; --side: #161222; --fg: #ece9f5; --muted: #a39cba;
  --line: #2f2942; --accent: #a78bfa; --accent-ink: #160f2b; --accent-soft: #2a2045;
  --good: #4cc48d; --good-soft: #14301f; --warn: #f0b04a; --warn-soft: #33260e;
  --bad: #f07a72; --bad-soft: #3a1b19; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* shell */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); height: calc(100vh - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 22px; padding: 18px 14px 18px max(14px, env(safe-area-inset-left, 0px)); }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 9px; padding: 0 6px; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand .ai { color: var(--accent); }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--accent-soft); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.nav .badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--surface); color: var(--accent); border-radius: 99px; padding: 1px 7px; }
.nav a[aria-current="page"] .badge { background: var(--accent-ink); color: var(--accent); }
.nav .badge:empty { display: none; }
.me { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.me strong { color: var(--fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .av { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.chip.person { background: var(--sunken); color: var(--fg); }
.chip.o-demo { background: var(--accent-soft); color: var(--accent); }
.chip.top { background: var(--warn-soft); color: var(--warn); }
.av-sm { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-weight: 700; font-size: 11px; flex: none; }
.reps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.rep-h { display: flex; align-items: center; gap: 10px; }
.rep-h .av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.rep-h .nm { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.rep-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rep-stats div { background: var(--surface); padding: 8px 10px; display: grid; }
.rep-stats b { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.rep-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.repsel { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 13px; }
tr.me-row td { background: var(--accent-soft); }
.status { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 4px; font-size: 13px; }
.status .row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.status .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status.on .pulse { background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.status .sub { color: var(--muted); }

.work { min-width: 0; display: flex; flex-direction: column; }
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 14px; padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.bar h1 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.bar .subtitle { color: var(--muted); font-size: 13px; margin-right: auto; }
.bar .titles { display: grid; margin-right: auto; min-width: 0; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { flex: 1 1 220px; width: 260px; max-width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 12px; color: var(--muted); font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 14px; font-weight: 500; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.danger.armed { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

main { padding-block: 22px 48px; padding-left: 24px; padding-right: max(24px, env(safe-area-inset-right, 0px)); display: grid; gap: 20px; align-content: start; }
.sec { display: grid; gap: 18px; align-content: start; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.panel h2 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.panel h2 .more { margin-left: auto; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
.panel .hint { color: var(--muted); margin: 0; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

/* summary */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 14px 16px; display: grid; gap: 2px; }
.stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat .val { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.stat.alert .val { color: var(--bad); }
.stat.hl .val { color: var(--accent); }

.notice { padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--fg); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin-right: 4px; }
.fchip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.fchip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.fchip .n { margin-left: 6px; opacity: .7; }

/* board */
.board-wrap { overflow-x: auto; padding-bottom: 6px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(230px, 1fr)); gap: 12px; min-width: min-content; }
.col { background: var(--sunken); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; border: 2px solid transparent; }
.col.drop { border-color: var(--accent); }
.col-h { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 4px; }
.col-h h3 { font-family: var(--font-display); font-size: 13px; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; display: inline-block; }
.col-h .cnt { color: var(--muted); font-size: 12px; }
.col-h .sum { margin-left: auto; color: var(--muted); font-size: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; text-align: left; width: 100%; cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card .nm { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card .co { color: var(--muted); font-size: 13px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; }
.card .val { font-weight: 600; }
.empty-col { color: var(--muted); font-size: 12px; padding: 10px 4px; text-align: center; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--sunken); color: var(--muted); white-space: nowrap; }
.chip.overdue { background: var(--bad-soft); color: var(--bad); }
.chip.today { background: var(--warn-soft); color: var(--warn); }
.chip.fresh, .chip.ex { background: var(--accent-soft); color: var(--accent); }
.chip.called, .chip.done { background: var(--good-soft); color: var(--good); }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.chip.o-interested, .chip.o-answered { background: var(--good-soft); color: var(--good); }
.chip.o-callback, .chip.o-voicemail { background: var(--warn-soft); color: var(--warn); }
.chip.o-not-interested, .chip.o-wrong-number { background: var(--bad-soft); color: var(--bad); }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.qbtn { border: 1px solid var(--accent); background: var(--surface); color: var(--accent); border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.qbtn:hover { background: var(--accent-soft); }
.qbtn.main { background: var(--accent); color: var(--accent-ink); }
.qbtn.ghost { border-color: var(--line); color: var(--muted); }
.qbtn:disabled { opacity: .5; cursor: wait; }
.quick .done { font-size: 12px; font-weight: 600; color: var(--good); }
.quick .q-prompt { display: grid; gap: 6px; width: 100%; }
.quick .q-cmt { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-height: 52px; resize: vertical; font-size: 13px; }
.quick .q-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.stage-sel { margin-left: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 12px; }

/* tables & lists */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
td.wrap { white-space: normal; min-width: 220px; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; background: var(--sunken); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--sunken); }
tbody tr:last-child td { border-bottom: 0; }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; }
.rows .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .sub { color: var(--muted); font-size: 13px; }
.rows .grow { flex: 1; min-width: 0; display: grid; }
.rows .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }
.rows button.link { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.bars { display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: 110px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.barrow .track { background: var(--sunken); border-radius: 99px; height: 10px; overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 99px; background: var(--accent); }
.barrow .n { text-align: right; color: var(--muted); }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 36px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty h2 { font-family: var(--font-display); margin: 0; font-size: 19px; }
.empty p { margin: 0; color: var(--muted); max-width: 48ch; }

/* forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.field textarea { resize: vertical; min-height: 70px; }
.field .help { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 8px; align-items: center; }
.phone-row { display: flex; gap: 6px; }
.phone-row input { flex: 1; }
.phone-row .btn { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions .spacer { margin-left: auto; }
.msg { font-size: 13px; color: var(--muted); }
.msg.err { color: var(--bad); }
.dup { grid-column: 1 / -1; background: var(--bad-soft); border-radius: 8px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dup .btn { padding: 4px 10px; }
.script-box { width: 100%; min-height: 340px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.55; resize: vertical; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(15, 10, 30, .38); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); z-index: 21; box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.dr-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(14px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 14px 18px; border-bottom: 1px solid var(--line); }
.dr-h h2 { font-family: var(--font-display); font-size: 18px; margin: 0; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 4px 8px; color: var(--muted); border-radius: 6px; }
.x:hover { background: var(--sunken); }
.dr-b { overflow-y: auto; padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) 18px; display: grid; gap: 22px; align-content: start; }
.sec-h { font-family: var(--font-display); font-size: 14px; font-weight: 600; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.log-form { display: grid; gap: 8px; background: var(--sunken); border-radius: 8px; padding: 10px; }
.log-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.log-form select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.log-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 60px; resize: vertical; }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 12px; white-space: pre-line; }
.timeline .kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.timeline .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline .empty-log { grid-template-columns: 1fr; color: var(--muted); }
.cmt-form { display: grid; gap: 8px; }
.cmt-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-height: 56px; resize: vertical; }
.cmts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.cmts li { background: var(--sunken); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; }
.cmts .by { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.cmts .by strong { color: var(--fg); font-weight: 600; }
.cmts .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmts .none { background: none; padding: 0; color: var(--muted); }

/* ask ai */
.ai-panel { gap: 14px; }
.ai-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-log { display: grid; gap: 10px; max-height: 58vh; overflow-y: auto; align-content: start; }
.ai-log:empty { display: none; }
.ai-msg { padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 85%; }
.ai-msg.u { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.ai-msg.a { justify-self: start; background: var(--sunken); border-bottom-left-radius: 4px; }
.ai-msg.e { justify-self: start; background: var(--bad-soft); color: var(--bad); }
.ai-msg.t { justify-self: start; font-size: 12px; font-weight: 600; color: var(--good); padding: 0 12px; }
.ai-form { display: flex; gap: 8px; align-items: flex-end; }
.ai-form textarea { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); resize: vertical; min-height: 44px; }

/* calendar */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-head h2 { margin-right: auto; flex-basis: 100%; }
.cal-head .btn { padding: 5px 11px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; text-align: center; padding: 2px 0; }
.cal-day { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; min-height: 86px; padding: 5px 6px; display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; overflow: hidden; }
.cal-day:hover { border-color: var(--accent); }
.cal-day.out { opacity: .45; }
.cal-day .n { font-weight: 600; font-size: 12px; }
.cal-day.today .n { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 6px; align-self: flex-start; }
.cal-day.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.cal-ev { font-size: 11px; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-day.sel .cal-ev { background: var(--surface); }
.cal-more { font-size: 11px; color: var(--muted); }
.cal-dot { display: none; }
.cal-tl { position: relative; border-top: 1px solid var(--line); margin-left: 66px; }
.cal-hr { height: 56px; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; }
.cal-hr:hover { background: var(--sunken); }
.cal-hr .lab { position: absolute; left: -66px; top: -8px; width: 58px; text-align: right; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal-hr.half { border-bottom-style: dashed; }
.cal-blk { position: absolute; border-radius: 6px; background: var(--accent); color: var(--accent-ink); padding: 3px 7px; font-size: 12px; overflow: hidden; text-align: left; border: 1px solid var(--surface); display: grid; align-content: start; gap: 0; line-height: 1.3; }
.cal-blk b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-blk span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-blk.k-call { background: #3d8bd9; color: #fff; }
.cal-blk.k-meeting { background: var(--good); color: #fff; }
.cal-blk.k-other { background: var(--muted); color: #fff; }
.cal-now { position: absolute; left: -6px; right: 0; height: 2px; background: var(--bad); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.cal-sum { color: var(--muted); font-size: 13px; margin: -4px 0 4px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 500; }
.slot:hover { border-color: var(--accent); color: var(--accent); }
.slot[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.slot:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.appt { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; }
.appt:first-child { border-top: 0; }
.appt .t { font-weight: 600; color: var(--accent); }
.appt .who { font-weight: 600; }
.appt .sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 1000px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 820px) {
  .cal-day { min-height: 48px; align-items: center; padding: 4px 2px; }
  .cal-ev, .cal-more { display: none; }
  .cal-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; padding: 0 4px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { font-size: 16px; padding: 0; }
  .brand .logo { width: 28px; height: 28px; }
  .brand .word { display: none; }
  .nav { display: flex; gap: 4px; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .nav a svg { display: none; }
  .status, .me { display: none !important; }
  .bar { position: static; }
  .bar-in, main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .form { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .barrow { grid-template-columns: 90px 1fr 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
