/* Area: schedule — calendar, tours, showing log, homes, open houses.
   Tokens only (see next.css :root). No text under 14px. */

/* ---------- calendar ---------- */
.cal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.cal-side { position: sticky; top: 150px; }
button.ev { display: block; width: 100%; text-align: left; border: 0; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer; color: inherit; }
button.ev.key { color: var(--on-dark); }
.ev svg { width: 16px; height: 16px; margin-left: 4px; }
.ev-sub { opacity: .85; font-weight: 500; }
.ev-flag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--card); color: var(--olive-deep); font-size: 14px; font-weight: 700; }
.ev.busy { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--card-2) 6px 12px); color: var(--ink-2); }
.ev.tour { background: var(--olive); color: var(--on-dark); }
.day { position: relative; }
.day-add { margin-top: auto; align-self: flex-start; width: 34px; height: 34px; border-radius: 50%; border: 1.5px dashed var(--line); background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.day-add:hover { border-color: var(--ink-3); color: var(--ink); }
.day-add svg { width: 16px; height: 16px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.month-h { font-size: 14px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; padding: 0 6px; }
.mcell { min-height: 116px; background: var(--card); border-radius: var(--r-sm); padding: 10px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.mcell b { font-size: 18px; font-weight: 800; }
.mcell.out { background: var(--card-2); box-shadow: none; }
.mcell.out b { color: var(--ink-3); }
.mcell.today { outline: 2.5px solid var(--olive); }
.mdot { font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 6px; border-radius: 6px; background: var(--olive-tint); }
.mdot.task { background: var(--sunk); }
.mdot.tour { background: var(--olive); color: var(--on-dark); }
.mdot.key { background: var(--ink); color: var(--on-dark); }
.more-n { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.dayview { display: flex; flex-direction: column; gap: 16px; }
.hours { display: flex; flex-direction: column; }
.hour-row { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 0; border-top: 1.5px solid var(--line); }
.hour-row:first-child { border-top: 0; }
.hour-row .time { font-weight: 800; font-size: 15px; }

/* ---------- forms ---------- */
.seg { display: inline-flex; background: var(--sunk); border-radius: var(--pill); padding: 4px; gap: 4px; align-self: flex-start; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 10px 20px; border-radius: var(--pill); font-weight: 700; font-size: 15px; color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 3px solid var(--olive); outline-offset: 2px; }
/* the sheet's Type row (Tovah, 2026-10-03): equal pills across the sheet, each on one line at 390px */
.seg.seg-type { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-self: stretch; width: 100%; box-sizing: border-box; }
.seg-type label { min-width: 0; }
.seg-type span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; box-sizing: border-box; text-align: center; white-space: nowrap; }
/* the sheet's bottom: the submit pinned, full width, over the sheet's own padding (next.css sets the phone's safe area) */
/* The Save row is sticky and opaque, so whatever sits above it needs room or it reads as cut off
   (Tovah, 2026-10-04: "note box is getting cut off" on the calendar Edit sheet). The gap above it is
   real space, and on a phone the negative margins match the phone sheet's own padding, not 30px. */
.sched-foot { position: sticky; bottom: 0; z-index: 2; display: grid; gap: 10px; margin: 18px -30px -30px; padding: 14px 30px 30px; background: var(--card); }
.phone .sched-foot { margin: 18px -20px calc((env(safe-area-inset-bottom) + 24px) * -1); padding: 14px 20px calc(env(safe-area-inset-bottom) + 24px); }
.sched-form textarea { min-height: 96px; }
.sched-foot .actions { justify-content: center; }
/* the plain line under one field */
.field-err { margin-top: -4px; }
/* the pick field (views/calendar.js pickField): one search box, the rows under it, a hidden value */
.pick { position: relative; }
.pick-opts { max-height: 320px; overflow-y: auto; margin-top: 2px; }
.pick-opts .row { width: 100%; text-align: left; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.pick-opts .row[aria-pressed="true"] { background: var(--olive-tint); box-shadow: inset 3px 0 0 var(--olive); }
.pick-opts .pick-new { font-weight: 700; gap: 8px; }
.pick-opts .pick-new svg { width: 18px; height: 18px; }
.pick.picked .pick-q { font-weight: 700; }
.pick-new-in { margin-top: 2px; }
.pick-empty { margin: 14px 16px; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; }
.check-row input { width: 22px; height: 22px; accent-color: var(--olive); flex: none; }
.field em, .field span em { font-style: normal; font-weight: 600; color: var(--ink-3); }
.form-err { margin: 0; padding: 12px 16px; border-radius: var(--r-sm); background: var(--alert-soft); color: var(--alert); font-weight: 700; font-size: 15px; }
.guests { border: 0; padding: 0; margin: 0; }
.guests legend { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.sched-form[data-kind="task"] .only-event, .sched-form[data-kind="event"] .only-task { display: none; }
.sched-form[data-allday="1"] .timed { display: none; }
.sched-form[data-video="1"] .not-video { display: none; }
.sched-form[data-person=""] .only-person { display: none; }
.sched-form[data-kind="showing"] .only-oh, .sched-form[data-kind="open_house"] .only-showing { display: none; }
.field-ta { width: 100%; min-height: 90px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--card); padding: 12px 14px; font-size: 16px; line-height: 1.5; resize: vertical; }
.field-ta:focus { outline: 0; border-color: var(--olive); }

/* ---------- tours ---------- */
.stop-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 46px; gap: 10px; align-items: end; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.stop { display: flex; gap: 14px; align-items: center; }
.stop .photo { border-radius: var(--r-sm); }
.stop .photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- homes ---------- */
.sent-row { padding: 10px 0; border-top: 1.5px solid var(--line); }
.sent-row:first-child { border-top: 0; padding-top: 0; }
.note-form { display: flex; gap: 8px; margin: 8px 0 0 50px; flex-wrap: wrap; }
.note-form input { flex: 1; min-width: 160px; min-height: 44px; border-radius: var(--pill); border: 1.5px solid var(--line); padding: 0 16px; background: var(--card); font-size: 15px; }
.note-form input:focus { outline: 0; border-color: var(--olive); }
.note-form .form-err { flex-basis: 100%; }
.link-photo img { max-width: 260px; border-radius: var(--r-sm); }
[aria-pressed="true"].btn-line { border-color: var(--olive); color: var(--olive-deep); background: var(--olive-tint); }

/* ---------- open houses ---------- */
.oh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.oh-photo { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }
.qr-wrap { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px; max-width: 240px; margin: 0 auto 14px; }
.qr { display: block; width: 100%; height: auto; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.result-grid .stat { min-width: 0; padding: 14px; }
.result-grid .stat b { font-size: 28px; }
.visit-row { border-top: 1.5px solid var(--line); }
.visit-row:first-of-type { border-top: 0; }
.visit-row .visit { border-top: 0; }
.visit-row.open { background: var(--card-2); margin: 0 -16px; padding: 0 16px 16px; border-radius: var(--r-md); }
.visit-form { padding-top: 4px; }
.chip.radio { position: relative; cursor: pointer; }
.chip.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip.radio:has(input:checked) { background: var(--olive); border-color: var(--olive); color: var(--on-dark); }
.chip.radio:has(input:focus-visible) { outline: 3px solid var(--olive); outline-offset: 2px; }
.checkin fieldset { border: 0; padding: 0; margin: 0; }
.checkin legend { margin-bottom: 8px; }
.checkin legend.small { font-weight: 700; color: var(--ink-2); }

@media (max-width: 1180px) {
  .cal-grid, .oh-grid { grid-template-columns: 1fr; }
  .cal-side { position: static; }
}
.phone .stop-row { grid-template-columns: 1fr 46px; }
.phone .stop-row .field:first-child { grid-column: 1 / -1; }
.phone .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phone .hour-row { grid-template-columns: 76px 1fr; }
.phone .visit { grid-template-columns: 48px minmax(0, 1fr); }
.phone .visit > .actions { grid-column: 1 / -1; }

.link-row { display: flex; gap: 10px; align-items: flex-end; }
.link-row .btn { min-height: 50px; }
.field input.needs { border-color: var(--alert); box-shadow: 0 0 0 3px var(--alert-soft); }
.phone .link-row { flex-direction: column; align-items: stretch; }

/* sharing a home */
.share-row { background: var(--card-2); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.source-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--olive); }
.home-hero .main-p { aspect-ratio: 4 / 3; border-radius: var(--r-lg); }

/* ============ Calendar (redesign, Tovah 2026-09-25: "this page looks like shit") ============ */
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: var(--card-2); border-radius: var(--r-xl); padding: 24px 28px; margin-bottom: 14px; }
.cal-head .display { font-size: clamp(40px, 4.4vw, 60px); }
.cal-head .display .soft { font-size: .7em; }
.cal-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-actions { display: flex; align-items: center; gap: 10px; }
/* the view switch is the same track as a sheet's .seg (Task · Event · Document): sunk pill, the chosen one a card */
.cal-seg { display: inline-flex; background: var(--sunk); border-radius: var(--pill); padding: 4px; gap: 4px; }
.cal-seg a { padding: 9px 16px; border-radius: var(--pill); text-decoration: none; font-weight: 700; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cal-seg a.on, .cal-seg a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
/* ★ a phone (Tovah, 2026-10-03: "Open houses" was cut to "Ope"): the track is a two-row grid, Day · Week · Month over
   Tours · Open houses, every pill whole and 44px tall; the switch, then the date nav, then settings + the primary */
/* ⚠️ 2026-10-22: this row WRAPS, it is not a two-column grid. Tovah, on a phone: "there should be a
   button to advance the next month. But it is covered up by the sun button. So there's no way to
   advance to the next month." There was a button - `<a aria-label="Later">` has been in cal-head the
   whole time - and it was underneath the settings control.
   ★ The cause is the one this repo keeps meeting: the nav sat in a `minmax(0, 1fr)` track holding
   three controls (Earlier, Today, Later) that will not shrink below their content, so it spilled out
   of its own column and into the next one. Grid tracks do not clip and grid items do not push each
   other aside; the actions column simply painted on top of the overflow, because it comes later in the
   DOM. A hidden control, not a broken one.
   ★ So: a wrapping flex row. Nothing overlaps because flex items cannot overlap, and the actions drop
   to a line of their own only on a screen too narrow to hold both - rather than always costing a row. */
.phone .cal-tools { display: flex; flex-wrap: wrap; align-items: center; width: 100%; gap: 12px 8px; }
.phone .cal-tools .cal-seg { flex: 1 0 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: 100%; box-sizing: border-box; border-radius: 22px; }
.phone .cal-tools .cal-seg a { grid-column: span 2; justify-content: center; min-height: 44px; padding: 8px 6px; box-sizing: border-box; min-width: 0; }
.phone .cal-tools .cal-seg a:nth-child(n + 4) { grid-column: span 3; }
/* ⚠️ `flex: none` on both: a shrinking nav squashes the three dates controls instead of wrapping, which
   is the same disappearing act in a different costume. */
.phone .cal-tools .cal-nav { flex: none; justify-content: flex-start; }
.phone .cal-tools .cal-actions { flex: none; margin-left: auto; justify-content: flex-end; }
.phone .cal-tools .cal-nav + .cal-actions .btn { padding-left: 14px; padding-right: 14px; }
/* Tours has no date nav, so the primary takes the width it would have shared */
.phone .cal-tools .cal-seg + .cal-actions { flex: 1 0 100%; margin-left: 0; }
.phone .cal-tools .cal-seg + .cal-actions .btn { flex: 1; justify-content: center; }
.cal-seg .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--olive); color: var(--on-dark); font-size: 14px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 4px 12px; }
.leg { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.leg::before { content: ''; width: 12px; height: 12px; border-radius: 4px; background: var(--c); }

/* item colors: the one legend */
.k-event { --c: var(--sage); --cf: var(--ink); }
.k-task { --c: var(--butter); --cf: var(--ink); }
.k-key { --c: var(--ink); --cf: var(--on-dark); }
.k-tour { --c: var(--sky); --cf: var(--ink); }
.k-busy { --c: var(--sunk); --cf: var(--ink-2); }

.citem { display: flex; align-items: baseline; gap: 6px; width: 100%; min-width: 0; text-align: left; border: 0; font: inherit; font-size: 14px; line-height: 1.3;
  background: var(--c); color: var(--cf); border-radius: 8px; padding: 5px 8px; text-decoration: none; cursor: pointer; }
.citem .ct { flex: none; font-weight: 800; }
.citem .cx { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.citem svg { width: 14px; height: 14px; flex: none; align-self: center; }
.citem.past { opacity: .55; }
.citem.k-busy { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--card-2) 6px 12px); cursor: default; }
.citem:hover:not(.k-busy) { filter: brightness(.97); }
.cm-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-dayview .citem .cx, .hour-row .citem .cx { white-space: normal; }

/* month */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.cm-h { padding: 12px 12px 10px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: var(--card-2); }
.cm-cell { min-height: 150px; padding: 8px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-cell:nth-child(7n + 1) { border-left: 0; }
.cm-cell.out { background: var(--card-2); }
.cm-cell.out .cm-num { color: var(--ink-3); }
.cm-cell.is-past:not(.out) { background: color-mix(in srgb, var(--card-2) 60%, var(--card)); }
.cm-num { align-self: flex-start; display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px; font-weight: 800; font-size: 16px; text-decoration: none; color: var(--ink); }
.cm-num:hover { background: var(--sunk); }
.cm-cell.is-today .cm-num { background: var(--olive); color: var(--on-dark); }
.cm-more { font-size: 14px; font-weight: 700; color: var(--olive); text-decoration: none; padding: 2px 8px; }

/* week */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.cw-day { background: var(--card); border-radius: var(--r-md); padding: 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); min-width: 0; }
.cw-day.is-past { background: var(--card-2); box-shadow: none; }
.cw-day.is-today { outline: 2.5px solid var(--olive); }
.cw-h { display: flex; justify-content: space-between; align-items: baseline; text-decoration: none; color: var(--ink); padding: 2px 4px 6px; }
.cw-h span { font-size: 14px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.cw-h b { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.cw-day .citem .cx { white-space: normal; }

/* settings sheet rows */
.sync-row { display: flex; align-items: center; gap: 14px; background: var(--card-2); border-radius: var(--r-md); padding: 14px; flex-wrap: wrap; }
.sync-row .grow { flex: 1; min-width: 200px; }

.phone .cal-head { padding: 18px; }
.phone .cal-month { font-size: 14px; }
.phone .cm-cell { min-height: 76px; padding: 4px; }
.phone .cm-cell .citem .ct { display: none; }
.phone .cal-week { grid-template-columns: 1fr; }
.phone .cw-day { min-height: 0; }
/* month items: time on top, the title gets two full lines */
.cal-month .citem { flex-direction: column; align-items: stretch; gap: 1px; padding: 5px 8px 6px; }
.cal-month .citem .ct { font-size: 14px; font-weight: 800; opacity: .85; }
.cal-month .citem .cx { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.citem.past { opacity: .7; }
.leg::before { width: 14px; height: 14px; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
/* Aero palette: tours in olive so they stand apart from the calm neutrals */
.k-tour { --c: var(--olive); --cf: var(--on-dark); }
.k-event { --c: var(--olive-soft); --cf: var(--ink); }

.citem .ck { flex: none; display: inline-grid; align-self: flex-start; }
.citem .ck svg { width: 14px; height: 14px; }
.cal-month .citem .ck { position: absolute; right: 6px; top: 6px; }
.cal-month .citem { position: relative; padding-right: 24px; }
.info-dl { display: grid; grid-template-columns: 110px 1fr; gap: 14px 18px; margin: 4px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.info-dl dt { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.info-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* clean pass: no extra box around the calendar head; the day view shows each time once */
.cal-head { background: transparent; padding: 0; border-radius: 0; }
.hour-row .citem .ct { display: none; }

/* ---------- tour stops: the home picker (Tovah, 2026-09-25) ---------- */
/* a stop: a card; Home 1 and the remove control on top, the home pick field, Time, the note for that home */
.stop-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--card); display: grid; gap: 14px; min-width: 0; }
.stop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stop-card .field { min-width: 0; }
/* a home row in the stop's list: the photo row picks it, Details opens the home */
.pick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding-right: 12px; border-bottom: 1px solid var(--line); }
.pick-row:last-child { border-bottom: 0; }
.pick-row .row { border: 0; }
.pick-row .row[aria-pressed="true"] .pick-img { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick-img { width: 64px; height: 48px; border-radius: var(--r-sm); object-fit: cover; flex: none; display: grid; place-items: center; background: var(--sunk); color: var(--ink-3); }
.pick-details { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.pick-details:hover { border-color: var(--ink-3); }
.phone .pick-row { grid-template-columns: 1fr; padding: 0 0 8px; }
.phone .pick-details { justify-self: start; margin-left: 16px; }
.pick-arr svg { width: 16px; height: 16px; transform: rotate(-45deg); }
.sched-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cal-seg-top { margin-bottom: 24px; }
.cal-seg-top { display: flex; width: max-content; max-width: 100%; }

/* ---------- soft leads ---------- */
.soft-list { display: grid; }
.soft-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.soft-row:first-child { padding-top: 0; }
.soft-row:last-child { border-bottom: 0; padding-bottom: 0; }
.soft-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.soft-t b { font-size: 17px; }
.phone .soft-row { grid-template-columns: auto minmax(0, 1fr); }
.phone .soft-row .actions { grid-column: 1 / -1; }

/* ---------- open-house visitors: how to reach them ---------- */
.visit-contact { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-weight: 600; margin-top: 2px; }
.visit-contact a { color: var(--ink-2); }
.oh-welcome textarea { min-height: 140px; }
/* ---------- one tour (Tovah, 2026-10-03): back link, the tour's name as the title, one action row ---------- */
.tour-title { min-width: 0; }
.tour-back { display: inline-block; margin-bottom: 12px; white-space: nowrap; font-size: 15px; }
.tour-name { text-transform: none; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tour-who { flex-wrap: wrap; }
.phone .tour-head { gap: 16px; }
.phone .tour-head .tour-name { font-size: 30px; }
.phone .tour-head .tour-name .soft { margin-top: 6px; font-size: 18px; }
.phone .tour-who { width: 100%; }

/* ===== calendar: simple lines, one row per item — icon · title · time (Tovah, 2026-09-25) ===== */
.leg::before { display: none; }
.leg { gap: 6px; }
.ci { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--ink-2); }
.ci svg { width: 15px; height: 15px; }
.ci-key, .ci-tour { color: var(--accent); }
.ci-busy { color: var(--ink-3); }
.cal-month { box-shadow: none; border: 1px solid var(--line); border-radius: var(--r-lg); }
.cm-h { background: transparent; border-bottom: 1px solid var(--line); text-align: right; padding: 12px 12px 10px; }
.cm-cell { padding: 8px 8px 10px; gap: 2px; min-height: 140px; }
.cm-cell.out, .cm-cell.is-past:not(.out) { background: transparent; }
.cm-cell.out { opacity: .45; }
.cm-num { align-self: flex-end; min-width: 30px; height: 30px; font-size: 16px; }
.citem, .cal-month .citem { flex-direction: row; align-items: center; gap: 7px; padding: 3px 4px; border-radius: 6px; background: transparent !important; color: var(--ink) !important; border: 0; box-shadow: none; }
.citem .cx, .cal-month .citem .cx { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; }
.citem .ct, .cal-month .citem .ct { flex: none; margin-left: auto; font-weight: 600; font-size: 14px; color: var(--ink-2); opacity: 1; font-variant-numeric: tabular-nums; }
.citem:hover:not(.k-busy) { background: var(--sunk) !important; filter: none; }
.citem.k-busy .cx { color: var(--ink-2); font-weight: 600; }
.citem.past { opacity: .5; }
.cw-day .citem, .hour-row .citem, .cal-dayview .citem { padding: 6px 8px; }
.cal-dayview .citem .cx, .hour-row .citem .cx, .cw-day .citem .cx { white-space: normal; }
.phone .cm-cell .citem .ct { display: none; }
.phone .cm-cell .citem .cx { font-size: 14px; }
/* Task · Event · Document (2026-09-29, laid out 2026-10-03): a document is its own thing; only its three fields show
   (Client, Document, Due), and the task's and event's fields only on their tabs. A hidden error line stays hidden. */
.sched-form:not([data-kind="doc"]) .only-doc { display: none; }
.sched-form[data-kind="doc"] .not-doc, .sched-form[data-kind="doc"] .only-task, .sched-form[data-kind="doc"] .only-event,
.sched-form[data-kind="doc"] .check-row, .sched-form[data-kind="doc"] .seg.only-task, .sched-form[data-kind="doc"] .guests { display: none; }
.sched-form .field-err[hidden] { display: none; }

/* ⚠️ The QR on its own (Tovah, 2026-10-07: "hide the leads or have the qr code be the whole screen
   when clicked"). The agent hands this screen to a stranger at the door, so the visitor list must
   not be behind it. It is not an overlay: ohPage returns THIS INSTEAD of the page, so there is
   nothing underneath to show through. These rules only size it. */
.qr-only {
  min-height: 72vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px 16px; position: relative; text-align: center;
}
.qr-only-code {
  /* no colour here: qrSvg() paints its own white ground and carries a 4 module quiet zone inside the
     SVG, which is what a scanner actually needs. The frame is just the card, so it wears the look. */
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px;
  width: min(74vmin, 460px);
}
.qr-only-code .qr { width: 100%; height: auto; }
.qr-only-where { font-size: 22px; font-weight: 700; margin: 0; }
.qr-only-how { font-size: 16px; color: var(--ink-2); margin: 0; }
.qr-only-x {
  position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: inherit; cursor: pointer;
}
.qr-only-x:hover { background: var(--sunk); }

/* the code in the sidebar is the button that opens it */
button.qr-wrap { display: block; width: 100%; cursor: pointer; font: inherit; color: inherit; text-align: center; }
button.qr-wrap:hover { border-color: var(--ink-3); }
.qr-wrap-hint { display: block; font-size: 14px; color: var(--ink-2); margin-top: 8px; }
