/* fz-calendar.css — Calendar — month/week/day, event chips, day drawer. Owner: calendar agent (ops-calendar.jsx).
   Loaded AFTER nova-shell.css (see index.php), so equal-specificity rules here win.
   Light is the base theme; dark lives under [data-theme="dark"] (app.jsx always sets it on <html>).

   Sections
     0. Tone plumbing (chip / row / section / legend colours → --fz-* status tokens)
     1. Page header controls (range toggle, ‹ Today ›, CTAs)
     2. Toolbar (mode, client, Filters disclosure, legend with counts, label chips)
     3. Month / week grid (cells, day number, today, quick-add, chips, +N more, mix bar)
     4. Day drawer + Day view (summary, sections, rows, notes)
     5. Floating cards (peek, quick add, label editor)
     6. Responsive (≤1100, ≤768, ≤640 dot collapse)

   Only --fz-* tokens. Colour carries meaning together with a word (legend, pills,
   section titles, chip tooltips) — never alone. No opacity dimming of text. */


/* ═══ 0. TONE PLUMBING ══════════════════════════════════════════════════════
   One local alias set per toned element, pointing at the kit status tokens. */
.fz-cal-chip, .fz-cal-row, .fz-cal-sec, .fz-cal-mix-dot, .fz-cal-note, .fz-cal-swd, .fz-cal-cell, .fz-cal-dot, .fz-cal-pill-x {
  --fz-k: var(--fz-neutral); --fz-k-soft: var(--fz-neutral-soft); --fz-k-ink: var(--fz-neutral-ink);
}
.fz-cal-chip.is-ok, .fz-cal-row.is-ok, .fz-cal-sec.is-ok, .fz-cal-mix-dot.is-ok, .fz-cal-note.is-ok, .fz-cal-swd.is-ok, .fz-cal-cell.is-ok, .fz-cal-dot.is-ok, .fz-cal-pill-x.is-ok
  { --fz-k: var(--fz-ok); --fz-k-soft: var(--fz-ok-soft); --fz-k-ink: var(--fz-ok-ink); }
.fz-cal-chip.is-warn, .fz-cal-row.is-warn, .fz-cal-sec.is-warn, .fz-cal-mix-dot.is-warn, .fz-cal-note.is-warn, .fz-cal-swd.is-warn, .fz-cal-cell.is-warn, .fz-cal-dot.is-warn, .fz-cal-pill-x.is-warn
  { --fz-k: var(--fz-warn); --fz-k-soft: var(--fz-warn-soft); --fz-k-ink: var(--fz-warn-ink); }
.fz-cal-chip.is-crit, .fz-cal-row.is-crit, .fz-cal-sec.is-crit, .fz-cal-mix-dot.is-crit, .fz-cal-note.is-crit, .fz-cal-swd.is-crit, .fz-cal-cell.is-crit, .fz-cal-dot.is-crit, .fz-cal-pill-x.is-crit
  { --fz-k: var(--fz-crit); --fz-k-soft: var(--fz-crit-soft); --fz-k-ink: var(--fz-crit-ink); }
.fz-cal-chip.is-info, .fz-cal-row.is-info, .fz-cal-sec.is-info, .fz-cal-mix-dot.is-info, .fz-cal-note.is-info, .fz-cal-swd.is-info, .fz-cal-cell.is-info, .fz-cal-dot.is-info, .fz-cal-pill-x.is-info
  { --fz-k: var(--fz-info); --fz-k-soft: var(--fz-info-soft); --fz-k-ink: var(--fz-info-ink); }
.fz-cal-chip.is-violet, .fz-cal-row.is-violet, .fz-cal-sec.is-violet, .fz-cal-mix-dot.is-violet, .fz-cal-note.is-violet, .fz-cal-swd.is-violet, .fz-cal-cell.is-violet, .fz-cal-dot.is-violet, .fz-cal-pill-x.is-violet
  { --fz-k: var(--fz-violet); --fz-k-soft: var(--fz-violet-soft); --fz-k-ink: var(--fz-violet-ink); }
.fz-cal-chip.is-neutral, .fz-cal-row.is-neutral, .fz-cal-sec.is-neutral, .fz-cal-mix-dot.is-neutral, .fz-cal-note.is-neutral, .fz-cal-swd.is-neutral, .fz-cal-cell.is-neutral, .fz-cal-dot.is-neutral, .fz-cal-pill-x.is-neutral
  { --fz-k: var(--fz-neutral); --fz-k-soft: var(--fz-neutral-soft); --fz-k-ink: var(--fz-neutral-ink); }
/* 8 Oct 2026 — teal = Google Calendar mirror (read-only events from the team's Google calendar). */
.fz-cal-chip.is-teal, .fz-cal-row.is-teal, .fz-cal-sec.is-teal, .fz-cal-mix-dot.is-teal, .fz-cal-note.is-teal, .fz-cal-swd.is-teal, .fz-cal-cell.is-teal, .fz-cal-dot.is-teal, .fz-cal-pill-x.is-teal
  { --fz-k: var(--fz-teal); --fz-k-soft: var(--fz-teal-soft); --fz-k-ink: var(--fz-teal-ink); }

.fz-cal { display: flex; flex-direction: column; gap: var(--fz-gap); min-width: 0; }
.fz-cal > .fsw-err { margin: 0; }


/* ═══ 1. PAGE HEADER CONTROLS ═══════════════════════════════════════════════
   Shared page-header spec (fz-base.css, QA polish 3 Oct): title + one sub line,
   no eyebrow, and EVERY control in the action row is var(--fz-ctl-h) tall —
   40px desktop, 44px at ≤768 — like Today / Clients / Posted / My Week / Team.
   The two segmented tracks (range toggle, ‹ Today ›) are 4 + (ctl-h − 8) + 4,
   the same recipe fz-base gives a header tab track. */
.fz-cal .fz-cal-head h1 { font-variant-numeric: tabular-nums; }
.fz-cal .fz-cal-head .fz-viewtog { box-sizing: border-box; height: var(--fz-ctl-h); }
.fz-cal .fz-cal-head .fz-viewtog-b { height: calc(var(--fz-ctl-h) - 2 * var(--fz-s-1)); }
.fz-cal-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: var(--fz-s-1);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  flex: none;
}
[data-theme="dark"] .fz-cal-nav { background: var(--fz-surface-sunken); box-shadow: inset 0 0 0 1px var(--fz-border); }
.fz-cal-navb,
.fz-cal-navt {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  height: calc(var(--fz-ctl-h) - 2 * var(--fz-s-1));
  margin: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fz-cal-navb { width: calc(var(--fz-ctl-h) - 2 * var(--fz-s-1)); padding: 0; }
.fz-cal-navt { padding: 0 var(--fz-s-3); }
.fz-cal-navb:hover, .fz-cal-navt:hover { background: var(--fz-surface-1); color: var(--fz-text-1); box-shadow: var(--fz-shadow-soft); }
[data-theme="dark"] .fz-cal-navb:hover, [data-theme="dark"] .fz-cal-navt:hover { background: var(--fz-surface-3); box-shadow: none; }
.fz-cal-navb:focus-visible, .fz-cal-navt:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 1px; border-radius: var(--fz-r-pill); }
:root .xcs-app .fz-cal .xcs-pagehead-cta > .fz-cal-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--fz-ctl-h);
  min-height: var(--fz-ctl-h);
  padding: 0 var(--fz-s-4) 0 var(--fz-s-3);
}


