/* The phone calendar. Moved out of shell/app.css (restructure step 8b); index.html loads it right after app.css. */
/* ── CALENDAR (phone) ──
 * Donald, 2026-09-10. The station calendar, same one as the wall board and the
 * JAV dashboard, at thumb scale. Type colours are inline per-event (they are a
 * data channel, set from CAL_TYPE_COLOR in /features/calendar/calendar-core.js so the three boards
 * cannot drift); everything else here is the STEEL surface ladder.
 */
#pane-calendar{padding:0 0 84px}
.cal-head{
  display:flex;align-items:center;gap:6px;
  padding:12px 12px 8px;
}
.cal-arrow{
  flex-shrink:0;width:44px;height:44px;
  background:none;border:none;color:var(--muted2);
  font-size:1.375rem;line-height:1;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.cal-arrow:active{color:var(--acc)}
.cal-title{
  flex:1;min-width:0;text-align:center;
  font-family:var(--font-mono);font-size:0.8125rem;font-weight:700;
  color:var(--text);letter-spacing:0.1em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cal-title-day{text-align:left;padding-left:6px}
.cal-today,.cal-back{
  flex-shrink:0;min-height:44px;padding:0 10px;
  background:var(--pill);border:none;border-radius:10px;
  color:var(--muted2);font-family:var(--font-mono);font-size:.8rem;
  font-weight:700;letter-spacing:0.08em;text-transform:uppercase;
  cursor:pointer;touch-action:manipulation;
}
.cal-today:active,.cal-back:active{opacity:0.6}
.cal-add{
  flex-shrink:0;width:44px;height:44px;border-radius:12px;
  background:var(--acc);border:none;color:var(--acc-ink);
  font-size:1.375rem;font-weight:700;line-height:1;
  cursor:pointer;touch-action:manipulation;
}
.cal-add:active{opacity:0.75}

.cal-week{
  display:grid;grid-template-columns:repeat(7,1fr);
  padding:0 8px 4px;
}
.cal-week span{
  text-align:center;
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--muted);letter-spacing:0.08em;
}

.cal-grid{
  display:grid;grid-template-columns:repeat(7,1fr);
  gap:2px;padding:0 8px;
  /* Donald, 2026-09-13: swipe between months. pan-y leaves vertical scrolling
     to the browser and hands only the sideways part of a drag to the pointer
     handlers in calendar-boot.js (calWireSwipe). */
  touch-action:pan-y;
}
/* The month turn (Donald, 2026-09-13; calGoTo / calWireSwipe in calendar-swipe.js):
   a ghost grid rides beside the live one for the duration of a drag or a
   slide, laid over its box; #cal-month clips the pair while they move and is
   plain again when they stop. Transforms only — set inline by the JS. */
#cal-month{position:relative}
#cal-month.sliding{overflow:hidden}
.cal-ghost{position:absolute;left:0;right:0;pointer-events:none;overflow:hidden}
/* The square is a <button> so it is a real 78px touch target with keyboard
   focus, but it must lay out like a cell — hence the reset. */
.cal-cell{
  display:flex;flex-direction:column;align-items:stretch;
  min-height:78px;overflow:hidden;
  /* the row height itself is set inline by calRenderMonth() — see calCellH */
  background:var(--card);border:none;border-radius:8px;
  padding:3px 3px 2px;
  font-family:var(--font);text-align:left;
  cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.cal-cell:active{background:var(--card2)}
.cal-cell.out{background:var(--bg2);opacity:0.45}
.cal-cell.today{box-shadow:inset 0 0 0 1.5px var(--acc)}
.cal-cell.hol{background:rgba(245,166,35,0.07)}
.cal-cell-head{display:flex;align-items:center;justify-content:space-between;height:15px}
.cal-cell-day{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--muted2);letter-spacing:0.02em;
}
.cal-cell.today .cal-cell-day{color:var(--acc)}
.cal-cell-r{display:flex;align-items:center;gap:3px}
.cal-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}
/* ── Shift rotation (Donald, 2026-09-13) ──
   A thin coloured edge along the top of the square and a tiny letter in its
   head: A red, B blue, C green — the --shift-* tokens at the top of this
   file, set on the square as --sa / --sb by calShiftStyle(). Two platoons on
   one day split the edge left half / right half, the shift going off on the
   left and the one coming on on the right — at 52px wide a diagonal 3px tall
   is just a smear, and a square cut in two reads as "two crews" from arm's
   length. The edge is painted at 85%: the shift hues are more saturated than
   the event palette, so this is as quiet as it can go and still be told
   apart, and red stays a marker, not an alarm. A square with no
   .sh class (rotation unknown, or an older Worker) has no edge and no letter,
   on purpose. */
