/* styles-late.css — the second half of styles.css (split to stay under the size cap). Linked IMMEDIATELY after
   styles.css and before every other sheet, so the cascade order is exactly what the one file had:
   empty states, print, the Config Page, the grouped grid, the saving modal, then accessibility + responsive. */

/* empty states — read as intentional, not broken */
.fc .fc-list-empty { background: var(--paper); }
.fc .fc-list-empty-cushion {
  font-family: var(--ui); font-weight: 500; font-size: .92rem; color: var(--ink-3);
  letter-spacing: .005em;
}
.fc .fc-list-empty-cushion::before {
  content: ""; display: block; width: 26px; height: 2px; margin: 0 auto 14px;
  background: var(--wuwm-gold); border-radius: 2px;
}

/* ---------- empty-state overlay for grid views (A6) ---------- */
#bc-empty-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; z-index: 5; }
#bc-empty-overlay .bc-empty-inner { text-align: center; background: rgba(250,248,244,.78); padding: 22px 30px; border-radius: 12px; }
#bc-empty-overlay .bc-empty-rule { display: block; width: 26px; height: 2px; margin: 0 auto 14px; background: var(--wuwm-gold); border-radius: 2px; }
#bc-empty-overlay .bc-empty-msg { font-family: var(--ui); font-weight: 500; font-size: .92rem; color: var(--ink-3); }