/* ═══ 2. TOOLBAR ════════════════════════════════════════════════════════════
   Sits on the page like the Clients / Posted / Team toolbars (QA polish 3 Oct:
   it was the only toolbar wrapped in a surface card): row 1 = mode · client ·
   Filters ▾; row 2 = legend (dots + words + counts, which is also the colour
   key) with the period total; row 3 (disclosure) = only mine · completed ·
   label chips. */
.fz-cal-tools {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-3);
  min-width: 0;
}
.fz-cal-tools-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-2) var(--fz-s-3);
  min-width: 0;
}
.fz-cal-client {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-2);
  height: 36px;
  max-width: 260px;
  min-width: 0;
  padding: 0 var(--fz-s-7) 0 var(--fz-s-3);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-sunken);
  color: var(--fz-text-3);
  transition: border-color var(--fz-t-fast) var(--fz-ease);
  cursor: pointer;
}
.fz-cal-client:hover { border-color: var(--fz-border-strong); }
.fz-cal-client:focus-within { border-color: var(--fz-focus); box-shadow: 0 0 0 1px var(--fz-focus); }
.fz-cal-client.is-on { border-color: var(--fz-accent-line); background: var(--fz-accent-soft); }
.fz-cal-client .fz-cav { flex: none; }
.fz-cal .fz-cal-client select,
[data-theme="dark"] .fz-cal .fz-cal-client select {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 var(--fz-s-7) 0 calc(var(--fz-s-3) + 20px + var(--fz-s-2));
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  color: var(--fz-text-1);
  font: inherit;
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  text-overflow: ellipsis;
  cursor: pointer;
  outline: none;
}
.fz-cal .fz-cal-client select option { color: initial; background: initial; }
/* Lebar label mengikuti teks pilihan: span tak terlihat tidak ada, jadi
   lebarnya dipatok — cukup untuk nama klien terpanjang yang wajar. */
.fz-cal-client { width: 220px; }
.fz-cal-client-caret { position: absolute; right: var(--fz-s-3); color: var(--fz-text-3); pointer-events: none; }
/* 24 Nov 2026 — pemilih sumber: Workspace calendar / Google Calendar (tidak lagi tercampur). */
.fz-cal-client.fz-cal-src { width: 236px; }
/* 24 Nov 2026 — pemilik: "buat dropdown kalender ada di sidebar seperti page absensi". Di desktop sumber
   dipilih dari grup Calendar di sidebar; dropdown ini hanya tampil saat sidebar menjadi laci (≤768px). */
@media (min-width: 769px) { .fz-cal .fz-cal-tools .fz-cal-src { display: none; } }
.fz-cal-src > .fsw-ic:first-child { color: var(--fz-text-2); }
.fz-cal-src.is-g { border-color: color-mix(in srgb, var(--fz-teal) 45%, var(--fz-border)); background: color-mix(in srgb, var(--fz-teal) 10%, var(--fz-surface-1)); }
.fz-cal-src.is-g > .fsw-ic:first-child { color: var(--fz-teal); }
.fz-cal-ftog {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--fz-s-2);
  height: 36px;
  padding: 0 var(--fz-s-3) 0 var(--fz-s-4);
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-1);
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-medium);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), border-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fz-cal-ftog:hover { background: var(--fz-surface-hover); border-color: var(--fz-border-strong); color: var(--fz-text-1); }
.fz-cal-ftog[aria-expanded="true"] { background: var(--fz-surface-2); color: var(--fz-text-1); border-color: var(--fz-border-strong); }
.fz-cal-ftog.has-on { color: var(--fz-accent-ink); border-color: var(--fz-accent-line); background: var(--fz-accent-soft); font-weight: var(--fz-fw-semi); }
.fz-cal-ftog-n {
  display: inline-grid;
  place-items: center;
  min-width: var(--fz-s-5);
  height: var(--fz-s-5);
  padding: 0 6px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-accent);
  color: var(--fz-text-on-accent);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
}
.fz-cal-ftog-c { color: var(--fz-text-3); transition: transform var(--fz-t-fast) var(--fz-ease); }
.fz-cal-ftog[aria-expanded="true"] .fz-cal-ftog-c { transform: rotate(180deg); }
.fz-cal-ftog:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; border-radius: var(--fz-r-pill); }

/* Row 2 = legend with counts (the colour key AND the period's mix),
   left-aligned at every width; the period total closes it on the right. */
.fz-cal-tot {
  margin-left: auto;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  color: var(--fz-text-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* Google Calendar sync line at the end of the legend row (8 Oct 2026). */
.fz-cal-gsync { display: inline-flex; align-items: center; gap: var(--fz-s-1); color: var(--fz-text-3); font-size: var(--fz-fs-meta); white-space: nowrap; }
.fz-cal-gsync.is-err { color: var(--fz-crit-ink); }
.fz-cal-gsync button { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--fz-accent-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fz-cal-mix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-1) var(--fz-s-4);
  min-width: 0;
  padding: 0 var(--fz-s-1);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  color: var(--fz-text-2);
}
.fz-cal-mix-i { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fz-cal-mix-i b { font-weight: var(--fz-fw-semi); color: var(--fz-text-1); font-variant-numeric: tabular-nums; }
.fz-cal-mix-i.is-zero, .fz-cal-mix-i.is-zero b { color: var(--fz-text-3); }
.fz-cal-mix-dot { width: var(--fz-s-2); height: var(--fz-s-2); border-radius: var(--fz-r-pill); background: var(--fz-k); flex: none; }
/* Posting key (QA r2): the KIND is marked by the paper-plane icon, not by a
   colour — a posting item's colour is its state (Posted green, Scheduled blue,
   Missed red…), the same as on Today, Posted and the Posting schedule. */
.fz-cal-mix-ico { flex: none; color: var(--fz-text-2); }
/* Notes key = a mini note chip (soft amber + dashed amber edge), not a dot —
   in Posting mode the amber dot already means "Awaiting client". */
.fz-cal-mix-dot.is-note { width: 12px; height: 10px; border-radius: 3px; background: var(--fz-k-soft); box-shadow: none; outline: 1px dashed var(--fz-k); outline-offset: -1px; }

/* Disclosure row. */
.fz-cal-tools-f {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-2) var(--fz-s-3);
  padding-top: var(--fz-s-3);
  border-top: 1px solid var(--fz-border);
  animation: fzCalIn var(--fz-t-med) var(--fz-ease);
}
@keyframes fzCalIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* View toggles on their own line, label chips below — no divider left
   dangling when the chips wrap. */
.fz-cal-fgrp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-2);
  flex: 1 1 100%;
}
.fz-cal-labels { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fz-s-2); min-width: 0; }
.fz-cal-lpair { display: inline-flex; align-items: center; gap: var(--fz-s-1); flex: none; }
.fz-cal-lchip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--fz-border);
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-1);
  overflow: hidden;
  transition: border-color var(--fz-t-fast) var(--fz-ease), background-color var(--fz-t-fast) var(--fz-ease);
}
.fz-cal-lchip:hover { border-color: var(--fz-border-strong); }
.fz-cal-lchip.is-on { background: var(--fz-surface-2); }
.fz-cal-lchip-t,
.fz-cal-lchip-m {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.fz-cal-lchip-t {
  gap: var(--fz-s-2);
  padding: 0 var(--fz-s-2) 0 var(--fz-s-3);
  color: var(--fz-text-1);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  white-space: nowrap;
}
.fz-cal-lchip.is-off .fz-cal-lchip-t { color: var(--fz-text-3); font-weight: var(--fz-fw-medium); text-decoration: line-through; text-decoration-color: var(--fz-border-strong); }
.fz-cal-lchip.is-off .fsw-label-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fz-border-strong); }
.fz-cal-lchip-m { justify-content: center; width: 28px; padding: 0; color: var(--fz-text-3); border-left: 1px solid var(--fz-border); }
.fz-cal-lchip-m:hover { background: var(--fz-surface-hover); color: var(--fz-text-1); }
.fz-cal-lchip-t:focus-visible, .fz-cal-lchip-m:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: -2px; }
.fz-cal-lbtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--fz-s-3);
  border: 1px dashed var(--fz-border-strong);
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  white-space: nowrap;
  cursor: pointer;
}
.fz-cal-lbtn:hover:not(:disabled) { background: var(--fz-surface-hover); color: var(--fz-text-1); }
.fz-cal-lbtn.is-quiet { border-color: transparent; color: var(--fz-text-2); }
.fz-cal-lbtn:disabled { color: var(--fz-text-3); cursor: default; }
.fz-cal-lbtn:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }
.fz-cal-ldot { flex: none; }