.cal-cell{position:relative}
.cal-cell.sh::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--sa);opacity:0.85;pointer-events:none;
}
.cal-cell.sh-split::before{background:linear-gradient(90deg,var(--sa) 50%,var(--sb) 50%)}
/* Today's ring wins: the edge steps in by the ring's width and sits inside it
   (an inset box-shadow paints under a pseudo-element, so it must move, not
   the ring). The holiday tint wins by simply being the whole square. */
.cal-cell.today.sh::before{top:1.5px;left:1.5px;right:1.5px}
.cal-sh{
  font-family:var(--font-mono);font-size:11px;font-weight:700;
  letter-spacing:0.06em;line-height:1;white-space:nowrap;
}
.cal-sh-sl{color:var(--muted);opacity:0.6;margin:0 0.5px}
.cal-day-sub-sep{margin:0 6px;color:var(--muted);opacity:0.6}
.cal-day-sh{letter-spacing:0.14em}
.cal-ev{
  display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;
  font-size:11px;line-height:13px;font-weight:600;
  word-break:break-word;
}
.cal-ev-t{font-family:var(--font-mono);font-weight:700;opacity:0.85}
/* Donald, 2026-09-13: a done entry in the square wears the day view's line,
   quietly — dimmed, struck, still in its type colour so it reads as what it
   was. `line-through` on a -webkit-box clamps fine in WebKit and Blink. */
.cal-ev.done{text-decoration:line-through;opacity:0.5}
/* Donald, 2026-09-13: a deadline past its date that nobody has ticked — a
   tiny mono OVERDUE ahead of its name, the same amber, on the due-date square
   only. The line under an entry the clock struck never appears on one of
   these; only a hand-tick strikes a deadline. */
.cal-ev-ovd{font-family:var(--font-mono);font-weight:700;font-size:11px;letter-spacing:0.06em}
.cal-more{
  font-family:var(--font-mono);font-size:11px;font-weight:700;
  color:var(--muted);letter-spacing:0.04em;margin-top:1px;
}
/* Holiday is what KIND of day it is, so it heads the square instead of queuing
   up with the appointments — same treatment as the wall board. */
.cal-hol-head{
  font-family:var(--font-mono);font-size:11px;font-weight:700;
  color:var(--acc);letter-spacing:0.08em;line-height:13px;
}
.cal-hol-name{
  display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;
  font-size:11px;line-height:13px;font-weight:700;
  color:var(--acc);word-break:break-word;
}
.cal-note{
  padding:14px 20px 4px;text-align:center;
  font-size:0.8125rem;line-height:1.45;color:var(--muted);
}

/* ── CALENDAR — day view ── */
.cal-day-sub{
  padding:0 20px 8px;
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--muted);letter-spacing:0.1em;text-transform:uppercase;
}
#cal-list{padding:0 12px}
.cal-row{
  display:flex;align-items:stretch;gap:10px;
  background:var(--card);border-radius:12px;
  padding:10px 8px 10px 0;margin-bottom:8px;
  cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.cal-row:active{background:var(--card2)}
.cal-row.done{opacity:0.5}
.cal-row.done .cal-row-title{text-decoration:line-through}
.cal-row-bar{width:4px;border-radius:0 3px 3px 0;flex-shrink:0}
.cal-row-body{flex:1;min-width:0}
.cal-row-top{display:flex;align-items:baseline;gap:8px}
.cal-row-time{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--text);letter-spacing:0.04em;
}
.cal-row-chip{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.08em;
}
/* Donald, 2026-09-13: when a person ticked it — `✓ Sep 13 · 1426`, the same
   small mono as the chip, pushed to the far end of the meta line. A fact, not
   a badge; a clock-done item has no stamp at all. */
