/* The CRM's own look, on the staff app's tokens (tokens.css) and kit (kit.css): a soft
   ground, white floating panels with large corners, navy that leads, and the brand
   pink only for the one primary action of a screen and for what is late. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ds-ground);
  color: var(--ds-ink);
  font-family: var(--ds-font-b);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: var(--ds-font-h); font-weight: 400; line-height: 1.25; margin: 0; }
a { color: var(--ds-navy-text); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.page { max-width: 1280px; margin: 0 auto; padding: 16px; }
body.has-nav .page { padding-bottom: 96px; }
@media (min-width: 900px) { body.has-nav .page { padding-bottom: 24px; } }

/* ── The top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--ds-navy-grad);
  color: var(--ds-on-navy);
}
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; min-height: 44px; }
.brand img { border-radius: 9px; background: #fff; }
.brand-t { font-family: var(--ds-font-h); font-size: 18px; }
.page-title { flex: 1 1 auto; min-width: 0; font-size: 18px; color: rgba(255, 255, 255, .86); overflow-wrap: anywhere; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name { font-weight: 700; overflow-wrap: anywhere; }
.who-role { font-size: 13px; padding: 2px 10px; border-radius: var(--ds-r-pill); background: rgba(255, 255, 255, .16); white-space: nowrap; }
.btn-quiet {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--ds-r-ctl);
  background: transparent; color: inherit; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline;
}
.topnav { display: flex; gap: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border-radius: var(--ds-r-ctl); color: rgba(255, 255, 255, .86); text-decoration: none; font-weight: 600;
}
.nav-link.is-on { background: rgba(255, 255, 255, .16); color: #fff; }
@media (max-width: 899px) {
  .topbar { flex-wrap: wrap; row-gap: 0; }
  .page-title { order: 3; flex-basis: 100%; font-size: 16px; padding-bottom: 4px; }
  .who-role { display: none; }
  .topnav {
    position: fixed; inset: auto 0 0 0; z-index: 30;
    justify-content: space-around; gap: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--ds-surface); box-shadow: 0 -6px 24px color-mix(in srgb, var(--ds-ink) 12%, transparent);
  }
  body:not(.has-nav) .topnav { display: none; }
  .nav-link { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 4px; color: var(--ds-muted); font-size: 13px; text-align: center; }
  .nav-link.is-on { background: var(--ds-soft); color: var(--ds-navy-text); }
}

/* ── Panels, buttons, fields ── */
.panel { background: var(--ds-surface); border-radius: var(--ds-r-panel); padding: 18px; box-shadow: var(--ds-shadow-float); min-width: 0; }
.panel + .panel { margin-top: 14px; }
.stack { display: grid; gap: 12px; min-width: 0; }
.row-gap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.muted { color: var(--ds-muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-ctl);
  background: var(--ds-surface); color: var(--ds-ink);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background var(--ds-t-fast), transform var(--ds-t-fast);
}
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--ds-soft); } }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-busy] { opacity: .6; cursor: progress; }
.btn-primary { background: var(--ds-hot); border-color: var(--ds-hot); color: var(--ds-on-hot); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--ds-hot-hover); } }
.btn-navy { background: var(--ds-navy); border-color: var(--ds-navy); color: var(--ds-on-navy); }
@media (hover: hover) and (pointer: fine) { .btn-navy:hover { background: var(--ds-navy-2); } }
.btn-soft { background: var(--ds-soft); border-color: transparent; }
.btn-danger { color: var(--ds-danger); border-color: color-mix(in srgb, var(--ds-danger) 40%, transparent); }
.btn-big { min-height: 52px; font-size: 17px; border-radius: var(--ds-r-item); }
.btn-text { min-height: 44px; border: 0; background: none; color: var(--ds-navy-text); font: inherit; text-decoration: underline; cursor: pointer; }

.field { display: grid; gap: 4px; min-width: 0; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; color: var(--ds-ink-2); }
.field .req::after { content: ' *'; color: var(--ds-hot-text); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--ds-edge); border-radius: var(--ds-r-ctl);
  background: var(--ds-surface); color: var(--ds-ink); font: inherit; font-size: 16px;
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus-visible, .btn:focus-visible, a:focus-visible, .chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--ds-navy) 45%, transparent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ds-navy); }
.err { color: var(--ds-danger); font-weight: 600; font-size: 14.5px; }
.not-ready { text-align: center; padding: 40px 16px; font-size: 18px; }