/* ═══ 3. MONTH / WEEK GRID ══════════════════════════════════════════════════
   Each day is its own rounded tile on the page canvas (reference: the calendar
   dashboard) — depth from surface contrast, not grid lines. */
.fz-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--fz-s-2);
  min-width: 0;
}
.fz-cal-dow {
  padding: var(--fz-s-1) var(--fz-s-3) 0;
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fz-text-3);
}
.fz-cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 148px;
  padding: var(--fz-s-2) var(--fz-s-2) var(--fz-s-2);
  border: 1px solid transparent;
  border-radius: var(--fz-r-md);
  background: var(--fz-surface-1);
  box-shadow: var(--fz-shadow-soft);
  cursor: pointer;
  transition: background-color var(--fz-t-fast) var(--fz-ease), border-color var(--fz-t-fast) var(--fz-ease);
}
[data-theme="dark"] .fz-cal-cell { box-shadow: none; }
.fz-cal-cell:hover { border-color: var(--fz-border-strong); }
.fz-cal-cell:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 2px; }
/* Week: tall enough for 8 chips; sparse modes (Operations / Posting) no longer
   leave 400px of empty white per day. */
.fz-cal-grid.is-week .fz-cal-cell { min-height: 300px; }
/* Out-of-month: a recessed well, number in --fz-text-3 — no opacity. In light
   the well (surface-2 #F5F4F0) is ~1.0:1 on the canvas (#F4F2ED), so it gets a
   hairline edge or the tile vanishes and its chips float on the page; dark
   reads by surface contrast alone. Hover still lifts the edge; today (another
   month's today) keeps its accent outline (the .is-today rule comes later). */
.fz-cal-cell.is-other { background: var(--fz-surface-2); box-shadow: none; border-color: var(--fz-border); }
.fz-cal-cell.is-other:hover { border-color: var(--fz-border-strong); }
[data-theme="dark"] .fz-cal-cell.is-other { background: var(--fz-surface-sunken); }
[data-theme="dark"] .fz-cal-cell.is-other:not(.is-today):not(:hover) { border-color: transparent; }
.fz-cal-cell.is-other .fz-cal-dn { color: var(--fz-text-3); }
/* Today: lime number disc + accent outline (the "selected date" lime). */
.fz-cal-cell.is-today { border-color: var(--fz-accent-line); box-shadow: inset 0 0 0 1px var(--fz-accent-line); }
.fz-cal-cell.is-today .fz-cal-dn { background: var(--fz-accent); color: var(--fz-text-on-accent); }
/* Operations mode: the day's least-ready edit state as a top rule + pill. */
.fz-cal-cell.has-state { box-shadow: inset 0 3px 0 var(--fz-k); }
.fz-cal-cell.has-state.is-today { box-shadow: inset 0 3px 0 var(--fz-k), inset 0 0 0 1px var(--fz-accent-line); }

/* Day header = date disc (+ Operations day-state pill), with the quick-add +
   pinned to its top-right corner OUT of the flow (QA r2): the hidden-until-
   hover + used to keep its 28px, so at 1024 "● Posted" read "● Post" and the
   pill beside today's disc shrank to its dot — status by colour alone. The
   header wraps; below the width where disc + widest pill ("Not edited") + the
   + fit side by side, the pill takes its own line under the date (container
   query further down, §6). position: relative = the +'s anchor. The subgrid
   stretches every header of a week to the tallest one, so lines pack at the
   top (align-content) — dates without a pill stay level with those with one. */
.fz-cal-cell-h {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: var(--fz-s-1);
  min-height: 28px;
  min-width: 0;
}
.fz-cal-dn {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--fz-r-pill);
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-body);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  color: var(--fz-text-1);
  flex: none;
}
/* Wrapper: inline beside the date while it fits, a full-width line of its own
   below the date when it doesn't (the pill inside keeps hugging its word). */
.fz-cal-statew { display: flex; flex: 0 1 auto; min-width: 0; }
.fz-cal-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  height: 20px;
  padding: 0 var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fz-cal-state i { width: 6px; height: 6px; border-radius: var(--fz-r-pill); background: var(--fz-k); flex: none; }
.fz-cal-add {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-3);
  cursor: pointer;
  flex: none;
  transition: background-color var(--fz-t-fast) var(--fz-ease), color var(--fz-t-fast) var(--fz-ease);
}
.fz-cal-add:hover { background: var(--fz-surface-3); color: var(--fz-text-1); }
.fz-cal-add:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
@media (hover: hover) and (min-width: 768px) {
  /* Desktop: the + appears with the day (hover / keyboard), so 42 cells don't shout. */
  .fz-cal-cell .fz-cal-add { opacity: 0; }
  .fz-cal-cell:hover .fz-cal-add, .fz-cal-cell:focus-within .fz-cal-add, .fz-cal-add:focus-visible { opacity: 1; }
}