.cal-row-stamp{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.04em;color:var(--muted);margin-left:auto;white-space:nowrap;
}
/* The row's own OVERDUE, beside the DEADLINE chip (Donald, 2026-09-13). */
.cal-row-ovd{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.08em;color:var(--ovd);
  border:1px solid currentColor;border-radius:3px;padding:0 4px;line-height:1.4;
}
.cal-row-title{font-size:0.9375rem;font-weight:600;color:var(--text);margin-top:2px;line-height:1.3}
.cal-row-loc{font-size:0.8125rem;color:var(--muted);margin-top:2px;line-height:1.3}
/* Attached links (Donald, 2026-09-13). One tappable row per link under the
   event, inside the row body so it wraps with the title but ABOVE the row's
   own tap target: the delegated click handler tests .cal-row-link before
   .cal-row, so tapping the Teams link opens Teams and does not tick the drill
   off. 44px tall because this is the thing a thumb reaches for at 0958 with
   the meeting at 1000; the row body is otherwise text. Colour is the accent,
   not the type colour, so a link reads as a link on every kind of event. */
.cal-row-links{margin-top:6px;display:flex;flex-direction:column;gap:4px}
.cal-row-link{
  display:flex;align-items:center;gap:8px;
  min-height:44px;padding:0 12px 0 10px;
  background:var(--card2);border-radius:10px;
  color:var(--acc);text-decoration:none;
  font-size:0.875rem;font-weight:600;line-height:1.25;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.cal-row-link:active{background:var(--pill)}
.cal-row-link svg{flex-shrink:0;opacity:0.85}
.cal-row-link-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* A done row is faded as a whole (.cal-row.done{opacity:.5}); the link stays
   exactly as tappable — a meeting that ran late is still a meeting. */
.cal-row-check,.cal-row-edit{
  flex-shrink:0;align-self:center;
  width:44px;height:44px;border:none;border-radius:50%;
  background:var(--pill);color:var(--muted2);font-size:1.0625rem;line-height:1;
  cursor:pointer;touch-action:manipulation;
}
.cal-row-check{color:var(--acc)}
/* Un-ticked reads as an empty box, not a claim that somebody checked. */
.cal-row-check.off{color:#4e5661;background:var(--card2)}
.cal-row-edit{font-size:1rem;margin-left:2px}
/* Stage 6a: the view-only chevron on an event this person may not change. */
.cal-row-edit.view{font-size:1.25rem;color:var(--muted)}
.cal-hol-banner{
  background:rgba(245,166,35,0.1);border-radius:12px;
  padding:10px 14px;margin-bottom:10px;
}
.cal-hol-banner-h{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--acc);letter-spacing:0.14em;
}
.cal-hol-banner-n{font-size:0.9375rem;font-weight:700;color:var(--acc);margin-top:3px;line-height:1.3}
/* Donald, 2026-09-13: what is still owed from before this day, one quiet mono
   line each at the top of the day view — the holiday banner's slot, the
   deadline amber and not the gold, and a line rather than a banner so it
   nags without shouting. `OVERDUE · Time Sheets Due · was Sun Sep 27`. */
.cal-ovd-line{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.08em;color:var(--ovd);
  background:rgba(244,123,32,0.1);border-radius:8px;
  padding:7px 12px;margin-bottom:8px;line-height:1.3;
}
.cal-ovd-line-t{font-family:var(--font);letter-spacing:0;font-size:0.8125rem;font-weight:600}
.cal-day-empty{
  padding:28px 20px;text-align:center;
  font-size:0.875rem;color:var(--muted);
}
/* ── CALENDAR — the checklist (Donald, 2026-09-13; calCk* in calendar-checklist.js) ──
   On the row: `11 of 18 in · 7 outstanding` in the row's small mono and a
   2 px bar in the row's colour under it (treatment A+B from the mock). A
   done row fades as a whole, so the bar greys with it. */
.cal-row-ck{margin-top:6px}
.cal-row-ck-t{
  display:block;font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.06em;color:var(--muted);
}
.cal-row-ckbar{display:block;height:2px;margin-top:4px;background:var(--pill);border-radius:1px;overflow:hidden}
.cal-row-ckbar i{display:block;height:100%;border-radius:1px}
/* The sheet: the add/edit sheet's anatomy — scrim, rounded top, sticky head
   and a sticky foot, the body between them the only thing that scrolls (the
   list is eighteen rows tall on a 92 vh sheet). Above the day view, below
   the done confirm. */
#cal-ck-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200}
#cal-ck{
  position:fixed;bottom:0;left:0;right:0;z-index:201;
  background:var(--bg2);border-radius:20px 20px 0 0;
  box-shadow:0 -12px 48px rgba(0,0,0,.5);
  max-height:92vh;display:flex;flex-direction:column;
}
#cal-ck[hidden],#cal-ck-overlay[hidden]{display:none}
#cal-ck .cal-sheet-head{border-bottom:none;padding-bottom:6px}
.cal-ck-sub{
  flex-shrink:0;padding:0 20px 10px;border-bottom:1px solid var(--bdr);
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--muted);letter-spacing:0.12em;text-transform:uppercase;
}
.cal-ck-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:4px 20px 12px}
.cal-ck-foot{
  flex-shrink:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  padding:12px 20px calc(env(safe-area-inset-bottom,20px) + 12px);
  border-top:1px solid var(--bdr);
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  letter-spacing:0.1em;color:var(--text);
}
.cal-ck-foot-sep{color:var(--muted);opacity:0.6}
.cal-ck-foot-left{color:var(--muted)}
.cal-ck-foot-done{margin-left:auto;color:var(--acc)}
/* COMPLETED — the holiday banner's shape in the gold, at the top of the
   list, so opening a finished sheet says so before a single name is read. */
