:root {
  /* one palette (17/11/2026): warm paper + Poggio wine red; every signal colour sits in the same
     earthy family (OKLCH, similar lightness/saturation) so nothing shouts. Status ramp
     ok (olive) -> warn (amber) -> review (terracotta) -> high (wine red) is reused for
     tour size, the busy bars on the day tiles and late arrivals. */
  --bg: #f8f4ed; --panel: #fffdfa; --panel2: #fcf9f4; --line: #e5dfd6; --ink: #25211b; --muted: #797066;
  --accent: #7b2d3b; --accent-ink: #fff; --on-fill: #fff;
  --t: #8a7d70; --ct: #3f73a0; --ll: #b4782c;
  --priv: #7b4977; --priv-bg: #f6eef4; --lang: #21716d; --lang-bg: #e8f3f1;
  --diet: #a23e31; --diet-bg: #f9ebe8; --ok: #518046; --warn: #a77612; --review: #b05925; --high: #a63030;
  --shadow: 0 1px 2px rgba(60,40,20,.06), 0 2px 8px rgba(60,40,20,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181512; --panel: #23201c; --panel2: #2a2621; --line: #39342f; --ink: #efebe4; --muted: #a49d94;
    --accent: #c8737f; --accent-ink: #181512; --on-fill: #181512;
    --t: #b0a295; --ct: #79acd6; --ll: #dfa65c;
    --priv: #c391be; --priv-bg: #33262f; --lang: #70bab5; --lang-bg: #1f302e;
    --diet: #e1897b; --diet-bg: #3a2420; --ok: #85bc79; --warn: #e4b65c; --review: #e49060; --high: #e2726b;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 2px; }
.grow { flex: 1; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; letter-spacing: .2px; color: var(--accent); }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: var(--accent-ink); font-size: 12px; text-align: center; }
.pill { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 10px;
  font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pill .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 7px 14px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--high); }
.btn.ghost { border: 0; background: transparent; color: var(--muted); }
.btn:disabled { opacity: .5; }

/* light-lunch strip */
.llstrip { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); align-items: center; }
.llstrip .lab { font-size: 12px; color: var(--muted); white-space: nowrap; margin-right: 4px; }
.llday { flex: 0 0 auto; min-width: 54px; padding: 4px 6px; border-radius: 8px; background: var(--panel);
  border: 1px solid var(--line); text-align: center; cursor: pointer; font-size: 12px; color: var(--muted); }
.llday b { display: block; font-size: 15px; color: var(--ink); }
.llday.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.llday.high { border-color: var(--high); background: color-mix(in srgb, var(--high) 16%, var(--panel)); }
.llday.sun { opacity: .45; }
.llday.sel { outline: 2px solid var(--accent); }

main { padding: 12px 16px 80px; max-width: 1280px; margin: 0 auto; }

/* day */
.daynav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.daynav h1 { font-size: 22px; margin: 0 8px 0 4px; }
.daynav input[type=date] { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 8px; }
.sumrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sum { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.sum b { color: var(--ink); font-size: 16px; margin-right: 3px; }
.sum.priv { border-color: var(--priv); background: var(--priv-bg); color: var(--priv); }
.sum.priv b, .sum.lang b { color: inherit; }
.sum.lang { border-color: var(--lang); background: var(--lang-bg); color: var(--lang); }
.sum.warn { border-color: var(--warn); } .sum.high { border-color: var(--high); color: var(--high); }
.notes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.note { background: var(--panel2); border: 1px dashed var(--line); border-radius: 10px; padding: 7px 12px; font-size: 14px; cursor: pointer; }
.note.full { border: 1px solid var(--high); color: var(--high); background: var(--diet-bg); font-weight: 600; }
.note .t { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }

.tgroup { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tlabel .tm { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tlabel .sub { font-size: 12px; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: var(--line); margin: 6px 0 3px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--ok); }
.meter.review > i { background: var(--review); }
.cap { font-size: 13px; font-variant-numeric: tabular-nums; }
.cap.review { color: var(--review); font-weight: 700; }
.cap.full { color: var(--high); font-weight: 700; }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lanes.one { grid-template-columns: 1fr; }
.lane h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.lane.priv h4 { color: var(--priv); }
.cards { display: flex; flex-direction: column; gap: 8px; }

.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--t);
  border-radius: 10px; padding: 8px 10px 8px 12px; box-shadow: var(--shadow); cursor: pointer; }