.fz-cal-chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fz-cal-chip {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 5px 6px 5px 5px;
  border: 0;
  border-radius: var(--fz-r-xs);
  background: var(--fz-k-soft);
  box-shadow: inset 2px 0 0 var(--fz-k);
  color: var(--fz-text-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: filter var(--fz-t-fast) var(--fz-ease), background-color var(--fz-t-fast) var(--fz-ease);
}
.fz-cal-chip:hover { background: var(--fz-surface-hover); }
.fz-cal-chip:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 1px; }
.fz-cal-chip > .fsw-avatar, .fz-cal-chip > .fz-cav, .fz-cal-chip > .fz-cal-ava-none, .fz-cal-chip > .fz-cal-ava-g { flex: none; }
.fz-cal-chip-tx { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.fz-cal-chip-a,
.fz-cal-chip-b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fz-cal-chip-b { display: block; }
.fz-cal-chip-a { display: flex; align-items: baseline; gap: 4px; font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-semi); color: var(--fz-text-1); }
.fz-cal-chip-nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Reel number: never eaten by the ellipsis — the client name shrinks first. */
.fz-cal-chip-seq {
  flex: none;
  margin-left: auto;
  font-family: var(--fz-font-mono);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-medium);
  letter-spacing: -.02em;
  color: var(--fz-text-2);
}
.fz-cal-chip-b { font-size: var(--fz-fs-micro); font-weight: var(--fz-fw-medium); color: var(--fz-k-ink); }
/* Posting task chip: paper-plane before "Posting · Scheduled" (kind = icon,
   colour = state). Inline, so it rides the 2-line clamp like the words. It is
   the OpsIcon 'send' glyph drawn as a CSS mask in the chip's ink, not an <svg>:
   an svg inside the chip button reads as the button's (off-centre) icon to
   the layout audit, while this is a word-sized mark of the second line. */
.fz-cal-chip-ico {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 3px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12 20 4.5l-3.2 15.5-4.6-4.9z'/%3E%3Cpath d='m12.2 15.1-3.4 3.6v-5.1'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12 20 4.5l-3.2 15.5-4.6-4.9z'/%3E%3Cpath d='m12.2 15.1-3.4 3.6v-5.1'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* One line per row, always: every chip is the same height, so chip rows in
   neighbouring cells line up (the earlier two-line clamp made "Brian /
   Michelle" chips 54px next to 38px ones). A long name ends in an ellipsis;
   the full text is in the chip's title / aria-label, the peek and the drawer. */
.fz-cal-chip-nm { display: block; }
.fz-cal-chip .fz-cal-ldot { margin-left: auto; }
/* Sticky note: amber like a reminder, but with a dashed edge instead of the
   solid side rule, so in Posting mode it never reads as an "Awaiting client"
   reel (same amber). Outline, not border: the chip keeps its exact height. */
.fz-cal-chip.is-note { box-shadow: none; outline: 1px dashed var(--fz-k); outline-offset: -1px; }
.fz-cal-chip.is-note:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 1px; }
.fz-cal-chip.is-done { background: var(--fz-surface-2); box-shadow: inset 2px 0 0 var(--fz-border-strong); }
.fz-cal-chip.is-done .fz-cal-chip-a { color: var(--fz-text-3); text-decoration: line-through; }
.fz-cal-chip.is-done .fz-cal-chip-b, .fz-cal-chip.is-done .fz-cal-chip-seq { color: var(--fz-text-3); }
.fz-cal-ava-none { display: inline-block; border-radius: var(--fz-r-pill); background: var(--fz-surface-3); }
/* Google Calendar event: no client, no PIC — a teal calendar glyph stands in for the avatar. */
.fz-cal-ava-g { display: inline-grid; place-items: center; flex: none; border-radius: var(--fz-r-pill); background: var(--fz-teal-soft); color: var(--fz-teal-ink); }

.fz-cal-cell-f {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: auto;
  min-width: 0;
}
.fz-cal-more {
  appearance: none;
  -webkit-appearance: none;
  align-self: flex-start;
  margin: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: var(--fz-r-xs);
  background: transparent;
  color: var(--fz-text-2);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
}
.fz-cal-more:hover { background: var(--fz-surface-3); color: var(--fz-text-1); }
.fz-cal-more:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
.fz-cal .fz-cal-cell-mix .fz-segbar { height: 4px; }
.fz-cal-cell.is-other .fz-cal-chip { background: var(--fz-surface-1); }
[data-theme="dark"] .fz-cal-cell.is-other .fz-cal-chip { background: var(--fz-surface-2); }

/* ── Chip rows line up across the week, names are never cut (QA r1, 2 Oct) ──
   Chips wrap their client and step name to at most two lines each instead of
   "Brian Mi…" / "Video edi…" — at 1024 that ellipsis made "Video editing" and
   "Video editing QC" read the same, and an overdue work step and an overdue
   QC step are both red, so the step name is the only way to tell them apart.
   Wrapping alone made chips uneven ("Brian / Michelle" 54px next to 38px), so
   every day cell is a SUBGRID of its week: chip N of every day sits in the
   same row track, stretched to the tallest chip in it. Tracks per cell
   (--fz-cal-rows from the JSX = chip cap + 2): day number · chip 1…cap ·
   "+N more". A subgrid ignores min-height in that axis, so ::before is a
   zero-width strut over every track (column 2) that only grows the tracks no
   day of the week uses; ::after holds the last track in every cell so the
   bottom padding is always reserved. Phones (dots, `has-rows` is off) and
   browsers without subgrid keep the one-line flex column above. */
@supports (grid-template-rows: subgrid) {
  .fz-cal-grid.has-rows > .fz-cal-cell {
    --fz-cal-min: 148px;
    --fz-cal-pad: var(--fz-s-2);
    display: grid;
    grid-row: span var(--fz-cal-rows, 5);
    grid-template-rows: subgrid;
    grid-template-columns: minmax(0, 1fr) 0;
    gap: 4px 0;
    min-height: 0;
    padding: var(--fz-cal-pad);
  }
  .fz-cal-grid.has-rows.is-week > .fz-cal-cell { --fz-cal-min: 300px; }
  .fz-cal-grid.has-rows > .fz-cal-cell::before {
    content: '';
    grid-column: 2;
    grid-row: 1 / -1;
    height: calc(var(--fz-cal-min) - 2 * var(--fz-cal-pad) - 2px);
    pointer-events: none;
  }
  .fz-cal-grid.has-rows > .fz-cal-cell::after { content: ''; grid-column: 1; grid-row: -2 / -1; pointer-events: none; }
  .fz-cal-grid.has-rows > .fz-cal-cell > .fz-cal-cell-h { grid-column: 1; grid-row: 1; margin-bottom: 2px; }
  .fz-cal-grid.has-rows .fz-cal-chips { display: contents; }
  .fz-cal-grid.has-rows .fz-cal-chip { grid-column: 1; align-self: stretch; }
  .fz-cal-grid.has-rows > .fz-cal-cell > .fz-cal-cell-f { grid-column: 1; grid-row: -2 / -1; align-self: end; margin-top: 0; padding-top: 2px; }
  .fz-cal-grid.has-rows .fz-cal-chip-a,
  .fz-cal-grid.has-rows .fz-cal-chip-nm,
  .fz-cal-grid.has-rows .fz-cal-chip-b { white-space: normal; }
  .fz-cal-grid.has-rows .fz-cal-chip-nm,
  .fz-cal-grid.has-rows .fz-cal-chip-b {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: break-word;
  }
}


/* ═══ 4. DAY DRAWER + DAY VIEW ══════════════════════════════════════════════ */
.fz-cal-drawer-ey { display: inline-flex; align-items: center; gap: var(--fz-s-2); }
.fz-cal-drawer .fsw-drawer-h .fsw-drawer-htitle { font-size: var(--fz-fs-num-sm); font-weight: var(--fz-fw-bold); }
.fz-cal-drawer-b { overflow-y: auto; }
.fz-cal-day { display: flex; flex-direction: column; gap: var(--fz-s-4); min-width: 0; }
.fz-cal-dsum { display: flex; flex-direction: column; gap: var(--fz-s-3); }
/* Day summary = kit metric tiles (OpsMetricGrid > OpsMetricCard, KIT §0). Only
   context rules live here: in the drawer (a surface-1 sheet) a tile is a
   surface-2 well with a tighter gap, so four fit a 480px drawer on one row; in
   the Day view the OpsPanel context already makes them surface-2 (fz-kit.css).
   A zero stays a quiet number (text colour, never opacity); the tone dot stays
   as the colour key of the matching section. */
.fz-cal-drawer .fz-cal-dstats.fz-metrics { gap: var(--fz-s-2); }
.fz-cal-drawer .fz-cal-dstats .fz-metric {
  gap: 2px;
  padding: var(--fz-s-3);
  border-radius: var(--fz-r-sm);
  background: var(--fz-surface-2);
  box-shadow: none;
}
.fz-cal-day .fz-cal-dstats .fz-metric-l { white-space: nowrap; }
/* Posting-schedule Day view (QA r3): six tiles (Reels + five slot states).
   The kit's auto-fit would leave one or two orphans on a laptop (5 + 1, 4 + 2),
   so the summary is its own size container and the six take 6 / 3 / 2 equal
   columns — always full rows. "Awaiting client" needs ~140px per tile. */
.fz-cal-day.is-reels .fz-cal-dsum { container: fzcaldsum / inline-size; }
.fz-cal-day .fz-cal-dstats.is-n6.fz-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@container fzcaldsum (min-width: 900px) {
  .fz-cal-day .fz-cal-dstats.is-n6.fz-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@container fzcaldsum (max-width: 459.98px) {
  .fz-cal-day .fz-cal-dstats.is-n6.fz-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Posting tile (QA r2): its key is the bare paper-plane glyph at label height,
   like the dots of the other tiles — not the kit's 24px icon disc, which made
   the label row taller and dropped "30" below "110 · 0 · 0". */
.fz-cal-day .fz-cal-dstats .fz-metric-ico { width: auto; height: auto; background: none; color: var(--fz-text-2); }
.fz-cal-day .fz-metric.is-zero .fz-metric-num { color: var(--fz-text-3); }
/* "This day by type" bar (QA polish 3 Oct): it carries the kit legend (dot +
   word + count), and Posting — always its FIRST segment when the day has any
   (OpsCalDayBody) — is drawn in the strong neutral (the neutral ink in light,
   near-white text-1 in dark, where the ink is only a shade off the base), so
   it never reads as the plain-neutral "Other tasks"; its legend dot matches.
   The kit's "of N" is dropped: the bar is the whole day, the tiles above hold
   the totals. */
.fz-cal-dmix.has-post .fz-segbar > .fz-seg:first-child,
.fz-cal-dmix.has-post .fz-seglegend-i:first-child > .fz-seglegend-dot { background: var(--fz-neutral-ink); }
[data-theme="dark"] .fz-cal-dmix.has-post .fz-segbar > .fz-seg:first-child,
[data-theme="dark"] .fz-cal-dmix.has-post .fz-seglegend-i:first-child > .fz-seglegend-dot { background: var(--fz-text-1); }
.fz-cal-dmix .fz-seglegend-i.is-total { display: none; }
.fz-cal-quiet { margin: 0; font-size: var(--fz-fs-meta); line-height: 1.5; color: var(--fz-text-3); }
.fz-cal-quiet.is-empty { padding: var(--fz-s-4); border-radius: var(--fz-r-md); background: var(--fz-surface-2); text-align: center; }
.fz-cal-secs { display: flex; flex-direction: column; gap: var(--fz-s-3); min-width: 0; }
.fz-cal-sec {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-2);
  padding: var(--fz-s-3);
  border-radius: var(--fz-r-md);
  background: var(--fz-surface-2);
  min-width: 0;
}
.fz-cal-sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--fz-s-2); min-height: 28px; padding: 0 var(--fz-s-1); }
.fz-cal-sec-dot { width: var(--fz-s-2); height: var(--fz-s-2); border-radius: var(--fz-r-pill); background: var(--fz-k); flex: none; }
.fz-cal-sec-ico { flex: none; color: var(--fz-text-2); }
.fz-cal-sec-t {
  margin: 0;
  font-family: var(--fz-font-body);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fz-text-2);
}
.fz-cal-sec-n {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
  font-size: var(--fz-fs-micro);
  font-weight: var(--fz-fw-semi);
  font-variant-numeric: tabular-nums;
}
.fz-cal-sec-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Drawer: an empty group stays visible as one quiet line (blueprint sketch:
   "Posting 0 — no slots today"), so the grouping reads the same every day. */