.cal-ck-banner{
  background:rgba(245,166,35,0.1);border:1px solid rgba(245,166,35,0.35);
  border-radius:12px;padding:10px 14px;margin:8px 0 6px;
}
.cal-ck-banner-h{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--acc);letter-spacing:0.14em;
}
.cal-ck-banner-n{font-size:0.9375rem;font-weight:700;color:var(--acc);margin-top:3px;line-height:1.3}
/* A SHIFT · 4 of 6 in the shift's own colour; CREW 1 in tiny caps over a
   hairline; then the names. */
.cal-ck-g{margin-top:10px}
.cal-ck-gh{
  display:flex;justify-content:space-between;align-items:baseline;
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;letter-spacing:0.14em;
  padding:8px 0 2px;
}
.cal-ck-gc{font-size:.8rem;letter-spacing:0.08em;color:var(--muted)}
.cal-ck-crew{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;letter-spacing:0.14em;
  color:var(--muted);opacity:0.7;padding:6px 0 2px;border-bottom:1px solid var(--bdr);
}
.cal-ck-row{
  display:flex;align-items:center;gap:10px;width:100%;min-height:52px;
  padding:4px 0;background:none;border:none;text-align:left;
  color:var(--text);font-family:var(--font);
  cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.cal-ck-row:active{background:var(--card)}
.cal-ck-row.busy{opacity:0.7}
.cal-ck-name{flex:1;min-width:0;font-size:0.9375rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The rank after the name (roster.rank, 0024): tiny dimmed caps, a name's
   width apart — `Andrew Tyson  CPT`. Quiet; the name is the thing. */
.cal-ck-rank{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;letter-spacing:0.1em;
  color:var(--muted);opacity:0.8;margin-left:8px;vertical-align:1px;
}
.cal-ck-stamp{
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;letter-spacing:0.04em;
  color:var(--muted);white-space:nowrap;
}
/* The green check — Donald: the board's green, not the amber tick. Empty
   reads as an empty box, not a claim that somebody checked. */
.cal-ck-box{
  flex-shrink:0;width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--card2);color:#4e5661;font-size:1.0625rem;line-height:1;
}
.cal-ck-box.on{background:var(--pill);color:var(--shift-c)}
.cal-ck-row.vacant{cursor:default;opacity:0.45}
/* Stage 6a: a check this person may not clear — the box goes quiet and the
   row answers a tap with the reason in the foot, not an untick. */
.cal-ck-row.locked .cal-ck-box.on{background:transparent;color:var(--muted);border:1.5px solid var(--muted);opacity:0.7}
.cal-ck-foot-hint{flex-basis:100%;font-size:.8rem;font-weight:600;color:var(--fire);line-height:1.35}
.cal-ck-row.vacant .cal-ck-name{font-style:italic;font-weight:500;color:var(--muted)}
.cal-ck-row.vacant .cal-ck-box.on{color:var(--muted)}
/* The editor's switch label: `CHECKLIST · EVERYONE SIGNS OFF`, the second
   half quieter. */
.cal-f-lbl-sub{opacity:0.6;letter-spacing:0.1em}
.cal-f-hint-ck{margin-top:0;margin-bottom:4px}

/* ── CALENDAR — add/edit sheet ──
 * Same anatomy as #filter-sheet: full-width scrim, rounded top, safe-area
 * padding at the bottom so the save button clears the home indicator. */
#cal-sheet-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200}
#cal-sheet{
  position:fixed;bottom:0;left:0;right:0;z-index:201;
  background:var(--bg2);border-radius:20px 20px 0 0;
  box-shadow:0 -12px 48px rgba(0,0,0,.5);
  max-height:92vh;display:flex;flex-direction:column;
}
#cal-sheet[hidden],#cal-sheet-overlay[hidden]{display:none}
.cal-sheet-head{
  flex-shrink:0;display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px 10px;border-bottom:1px solid var(--bdr);
}
.cal-sheet-title{font-size:1.0625rem;font-weight:700;color:var(--text);letter-spacing:-0.01em}
.cal-sheet-x{
  background:var(--pill);border:none;color:var(--muted2);
  font-size:1rem;width:44px;height:44px;border-radius:50%;line-height:1;cursor:pointer;
}
.cal-sheet-body{
  flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:12px 20px calc(env(safe-area-inset-bottom,20px) + 16px);
}
.cal-f-lbl{
  display:block;margin:12px 0 6px;
  font-family:var(--font-mono);font-size:.8rem;font-weight:700;
  color:var(--muted);letter-spacing:0.12em;text-transform:uppercase;
}
.cal-f-inp{
  width:100%;min-height:46px;
  background:var(--card);border:none;border-radius:12px;
  padding:12px 14px;color:var(--text);
  font-family:var(--font);font-size:16px;   /* anything smaller and iOS zooms the page (1rem is 15px here) */
}
.cal-f-inp::placeholder{color:var(--muted)}
.cal-f-inp:focus{outline:2px solid var(--acc);outline-offset:-2px}
.cal-f-area{min-height:64px;resize:vertical;line-height:1.4}
.cal-f-two{display:flex;gap:10px}
.cal-f-two > div{flex:1;min-width:0}
/* ALL DAY. Settings styles its binary choices by hiding the input and letting
   the label carry the state (.set-chip:has(input:checked)); this is that idea
   in switch form, so the sheet has no browser-default control on it. The input
   stays in the DOM and stays the source of truth — calSetTimesVisible() still
   just reads .checked — it is only moved out of sight, not replaced. */