.chip {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-pill);
  background: var(--ds-surface); color: var(--ds-ink); font: inherit; font-weight: 600; cursor: pointer;
}
.chip[aria-pressed='true'] { background: var(--ds-navy); border-color: var(--ds-navy); color: var(--ds-on-navy); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--ds-r-pill); font-size: 13px; font-weight: 700; background: var(--ds-soft); color: var(--ds-ink-2); white-space: nowrap; }
.pill[data-tone='green'] { background: var(--ds-ok-soft); color: var(--ds-ok); }
.pill[data-tone='orange'] { background: var(--ds-amber-soft); color: var(--ds-amber); }
.pill[data-tone='pink'] { background: var(--ds-hot-soft); color: var(--ds-hot-text); }
.pill[data-tone='blue'], .pill[data-tone='purple'], .pill[data-tone='teal'] { background: var(--ds-soft); color: var(--ds-navy-text); }

.toast {
  position: fixed; inset: auto 16px 88px 16px; z-index: 50; margin: 0 auto; max-width: 480px;
  padding: 12px 16px; border-radius: var(--ds-r-item);
  background: var(--ds-navy); color: var(--ds-on-navy); font-weight: 600; box-shadow: var(--ds-shadow-pop);
  animation: toast-in var(--ds-t-rise) var(--ds-ease);
}
.toast-err { background: var(--ds-danger); }
@media (min-width: 900px) { .toast { inset: auto 24px 24px auto; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* Dialogs: a sheet from the bottom on a phone, a card in the middle on a desktop. */
dialog.sheet {
  width: min(560px, 100vw); max-width: 100vw; max-height: 92vh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: var(--ds-r-panel) var(--ds-r-panel) 0 0;
  background: var(--ds-surface); color: var(--ds-ink); box-shadow: var(--ds-shadow-pop);
}
dialog.sheet::backdrop { background: color-mix(in srgb, var(--ds-navy) 45%, transparent); }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: var(--ds-r-panel); } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.sheet-head h2 { flex: 1 1 auto; font-size: 20px; min-width: 0; }
.sheet-body { display: grid; gap: 14px; padding: 8px 18px 16px; overflow-y: auto; max-height: calc(92vh - 140px); }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--ds-line); }
.sheet-foot .btn { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.flip { display: inline-flex; transform: scaleX(-1); }
.page-wide { max-width: 1440px; }
.back-link { margin-bottom: 12px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chips-scroll .chip { flex: none; }
.chips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }

/* ── The queue ── */
.q-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1024px) {
  .q-layout { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); }
  .q-list { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding-inline-end: 4px; }
  .q-back { display: none; }
}
@media (max-width: 1023px) {
  body.q-open .q-list { display: none; }
  body:not(.q-open) .q-side { display: none; }
  .q-back { margin-bottom: 10px; }
}
.q-list { display: grid; gap: 14px; min-width: 0; }
.q-panel { display: grid; gap: 12px; }
.q-rows { display: grid; gap: 8px; }
.q-row {
  display: grid; gap: 4px; width: 100%; min-height: 64px; padding: 12px 14px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-r-item);
  background: var(--ds-surface); color: var(--ds-ink); font: inherit; text-align: start; cursor: pointer;
  transition: background var(--ds-t-fast), box-shadow var(--ds-t-fast);
}
@media (hover: hover) and (pointer: fine) { .q-row:hover { background: var(--ds-soft); } }
.q-row.is-open { border-color: var(--ds-navy); box-shadow: inset 4px 0 0 var(--ds-navy); background: var(--ds-soft); }
.q-row.late { border-color: color-mix(in srgb, var(--ds-hot) 45%, transparent); }
.q-main, .q-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.q-name { font-weight: 700; font-size: 16.5px; overflow-wrap: anywhere; min-width: 0; }
.q-sub { color: var(--ds-muted); font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.q-next { font-size: 14px; color: var(--ds-ink-2); font-weight: 600; }
.q-ago { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ds-muted); }
.q-ago.is-late { color: var(--ds-hot-text); font-weight: 700; }
.q-tries { font-size: 13px; padding: 0 8px; border-radius: var(--ds-r-pill); background: var(--ds-amber-soft); color: var(--ds-amber); font-weight: 700; }
.q-later summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; cursor: pointer; }
.q-later[open] summary { margin-bottom: 8px; }
.q-empty-card { min-height: 240px; display: grid; place-items: center; }