.fz-cal-sec.is-empty { padding-top: var(--fz-s-2); padding-bottom: var(--fz-s-2); }
.fz-cal-sec.is-empty .fz-cal-sec-h { flex-wrap: wrap; row-gap: 2px; }
.fz-cal-sec.is-empty .fz-cal-sec-n { background: var(--fz-surface-3); color: var(--fz-text-3); }
.fz-cal-sec-none { margin-left: auto; font-size: var(--fz-fs-meta); color: var(--fz-text-3); }
/* "3 overdue — listed under Overdue": the kind's late items moved to the red
   section; said in words, in the red ink so it points at that section. */
.fz-cal-sec-none.is-late { color: var(--fz-crit-ink); font-weight: var(--fz-fw-medium); }
/* Fallback status pill when the kit is not loaded (OpsCalPill). */
.fz-cal-pill-x.is-accent { --fz-k-soft: var(--fz-accent-soft); --fz-k-ink: var(--fz-accent-ink); }
.fz-cal-pill-x {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--fz-s-2);
  border-radius: var(--fz-r-pill);
  background: var(--fz-k-soft);
  color: var(--fz-k-ink);
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-medium);
  white-space: nowrap;
}
.fz-cal-sec-all,
.fz-cal-sec-add {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: var(--fz-s-1) var(--fz-s-2);
  border: 0;
  border-radius: var(--fz-r-xs);
  background: transparent;
  color: var(--fz-accent-ink);
  font: inherit;
  font-size: var(--fz-fs-meta);
  font-weight: var(--fz-fw-semi);
  cursor: pointer;
  white-space: nowrap;
}
.fz-cal-sec-all { align-self: flex-start; }
.fz-cal-sec-add { margin-left: auto; }
.fz-cal-sec-all:hover, .fz-cal-sec-add:hover { background: var(--fz-surface-3); }
.fz-cal-sec-all:focus-visible, .fz-cal-sec-add:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }

.fz-cal-row { display: flex; align-items: center; gap: var(--fz-s-1); min-width: 0; border-radius: var(--fz-r-sm); }
/* Google Calendar rows open their details in place (8 Oct 2026): the row wraps, details take the full width. */
.fz-cal-row.has-g { flex-wrap: wrap; }
.fz-cal-row-chev { color: var(--fz-text-3); transition: transform var(--fz-t-fast) var(--fz-ease); }
.fz-cal-row-chev.is-open { transform: rotate(180deg); }
.fz-cal-row-g { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--fz-s-2); min-width: 0; padding: 0 var(--fz-s-3) var(--fz-s-3) calc(var(--fz-s-3) + 32px + var(--fz-s-3)); font-size: var(--fz-fs-meta); color: var(--fz-text-2); }
.fz-cal-row-gl { display: flex; align-items: flex-start; gap: var(--fz-s-2); overflow-wrap: anywhere; }
.fz-cal-row-gl > svg { flex: none; margin-top: 2px; color: var(--fz-text-3); }
.fz-cal-row-gd { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; max-height: 14em; overflow: auto; }
.fz-cal-row-gd a, .fz-cal-row-gopen { color: var(--fz-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.fz-cal-row-gopen { display: inline-flex; align-items: center; gap: var(--fz-s-1); align-self: flex-start; }
@media (max-width: 640px) { .fz-cal-row-g { padding-left: var(--fz-s-3); } }
.fz-cal-row:hover { background: var(--fz-surface-hover); }
[data-theme="dark"] .fz-cal-row:hover { background: var(--fz-surface-3); }
.fz-cal-row-main {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: var(--fz-s-3);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: var(--fz-s-2);
  border: 0;
  border-radius: var(--fz-r-sm);
  background: transparent;
  color: var(--fz-text-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fz-cal-row-main:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: -2px; }
.fz-cal-row-av { position: relative; display: inline-flex; flex: none; }
.fz-cal-row-av::after {
  content: '';
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 10px;
  height: 10px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-k);
  box-shadow: 0 0 0 2px var(--fz-surface-2);
}
.fz-cal-row-tx { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.fz-cal-row-a,
.fz-cal-row-b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fz-cal-row-a { font-size: var(--fz-fs-body); font-weight: var(--fz-fw-semi); color: var(--fz-text-1); }
.fz-cal-row-b { font-size: var(--fz-fs-meta); color: var(--fz-text-3); }
.fz-cal-row-r { display: inline-flex; align-items: center; gap: var(--fz-s-2); flex: none; }
.fz-cal-row.is-done .fz-cal-row-a { color: var(--fz-text-3); text-decoration: line-through; }
.fz-cal-row-x {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 var(--fz-s-1) 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-3);
  cursor: pointer;
  flex: none;
}
.fz-cal-row-x:hover { background: var(--fz-surface-1); color: var(--fz-text-1); }
.fz-cal-row-x:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }

/* Sticky notes. */
.fz-cal-notes-l { display: flex; flex-direction: column; gap: var(--fz-s-2); }
.fz-cal-note {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-2);
  padding: var(--fz-s-3);
  border-radius: var(--fz-r-sm);
  background: var(--fz-k-soft);
  box-shadow: inset 3px 0 0 var(--fz-k);
}
.fz-cal-note.is-edit { outline: 2px solid var(--fz-focus); outline-offset: -2px; }
.fz-cal-note-b { font-size: var(--fz-fs-body); line-height: 1.5; color: var(--fz-text-1); white-space: pre-wrap; overflow-wrap: anywhere; }
.fz-cal-note-f { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fz-s-1) var(--fz-s-2); font-size: var(--fz-fs-meta); }
.fz-cal-note-f .fsw-person-name { font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-semi); }
.fz-cal-note-t { color: var(--fz-text-3); font-variant-numeric: tabular-nums; }
.fz-cal-note-acts { display: inline-flex; gap: 2px; margin-left: auto; }
.fz-cal-note-acts button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-2);
  cursor: pointer;
}
.fz-cal-note-acts button:hover { background: var(--fz-surface-1); color: var(--fz-text-1); }
.fz-cal-note-acts button.is-danger:hover { color: var(--fz-crit-ink); }
.fz-cal-note-acts button:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
.fz-cal-nform { display: flex; flex-direction: column; gap: var(--fz-s-2); }
.fz-cal .fz-cal-nform-ta, .fz-cal-drawer .fz-cal-nform-ta { width: 100%; min-height: 84px; resize: vertical; border-radius: var(--fz-r-sm); }
.fz-cal-nform-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--fz-s-2); }
.fz-cal-nform-act { display: inline-flex; gap: var(--fz-s-2); margin-left: auto; }
.fz-cal-sws { display: flex; flex-wrap: wrap; gap: 2px; }
.fz-cal-sw {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  cursor: pointer;
}
.fz-cal-sw:hover { background: var(--fz-surface-3); }
.fz-cal-sw.is-on { box-shadow: inset 0 0 0 2px var(--fz-text-1); }
.fz-cal-sw:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
.fz-cal-swd { display: block; width: 16px; height: 16px; border-radius: var(--fz-r-pill); background: var(--fz-k); }

/* Day view: the same body on the page, inside one kit module (OpsPanel
   .fz-cal-dayview — surface, 24px radius, padding and shadow come from
   fz-kit.css; nothing is restated here). */
/* Day view: four big stat tiles (the view's hero), the day's mix bar, then ONE
   stack of full-width sections in the drawer's order (… Notes last). Rows flow
   in a grid inside each section — two per line on a laptop, one on tablet /
   phone — so the width is used without side-by-side columns, and no column
   can ever stand empty next to a long one (the old side/main split left a
   ~1,200px hole beside Operations days). */
.fz-cal-day.is-page { gap: var(--fz-s-5); }
.fz-cal-dsecs { display: flex; flex-direction: column; gap: var(--fz-gap); min-width: 0; }
.fz-cal-day.is-page .fz-cal-sec { padding: var(--fz-s-4); gap: var(--fz-s-3); }
/* A Day-view section that only says "N overdue — listed under Overdue" is one
   line: keep it as compact as the drawer's empty rows. */
.fz-cal-day.is-page .fz-cal-sec.is-empty { padding-top: var(--fz-s-3); padding-bottom: var(--fz-s-3); }
.fz-cal-day.is-page .fz-cal-sec-b,
.fz-cal-day.is-page .fz-cal-notes-l {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: var(--fz-s-1) var(--fz-s-3);
}
/* Rows in a grid need a surface to read as items, not as loose text: one step
   up from the section (white on the soft-grey section in light, a lift in
   dark). The avatar's status-dot ring follows the row colour. */
.fz-cal-day.is-page .fz-cal-row { --fzc-row: var(--fz-surface-1); background: var(--fzc-row); }
[data-theme="dark"] .fz-cal-day.is-page .fz-cal-row { --fzc-row: var(--fz-surface-hover); }
.fz-cal-day.is-page .fz-cal-row:hover { background: var(--fz-surface-hover); }
[data-theme="dark"] .fz-cal-day.is-page .fz-cal-row:hover { background: var(--fz-surface-3); }
.fz-cal-day.is-page .fz-cal-row-av::after { box-shadow: 0 0 0 2px var(--fzc-row); }