.cal-f-switch{
  display:flex;align-items:center;justify-content:space-between;
  min-height:48px;margin-top:6px;
  cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
/* Off-screen rather than display:none, so a keyboard can still reach it. */
.cal-f-switch input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.cal-f-sw{
  position:relative;flex-shrink:0;
  width:50px;height:30px;border-radius:15px;
  /* 44px of thumb around a 30px track, without a 44px-tall grey slab */
  margin:7px 0;
  background:var(--pill);
  transition:background 0.18s ease;
}
.cal-f-sw::after{
  content:'';position:absolute;top:3px;left:3px;
  width:24px;height:24px;border-radius:50%;
  background:var(--muted);
  transition:transform 0.18s ease, background 0.18s ease;
}
.cal-f-switch:has(input:checked) .cal-f-sw{background:var(--acc)}
.cal-f-switch:has(input:checked) .cal-f-sw::after{
  transform:translateX(20px);background:var(--acc-ink);
}
.cal-f-switch:has(input:focus-visible) .cal-f-sw{outline:2px solid var(--acc);outline-offset:2px}
.cal-f-switch:active .cal-f-sw{opacity:0.8}
.cal-chips{display:flex;flex-wrap:wrap;gap:6px}
.cal-chip{
  min-height:44px;padding:0 12px;
  background:var(--card);border:1px solid var(--pill);border-radius:11px;
  color:var(--muted2);font-family:var(--font);font-size:0.8125rem;font-weight:600;
  cursor:pointer;touch-action:manipulation;
}
.cal-chip.on{background:var(--acc);border-color:var(--acc);color:var(--acc-ink);font-weight:700}
.cal-f-hint{
  margin-top:8px;font-size:.8rem;line-height:1.4;color:var(--muted);
}
.cal-f-err{
  background:rgba(236,91,82,0.14);border-radius:10px;
  padding:10px 12px;margin-bottom:4px;
  font-size:0.8125rem;font-weight:600;color:var(--fire);line-height:1.35;
}
/* Stage 6a: the read-only sheet's notice — same shape, the quiet amber
   rather than fire: nothing went wrong, this is just not yours to change. */
.cal-f-err.ro{background:rgba(245,166,35,0.12);color:var(--acc)}
#cal-sheet.ro .cal-f-inp,#cal-sheet.ro .cal-chip,#cal-sheet.ro .cal-f-sw{opacity:0.6}
#cal-sheet.ro .cal-f-link-rm,#cal-sheet.ro #cal-f-link-add{display:none}
.cal-f-save{
  width:100%;min-height:50px;margin-top:20px;
  background:var(--acc);border:none;border-radius:12px;color:var(--acc-ink);
  font-family:var(--font);font-size:0.9375rem;font-weight:700;
  cursor:pointer;touch-action:manipulation;
}
.cal-f-save.busy{opacity:0.6;pointer-events:none}
.cal-f-del{
  width:100%;min-height:48px;margin-top:10px;
  background:none;border:none;color:var(--fire);
  font-family:var(--font);font-size:0.875rem;font-weight:600;
  cursor:pointer;touch-action:manipulation;
}
/* Armed = the crew tapped Delete once. One inline confirm, no system dialog. */
.cal-f-del.armed{background:rgba(236,91,82,0.16);border-radius:12px;font-weight:700}
/* The done confirm (Donald, 2026-09-13; calConfirm in calendar-ticks.js): the edit
   sheet's anatomy, a question and two buttons, over everything including the
   sheet. A short rise from the bottom edge; none under reduced motion. */
#cal-confirm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:210}
#cal-confirm{
  position:fixed;bottom:0;left:0;right:0;z-index:211;
  background:var(--bg2);border-radius:20px 20px 0 0;
  box-shadow:0 -12px 48px rgba(0,0,0,.5);
  padding:22px 20px calc(env(safe-area-inset-bottom,20px) + 12px);
  animation:calConfirmUp .18s ease-out;
}
#cal-confirm[hidden],#cal-confirm-overlay[hidden]{display:none}
.cal-confirm-t{font-size:1.0625rem;font-weight:700;color:var(--text);letter-spacing:-0.01em}
.cal-confirm-m{font-size:0.9375rem;color:var(--muted2);line-height:1.4;margin-top:6px}
#cal-confirm .cal-confirm-ok{margin-top:18px}
#cal-confirm .cal-confirm-ok.danger{background:var(--fire);color:#fff}
.cal-confirm-no{
  width:100%;min-height:48px;margin-top:6px;
  background:none;border:none;color:var(--muted2);
  font-family:var(--font);font-size:0.9375rem;font-weight:600;
  cursor:pointer;touch-action:manipulation;
}
@keyframes calConfirmUp{from{transform:translateY(24px);opacity:0}to{transform:none;opacity:1}}
/* The scope chooser (Donald, 2026-09-13; calScopeAsk in calendar-ticks.js): the
   done confirm's sheet with three full-width options in place of the one
   accent button — This event / This and following / All events — and the
   same Cancel. On a save the first option carries the accent; on a delete
   (.del) none does and all three take the Delete button's red. */