.card.CT { border-left-color: var(--ct); } .card.LL { border-left-color: var(--ll); }
.card.private { background: var(--priv-bg); border-color: color-mix(in srgb, var(--priv) 45%, var(--line)); border-left-width: 5px; }
.card.private.CT { border-left-color: var(--ct); } .card.private.LL { border-left-color: var(--ll); } .card.private.T { border-left-color: var(--t); }
.card.cancelled { opacity: .45; text-decoration: line-through; }
.card .l1 { display: flex; align-items: baseline; gap: 8px; }
.card .nm { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .px { margin-left: auto; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .px small { font-size: 12px; font-weight: 500; color: var(--muted); }
.card .ch { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.card .nt { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: pre-line; max-height: 3.9em; overflow: hidden; }
.chip { font-size: 12px; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--line); background: var(--panel2); color: var(--muted); white-space: nowrap; }
.chip.svc-T { color: var(--t); } .chip.svc-CT { color: var(--ct); border-color: var(--ct); } .chip.svc-LL { color: var(--ll); border-color: var(--ll); }
.chip.priv { background: var(--priv); border-color: var(--priv); color: var(--on-fill); font-weight: 600; }
.chip.lang { background: var(--lang); border-color: var(--lang); color: var(--on-fill); font-weight: 700; }
.chip.diet { background: var(--diet-bg); border-color: var(--diet); color: var(--diet); font-weight: 600; white-space: normal; }
.chip.late { border-color: var(--warn); color: var(--warn); font-weight: 600; }
.chip.pend { border-style: dashed; }
.chip.err { border-color: var(--high); color: var(--high); }

.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.toggle { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }

/* week */
.week { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.week th { font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; padding: 4px 6px; }
.week th.today { color: var(--accent); }
.week th.rowh { width: 92px; }
.week td { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; vertical-align: top; cursor: pointer; font-size: 13px; height: 54px; }
.week td.sun { opacity: .4; }
.week td .big { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.week td.review { border-color: var(--review); background: color-mix(in srgb, var(--review) 12%, var(--panel)); }
.week td.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--panel)); }
.week td.high, .week td.full { border-color: var(--high); background: color-mix(in srgb, var(--high) 12%, var(--panel)); }
.week .mini { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.week .chip { font-size: 11px; padding: 0 5px; }

/* requests & lunch */
.list { display: flex; flex-direction: column; gap: 10px; }
.req { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.req .l1 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.req .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.req .nm { font-weight: 650; }
.req .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.req .cm { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: pre-line; }
.req .cap { margin-top: 4px; }
.sect { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.lunch { width: 100%; border-collapse: collapse; }
.lunch td, .lunch th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; font-size: 14px; }
.lunch th { font-size: 12px; color: var(--muted); font-weight: 600; }
.lunch .n { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; width: 70px; }
.lunch tr.warn .n { color: var(--warn); } .lunch tr.high .n { color: var(--high); }
.lunch .who { color: var(--muted); font-size: 13px; }

/* sheets */
dialog.sheet { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px);
  background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.sheet::backdrop { background: rgba(0,0,0,.35); }
dialog.sheet form { display: contents; }
.sheet-head { display: flex; align-items: center; padding: 14px 16px 6px; }
.sheet-head h2 { margin: 0; font-size: 18px; flex: 1; }
.sheet-body { padding: 6px 16px 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 170px); }
.sheet-foot { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.lbl { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
input, select, textarea { border: 1px solid var(--line); background: var(--panel2); border-radius: 8px; padding: 8px 10px; color: var(--ink); font-size: 16px; }
textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--panel2); padding: 9px 6px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg.small button { padding: 6px 4px; font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--panel2); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chips button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chips button small { color: var(--muted); margin-left: 4px; }
.stepper { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.stepper button { width: 44px; border: 0; background: var(--panel2); font-size: 20px; cursor: pointer; }
.stepper input { flex: 1; min-width: 0; border: 0; border-radius: 0; text-align: center; font-size: 18px; font-weight: 700; background: var(--panel); }
.switch { flex-direction: row; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); align-self: end; padding-bottom: 8px; }
.switch input { width: 20px; height: 20px; }
.warns { display: flex; flex-direction: column; gap: 5px; }
.w { font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.w.ok { color: var(--ok); } .w.warn { border-color: var(--warn); color: var(--warn); }
.w.review { border-color: var(--review); color: var(--review); font-weight: 600; }
.w.high { border-color: var(--high); color: var(--high); font-weight: 600; }
.meta { font-size: 12px; color: var(--muted); margin: 0; }
.more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.more > div { margin-top: 8px; }
.copyrow { display: flex; gap: 6px; } .copyrow input { flex: 1; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; z-index: 50; }

@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 8px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .tgroup { grid-template-columns: 1fr; gap: 6px; }
  .tlabel { display: flex; align-items: center; gap: 10px; }
  .tlabel .meter { flex: 1; margin: 0; }
  .lanes { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .week-wrap { overflow-x: auto; } .week { min-width: 760px; }
}
.row2 > * { min-width: 0; }
.sheet-body > * { flex-shrink: 0; }
label.toggle { flex-direction: row; }
.chip.moved { border-color: var(--warn); color: var(--warn); }
#newBtn { white-space: nowrap; }
.pill .short { display: none; }
@media (max-width: 760px) {
  .pill .long { display: none; } .pill .short { display: inline; }
  .lane.none { display: none; }
  .daynav h1 { font-size: 19px; width: 100%; order: -1; margin-left: 0; }
}

/* arrival: swipe right on a card; ring = arrived / late */
.swipe { position: relative; }
.swipe-bg { position: absolute; inset: 0; border-radius: 10px; display: flex; align-items: center; padding-left: 16px;
  font-weight: 700; color: var(--on-fill); background: color-mix(in srgb, var(--ok) 70%, var(--panel)); opacity: 0; }
.swipe-bg.undo { background: var(--muted); }
.swipe:has(.card.dragging) .swipe-bg { opacity: 1; }
.swipe-bg.ready { background: var(--ok); }
.swipe-bg.undo.ready { background: var(--ink); color: var(--bg); }
.card { touch-action: pan-y; -webkit-user-select: none; user-select: none; transition: transform .18s ease, box-shadow .2s; }
.card.dragging { transition: none; cursor: grabbing; }
.card.arrived { box-shadow: 0 0 0 3px var(--ok); }
.card.late1 { box-shadow: 0 0 0 3px var(--warn); }
.card.late2 { box-shadow: 0 0 0 3px var(--high); }
.card .lateinfo { font-size: 13px; font-weight: 700; color: var(--high); white-space: nowrap; }
.card.late1 .lateinfo { color: var(--warn); }
.chip.here { background: var(--ok); border-color: var(--ok); color: var(--on-fill); font-weight: 700; }
.sum.here { border-color: var(--ok); color: var(--ok); } .sum.here b { color: inherit; }
.cards { gap: 10px; padding: 3px; }
.card { z-index: 1; }

/* team */
.team { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; padding: 8px 10px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.team .lab { font-size: 13px; color: var(--muted); margin-right: 4px; }
.team .meta { width: 100%; }
.tchip { font-size: 13px; border-radius: 7px; padding: 2px 8px; background: var(--panel); border: 1px solid var(--line); }
.tchip small { color: var(--muted); }
.tchip.leaves, .tchip.arrives { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--panel)); }
.tchip.absent { text-decoration: line-through; color: var(--muted); }
.tchip.off { opacity: .45; }
.team #editTeam { margin-left: auto; font-size: 13px; }
.staffline { margin: 4px 0 4px 122px; padding: 4px 10px; font-size: 13px; color: var(--warn);
  border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border-radius: 0 6px 6px 0; cursor: default; }
.staffline[data-id] { cursor: pointer; }
.staffline span { font-weight: 700; margin-right: 8px; font-variant-numeric: tabular-nums; }
.staffline i { color: var(--muted); font-style: normal; }
dialog.sheet.wide { width: min(920px, calc(100vw - 24px)); }
.tscroll { overflow-x: auto; }
.tsched { border-collapse: collapse; }
.tsched th { font-size: 12px; color: var(--muted); text-align: left; padding: 2px 4px; }
.tsched td { padding: 2px; }
.tsched input { width: 88px; padding: 6px; font-size: 14px; }
.tsched td:first-child input { width: 120px; font-weight: 600; }

/* week: one card per day */
.wlegend { margin: -4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wday { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.wday.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.whead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.whead b { font-size: 16px; } .whead span { font-size: 13px; color: var(--muted); }
.wbadges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; min-height: 4px; }
.wllday { font-size: 12px; border-radius: 6px; padding: 1px 7px; border: 1px solid var(--line); }
.wllday.warn { border-color: var(--warn); color: var(--warn); font-weight: 700; }
.wllday.high { border-color: var(--high); color: var(--high); font-weight: 700; }
.wteam { font-size: 12px; color: var(--warn); margin-bottom: 6px; }
.wrow { display: flex; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.wrow.vacant { opacity: .5; }
.wt { width: 40px; flex: 0 0 auto; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 2px; }
.wbody { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wshared { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.wshared small { font-size: 11px; font-weight: 500; color: var(--muted); }
.wshared.review { color: var(--review); } .wshared.full { color: var(--high); }
.wll { font-size: 12px; color: var(--ll); font-weight: 600; }
@media (max-width: 760px) { .staffline { margin-left: 0; } }
.wbody { flex: 1; min-width: 0; }
.wshared.zero { color: var(--muted); font-weight: 500; font-size: 13px; }

/* tours: one column, each tour is a box around its bookings */
.tgroup { grid-template-columns: 110px minmax(0, 1fr); }
.tcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tour { border: 2px solid color-mix(in srgb, var(--ct) 45%, var(--line)); border-radius: 14px; padding: 6px 8px 8px;
  background: color-mix(in srgb, var(--ct) 4%, transparent); }
.tour.review { border-color: var(--review); }
.tour.priv { border-color: var(--priv); background: var(--priv-bg); }
.tour.tasting { border: 1px dashed var(--line); background: transparent; }
.tour.mixed { border-color: var(--high); }
.thead { display: flex; align-items: center; gap: 6px; padding: 0 4px 6px; flex-wrap: wrap; }
.thead .tt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tour.priv .thead .tt { color: var(--priv); }
.tcount { margin-left: auto; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.tcount small { font-size: 12px; font-weight: 500; color: var(--muted); }
.tcount.review { color: var(--review); }
.tmeter { flex: 0 0 70px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tmeter i { display: block; height: 100%; background: var(--ok); }
.tmeter.review i { background: var(--review); }
.tour.priv .tmeter { display: none; }
.card.private { background: var(--panel); }
.chip.op { border-color: var(--t); color: var(--ink); }
.privtxt { color: var(--priv); font-weight: 600; }
.notour { padding: 8px 4px; }
.newtour { visibility: hidden; margin-top: 8px; border: 2px dashed var(--muted); border-radius: 12px; padding: 12px 6px; text-align: center;
  color: var(--muted); font-size: 14px; }
body.dnd .newtour { visibility: visible; }
body.dnd { -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
.drop-ok { border-color: var(--ok) !important; background: color-mix(in srgb, var(--ok) 12%, transparent) !important; }
.drop-no { border-color: var(--high) !important; background: color-mix(in srgb, var(--high) 10%, transparent) !important; }
.card.dnd-src { opacity: .35; }
.card.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; margin: 0; transition: none;
  will-change: transform; box-shadow: 0 14px 34px rgba(0,0,0,.28); }
.card.pressing { transform: scale(.985); transition: transform .3s ease; }
.tour.landing { border-style: dashed; }
.card { -webkit-touch-callout: none; }
.wtour { display: inline-flex; align-items: baseline; gap: 3px; font-size: 13px; border: 1.5px solid color-mix(in srgb, var(--ct) 45%, var(--line));
  border-radius: 8px; padding: 0 6px; }
.wtour b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wtour small { color: var(--muted); font-size: 11px; }
.wtour.review { border-color: var(--review); color: var(--review); }
.wtour.priv { border-color: var(--priv); background: var(--priv-bg); color: var(--priv); }
.wtour .chip { font-size: 10px; padding: 0 4px; }
@media (max-width: 760px) { .tgroup { grid-template-columns: 1fr; } }
.card.armed { transform: scale(1.03); box-shadow: 0 8px 22px rgba(0,0,0,.2); transition: transform .12s ease; }

/* tour size: ≤12 green, 13-16 yellow, 17-20 orange, >20 red */
:root { --t-yellow: var(--warn); --t-orange: var(--review); --t-over: var(--high); }
.tour.yellow { border-color: var(--t-yellow); } .tour.orange { border-color: var(--t-orange); } .tour.over { border-color: var(--t-over); }
.tcount.yellow { color: var(--t-yellow); } .tcount.orange { color: var(--t-orange); } .tcount.over { color: var(--t-over); }
.tmeter.yellow i { background: var(--t-yellow); } .tmeter.orange i { background: var(--t-orange); } .tmeter.over i { background: var(--t-over); }
.wtour.yellow { border-color: var(--t-yellow); color: var(--t-yellow); }
.wtour.orange { border-color: var(--t-orange); color: var(--t-orange); }
.wtour.over { border-color: var(--t-over); color: var(--t-over); background: color-mix(in srgb, var(--t-over) 10%, transparent); }
.w.yellow { border-color: var(--t-yellow); color: var(--t-yellow); }
.w.orange { border-color: var(--t-orange); color: var(--t-orange); font-weight: 600; }
.w.over { border-color: var(--t-over); color: var(--t-over); font-weight: 700; }
@media (max-width: 760px) { .tlabel { flex-wrap: wrap; } .tlabel .newtour { margin: 0 0 0 auto; padding: 8px 10px; } }

/* tasting-room iPad ("host" role) */
body.host .tabs a[data-tab="requests"], body.host .tabs a[data-tab="lunch"] { display: none; }
.ihead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.iname { font-size: 24px; font-weight: 750; line-height: 1.15; }
.imeta { color: var(--muted); margin-top: 4px; font-size: 15px; }
.ipax { font-size: 40px; font-weight: 800; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.ipax small { font-size: 18px; color: var(--muted); } .ipax span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.ichips { display: flex; flex-wrap: wrap; gap: 6px; }
.ichips .chip { font-size: 14px; padding: 3px 9px; }
.idiet { background: var(--diet-bg); border: 1.5px solid var(--diet); color: var(--diet); border-radius: 12px; padding: 10px 12px; font-size: 16px; }
.idiet div { margin-top: 3px; font-weight: 600; white-space: pre-line; }
.inotes { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.inotes div { margin-top: 3px; white-space: pre-line; }
.igrid { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.irow { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.irow > span { color: var(--muted); font-size: 13px; padding-top: 2px; }
.irow a { color: var(--accent); }

/* email */
body.host .tabs a[data-tab="messages"] { display: none; }
.chip.sent { border-color: var(--ok); color: var(--ok); }
.warnTxt { color: var(--high); }
.isum { background: color-mix(in srgb, var(--ct) 9%, var(--panel)); border: 1.5px solid color-mix(in srgb, var(--ct) 50%, var(--line));
  border-radius: 12px; padding: 10px 12px; }
.isum div { white-space: pre-line; margin-top: 4px; }
.thr { cursor: pointer; }
.thr.open { border-left: 4px solid var(--lang); }
.thr .l1 .grow { flex: 1; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; max-width: 88%; background: var(--panel); }
.msg.out { align-self: flex-end; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.msg.request { background: var(--panel2); border-style: dashed; }
.msg.auto { opacity: .6; }
.msg .mh { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.msg .mb { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.msg .mb.full { margin-top: 6px; color: var(--muted); font-size: 13px; max-height: 300px; overflow: auto; }
a.btn { text-decoration: none; color: inherit; display: inline-block; }
a.btn.primary { color: var(--accent-ink); }

.card .icons { font-size: 15px; margin-top: 3px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icons.big { font-size: 20px; margin-top: 6px; }
/* late: the whole card speaks one colour (no green service stripe) */
.card.late1 { border-left-color: var(--warn) !important; }
.card.late2 { border-left-color: var(--high) !important; }
.team .lab.sep { margin-left: 10px; }
.card .icons { text-align: right; margin-top: 4px; }   /* bottom right of the booking */

/* windows: fixed height, title and buttons stay, only the middle scrolls; page behind locked */
dialog.sheet[open] { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); overflow: hidden; }
dialog.sheet[open] > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.sheet-head, .sheet-foot { flex: 0 0 auto; }
.sheet-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; }
html.modal-open, html.modal-open body { overflow: hidden; overscroll-behavior: none; }

/* conversation header built from the web form */
.rqhead { border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 12px; padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--panel)); display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.rq1 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 16px; }
.rq3 { font-style: italic; white-space: pre-line; }
.rqhead a { color: var(--accent); }

/* conversation = chat: messages get the space, a growing one-line reply box at the bottom */
#threadDlg[open] { height: calc(100dvh - 32px); }
#threadDlg .sheet-head { gap: 8px; flex-wrap: wrap; }
.thacts { display: flex; gap: 6px; align-items: center; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.composer { flex: 0 0 auto; display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.composer.hidden { display: none; }
.composer textarea { flex: 1; resize: none; min-height: 40px; border-radius: 20px; padding: 9px 14px; line-height: 1.35; overflow-y: auto; }
.composer .btn { border-radius: 20px; height: 40px; }

/* the current time on today's day view */
.nowline { position: relative; height: 0; border-top: 2px solid var(--high); margin: 6px 0; }
.nowline::before { content: ""; position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--high); }
.nowline span { position: absolute; left: 14px; top: -10px; background: var(--bg); color: var(--high); font-size: 12px;
  font-weight: 700; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* swipe left: no-show / cancel */
.swipe-bg.left { justify-content: flex-end; padding: 0 16px 0 0; background: color-mix(in srgb, var(--muted) 70%, var(--panel)); }
.swipe-bg.left.ready { background: var(--muted); }
.card.noshow { opacity: .55; }
.card.noshow .nm { text-decoration: line-through; }
dialog.sheet.narrow { width: min(420px, calc(100vw - 24px)); }
.actions .btn.big { padding: 14px; font-size: 17px; text-align: left; }
/* week: today stands out */
.wday.today { border: 2.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.todaytag { background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 1px 6px; border-radius: 5px; vertical-align: 2px; }

/* ✨ reply assistant */
.cbtns { display: flex; flex-direction: column; gap: 6px; }
.btn.wand { background: var(--ct); border-color: var(--ct); color: var(--on-fill); border-radius: 20px; height: 40px; font-size: 18px; }
.btn.wand:disabled, .composer .btn.primary:disabled { background: var(--line); border-color: var(--line); color: var(--muted); opacity: 1; cursor: default; }
.btn.wand.busy { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.thwarn { margin: 0 12px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, var(--panel)); font-size: 14px; flex: 0 0 auto; max-height: 30vh; overflow: auto; }
.thwarn.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.thwarn ul { margin: 4px 0 4px 18px; padding: 0; }
.thwarn .wfoot { display: flex; gap: 14px; justify-content: flex-end; font-size: 13px; }
.thwarn a { color: var(--accent); }

/* requests: list left, the request's day on the right */
.reqsplit.open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.reqprev { display: none; }
.reqsplit.open .reqprev { display: block; position: sticky; top: 64px; max-height: calc(100dvh - 80px); overflow-y: auto;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; overscroll-behavior: contain; }
.req[data-rid] { cursor: pointer; }
.req.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pvhead { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tgroup.pv { grid-template-columns: 64px minmax(0, 1fr); padding: 8px 0; }
.tgroup.pv .tm { font-size: 16px; }
.tgroup.reqtime .tm { color: var(--accent); }
.card.pc { box-shadow: none; padding: 6px 10px; cursor: default; }
.card.pc .nm { font-size: 14px; } .card.pc .px { font-size: 16px; }
.card.ghostreq { border: 2px dashed var(--accent) !important; border-left-width: 2px !important; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.card.ghostreq .meta { color: var(--accent); font-weight: 600; }
.tour.newghost { border-style: dashed; }
.card.matched { box-shadow: 0 0 0 3px var(--accent); }
@media (max-width: 900px) { .reqsplit.open { grid-template-columns: 1fr; } .reqsplit.open .reqprev { position: static; max-height: none; } }

/* booking window: ✉ Conversation tab */
#edForm.convmode .sheet-body > *:not(#edKind):not(#edConv) { display: none !important; }
#edForm.convmode .sheet-foot { display: none; }
#edConv { display: flex; flex-direction: column; gap: 10px; }
#edConv.hidden { display: none; }
.ecbar { display: flex; gap: 8px; align-items: center; position: sticky; top: -6px; background: var(--panel); padding: 4px 0; z-index: 2; }
.ecbar input { flex: 1; }
#ecMsgs .msg { max-width: 100%; }
#ecMsgs mark { background: color-mix(in srgb, var(--warn) 30%, var(--panel)); color: var(--ink); border-radius: 3px; padding: 0 1px; }
#infoTabs { min-width: 260px; }
#infoConv { display: flex; flex-direction: column; gap: 10px; }
#infoConv.hidden, #infoBody.hidden, #infoFoot.hidden { display: none; }
#infoConv mark { background: color-mix(in srgb, var(--warn) 30%, var(--panel)); color: var(--ink); border-radius: 3px; padding: 0 1px; }

/* conversation window: left the conversation, right the day */
#threadDlg.conv { width: min(1400px, calc(100vw - 24px)); }
.convgrid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.convleft { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.convright { overflow-y: auto; padding: 10px 14px; background: var(--panel2); overscroll-behavior: contain; min-height: 0; }
.pvnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; position: sticky; top: -10px;
  background: var(--panel2); padding: 6px 0; z-index: 2; }
.pvnav b { font-size: 16px; }
.pvnav .pvdate { padding: 4px 6px; font-size: 14px; }
.thr .gl { font-size: 14px; margin: 3px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 900px) { .convgrid { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 40%); }
  .convleft { border-right: 0; border-bottom: 1px solid var(--line); } }
.card.pc[data-id] { cursor: pointer; }
.card.pc[data-id]:hover { box-shadow: 0 0 0 2px var(--line); }
.pvnav [data-pnew] { white-space: nowrap; }

/* Day view zoom (slider at the bottom + pinch): --s 1 = normal, down to .5 = compact.
   Below .85 notes and tour meters go; below .7 a booking becomes one line. */
#view.dz { --s: 1; }
#view.dz .tgroup { grid-template-columns: calc(110px * var(--s)) minmax(0, 1fr); gap: calc(12px * var(--s)); padding: calc(12px * var(--s)) 0; }
#view.dz .tlabel .tm { font-size: calc(20px * max(var(--s), .75)); }
#view.dz .tlabel .sub { font-size: calc(12px * max(var(--s), .9)); }
#view.dz .staffline { margin-left: calc(122px * var(--s)); margin-top: calc(4px * var(--s)); margin-bottom: calc(4px * var(--s)); }
#view.dz .tcol, #view.dz .cards { gap: calc(10px * var(--s)); }
#view.dz .tour { padding: calc(6px * var(--s)) calc(8px * var(--s)) calc(8px * var(--s)); border-radius: calc(14px * max(var(--s), .7)); }
#view.dz .thead { padding-bottom: calc(6px * var(--s)); }
#view.dz .card { padding: calc(8px * var(--s)) 10px calc(8px * var(--s)) 12px; }
#view.dz .card .nm { font-size: calc(16px * max(var(--s), .85)); }
#view.dz .card .px { font-size: calc(20px * max(var(--s), .75)); }
#view.dz .card .icons { font-size: calc(15px * max(var(--s), .85)); margin-top: calc(4px * var(--s)); }
#view.dz .card .ch { margin-top: calc(5px * var(--s)); }
#view.dz .chip { font-size: calc(12px * max(var(--s), .9)); }
#view.dz.zc1 .card .nt, #view.dz.zc1 .tmeter { display: none; }
#view.dz.zc1 .notour { padding: 2px 4px; }
#view.dz.zc2 .card { display: flex; align-items: center; gap: 8px; }
#view.dz.zc2 .card .l1 { display: contents; }
#view.dz.zc2 .card .nm { flex: 0 1 auto; min-width: 0; order: 1; }
#view.dz.zc2 .card .lateinfo { order: 1; }
#view.dz.zc2 .card .ch { order: 2; flex: 1 1 auto; min-width: 0; margin: 0; flex-wrap: nowrap; overflow: hidden; }
#view.dz.zc2 .card .chip.diet { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#view.dz.zc2 .card .chip.sent, #view.dz.zc2 .card .chip.pend { display: none; }
#view.dz.zc2 .card .icons { order: 3; margin: 0 0 0 auto; flex: 0 0 auto; }
#view.dz.zc2 .card .px { order: 4; margin-left: 0; }
@media (max-width: 760px) { #view.dz .tgroup { grid-template-columns: 1fr; } #view.dz .staffline { margin-left: 0; } }
.zoombar { position: fixed; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow); opacity: .45; transition: opacity .2s; }
.zoombar > :not(.zi) { display: none; }
.zoombar.open, .zoombar:focus-within { opacity: .97; padding: 3px 3px 3px 10px; }
.zoombar.open > :not(.zi), .zoombar:focus-within > :not(.zi) { display: initial; }
@media (hover: hover) {
  .zoombar:hover { opacity: .97; padding: 3px 3px 3px 10px; }
  .zoombar:hover > :not(.zi) { display: initial; }
}
.zoombar input { width: 140px; accent-color: var(--ct); }
.zoombar button { border: 0; background: none; font-size: 17px; line-height: 1; padding: 2px 5px; color: var(--muted); cursor: pointer; }
.zoombar .zi { font-size: 15px; width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.zoombar .zl { font-size: 12px; color: var(--muted); min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; cursor: pointer; }
#view.dz .newtour { margin-top: calc(8px * var(--s)); padding: calc(12px * var(--s) * var(--s)) 6px; font-size: calc(14px * max(var(--s), .85)); }
#view.dz.zc2 .newtour { border-width: 1px; }

/* Tour slot closed on the website: red ring around the whole time slot + 🚫 on it.
   --sweep (registered, so it animates) = how much of the ring a conic mask shows,
   starting at the left (the time label) and going round clockwise. */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
.tgroup { position: relative; }
.closering { position: absolute; inset: 4px -8px; border: 3px solid var(--high); border-radius: 16px; pointer-events: none;
  --sweep: 360deg;
  -webkit-mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0);
          mask: conic-gradient(from -90deg, #000 var(--sweep), transparent 0); }
.closering.draw { animation: ringDraw .95s cubic-bezier(.65, 0, .35, 1) both, ringFlash .9s ease-out .9s; }
.closering.undraw { animation: ringUndraw .65s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes ringDraw { from { --sweep: 0deg; } to { --sweep: 360deg; } }
@keyframes ringUndraw { from { --sweep: 360deg; } to { --sweep: 0deg; } }
@keyframes ringFlash { 0% { background: color-mix(in srgb, var(--high) 14%, transparent); } 100% { background: transparent; } }
.closebadge { position: absolute; top: -10px; right: 22px; z-index: 3; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; line-height: 1; background: var(--panel); border: 2px solid var(--high);
  box-shadow: var(--shadow); cursor: pointer; transition: opacity .2s, transform .2s; }
.closebadge[disabled] { cursor: default; }
.closebadge.ghost { border-color: var(--line); box-shadow: none; opacity: 0; filter: grayscale(1); }
.tgroup:hover .closebadge.ghost { opacity: .55; }
.closebadge.ghost:hover { opacity: 1 !important; filter: none; border-color: var(--high); }
@media (hover: none) { .closebadge.ghost { opacity: .3; } }
.closebadge.pop { animation: badgePop .45s cubic-bezier(.34, 1.56, .64, 1) .85s both; }
.closebadge.fade { animation: badgeFade .3s ease-in both; }
@keyframes badgePop { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes badgeFade { to { transform: scale(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .closering.draw, .closering.undraw, .closebadge.pop { animation-duration: .01s; } }

/* Strip of upcoming days: guests + how busy each part of the day is (11:00 · 13:30 · 16:00) */
.llday { display: flex; flex-direction: column; min-width: 58px; padding: 4px 6px 5px; }
.llday.warn, .llday.high { background: var(--panel); border-color: var(--line); }
.llday b { display: flex; align-items: baseline; gap: 4px; }
.llday .llmini { font-size: 10px; font-weight: 700; color: var(--muted); }
.llday .llmini.warn { color: var(--warn); } .llday .llmini.high { color: var(--high); }
.busybar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 5px; height: 5px; }
.busybar i { border-radius: 3px; background: var(--line); }
.llday.sun .busybar { visibility: hidden; }
/* Day details (stats, team, show cancelled) behind a toggle */
.dmore { margin-left: auto; font-size: 13px; }
.dmore .chev { display: inline-block; transition: transform .2s; }
.dmore.open .chev { transform: rotate(180deg); }
.toggle.showcanc { display: inline-flex; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.thr .markdone { padding: 2px 9px; font-size: 12px; }
.thr.leaving { opacity: 0; transform: translateX(24px); transition: opacity .3s, transform .3s; }
.trtoday { display: inline-flex; gap: 10px; font-size: 16px; font-weight: 600; margin-right: 6px; }
.trtoday small { font-weight: 500; color: var(--muted); font-size: 12px; }
.wtr { margin: -2px 0 6px; }
.wtr .trtoday { font-size: 13px; gap: 8px; }
.wtr .trtoday small { font-size: 11px; }

/* Day in columns: time axis, one block per booking as long as the expected stay */
.viewseg button { padding: 5px 10px; font-size: 13px; white-space: nowrap; }
.collegend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin: 4px 0 10px; }
.collegend .sw { width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; background: var(--svc); }
.collegend .sw:first-child { margin-left: 0; }
.sw.T, .cblock.T { --svc: var(--t); } .sw.CT, .cblock.CT { --svc: var(--ct); } .sw.LL, .cblock.LL { --svc: var(--ll); }
.colwrap { overflow-x: auto; padding: 14px 4px 70px 0; }
.colday { position: relative; margin-left: 50px; min-width: calc(var(--cols) * 128px * var(--s, 1)); }
.chour { position: absolute; left: -50px; right: 0; border-top: 1px solid var(--line); }
.chour span { position: absolute; left: 0; top: -9px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  background: var(--bg); padding-right: 4px; }
.cslotmark { position: absolute; left: -22px; margin-top: -9px; font-size: 13px; }
.cgrid { position: absolute; inset: 0; }
.cgroup { position: absolute; box-sizing: border-box; border: 2px solid color-mix(in srgb, var(--ct) 45%, var(--line));
  border-radius: 12px; margin-top: -5px; padding-bottom: 5px; box-sizing: content-box; pointer-events: none; }
.cgroup.priv { border-color: var(--priv); }
.cgroup.yellow { border-color: var(--t-yellow); } .cgroup.orange { border-color: var(--t-orange); } .cgroup.over { border-color: var(--t-over); }
.cglab { position: absolute; z-index: 1; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg);
  padding: 0 6px; border-radius: 6px; white-space: nowrap; }
.cglab.priv { color: var(--priv); }
.cbwrap { position: absolute; border-radius: 9px; }
.cbwrap .swipe-bg { border-radius: 9px; padding-left: 8px; align-items: flex-start; padding-top: 8px; font-size: 16px; }
.cbwrap .swipe-bg.left { padding: 8px 8px 0 0; }
.cbwrap:has(.cblock.dragging) .swipe-bg { opacity: 1; }
/* while a block is swiped, armed or lifted, it sits above its neighbours */
.cbwrap:has(.cblock.dragging), .cbwrap:has(.cblock.armed), .cbwrap:has(.cblock.pressing) { z-index: 6; }
.cbwrap .cblock.dragging { box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.cblock { position: absolute; inset: 0; box-sizing: border-box; overflow: hidden; cursor: pointer; border-radius: 9px; padding: 5px 7px;
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .18s ease;
  background: color-mix(in oklch, var(--svc) 20%, var(--panel)); border: 1px solid color-mix(in oklch, var(--svc) 45%, var(--line));
  border-left: 6px solid var(--stripe, var(--panel)); font-size: calc(12px * max(var(--s, 1), .8)); line-height: 1.3; }
/* the stripe on the left = status: white, green = arrived, red = late (3+ min, not here yet) */
.cblock.arrived { --stripe: var(--ok); }
.cblock.late1, .cblock.late2 { --stripe: var(--high); }
.cblock.dragging { transition: none; }
.cblock.dnd-src { opacity: .35; }
.cblock.ghost { position: fixed; inset: auto; left: 0; top: 0; z-index: 100; pointer-events: none; transition: none;
  box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.cblock.armed { transform: scale(1.03); box-shadow: 0 8px 22px rgba(0,0,0,.2); z-index: 3; }
.cgroup.drop-ok { border-color: var(--ok) !important; border-style: dashed; }
.cgroup.drop-no { border-color: var(--high) !important; border-style: dashed; }
.cnewtour { position: absolute; left: calc(100% + 8px); width: 104px; box-sizing: border-box; display: flex; align-items: center;
  justify-content: center; text-align: center; margin: 0; padding: 4px; font-size: 12px; border-radius: 10px; }
.colday { margin-right: 120px; }
.cblock .lateinfo { font-weight: 700; color: var(--high); }
.cblock.late1 .lateinfo { color: var(--warn); }
.cblock:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--svc) 60%, transparent); }
.cblock.arrived .cbt b { color: var(--on-fill); background: var(--ok); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.cblock.noshow { opacity: .45; }
.cbt { font-size: .92em; color: var(--muted); font-variant-numeric: tabular-nums; }
.cbn { font-weight: 700; font-size: 1.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbp, .cbx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbx.diet { color: var(--diet); font-weight: 600; }
.cnow { position: absolute; left: -50px; right: 0; border-top: 2px solid var(--high); z-index: 4; pointer-events: none; }
.cnow span { position: absolute; left: 0; top: -9px; font-size: 11px; font-weight: 700; color: var(--on-fill); background: var(--high);
  border-radius: 5px; padding: 0 4px; }

/* Week in columns: shared time axis, one column per day as wide as its busiest moment */
.wkcols { display: flex; gap: 6px; min-width: max-content; }
.wkaxis { flex: 0 0 44px; }
.wkaxis .wkbody { position: relative; }
.wkaxis .chour { left: 0; }
.wkday { flex: 1 0 calc(max(var(--cols), 2) * 56px * var(--s, 1)); min-width: calc(max(var(--cols), 2) * 56px * var(--s, 1));
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.wkday.today { border: 2px solid var(--accent); }
.wkhead { display: flex; flex-direction: column; gap: 1px; height: 64px; box-sizing: border-box; padding: 6px 8px; overflow: hidden;
  color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); font-size: 12px; }
.wkhead b { font-size: 14px; } .wkhead > span { color: var(--muted); white-space: nowrap; }
.wkhead .trtoday { font-size: 12px; gap: 6px; }
.wkaxis .wkhead { border: 0; }
.wkday .wkbody { position: relative; margin: 14px 4px 0; }
.wkday .chour { left: -4px; right: -4px; }
.wkday .cblock { padding: 3px 4px; font-size: calc(11px * max(var(--s, 1), .8)); border-left-width: 3px; border-radius: 6px; }
.wkday .cglab { font-size: 10px; background: var(--panel2); padding: 0 3px; }
.wkday .cgroup { border-radius: 8px; border-width: 1.5px; margin-top: -3px; padding-bottom: 3px; }
.wkaxis .wkbody { margin-top: 14px; }
.wkday .cbn { text-overflow: clip; }
.wkday .cbp { font-weight: 700; }
#view.dz .cnewtour { margin: 0; padding: 4px; font-size: 12px; border-width: 2px; }
/* column view: where a dragged block would start */
.droptime { position: absolute; left: -50px; right: 0; border-top: 2px dashed var(--accent); z-index: 6; pointer-events: none; }
.droptime span { position: absolute; left: 0; top: -10px; font-size: 12px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); border-radius: 5px; padding: 0 5px; }
.colday.drop-ok, .colday.drop-no { border: 0 !important; background: transparent !important; }

/* List cards like the column blocks: the bar on the left is the status (neutral, green = arrived,
   red/amber = late), the service is a light tint of the card. */
.card, .card.CT, .card.LL, .card.private, .card.private.T, .card.private.CT, .card.private.LL { border-left-color: var(--line); }
.card.T, .card.private.T { background: color-mix(in oklch, var(--t) 9%, var(--panel)); }
.card.CT, .card.private.CT { background: color-mix(in oklch, var(--ct) 9%, var(--panel)); }
.card.LL, .card.private.LL { background: color-mix(in oklch, var(--ll) 12%, var(--panel)); }
.card.arrived, .card.private.arrived { border-left-color: var(--ok); }
.card.ghostreq, .card.ghostreq.CT, .card.ghostreq.LL, .card.ghostreq.T { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