/* ═══ 5. FLOATING CARDS (peek · quick add · label editor) ══════════════════ */
.fsw-menu.fz-cal-peek,
.fsw-menu.fz-cal-quick {
  display: flex;
  flex-direction: column;
  gap: var(--fz-s-2);
  width: 320px;
  min-width: 0;
  max-width: min(320px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: var(--fz-s-4);
  border-radius: var(--fz-r-lg);
}
.fz-cal-peek-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 36px; position: relative; min-height: 28px; }
.fz-cal-peek-x {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--fz-r-pill);
  background: transparent;
  color: var(--fz-text-3);
  cursor: pointer;
}
.fz-cal-peek-x:hover { background: var(--fz-surface-hover); color: var(--fz-text-1); }
.fz-cal-peek-x:focus-visible { outline: 2px solid var(--fz-focus); outline-offset: 0; }
.fz-cal-peek-t {
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-card);
  font-weight: var(--fz-fw-semi);
  line-height: 1.35;
  color: var(--fz-text-1);
  overflow-wrap: anywhere;
}
.fz-cal-peek-when { display: flex; align-items: center; gap: 6px; font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-medium); color: var(--fz-text-2); font-variant-numeric: tabular-nums; }
.fz-cal-peek-when .fsw-ic { color: var(--fz-text-3); flex: none; }
.fz-cal-peek-row { display: flex; align-items: center; gap: var(--fz-s-2); min-width: 0; font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-medium); color: var(--fz-text-1); }
.fz-cal-peek-row > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fz-cal-peek-people { display: flex; flex-wrap: wrap; gap: var(--fz-s-1) var(--fz-s-3); }
.fz-cal-peek-people .fsw-person-name { font-size: var(--fz-fs-meta); }
.fz-cal-peek-body {
  padding: var(--fz-s-2) var(--fz-s-3);
  border-radius: var(--fz-r-sm);
  background: var(--fz-surface-2);
  font-size: var(--fz-fs-meta);
  line-height: 1.5;
  color: var(--fz-text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 148px;
  overflow-y: auto;
}
.fz-cal-peek-reel { display: flex; flex-direction: column; gap: var(--fz-s-2); }
.fz-cal-peek-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.fz-cal-peek-meta { font-size: var(--fz-fs-meta); color: var(--fz-text-3); }
.fz-cal-peek-k { font-size: var(--fz-fs-micro); font-weight: var(--fz-fw-semi); letter-spacing: .08em; text-transform: uppercase; color: var(--fz-text-3); }
.fz-cal-peek-res { display: flex; flex-direction: column; gap: var(--fz-s-1); }
.fz-cal-peek-resi { display: flex; align-items: center; gap: var(--fz-s-2); min-width: 0; color: var(--fz-text-2); }
.fz-cal-peek-resn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fz-fs-meta); color: var(--fz-text-1); }
.fz-cal-peek-reso { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-semi); color: var(--fz-accent-ink); text-decoration: none; }
.fz-cal-peek-reso:hover { text-decoration: underline; }
.fz-cal-peek-sel { width: 100%; }
.fz-cal-peek-f {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fz-s-2);
  margin-top: var(--fz-s-1);
  padding-top: var(--fz-s-3);
  border-top: 1px solid var(--fz-border);
}
.fz-cal-push { margin-left: auto; }
/* Footer buttons of the floating cards share one height (legacy rules gave the
   ghost 32px and the primary 38px). Phones keep the legacy 44px floor. */
.fz-cal-peek-f > .xcs-btn-primary,
.fz-cal-peek-f > .xcs-btn-ghost,
.fz-cal-nform-act > .xcs-btn-primary,
.fz-cal-nform-act > .xcs-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  min-height: 36px;
}
.fz-cal-quick-h { position: relative; display: flex; align-items: center; gap: var(--fz-s-2); padding-right: 36px; min-height: 28px; }
.fz-cal-quick-ico {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--fz-r-pill);
  background: var(--fz-surface-3);
  color: var(--fz-text-2);
  flex: none;
}
.fz-cal-quick-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-family: var(--fz-font-display);
  font-size: var(--fz-fs-card);
  font-weight: var(--fz-fw-semi);
  line-height: 1.25;
  color: var(--fz-text-1);
}
.fz-cal-quick-t small { font-family: var(--fz-font-body); font-size: var(--fz-fs-meta); font-weight: var(--fz-fw-medium); color: var(--fz-text-3); }
.fz-cal-quick-2 { display: flex; gap: var(--fz-s-2); }
.fz-cal-quick-2 > .fsw-input { flex: 1 1 0; min-width: 0; }
.fz-cal-quick .fsw-labelnew { border: 0; border-radius: var(--fz-r-sm); background: var(--fz-surface-2); padding: var(--fz-s-2); }
/* Label select + "Label" button on one line, same height, button never wraps. */
.fz-cal-quick .fsw-labelrow { gap: var(--fz-s-2); }
.fz-cal-quick .fsw-labelrow > .fsw-input { height: 36px; }
.fz-cal-quick .fsw-labelrow > .xcs-btn-ghost {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  min-height: 36px;
  white-space: nowrap;
}
.fz-cal-quick-2 > .fsw-input { height: 36px; }
.fz-cal-quick .fsw-labelnew-dot.is-on { box-shadow: inset 0 0 0 2px var(--fz-text-1); }


/* ═══ 6. RESPONSIVE ═════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .fz-cal-cell { min-height: 132px; padding: 6px; }
  .fz-cal-chip { gap: 5px; padding: 4px 5px 4px 4px; }
  .fz-cal-grid.has-rows > .fz-cal-cell { --fz-cal-min: 132px; --fz-cal-pad: 6px; }
}
/* Chip density follows the CELL width, not the viewport (the sidebar eats a
   different share at every width). The chip is full width, so its own width
   = the cell's content box: 1440 = 130px (avatar + tag), <128px drops the
   corner tag (#01 / 14:00 — still in the tooltip, peek and drawer), <100px
   (tablet) also drops the avatar so the client name keeps its letters.
   The query container is the CHIP, not the cell: container-type applies
   containment that turns a subgrid back into a plain grid ("rows: none"),
   which would undo the aligned chip rows above. A query measures the chip's
   CONTENT box (cell content − 11px padding, 9px at ≤1100), so the steps are
   116 / 89 here. A container can't restyle itself, so the avatar-less inset
   moves onto the text (4-5px + 2px). */
.fz-cal-chip { container: fzcalchip / inline-size; }
@container fzcalchip (max-width: 116px) {
  .fz-cal-chip-seq { display: none; }
}
@container fzcalchip (max-width: 89px) {
  .fz-cal-chip > .fsw-avatar, .fz-cal-chip > .fz-cav, .fz-cal-chip > .fz-cal-ava-none, .fz-cal-chip > .fz-cal-ava-g { display: none; }
  .fz-cal-chip-tx { padding-left: 2px; }
}
/* Operations day-state pill (QA r2) — never shortened to "● Post" / "● E" /
   a bare dot. The query container is the day HEADER (a plain grid item, not
   the subgrid cell — see above); phones (≤640) render no pill and centre the
   date, so no container there. Inline only when date disc 28 + gap 4 + the
   widest word "● Not edited" 81 + gap 4 + the corner + 28 = 145px fit —
   every pill of the grid moves together, so a week never mixes inline and
   stacked pills. Below 84px (1024 with the sidebar: 75px, ~900: 57px) the
   dot goes (tint + ink + word still carry the state) and the word may break
   onto a second line inside the tag instead of being cut. */