#cal-scope-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:210}
#cal-scope{
  position:fixed;bottom:0;left:0;right:0;z-index:211;
  background:var(--bg2);border-radius:20px 20px 0 0;
  box-shadow:0 -12px 48px rgba(0,0,0,.5);
  padding:22px 20px calc(env(safe-area-inset-bottom,20px) + 12px);
  animation:calConfirmUp .18s ease-out;
}
#cal-scope[hidden],#cal-scope-overlay[hidden]{display:none}
.cal-scope-opts{display:flex;flex-direction:column;gap:8px;margin-top:18px}
.cal-scope-opt{
  width:100%;min-height:50px;
  background:var(--card);border:1px solid var(--pill);border-radius:12px;color:var(--text);
  font-family:var(--font);font-size:0.9375rem;font-weight:600;
  cursor:pointer;touch-action:manipulation;
}
#cal-scope:not(.del) .cal-scope-opt[data-scope="one"]{
  background:var(--acc);border-color:var(--acc);color:var(--acc-ink);font-weight:700;
}
#cal-scope.del .cal-scope-opt{color:var(--fire);border-color:rgba(236,91,82,0.35)}
/* LINKS in the sheet (Donald, 2026-09-13). One card per link: URL on top
   because pasting one is the whole gesture, the name under it, and a remove
   button down the right edge that spans both — the same 44px round button the
   day rows use for tick and pencil, so nothing here is a new control. The
   inputs are plain .cal-f-inp so they match Title and Location exactly. */