/* ---------- print / export (A3) ---------- */
#bc-print-footer { display: none; }
@media print {
  .bc-gear, #bc-drawer { display: none !important; }
  .fc .fc-toolbar .fc-button { display: none !important; }      /* hide nav/view/export buttons; keep the title */
  header.bc-head .bc-legend { display: none !important; }        /* legend prints in the footer instead */
  body { background: #fff !important; }
  #app { max-width: none; margin: 0; padding: 12px 0 0; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }  /* print event colors */
  #calendar { box-shadow: none; }
  #bc-print-footer {
    display: block; position: fixed; bottom: 0; left: 0; right: 0;
    border-top: 1px solid #999; padding: 8px 10px; background: #fff;
    font-family: var(--ui); font-size: 9pt;
  }
  .bc-print-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 4px; }
  .bc-print-legend-item { display: inline-flex; align-items: center; gap: 6px; color: #222; }
  .bc-print-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
  .bc-print-meta { color: #555; font-size: 8pt; }
  @page { margin: 12mm; }
}

/* ---------- Config Page (front door) ---------- */
#config-page { flex: 1 1 auto; overflow-y: auto; padding-top: 8px; }
.bc-cfgpage-loading { color: var(--ink-3); padding: 24px; }
.bc-cfg-toolbar { display: flex; align-items: center; gap: 12px; margin: 8px 0 18px; }
.bc-cfg-h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.bc-primary-btn { font-family: var(--ui); font-size: .95rem; font-weight: 600; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 9px; padding: 10px 18px; cursor: pointer; }
.bc-primary-btn:hover { background: #000; }
.bc-link-btn { background: none; border: none; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-family: var(--ui); font-size: .92rem; padding: 6px 2px; }
.bc-link-btn:hover { color: var(--ink); }
.bc-cfg-empty { background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.bc-cfg-emptyrow { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }
.bc-cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.bc-cfg-card { position: relative; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.bc-cfg-card-title { font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--ink); margin: 6px 0 4px; }
.bc-cfg-card-meta { font-size: .85rem; color: var(--ink-3); margin-bottom: 16px; }
.bc-cfg-card-actions { display: flex; align-items: center; gap: 8px; }
.bc-cfg-role { position: absolute; top: 16px; right: 16px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; }
.bc-cfg-role-owner { background: rgba(var(--wuwm-gold-rgb), .25); color: #6b5300; }
.bc-cfg-role-editor { background: #E5F0FF; color: #1F5Fb0; }
.bc-cfg-role-viewer { background: #EEEAE0; color: var(--ink-2); }
/* modal */
.bc-cfg-overlay { position: fixed; inset: 0; background: rgba(35,31,32,.4); display: flex; align-items: flex-start; justify-content: center; z-index: 200; padding: 5vh 16px; overflow-y: auto; }
.bc-cfg-modal { background: var(--surface); border-radius: 16px; width: min(1100px, 96vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; max-height: 94vh; }
.bc-cfg-modal-head { display: flex; align-items: center; gap: 12px; padding: 22px 28px; border-bottom: 1px solid var(--hairline); }
.bc-cfg-modal-head h2 { margin: 0; flex: 1; font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.bc-cfg-modal-body { padding: 22px 28px; overflow-y: auto; }
.bc-cfg-modal-body .bc-row-label { font-size: 1.05rem; }
.bc-cfg-modal-body .bc-select, .bc-cfg-modal-body .bc-text { font-size: 1rem; padding: 9px 11px; }
.bc-cfg-modal-foot { display: flex; align-items: center; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--hairline); }
.bc-cfg-modal-foot .bc-hint { flex: 1; margin: 0; }
.bc-cfg-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.bc-cfg-selected { font-size: 1rem; font-weight: 600; color: #2E7D32; min-height: 1.2em; margin: 8px 0; }
.bc-cfg-tree { border: 1px solid var(--hairline); border-radius: 10px; max-height: 440px; overflow-y: auto; margin: 8px 0; }
.bc-cfg-node { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--hairline); font-size: 1.02rem; }
.bc-cfg-node:last-child { border-bottom: none; }
.bc-cfg-node-open { cursor: pointer; }
.bc-cfg-node-open:hover { background: #F7F3EA; }
.bc-cfg-node-label { flex: 0 1 auto; }
.bc-cfg-crumb { display: none; align-items: center; gap: 12px; margin: 10px 0 2px; }
.bc-cfg-path { font-size: .92rem; color: var(--ink-2); }
.bc-colorfield { display: inline-flex; align-items: center; gap: 8px; }
.bc-hex { width: 100px; font-family: var(--ui); font-size: .95rem; padding: 8px 9px; border: 1px solid var(--control-line); border-radius: 7px; text-transform: lowercase; }
/* tabbed config editor */
.bc-cfg-tabbar { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--hairline); margin-bottom: 18px; }
.bc-cfg-tab { font-family: var(--ui); font-size: 1rem; font-weight: 600; color: var(--ink-3); background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 16px; cursor: pointer; }
.bc-cfg-tab:hover { color: var(--ink-2); }
.bc-cfg-tab.active { color: var(--ink); border-bottom-color: var(--wuwm-gold); }
.bc-cfg-tabcontent { min-height: 300px; }
.bc-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.bc-chip { font-family: var(--ui); font-size: .86rem; background: #F2ECE0; border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--ink); }
.bc-chip:hover { background: var(--wuwm-gold-soft); }

/* ---------- grouped grid (matrix: groups x days) ---------- */
.fc.bc-grouped-mode .fc-view-harness { display: none; }
#bc-grouped { display: none; }
.fc.bc-grouped-mode #bc-grouped { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.bc-grid-scroll { overflow: auto; flex: 1 1 auto; min-height: 0; }
.bc-grid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
/* Bars = Smartsheet-style timeline: ONE continuous date axis over every event, scrolled + zoomed (never
   paged). Two-tier sticky header (coarse over fine), frozen group lanes, a Today line; single-date items
   are milestone diamonds, date ranges are bars, each with its label to the right. */
.bc-gantt-scroll { overflow: auto; flex: 1 1 auto; min-height: 0; }
.bc-gantt { position: relative; width: max-content; min-width: 100%; }
.bc-gantt-head { display: flex; position: sticky; top: 0; z-index: 5; }
.bc-gantt-corner { position: sticky; left: 0; z-index: 6; flex: none; background: var(--surface); display: flex; align-items: flex-end; font-family: var(--ui); font-weight: 600; font-size: calc(.8rem * var(--bc-cal-scale, 1)); color: var(--ink-2); padding: 6px 12px; border-right: 1px solid var(--hairline-strong); border-bottom: 1px solid var(--hairline); box-sizing: border-box; }
.bc-gantt-axis { position: relative; flex: none; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.bc-gantt-tier { position: relative; height: 22px; }
.bc-gantt-tier-top { border-bottom: 1px solid var(--hairline); }
.bc-gantt-seg { position: absolute; top: 0; height: 100%; box-sizing: border-box; border-right: 1px solid var(--hairline); font-family: var(--ui); font-size: calc(.72rem * var(--bc-cal-scale, 1)); color: var(--ink-2); display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; padding: 0 4px; }
.bc-gantt-seg-top { font-weight: 700; color: var(--ink); justify-content: flex-start; }
.bc-gantt-lane { display: flex; position: relative; border-bottom: 1px solid var(--hairline); }
.bc-gantt-lanehead { position: sticky; left: 0; z-index: 3; flex: none; background: var(--surface); display: flex; align-items: center; font-family: var(--ui); font-weight: 600; font-size: calc(.88rem * var(--bc-cal-scale, 1)); color: var(--ink); padding: 8px 12px 8px 16px; border-right: 1px solid var(--hairline-strong); box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
.bc-gantt-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.bc-gantt-track { position: relative; flex: none; }
.bc-gantt-todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--wuwm-gold, #FFC20E); opacity: .85; z-index: 1; }
.bc-gantt-item { position: absolute; display: flex; align-items: center; gap: 6px; cursor: grab; z-index: 2; }
.bc-gantt-item.bc-gantt-dragging { cursor: grabbing; opacity: .75; z-index: 4; }
.bc-gantt-bar { flex: none; border-radius: 5px; box-shadow: 0 1px 2px rgba(0,0,0,.14); }
.bc-gantt-ms { flex: none; border-radius: 3px; transform: rotate(45deg); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.bc-gantt-label { font-family: var(--ui); font-size: calc(.82rem * var(--bc-cal-scale, 1)); font-weight: 600; color: var(--ink); white-space: nowrap; }
.bc-gantt-item:hover .bc-gantt-label { text-decoration: underline; }
.bc-gantt-todaybtn { margin-left: 6px; }
.bc-grid th, .bc-grid td { border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); vertical-align: top; }
.bc-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); font-family: var(--ui); font-size: .8rem; font-weight: 600; color: var(--ink-2); padding: 10px 8px; text-align: center; }
.bc-grid-corner { position: sticky; left: 0; z-index: 4; text-align: left !important; width: 180px; min-width: 180px; }
.bc-grid-dayhead.bc-grid-today { color: var(--ink); box-shadow: inset 0 -3px 0 var(--wuwm-gold); }
.bc-grid-grouphead { position: sticky; left: 0; z-index: 2; background: var(--surface); font-family: var(--ui); font-size: calc(.95rem * var(--bc-cal-scale, 1)); font-weight: 600; color: var(--ink); padding: 12px; width: 180px; min-width: 180px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.bc-grid-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.bc-grid-sub { color: var(--ink-3); font-weight: 500; }   /* "then group by" secondary label */
/* bars: a full-height table lets the browser divide the leftover room across however many group
   rows exist. A cell's height is a MINIMUM in table layout, so a busy cell still grows + scrolls. */
.bc-grid-bars { height: 100%; }
.bc-grid-cell { padding: 6px; height: 64px; }
.bc-grid-cell.bc-grid-today { background: rgba(var(--wuwm-gold-rgb), .06); }
.bc-grid-chip { font-family: var(--ui); font-size: calc(.82rem * var(--bc-cal-scale, 1)); line-height: 1.25; border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; cursor: grab; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }
.bc-grid-chip:hover { filter: brightness(.93); }
.bc-grid-chip:active { cursor: grabbing; }
.bc-grid-chip.bc-grid-dragging { opacity: .4; }
/* Bars | Times switch above the matrix */
.bc-grid-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex: none; }
.bc-grid-modes { display: flex; justify-content: flex-end; gap: 4px; padding: 0 4px 6px; flex: none; }
.bc-grid-ranges { display: flex; justify-content: flex-start; gap: 4px; padding: 0 4px 6px; flex: none; }
.bc-grid-mode, .bc-grid-range { font-family: var(--ui); font-size: calc(.78rem * var(--bc-cal-scale, 1)); font-weight: 600; color: var(--ink-2); background: transparent; border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.bc-grid-mode:hover:not(:disabled), .bc-grid-range:hover:not(:disabled) { background: var(--wuwm-gold-soft); }
.bc-grid-mode.active, .bc-grid-range.active { background: var(--wuwm-gold-soft); color: var(--ink); border-color: var(--wuwm-gold); }
.bc-grid-mode:disabled, .bc-grid-range:disabled { opacity: .45; cursor: default; }
/* times mode: every band repeats ONE auto-fitted hour window, so blocks line up across bands */
.bc-lane-head { padding: 0 12px !important; }
.bc-lane-name { display: flex; align-items: center; }
.bc-lane-ruler { position: relative; }
.bc-lane-tick { position: absolute; right: 0; font-family: var(--ui); font-size: calc(.7rem * var(--bc-cal-scale, 1)); font-weight: 500; color: var(--ink-3); transform: translateY(-.45em); }
.bc-lane-cell { padding: 0 !important; height: auto !important; }
.bc-lane-ad { display: flex; gap: 2px; align-items: center; padding: 0 2px; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.bc-lane-adchip { flex: 0 1 auto; margin: 0 !important; font-size: calc(.72rem * var(--bc-cal-scale, 1)); padding: 1px 6px; }
.bc-lane-body { position: relative; }
.bc-lane-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--hairline); opacity: .55; }
.bc-lane-block { position: absolute; margin: 0 !important; white-space: normal; font-size: calc(.76rem * var(--bc-cal-scale, 1)); line-height: 1.2; padding: 2px 5px; }
.bc-lane-block .bc-chip-time { display: block; }
.bc-lane-block.bc-lane-short { white-space: nowrap; text-overflow: ellipsis; }
/* timeline mode: one day, clock left-to-right, a lane per group */
.bc-tl-days { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 8px; flex: none; }
.bc-tl-day { font-family: var(--ui); font-size: calc(.78rem * var(--bc-cal-scale, 1)); font-weight: 600; color: var(--ink-2); background: transparent; border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.bc-tl-day:hover { background: var(--wuwm-gold-soft); }
.bc-tl-day.active { background: var(--wuwm-gold-soft); color: var(--ink); border-color: var(--wuwm-gold); }
.bc-tl-day.bc-tl-today { text-decoration: underline; text-underline-offset: 3px; }
.bc-tl { min-width: 720px; }
.bc-tl-axis { position: relative; height: 18px; margin-left: 180px; border-bottom: 1px solid var(--hairline); }
.bc-tl-tick { position: absolute; top: 1px; font-family: var(--ui); font-size: calc(.7rem * var(--bc-cal-scale, 1)); font-weight: 500; color: var(--ink-3); transform: translateX(-50%); }
.bc-tl-tick.bc-tl-tick-end { left: auto; right: 0; transform: none; }
.bc-tl-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--hairline); }
.bc-tl-name { flex: 0 0 180px; width: 180px; font-family: var(--ui); font-size: calc(.95rem * var(--bc-cal-scale, 1)); font-weight: 600; color: var(--ink); padding: 10px 12px; display: flex; align-items: center; white-space: normal; overflow-wrap: anywhere; }
.bc-tl-track { position: relative; flex: 1 1 auto; min-height: 44px; }
.bc-tl-row { align-items: stretch; }
.bc-tl-line { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--hairline); opacity: .55; }
/* fill = colour-by (legend), outline = the group's colour; transparent keeps the geometry stable */
.bc-tl-block { position: absolute; margin: 0 !important; white-space: normal; font-size: calc(.78rem * var(--bc-cal-scale, 1)); line-height: 1.18;
  padding: 2px 6px; cursor: pointer; box-sizing: border-box; border: 3px solid transparent;
  display: flex; flex-direction: column; justify-content: center; }
.bc-tl-block .bc-chip-time { display: block; }
.bc-tl-allday .bc-tl-track { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 5px; }
.bc-tl-adchip { margin: 0 !important; font-size: calc(.74rem * var(--bc-cal-scale, 1)); padding: 2px 8px; cursor: pointer; }
.bc-lane-short { white-space: nowrap; text-overflow: ellipsis; }
.bc-lane-short .bc-chip-time { display: inline; }
/* a half-hour block is ~16px tall: drop the time, tighten the box, keep the title legible */
.bc-lane-tiny { padding: 0 5px !important; font-size: calc(.7rem * var(--bc-cal-scale, 1)); line-height: 1.15; }
.bc-lane-tiny .bc-chip-time { display: none !important; }
.bc-tl-block.bc-lane-short .bc-chip-time { display: none; }
.bc-lane-block.bc-lane-short .bc-chip-time { display: inline; }
.bc-chip-time { font-weight: 700; opacity: .92; }
/* the floating clone that follows the cursor during a pointer drag */
.bc-grid-ghost { position: fixed; pointer-events: none; z-index: 10000; opacity: .92; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
body.bc-grid-dragging-active { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
/* drop-target highlight while dragging a chip onto a day cell */
.bc-grid-cell.bc-drop-target { outline: 2px dashed var(--wuwm-gold, #FFC20E); outline-offset: -3px; background: rgba(var(--wuwm-gold-rgb, 255,194,14), .12); }
/* transient toast (drag-drop feedback / write errors) */
.bc-flash { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); z-index: 9999;
  background: #231F20; color: #fff; font-family: var(--ui); font-size: .9rem; font-weight: 600;
  padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; max-width: 80vw; }
.bc-flash.show { opacity: 1; transform: translate(-50%, 0); }
.bc-flash.bc-flash-error { background: #8A3B30; }
.bc-grid-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; min-height: 200px; color: var(--ink-3); font-size: .95rem; }
/* saving modal: blocks input while a write is in flight (progress bar), then resolves into a
   summary the viewer must close */
.bc-saving-overlay { position: fixed; inset: 0; z-index: 10001; display: none; align-items: center; justify-content: center;
  background: rgba(26, 22, 22, .16); backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); cursor: progress; }
.bc-saving-overlay.show { display: flex; }
.bc-saving-overlay.bc-saving-done { cursor: default; }
.bc-saving-card { background: #fff; border-radius: 14px; padding: 20px 24px; min-width: 300px; max-width: min(440px, 86vw);
  box-shadow: 0 18px 48px rgba(0,0,0,.28); font-family: var(--ui); text-align: left; }
.bc-saving-label { font-weight: 700; font-size: 1rem; color: #231F20; margin-bottom: 12px; }
.bc-saving-label.bc-save-ok { color: #2E7D46; }
.bc-saving-label.bc-save-err { color: #8A3B30; }
.bc-progress { height: 8px; border-radius: 999px; background: #ECE6DA; overflow: hidden; position: relative; }
.bc-progress-bar { position: absolute; top: 0; bottom: 0; width: 38%; border-radius: 999px;
  background: var(--wuwm-gold, #FFC20E); animation: bc-indeterminate 1.05s ease-in-out infinite; }
@keyframes bc-indeterminate { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bc-progress-bar { animation-duration: 2s; } }
.bc-saving-detail { font-size: .92rem; color: var(--ink-2, #3a3a3a); line-height: 1.45; }
.bc-move-name { font-weight: 700; color: #231F20; font-size: 1rem; margin-bottom: 10px; word-break: break-word; }
.bc-move-row { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.bc-move-k { flex: 0 0 68px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3, #7a7268); }
.bc-move-v { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95rem; color: #231F20; }
/* "＋ New" story modal + popover Delete */
.bc-modal-overlay { position: fixed; inset: 0; z-index: 10002; display: flex; align-items: center; justify-content: center; background: rgba(26,22,22,.28); padding: 16px; }
.bc-modal-card { background: #fff; border-radius: 14px; padding: 20px 22px; width: min(460px, 94vw); max-height: 88vh; overflow: auto; box-shadow: 0 18px 48px rgba(0,0,0,.3); font-family: var(--ui); }
.bc-modal-title { font-family: var(--display, var(--ui)); font-weight: 700; font-size: 1.15rem; color: #231F20; margin-bottom: 14px; }
.bc-modal-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.bc-modal-key { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3, #7a7268); }
.bc-modal-row input, .bc-modal-row select, .bc-modal-row textarea { font-family: var(--ui); font-size: .95rem; padding: 8px 10px; border: 1px solid var(--control-line, #E5DDCD); border-radius: 8px; width: 100%; text-align: left; }
.bc-modal-row .bc-popover-check { width: 18px; height: 18px; }   /* checkbox stays its own size, left-aligned by the row */
.bc-modal-msg { font-size: .85rem; color: #8A3B30; min-height: 1.1em; margin: 4px 0; }
.bc-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.bc-pop-del { color: #CF222E; }
.bc-pop-del:hover { background: #FBE9E6; }
.bc-saving-actions { margin-top: 16px; display: flex; justify-content: flex-end; }
.bc-saving-close { font-family: var(--ui); font-weight: 700; font-size: .88rem; color: #fff; background: #231F20;
  border: 0; border-radius: 9px; padding: 8px 18px; cursor: pointer; }
.bc-saving-close:hover { background: #000; }
.bc-saving-close:focus-visible { outline: 3px solid rgba(var(--wuwm-gold-rgb, 255,194,14), .6); outline-offset: 2px; }
/* roomier time-grid rows so 15-minute slots are easy to read and drop onto (Week/Day views) */
.fc .fc-timegrid-slot { height: 1.8em; }
/* settings drawer: admin/viewer role badge + locked config-level controls */
.bc-role { font-family: var(--ui); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }
.bc-role-admin { background: #E7F4EA; color: #2D7A45; }
.bc-role-editor { background: #E6EEF9; color: #1F5FA8; }
.bc-role-viewer { background: #F0ECE2; color: #7a7268; }
.bc-access-tag { font-size: .72rem; font-weight: 600; color: var(--ink-3, #7a7268); background: #F2ECE0; border-radius: 999px; padding: 1px 8px; margin-left: 8px; white-space: nowrap; }
/* app-native group cards in the Access tab */
.bc-group-card { border: 1px solid var(--hairline-strong, #E5DDCD); border-radius: 10px; padding: 10px 12px; margin: 8px 0; background: #FCFAF5; }
.bc-group-head { display: flex; align-items: center; gap: 8px; }
.bc-group-name { font-weight: 700; color: #231F20; }
.bc-group-members { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bc-member-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; background: #EEF1F5; color: #2b2b2b; border-radius: 999px; padding: 2px 6px 2px 10px; }
.bc-member-x { border: 0; background: transparent; color: #70685F; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 2px; }
.bc-member-x:hover { color: #CF222E; }
.bc-lock-note { font-size: .82rem; color: #7a5a1e; background: #FBF3DF; border: 1px solid #F0E2B8; border-radius: 8px; padding: 8px 10px; margin: 8px 0 12px; line-height: 1.4; }
.bc-drawer .bc-tabcontent [disabled], .bc-drawer .bc-cfg-block [disabled] { opacity: .5; cursor: not-allowed; }
.bc-cfg-block.bc-locked { opacity: .95; }
/* build stamp in the masthead (confirms which bundle the browser loaded) */
.bc-build { display: inline-block; margin-top: 3px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: #C8102E; padding: 1px 8px; border-radius: 999px; }
/* "← Calendars" back-link in the calendar masthead (config mode) */
.bc-configs-link { order: 0; font-size: .82rem; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border: 1px solid var(--hairline-strong); border-radius: 999px; margin-right: 4px; }
.bc-configs-link:hover { background: #F2ECE0; color: var(--ink); }

/* ============================ accessibility + responsive ============================ */
/* visible keyboard focus everywhere (low specificity so components can still override) */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(var(--wuwm-gold-rgb, 255,194,14), .75); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .bc-progress-bar { animation: none; left: 0; width: 100%; opacity: .6; }
}

/* tablet */
@media (max-width: 820px) {
  .bc-head { flex-wrap: wrap; row-gap: 6px; }
  .bc-legend { flex-wrap: wrap; }
}
/* phone */
@media (max-width: 640px) {
  .bc-drawer { width: 100vw; max-width: 100vw; }
  .bc-head { padding: 8px 12px; gap: 8px; }
  .bc-titles h1 { font-size: 1.1rem; }
  .bc-sub { font-size: .78rem; }
  .fc .fc-toolbar.fc-header-toolbar { flex-wrap: wrap; gap: 6px 8px; }
  .fc .fc-toolbar-title { font-size: 1.05rem; }
  .fc .fc-toolbar-chunk { display: flex; flex-wrap: wrap; gap: 4px; }
  .bc-popover { max-width: 92vw; }
  .bc-tabbar { flex-wrap: wrap; }
  .bc-grid-scroll { -webkit-overflow-scrolling: touch; }
  .bc-modal-card { padding: 16px; }
}
/* larger tap targets on touch devices */
@media (pointer: coarse) {
  .fc .fc-button, .bc-add-btn, .bc-del-btn, .bc-seg-btn, .bc-saving-close, .bc-tab { min-height: 40px; }
  .bc-member-x { min-width: 28px; min-height: 28px; }
}