@media (min-width: 641px) {
  .fz-cal-cell-h { container: fzcalh / inline-size; }
}
@container fzcalh (max-width: 149.98px) {
  .fz-cal-statew { flex: 1 0 100%; }
}
@container fzcalh (max-width: 83.98px) {
  .fz-cal-state {
    height: auto;
    min-height: 20px;
    padding: 3px var(--fz-s-2);
    border-radius: var(--fz-r-xs);
    line-height: 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .fz-cal-state i { display: none; }
}
/* Touch widths: the quick-add + would fill a ~46px cell, so (as before the
   redesign) it is hidden and notes are added from the day drawer. */
@media (max-width: 767px) {
  .fz-cal-cell .fz-cal-add { display: none; }
}
@media (max-width: 768px) {
  /* Header controls follow --fz-ctl-h (44px here) — see §1. */
  .fz-cal-client, .fz-cal-ftog { height: 44px; }
  .fz-cal-client { width: auto; flex: 1 1 180px; max-width: none; }
  .fz-cal-lchip, .fz-cal-lbtn { height: 44px; }
  .fz-cal-lchip-m { width: 40px; }
  .fz-cal-mix { gap: var(--fz-s-1) var(--fz-s-3); }
  /* Its own line here, and allowed to wrap: "0 reels scheduled on this day ·
     30 posting tasks due (Team view)" ran past a 390px card (QA r3). */
  .fz-cal-tot { flex: 1 1 100%; min-width: 0; margin-left: 0; white-space: normal; }
  .fz-cal-grid { gap: 4px; }
  .fz-cal-cell { border-radius: var(--fz-r-sm); }
  .fz-cal-row-main { min-height: 56px; }
  .fz-cal-note-acts button, .fz-cal-sw { width: 40px; height: 40px; }
  .fz-cal-sec-all, .fz-cal-sec-add { min-height: 40px; }
  .fz-cal .fz-panel.fz-cal-dayview { padding: var(--fz-s-3); }
  .fz-cal-row-x { width: 44px; height: 44px; }
  .fz-cal-peek-x { width: 44px; height: 44px; top: -8px; right: -8px; }
  .fz-cal-peek-top, .fz-cal-quick-h { padding-right: 44px; }
  /* Touch floor (refine QA, 5 Oct): Month/Week/Day, Team/Operations/Posting
     schedule and ‹ Today › were 36px inside their 44px tracks. The tracks keep
     --fz-ctl-h (44) and drop to 2px of padding, so every target is 40px tall
     (2 + 40 + 2) and the header row does not grow. */
  .fz-cal .fz-cal-head .fz-viewtog,
  .fz-cal .fz-cal-tools .fz-viewtog,
  .fz-cal .fz-cal-nav { padding: 2px; }
  .fz-cal .fz-cal-head .fz-viewtog-b,
  .fz-cal .fz-cal-tools .fz-viewtog-b,
  .fz-cal .fz-cal-navt { height: calc(var(--fz-ctl-h) - 4px); }
  .fz-cal .fz-cal-navb { width: calc(var(--fz-ctl-h) - 4px); height: calc(var(--fz-ctl-h) - 4px); }
}
/* ── Phone: one cell ≈ 48px. Chips collapse to coloured DOTS that cannot be
   tapped on their own (pointer-events: none) — the whole cell is the target
   and opens the day drawer with the full list (audit §5.10). The 🔗 marker
   has no font-size of its own, so font-size 0 shrinks it with the text. */
@media (max-width: 640px) {
  .fz-cal-grid { gap: 3px; }
  .fz-cal-dow { padding: 0; text-align: center; letter-spacing: .04em; }
  .fz-cal-cell {
    min-height: 68px;
    padding: 4px 3px;
    gap: 4px;
    border-radius: var(--fz-r-xs);
    align-items: center;
  }
  .fz-cal-grid.is-week .fz-cal-cell { min-height: 120px; }
  .fz-cal-cell-h { justify-content: center; min-height: 24px; }
  .fz-cal-dn { min-width: 24px; height: 24px; padding: 0 4px; font-size: var(--fz-fs-meta); }
  .fz-cal-state, .fz-cal-statew { display: none; }
  .fz-cal-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .fz-cal-chip {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    min-width: 0;
    padding: 0;
    border-radius: var(--fz-r-pill);
    background: var(--fz-k);
    box-shadow: none;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .fz-cal-chip > *, .fz-cal-chip .fz-cal-ldot { display: none; }
  .fz-cal-chip.is-done, .fz-cal-cell.is-other .fz-cal-chip.is-done { background: var(--fz-border-strong); box-shadow: none; }
  .fz-cal-cell.is-other .fz-cal-chip { background: var(--fz-k); }
  .fz-cal-cell-f { align-items: center; margin-top: 0; }
  .fz-cal-more { padding: 0 2px; font-size: var(--fz-fs-micro); pointer-events: none; }
  /* The rendered phone variant (OpsCalCell `sempit`): plain dots + "+N". */
  .fz-cal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 100%; }
  .fz-cal-dot { display: block; width: 8px; height: 8px; border-radius: var(--fz-r-pill); background: var(--fz-k); }
  .fz-cal-dot.is-done { background: var(--fz-border-strong); }
  .fz-cal-more.is-static { display: block; max-width: 100%; overflow: hidden; color: var(--fz-text-2); font-weight: var(--fz-fw-semi); line-height: 1.2; text-align: center; }
  /* Day view on a phone: no card-in-card — sections sit on the page as cards. */
  .fz-cal .fz-panel.fz-cal-dayview, [data-theme="dark"] .fz-cal .fz-panel.fz-cal-dayview { padding: 0; background: transparent; box-shadow: none; }
  .fz-cal .fz-cal-dayview .fz-cal-sec, .fz-cal .fz-cal-dayview .fz-metric, .fz-cal .fz-cal-dayview .fz-cal-quiet.is-empty,
  .fz-cal .fz-cal-dayview .fsw-empty:not(.is-center) { background: var(--fz-surface-1); }
  .fz-cal-dayview .fz-cal-row-av::after { box-shadow: 0 0 0 2px var(--fz-surface-1); }
  /* Day rows (page + drawer, QA polish 3 Oct): the meta line "Video editing QC ·
     #01 · 17:00 · Habib" wraps to two lines instead of losing the due time and
     the reviewer to a one-line ellipsis; the client line above stays one line. */
  .fz-cal-row-b {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .fz-cal-chip.is-note { outline: none; }
  .fz-cal-dot.is-note { border-radius: 2px; }
  .fz-cal-cell-mix { display: none; }
  .fz-cal-cell.is-today { box-shadow: none; }
  .fz-cal-cell.has-state { box-shadow: inset 0 3px 0 var(--fz-k); }
  .fsw-menu.fz-cal-peek, .fsw-menu.fz-cal-quick { width: calc(100vw - 16px); }
}