.cal-f-link{display:flex;gap:8px;align-items:stretch;margin-bottom:8px}
.cal-f-link-fields{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.cal-f-link-rm{
  flex-shrink:0;align-self:center;
  width:44px;height:44px;border:none;border-radius:50%;
  background:var(--pill);color:var(--muted2);font-size:1.125rem;line-height:1;
  cursor:pointer;touch-action:manipulation;
}
.cal-f-link-rm:active{background:var(--card2)}
#cal-f-links:empty{display:none}

/* ── CALENDAR — "you haven't seen this yet" ──
 * Donald, 2026-09-10. A dot on the Calendar tab while the station calendar
 * holds events this phone has never shown its owner, and a short amber wash
 * over the day(s) holding them when the month opens. It fades on its own and
 * does not come back — a fire station is not a game, and a badge that sits
 * there blinking is a badge people learn to ignore.
 */
.nb .ic{position:relative}
.nb.has-new .ic::after{
  content:'';position:absolute;top:-2px;right:-4px;
  width:7px;height:7px;border-radius:50%;
  background:var(--acc);
  box-shadow:0 0 0 2px var(--bg2);   /* punched out of the nav bar, not floating on it */
}
.cal-cell.fresh{animation:calFresh 3.2s ease-out both}
/* The row a tapped reminder landed on (calHandleDeepLink, 2026-09-13): the
   same wash, once, so "that event" is the one the eye goes to. */
.cal-row.hit{animation:calFresh 3.2s ease-out both}
@keyframes calFresh{
  0%   {background:rgba(245,166,35,0.24);box-shadow:inset 0 0 0 1.5px rgba(245,166,35,0.55)}
  55%  {background:rgba(245,166,35,0.18);box-shadow:inset 0 0 0 1.5px rgba(245,166,35,0.4)}
  100% {background:var(--card);box-shadow:inset 0 0 0 1.5px rgba(245,166,35,0)}
}
/* Today's square already owns the amber outline; the wash must not fight it. */
.cal-cell.today.fresh{animation:calFreshToday 3.2s ease-out both}
@keyframes calFreshToday{
  0%   {background:rgba(245,166,35,0.24)}
  55%  {background:rgba(245,166,35,0.18)}
  100% {background:var(--card)}
}
@media (prefers-reduced-motion:reduce){
  /* No animation at all — a flat tint that the next render clears. */
  .cal-cell.fresh,.cal-cell.today.fresh{animation:none;background:rgba(245,166,35,0.18)}
  #cal-confirm,#cal-scope,#set-act{animation:none}
}

/* Vacation bid entry (2026-10-15): one line under the month title while bid mode is on. */
.vb-banner{display:flex;align-items:center;gap:8px;margin:0 8px 8px;padding:11px 14px;border-radius:12px;
  background:rgba(245,166,35,.14);color:var(--text);font-size:14px;font-weight:600;text-decoration:none}
.vb-banner[hidden]{display:none}
.vb-banner b{color:var(--acc)}
.vb-banner span{margin-left:auto;color:var(--acc);font-size:18px}