/* ── The card ── */
.card { display: grid; gap: 18px; }
.card-head { display: grid; gap: 10px; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.card-title h2 { font-size: 24px; overflow-wrap: anywhere; min-width: 0; }
.card-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 17px; }
.card-contact strong { overflow-wrap: anywhere; }
.card-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.card-quick .btn { flex: 1 1 140px; }
.card-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.card-facts > div { padding: 8px 12px; border-radius: var(--ds-r-sm); background: var(--ds-ground); min-width: 0; }
.card-facts dt { font-size: 12.5px; color: var(--ds-muted); }
.card-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.card-next { background: var(--ds-hot-soft) !important; grid-column: 1 / -1; }
.card-actions { display: grid; gap: 12px; padding: 14px; border-radius: var(--ds-r-card); background: var(--ds-ground); }
.act-label { margin: 0; font-weight: 700; font-size: 14px; color: var(--ds-ink-2); }
.act-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.act-main { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.card-form { display: grid; gap: 10px; padding: 12px; border-radius: var(--ds-r-item); background: var(--ds-surface); }
.card-sec { display: grid; gap: 12px; min-width: 0; }
.card-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.card-fields { gap: 14px; }
.missing { margin: 0; padding: 10px 14px; border-radius: var(--ds-r-item); background: var(--ds-amber-soft); color: var(--ds-amber); font-weight: 700; }
.missing.is-done { background: var(--ds-ok-soft); color: var(--ds-ok); }
.card-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-card); min-width: 0; }
.card-group legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 700; }
.field-wide, .field-check { grid-column: 1 / -1; }
.tick { color: var(--ds-ok); font-size: 13px; font-weight: 700; }
.answers { display: grid; gap: 8px; margin: 0; }
.answers > div { padding: 10px 12px; border-radius: var(--ds-r-sm); background: var(--ds-ground); }
.answers dt { font-size: 14px; color: var(--ds-muted); }
.answers dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.sub { display: grid; gap: 8px; }
.sub-meta { margin: 0; }
.meeting { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--ds-r-item); background: var(--ds-ground); }
.meeting.is-active { background: var(--ds-amber-soft); }
.meeting-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.meeting p { margin: 0; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { display: grid; gap: 2px; padding: 8px 12px; border-inline-start: 3px solid var(--ds-line-strong); }

/* ── The calendar ── */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.cal-range { font-size: 20px; }
@media (max-width: 640px) { .cal-range { order: -1; flex-basis: 100%; text-align: center; } .cal-bar .btn { flex: 1 1 0; } }
.cal-days { margin-bottom: 12px; }
@media (min-width: 900px) { .cal-days { display: none; } }
.cal-agent { display: grid; gap: 12px; }
.cal-week { display: grid; gap: 10px; }
@media (min-width: 900px) { .cal-week { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 899px) { .cal-day:not(.is-sel) { display: none; } }
.cal-day { display: grid; align-content: start; gap: 8px; padding: 10px; border-radius: var(--ds-r-item); background: var(--ds-ground); min-width: 0; }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--ds-navy-mid); }
.cal-day-h { font-size: 15px; font-family: var(--ds-font-b); font-weight: 700; }
.cal-free { margin: 0; }
.cal-block {
  display: grid; gap: 2px; padding: 0 10px 10px; border-radius: var(--ds-r-sm);
  background: var(--ds-surface); color: var(--ds-ink); text-decoration: none; box-shadow: inset 4px 0 0 var(--ds-navy); overflow: hidden; min-width: 0;
}
.cal-block.is-other { box-shadow: inset 4px 0 0 var(--ds-line-strong); }
.cal-travel { margin: 0 -10px 4px; padding: 3px 10px; font-size: 12px; color: var(--ds-muted); background: repeating-linear-gradient(135deg, var(--ds-soft) 0 6px, transparent 6px 12px); }
.cal-time { font-size: 15px; }
.cal-what { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 639px) {
  .cal-bar .cal-range { order: -1; flex-basis: 100%; text-align: center; }
  .cal-bar .btn { flex: 1 1 0; }
}
.cal-days { flex-wrap: wrap; overflow: visible; }
.cal-bar .btn { white-space: nowrap; }

/* ── The field agent's day ── */
.day-agents { margin-bottom: 12px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; margin-bottom: 14px; border-radius: var(--ds-r-card); background: var(--ds-surface); box-shadow: var(--ds-shadow-float); max-width: 520px; }
.tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: var(--ds-r-item); background: transparent; color: var(--ds-muted); font: inherit; font-weight: 700; cursor: pointer; }
.tab[aria-selected='true'] { background: var(--ds-navy); color: var(--ds-on-navy); }
#today, #tomorrow, #followups { max-width: 760px; }
#tomorrow { margin-top: 14px; }
.meet-card, .fu-card { display: grid; gap: 10px; padding: 12px; border-radius: var(--ds-r-card); background: var(--ds-ground); }
.meet-card.is-open, .fu-card.is-open { box-shadow: inset 0 0 0 2px var(--ds-navy-mid); }
.meet-row, .fu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 4px;
  border: 0; background: none; color: var(--ds-ink); font: inherit; text-align: start; cursor: pointer;
}
.meet-time { flex: none; display: grid; place-items: center; min-width: 64px; min-height: 52px; padding: 0 8px; border-radius: var(--ds-r-item); background: var(--ds-navy); color: var(--ds-on-navy); font-family: var(--ds-font-h); font-size: 19px; }
.meet-main { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.meet-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.meet-sub { color: var(--ds-muted); font-size: 14px; overflow-wrap: anywhere; }
.meet-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.meet-actions .btn { padding-inline: 8px; }
.meet-brief, .fu-body { display: grid; gap: 12px; padding: 14px; border-radius: var(--ds-r-item); background: var(--ds-surface); }
.meet-brief h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.brief-facts { display: grid; gap: 8px; margin: 0; }
.brief-facts > div { padding: 8px 12px; border-radius: var(--ds-r-sm); background: var(--ds-ground); }
.brief-facts dt { font-size: 13px; color: var(--ds-muted); }
.brief-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.brief-answers summary, .cl-summary summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.cl-steps { display: grid; gap: 6px; padding: 12px; border-radius: var(--ds-r-item); background: var(--ds-ground); }
.cl-pre { margin: 0; padding: 12px; border-radius: var(--ds-r-sm); background: var(--ds-ground); font: inherit; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.meet-row, .fu-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.meet-row > .pill, .fu-row > .pill { grid-column: 2; justify-self: start; }
.fu-row { grid-template-columns: minmax(0, 1fr); }
.fu-row > .pill { grid-column: 1; }
@media (min-width: 640px) {
  .meet-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .meet-row > .pill { grid-column: 3; }
  .fu-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fu-row > .pill { grid-column: 2; }
}

/* ── The manager ── */
.m-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1024px) { .m-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.m-col { display: grid; gap: 16px; min-width: 0; }
.m-col > .panel + .panel { margin-top: 0; }
.m-row { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--ds-r-item); background: var(--ds-ground); }
.m-row p { margin: 0; }
.m-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.m-name { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; overflow-wrap: anywhere; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.note-ok { margin: 0; color: var(--ds-ok); font-weight: 700; }
.f-month { display: grid; gap: 8px; }
.f-month h3 { font-size: 17px; }
.f-month p { margin: 0; }
.f-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.f-table th, .f-table td { padding: 8px 10px; text-align: start; border-bottom: 1px solid var(--ds-line); }
.f-table thead th { font-size: 13px; color: var(--ds-muted); font-weight: 600; }
.f-table td { font-family: var(--ds-font-h); font-size: 17px; }
.f-table tr.is-total th, .f-table tr.is-total td { font-weight: 700; background: var(--ds-ground); }
@media (max-width: 639px) {
  .f-table thead { display: none; }
  .f-table, .f-table tbody, .f-table tr { display: block; }
  .f-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px; margin-bottom: 8px; border-radius: var(--ds-r-item); background: var(--ds-ground); }
  .f-table th[scope='row'] { grid-column: 1 / -1; border: 0; padding: 0 0 4px; }
  .f-table td { display: grid; align-content: space-between; border: 0; padding: 0; font-size: 18px; }
  .f-table td::before { content: attr(data-label); font-family: var(--ds-font-b); font-size: 12px; color: var(--ds-muted); }
}
/* A narrow phone: two buttons a row, so "WhatsApp" fits inside its button. */
@media (max-width: 420px) { .meet-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .meet-actions .nav { grid-column: 1 / -1; } }

/* ── Feeling native on a phone (15.10.2026) ──────────────────────────────────
   No grey flash on tap, no 300ms wait, no text selected by a long press on a control,
   no page pulled down by mistake, and every control answers the moment the finger
   lands (not when it leaves). Motion as on iOS: springs in app/motion.js. */
html { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, a, [role='button'], .chip, .q-row, .meet-row, .fu-row, .tab, .nav-link { touch-action: manipulation; }
button, .btn, .chip, .tab, .nav-link, .q-row, .meet-row, .fu-row, .k-add, .k-line {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.btn, .chip, .tab, .nav-link, .k-add { transition: transform 120ms var(--ds-ease), background 120ms, box-shadow 120ms; }
.q-row, .meet-row, .fu-row { transition: transform 140ms var(--ds-ease), background 140ms, box-shadow 140ms; }
.btn:active, .chip:active, .tab:active, .nav-link:active, .k-add:active { transform: scale(0.96); }
.q-row:active, .meet-row:active, .fu-row:active { transform: scale(0.985); }
.sheet-body, .q-list { overscroll-behavior: contain; }

/* Glass bars: the content scrolls under them. The blur sits on a layer behind the top
   bar, not on the bar itself: a backdrop-filter on the bar would make it the frame of the
   phone's bottom menu (position: fixed inside it), and the menu would jump to the top. */
.topbar { top: env(safe-area-inset-top, 0px); background: transparent; }
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ds-navy-2) 92%, transparent), color-mix(in srgb, var(--ds-navy) 95%, transparent));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08);
}
@media (max-width: 899px) {
  .topnav {
    background: color-mix(in srgb, var(--ds-surface) 78%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--ds-ink) 8%, transparent);
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }
}

/* Sheets: app/motion.js moves them (a spring, the finger); the page behind dims with them. */
dialog.sheet { will-change: transform; }
dialog.sheet::backdrop { background: rgba(7, 20, 51, calc(var(--dim, 1) * .5)); }
.sheet-grab { display: none; }
@media (max-width: 639px) {
  dialog.sheet { box-shadow: 0 -10px 40px -10px rgba(7, 20, 51, .35); }
  .sheet-grab { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 999px; background: var(--ds-line-strong); }
  .sheet-grab, .sheet-head { touch-action: none; cursor: grab; }
  .sheet-head { padding-top: 10px; }
}

/* Moving between pages: a soft cross-fade with a small rise. (No view-transition-name on
   the top bar: it would make the bar its own backdrop root and stop its blur.) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 160ms ease-out both; }
::view-transition-new(root) { animation: vt-in 280ms var(--ds-ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .btn:active, .chip:active, .tab:active, .nav-link:active, .k-add:active, .q-row:active, .meet-row:active, .fu-row:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar::before { background: var(--ds-navy); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topnav { background: var(--ds-surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* ── One app (app/app.js) ── */
.view { min-width: 0; }
/* Full screen from the home screen: the bar reaches under the clock and the notch. */
.topbar { top: 0; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }

/* A queue row that swipes: its buttons wait under it, on the left (Hebrew). */
.q-swipe { position: relative; overflow: hidden; border-radius: var(--ds-r-item); }
.q-swipe > .q-row { position: relative; z-index: 1; touch-action: pan-y; }
.q-acts { position: absolute; inset-block: 0; left: 0; display: flex; direction: ltr; }
.q-act {
  width: 74px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: inherit; font-size: 13px; font-weight: 700; color: #FFFFFF; text-decoration: none; cursor: pointer;
}
.q-act-no { background: #B45F00; }
.q-act-call { background: var(--ds-ok); }
.q-act:disabled { opacity: .6; }
.q-swipe:not(.is-swiping) .q-acts { visibility: hidden; }
