:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #f1f0ec;
  --text: #1d1f23;
  --muted: #6b6f76;
  --line: #e2e0db;
  --line-soft: #f0eeea;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(20, 22, 26, .14), 0 2px 6px rgba(20, 22, 26, .06);
  --slot: 22px;
  --gutter: 56px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
/* Theme: Settings → Appearance sets data-theme="light" | "dark"; no attribute = follow the system */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316; --surface: #1b1c20; --surface-2: #25272c; --text: #eceef1; --muted: #9a9ea7;
    --line: #2f3137; --line-soft: #24262b; --accent: #2dd4bf; --accent-ink: #062521;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121316; --surface: #1b1c20; --surface-2: #25272c; --text: #eceef1; --muted: #9a9ea7;
  --line: #2f3137; --line-soft: #24262b; --accent: #2dd4bf; --accent-ink: #062521;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (pointer: coarse) { :root { --slot: 26px; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.35 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { flex: none; }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: inline; } }

#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 750; font-size: 16px; letter-spacing: -.01em; margin-right: 6px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.navbtns { display: flex; align-items: center; gap: 2px; }
.range { flex: 1; min-width: 0; margin: 0 0 0 6px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.break { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; white-space: nowrap; transition: background .12s; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.muted { color: var(--muted); }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; }
.link { border: 0; background: none; padding: 2px 4px; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 0 11px; height: 28px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 550; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

/* ---------- layout ---------- */
.layout { flex: 1; display: flex; min-height: 0; }
.sidebar { width: 296px; flex: none; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 14px 40px; overscroll-behavior: contain; }
.grabber { display: none; }
.panel + .panel { margin-top: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h3 { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.hint { margin: 8px 0 10px; font-size: 12px; color: var(--muted); }
.help { display: block; margin: 6px 0 0; font-size: 12px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 550; transition: transform .12s, background .12s, border-color .12s; }
.user-chip:hover { border-color: var(--c); }
.user-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); box-shadow: inset 0 0 0 1px var(--c); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.avatar.sm { width: 18px; height: 18px; font-size: 10px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sidebar { overflow-x: hidden; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 46px; padding: 6px 9px 6px 11px; border-radius: 9px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); border-left: 4px solid var(--c); cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .12s, box-shadow .12s; text-align: left; }
.tile:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 0, 0, .08); }
.tile:focus-visible, .event:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tile-name { display: flex; align-items: center; gap: 4px; font-weight: 650; font-size: 13px; color: color-mix(in srgb, var(--c) 52%, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-tile { --c: var(--muted); flex-direction: row; align-items: center; justify-content: center; gap: 4px; background: transparent; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.add-tile:hover { color: var(--accent); border-color: var(--accent); box-shadow: none; }

/* ---------- calendar ---------- */
.calendar { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.cal-body { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; position: relative; }
.cal-head, .cal-grid { display: grid; grid-template-columns: var(--gutter) repeat(var(--days, 7), minmax(0, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 8; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 var(--line); }
.day-head { border: 0; background: transparent; padding: 8px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; border-left: 1px solid var(--line-soft); min-width: 0; }
.day-head:hover .dnum { background: var(--surface-2); }
.dow { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.dnum { font-size: 19px; font-weight: 650; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; transition: background .12s; }
.day-head.is-today .dnum, .day-head.is-today:hover .dnum { background: var(--accent); color: var(--accent-ink); }
.day-head.is-today .dow { color: var(--accent); }

.cal-grid { height: calc(var(--slot) * 48); position: relative; }
.gutter { position: relative; }
.hour { position: absolute; right: 8px; top: calc(var(--slot) * 2 * var(--h)); transform: translateY(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.day-col {
  position: relative; border-left: 1px solid var(--line); cursor: cell;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 100% calc(var(--slot) * 2), 100% var(--slot);
}
.day-col.is-today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.events { position: absolute; inset: 0; pointer-events: none; }

/* Overlap layout (see layoutDay in calendar.js):
   --off  room for long-event rails on the left   --d  cascade depth (indent)
   --x/--w  share of the remaining width for items starting at about the same time */
.events { --ind: min(18px, 16%); }
.event, .note-pin {
  --avail: calc(100% - 5px - var(--off, 0px) - var(--d, 0) * var(--ind));
  left: calc(2px + var(--off, 0px) + var(--d, 0) * var(--ind) + var(--avail) * var(--x, 0));
  width: calc(var(--avail) * var(--w, 1) - 1px);
  z-index: calc(2 + var(--d, 0));
}
.event {
  pointer-events: auto; position: absolute;
  top: calc(var(--slot) * var(--s) + 1px); height: calc(var(--slot) * var(--l) - 2px);
  padding: 3px 6px 3px 7px; border-radius: 7px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 18%, var(--surface));
  border-left: 3px solid var(--c);
  box-shadow: 0 0 0 1px var(--surface);
  color: color-mix(in srgb, var(--c) 45%, var(--text));
  font-size: 12px; line-height: 1.25; cursor: grab;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: opacity .15s, box-shadow .12s;
}
.event:hover { z-index: 20; box-shadow: 0 0 0 1px var(--surface), 0 3px 10px rgba(0, 0, 0, .14); }
.ev-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 22px; }
.ev-time { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; }
.event.short { display: flex; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.event.short .ev-title { padding-right: 0; flex: 0 1 auto; }
.event.short .ev-time { flex: 1; min-width: 0; padding-right: 22px; }
.event { container-type: inline-size; }
@container (max-width: 150px) {
  .ev-time-hide, .event.short .ev-time { display: none; }
  .event.short .ev-title { padding-right: 22px; }
}
.ev-badges { position: absolute; top: 3px; right: 4px; display: flex; gap: 3px; align-items: center; }
.event.short .ev-badges { top: 50%; transform: translateY(-50%); }
.ev-note { border: 0; padding: 0; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 28%, var(--surface)); color: inherit; cursor: pointer; }
.ev-note:hover { background: var(--c); color: #fff; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 20px; height: 3px; margin-left: -10px; border-radius: 2px; background: var(--c); opacity: 0; transition: opacity .12s; }
.event:hover .ev-resize::after, .event.resizing .ev-resize::after { opacity: .7; }
@media (pointer: coarse) { .ev-resize { height: 14px; } .ev-resize::after { opacity: .45; } }
.event.dim { opacity: .25; }
.event.lifted { opacity: .3; }
.event.resizing { z-index: 6; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }

.drop-preview {
  position: absolute; z-index: 7; left: 2px; right: 3px; pointer-events: none;
  top: calc(var(--slot) * var(--s) + 1px); height: calc(var(--slot) * var(--l) - 2px);
  border-radius: 7px; border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 24%, var(--surface));
  color: color-mix(in srgb, var(--c) 45%, var(--text)); padding: 2px 6px; font-size: 12px;
  display: flex; flex-direction: column; overflow: hidden; line-height: 1.25; box-shadow: var(--shadow);
}
.drop-preview b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drag-ghost { position: fixed !important; left: 0; top: 0; z-index: 300; pointer-events: none; margin: 0; opacity: .92; box-shadow: var(--shadow); transition: none !important; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
body.is-dragging .cal-body { touch-action: none; }

.now-line { position: absolute; left: -1px; right: 0; z-index: 4; top: calc(var(--slot) * var(--m)); height: 2px; background: #ef4444; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.slot-hover { position: absolute; left: 0; right: 0; top: calc(var(--slot) * var(--s)); height: var(--slot); background: color-mix(in srgb, var(--accent) 9%, transparent); pointer-events: none; font-size: 11px; color: var(--muted); padding-left: 6px; line-height: var(--slot); overflow: hidden; white-space: nowrap; }
.slot-hover::after { content: "+ #activity"; }

/* quick add */
.quick-add { position: absolute; z-index: 20; left: 2px; right: 2px; min-width: 170px; top: calc(var(--slot) * var(--s) - 3px); }
.quick-add.flip { left: auto; }
.quick-add input { width: 100%; height: calc(var(--slot) + 6px); border: 2px solid var(--accent); border-radius: 7px; padding: 0 7px; background: var(--surface); outline: none; box-shadow: var(--shadow); font-size: 13px; }
.qa-hint { margin-top: 4px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 2px 6px; border-radius: 6px; width: max-content; box-shadow: var(--shadow); }
.quick-add:has(.suggest:not([hidden])) .qa-hint { display: none; }
.suggest { position: absolute; top: calc(var(--slot) + 10px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.quick-add.flip .suggest { left: auto; right: 0; }
.suggest li { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 7px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.suggest li.on, .suggest li:hover { background: var(--surface-2); }
.suggest small { margin-left: auto; padding-left: 12px; color: var(--muted); font-size: 11.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }

/* drop bar (people + trash while dragging an event) */
.dropbar { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; z-index: 250; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: calc(100vw - 16px); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 20px)); transition: transform .18s ease; }
.dropbar.show { transform: translate(-50%, 0); }
.dropbar .lbl { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.drop-target { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 5px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; transition: transform .1s, background .1s; }
.drop-target.trash { padding: 0 11px; color: var(--danger); }
.drop-target.face { padding: 0 3px; }
.drop-target.face .avatar { font-size: 10px; }
.dropbar:has(.face) { max-width: min(760px, calc(100vw - 16px)); }
.drop-hot { transform: scale(1.08); border-color: var(--c) !important; background: color-mix(in srgb, var(--c) 20%, var(--surface)) !important; box-shadow: inset 0 0 0 1px var(--c); }

/* ---------- menu / toast ---------- */
.menu { position: fixed; z-index: 260; min-width: 240px; max-width: calc(100vw - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 400; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: #1f2125; color: #fff; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100vw - 24px); transform: translate(-50%, 150%); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast .btn { background: transparent; color: #7ff0dc; border-color: #3a3d44; }
.toast:not(:has(.btn)) { padding-right: 14px; }

/* ---------- modals ---------- */
.backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: max(16px, 7vh) 16px 16px; background: rgba(15, 17, 20, .38); opacity: 0; transition: opacity .14s; }
.backdrop.in { opacity: 1; }
.modal { width: min(470px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); border-top: 5px solid var(--c, var(--accent)); transform: translateY(10px) scale(.98); transition: transform .16s ease; }
.backdrop.in .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0 18px; }
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 650; color: var(--muted); }
.modal-body { padding: 4px 18px 14px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.grow { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; min-width: 0; }
.field > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--muted); }
.field input, .field select, .input, .modal select { height: 38px; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: var(--surface); min-width: 0; }
.field input[name="title"] { font-size: 17px; font-weight: 650; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
select:disabled { opacity: .6; }
.row { display: flex; gap: 8px; }
.row > select, .row > input { flex: 1; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.row3 .field { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; overflow: hidden; flex: none; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatch.custom { background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e); }
.user-row .swatch.custom { background: var(--c); }
.swatch input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.user-rows { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.user-row { display: flex; align-items: center; gap: 10px; }
.user-row .name { flex: 1; }

/* notepad */
.m-note .note-title { width: 100%; border: 0; background: transparent; font-size: 20px; font-weight: 700; padding: 6px 0; outline: none; }
.note-type { margin: 6px 0 12px; }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 2px 0; border-bottom: 1px solid var(--line-soft); }
.checklist input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.checklist .item { flex: 1; border: 0; background: transparent; height: 36px; outline: none; min-width: 0; }
.checklist li.done .item { text-decoration: line-through; color: var(--muted); }
.checklist .icon-btn { opacity: .4; }
.checklist li:hover .icon-btn, .checklist .icon-btn:focus-visible { opacity: 1; }
.note-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--muted); }
.note-text { display: none; width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: color-mix(in srgb, #ca8a04 5%, var(--surface)); line-height: 1.55; }
.m-note.is-text .note-text { display: block; }
.m-note.is-text .note-check { display: none; }

/* ---------- mobile ---------- */
.fab { display: none; }
@media (max-width: 760px) {
  :root { --gutter: 44px; }
  .brand-name, .hide-sm { display: none; }
  .topbar { flex-wrap: wrap; gap: 6px 4px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand { order: 1; margin-right: 2px; }
  .range { order: 2; font-size: 16px; margin-left: 4px; }
  .menu-btn { order: 3; }
  .break { display: block; order: 4; flex-basis: 100%; height: 0; }
  .navbtns { order: 5; }
  .seg { order: 6; margin-left: auto; }
  .dnum { font-size: 17px; width: 30px; height: 30px; }
  .hour { right: 5px; font-size: 10px; }

  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; width: auto; max-height: 64dvh;
    border-right: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .2);
    padding: 6px 14px calc(84px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
  }
  .sheet-open .sidebar { transform: none; visibility: visible; }
  .grabber { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; cursor: pointer; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 160;
    right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); height: 48px; padding: 0 18px;
    border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; box-shadow: var(--shadow); cursor: pointer;
  }
  body.is-dragging .fab { opacity: 0; pointer-events: none; }
  .backdrop { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; transform: translateY(30px); }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* Modal footers on a phone (HQ-73): one rule for every modal footer, and the sign-in sheet's. Scott, iPhone, v224: the
   recipe's Delete · Edit · Add to the grocery list · Plan it · Cook ran off the right edge. On a phone the footer wraps
   (nothing runs off) and every button is a 44px target. Three or more buttons stack: the main action full width on top,
   the others share the rows below, and a destructive one (Delete, Remove, Used up) sits alone on the last row, on the
   left, set apart. Two buttons stay side by side. Desktop is unchanged. tests/modal-footers.mjs: 320/375/390px. */
@media (max-width: 760px) {
  /* a phone sheet runs edge to edge: the wide modals' desktop width (100vw - 24px) left a 24px gap on the right */
  .backdrop > .modal:is(.g-wide, .g-photo-modal, .pl-modal, .sp-modal, .ar-modal) { width: 100%; }
  .modal-foot, .si-foot { flex-wrap: wrap; row-gap: 8px; }
  .modal-foot > .btn, .si-foot > .btn { min-height: 44px; min-width: 44px; height: auto; max-width: 100%; padding-top: 6px; padding-bottom: 6px; white-space: normal; line-height: 1.2; text-align: center; }
  .si-foot > .si-go { min-height: 46px; }
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])) > .btn { flex: 1 1 auto; }
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])) > .btn.primary { order: -1; flex-basis: 100%; }
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])) > .si-sum { order: -2; flex-basis: 100%; }
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])) > .grow { display: none; }
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])) > .btn.danger:not(.primary) { order: 2; flex: 0 0 auto; }
  /* the line break before Delete: an empty full-width item, so Delete gets a row of its own with a wider gap above */
  :is(.modal-foot, .si-foot):has(> .btn:not([hidden]) ~ .btn:not([hidden]) ~ .btn:not([hidden])):has(> .btn.danger:not(.primary):not([hidden]))::after { content: ''; order: 1; flex-basis: 100%; height: 0; }
}
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; } /* stops iOS zoom-on-focus */
  .field input[name="title"] { font-size: 17px !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- v0.2: viewing-as, hidden events, groceries ---------- */
.viewer-btn { padding: 0 10px 0 6px; gap: 6px; }
.viewer-btn svg { color: var(--muted); }
.viewer-btn.on { border-color: var(--c, var(--accent)); }
.viewer-banner { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 13px; flex: none;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.viewer-banner[hidden] { display: none; }
.viewer-banner > span { flex: 1; min-width: 0; }
.viewer-banner svg { color: var(--c); }
.menu-head { padding: 8px 10px 6px; font-size: 12px; font-weight: 650; color: var(--muted); }
.menu-head small { font-weight: 400; }
.menu button.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 650; }

/* eye badge on events: appears on hover; always shown when hidden from someone */
.ev-eye { border: 0; padding: 0; width: 20px; height: 20px; border-radius: 5px; display: none; place-items: center; background: color-mix(in srgb, var(--c) 28%, var(--surface)); color: inherit; cursor: pointer; }
.event:hover .ev-eye, .ev-eye.on, .ev-eye:focus-visible { display: grid; }
.ev-eye.on { background: var(--text); color: var(--surface); }
.ev-eye:hover { background: var(--c); color: #fff; }
@media (hover: none) { .event .ev-eye:not(.on) { display: none; } }

.popover { position: fixed; z-index: 270; width: min(320px, calc(100vw - 16px)); padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.pop-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.pop-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.see-chip .eye { display: grid; color: var(--muted); margin-left: 2px; }
.see-chip.hidden-from { border-style: dashed; background: var(--surface-2); color: var(--muted); }
.see-chip.hidden-from .avatar { filter: grayscale(1); opacity: .55; }
.see-chip.hidden-from .eye { color: var(--danger); }
.see-chip:disabled { opacity: .5; cursor: default; }

/* note type switch: show only the parts each type uses */
.m-note .note-type button { padding: 0 10px; }
.m-note[data-type="text"] .note-list { display: none; }
.m-note[data-type="text"] .note-text { display: block; }
.m-note[data-type="grocery"] .checklist, .m-note[data-type="checklist"] .grocery { display: none; }
.m-note[data-type="grocery"] [data-a="clear"] { display: none; }
.add-item { margin-bottom: 4px; }
.g-feedback { min-height: 18px; font-size: 12px; color: var(--accent); font-weight: 600; margin: 2px 2px 6px; }

/* grocery sections */
.g-sec { margin-bottom: 10px; }
.g-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.g-emoji { font-size: 15px; }
.g-count { margin-left: auto; font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.g-sec ul { list-style: none; margin: 0; padding: 0; }
.g-item { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-soft); transition: opacity .25s, transform .25s; border-radius: 6px; }
.g-item .item { flex: 1; border: 0; background: transparent; height: 38px; outline: none; min-width: 0; }
.g-check { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--muted); background: transparent; cursor: pointer; padding: 0; position: relative; }
.g-check:hover { border-color: var(--accent); }
.g-item.got .g-check { background: var(--accent); border-color: var(--accent); }
.g-item.got .g-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.g-item.got .item { color: var(--muted); }
.g-item.leaving { opacity: 0; transform: translateX(16px); }
.g-item.got .item { text-decoration: line-through; }
.g-item.flash { animation: gflash 1.4s ease; }
@keyframes gflash { 0%, 30% { background: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background: transparent; } }
.g-move { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--muted); opacity: .45; cursor: pointer; }
.g-item:hover .g-move, .g-move:focus-within { opacity: 1; background: var(--surface-2); }
.g-move select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; font-size: 16px; }
.g-item .icon-btn { opacity: .4; }
.g-item:hover .icon-btn { opacity: 1; }
@media (hover: none) { .g-move, .g-item .icon-btn { opacity: .7; } }
.g-empty { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 14px 4px; }

/* grocery undo: lower-left, 5 seconds */
.undo-chip { position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 450; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; max-width: calc(100vw - 32px); background: #1f2125; color: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
  transform: translateY(150%); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
.undo-chip.show { transform: none; opacity: 1; pointer-events: auto; }
.u-text { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #3a3d44; background: transparent; color: #7ff0dc; font-weight: 650; cursor: pointer; }
.u-btn:hover { background: #2b2e33; }
.u-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #7ff0dc; transform-origin: left; animation: ubar 5s linear forwards; }
@keyframes ubar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 760px) {
  .viewer-btn { order: 3; padding: 0 6px; }
  .viewer-btn .v-lbl { display: none; }
  .viewer-banner { padding: 6px 10px; font-size: 12px; }
  .m-note .note-type button { padding: 0 8px; font-size: 13px; }
  .undo-chip { bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; }
}
/* narrow day columns: badges drop below the title instead of covering it */
@container (max-width: 120px) {
  .event:not(.compact) .ev-title { padding-right: 0; }
  .event:not(.compact) .ev-badges { position: static; margin-top: 3px; }
  .event.compact .ev-note, .event.compact .ev-eye:not(.on) { display: none; }
  .event.compact .ev-title { padding-right: 22px; }
}

/* ---------- v0.3: settings, compact view, several people, all-day lane, color picker ---------- */
.icon-btn.on { background: var(--surface-2); color: var(--accent); }

/* compact view: title only */
.compact-events .event .ev-time { display: none; }
.compact-events .event:not(.short) .ev-title { white-space: normal; overflow-wrap: break-word; }
.event.multi .ev-title { padding-right: 34px; }
.event.multi.short .ev-time { padding-right: 34px; }

/* several people: a striped edge with everyone's color */
.event.multi, .ad-chip.multi { border-left-width: 0; padding-left: 10px; }
.event.multi::before, .ad-chip.multi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--stripe); }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar + .avatar { margin-left: -6px; }
.avatars .avatar { box-shadow: 0 0 0 1.5px var(--surface); }
.avatar.more { background: var(--muted); font-size: 9px; }

/* all-day lane (second row of the sticky header) */
.allday-gutter { display: flex; justify-content: flex-end; padding: 7px 8px 0 0; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--line); white-space: nowrap; }
.allday-cell { position: relative; min-width: 0; min-height: 30px; max-height: 136px; overflow-y: auto; padding: 3px 3px 5px; border-top: 1px solid var(--line); border-left: 1px solid var(--line-soft); cursor: cell; overscroll-behavior: contain; }
.allday-cell.is-today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.allday-cell.drop-hot { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.ad-list { display: flex; flex-direction: column; gap: 2px; }
@media (hover: hover) { .allday-cell:hover .ad-list:empty::after { content: "+ add"; font-size: 11px; color: var(--muted); padding: 3px 4px; } }
.ad-chip { position: relative; display: flex; align-items: center; gap: 5px; min-height: 22px; padding: 1px 3px 1px 6px; border-radius: 6px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-left: 3px solid var(--c); color: color-mix(in srgb, var(--c) 45%, var(--text));
  font-size: 12px; font-weight: 600; line-height: 1.2; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ad-chip:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.ad-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-chip .ev-badges { position: static; transform: none; display: flex; gap: 2px; flex: none; }
.ad-chip .ev-eye, .ad-chip .ev-note { width: 17px; height: 17px; }
.ad-check { position: relative; flex: none; width: 15px; height: 15px; padding: 0; border-radius: 4px; border: 1.5px solid currentColor; background: var(--surface); cursor: pointer; }
.ad-chip.done .ad-check { background: var(--c); border-color: var(--c); }
.ad-chip.done .ad-check::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ad-chip.done .ad-title { text-decoration: line-through; opacity: .6; }
.ad-chip.dim { opacity: .25; }
.ad-chip.lifted { opacity: .35; }
.quick-add.qa-allday { position: static; min-width: 0; margin-top: 2px; }
.quick-add.qa-allday input { height: 26px; margin: 0; font-size: 12.5px; }
.quick-add.qa-allday .qa-hint { white-space: normal; width: auto; }
.quick-add.qa-allday .suggest { z-index: 300; }
@container (max-width: 120px) { .ad-chip .ev-note { display: none; } }
.ad-chip { container-type: inline-size; }

/* event editor additions */
.check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.check small { color: var(--muted); }
.m-event .group-color { display: none; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.m-event.is-multi .group-color { display: flex; }
.m-event.is-multi .gc-help { display: none; }
.m-event.is-allday .timed { display: none; }
.m-event.is-allday .row3 { grid-template-columns: 1fr; }
.m-event .todo-opt { display: none; }
.m-event.is-allday .todo-opt { display: flex; }
.swatch.big { width: 36px; height: 36px; }
.swatch.more { background: radial-gradient(circle, var(--c) 0 42%, transparent 44%), conic-gradient(#e03131, #f08c00, #f5b700, #22a06b, #0ea5a4, #2f6fed, #8b5cf6, #e5487f, #e03131); }

/* color picker popover */
.color-pop { width: min(318px, calc(100vw - 16px)); }
.cp-title { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.cp-label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.cp-row, .cp-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.color-pop .swatch { width: 100%; height: auto; aspect-ratio: 1; border-width: 2px; }
.cp-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cp-custom .swatch { width: 30px; height: 30px; aspect-ratio: auto; }
.cp-hex { width: 110px; height: 32px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.cp-hex.bad { border-color: var(--danger); }
.cp-hint { font-size: 12px; color: var(--muted); }

/* settings dialog */
.modal .seg { flex-wrap: wrap; }
.modal .seg button { height: 32px; }

@media (max-width: 760px) {
  .density-btn { order: 7; }
  .allday-gutter { font-size: 9.5px; padding-right: 4px; }
}
.one-day .allday-cell { max-height: 38vh; }
.one-day .ad-chip { min-height: 26px; font-size: 13px; }

/* ---------- v0.4: readable overlaps, lists on the calendar ---------- */
/* long blocks (work shifts) that overlap other things: slim rail + title that fades out */
.event.span {
  pointer-events: none; background: none; border-left: 0; padding: 0; box-shadow: none; overflow: visible;
  left: calc(2px + var(--lane, 0) * 10px); width: calc(100% - 5px - var(--lane, 0) * 10px); z-index: 1;
}
.event.span:hover { box-shadow: none; }
.span-rail { pointer-events: auto; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 3px; background: var(--stripe, var(--c)); cursor: grab; }
.span-head {
  pointer-events: auto; position: absolute; left: 0; right: 0; top: 0; height: min(100%, calc(var(--slot) * 3));
  padding: 3px 6px 3px 11px; border-radius: 7px; overflow: hidden; cursor: grab;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--c) 24%, var(--surface)) 0%, color-mix(in srgb, var(--c) 24%, var(--surface)) 35%, transparent 100%);
  color: color-mix(in srgb, var(--c) 45%, var(--text));
}
.span-head .ev-badges { top: 3px; right: 4px; }
.span-end { position: absolute; left: 10px; right: 4px; bottom: 2px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--c) 60%, var(--muted)); pointer-events: none; }
.event.span .ev-resize { pointer-events: auto; width: 40px; right: auto; }
.event.span.lifted .span-rail, .event.span.lifted .span-head { opacity: .35; }
.compact-events .event.span .ev-time { display: none; }

/* lists placed on the calendar: one line, "~2pm", no end time */
.note-pin {
  position: absolute; pointer-events: auto; top: calc(var(--slot) * var(--s) + 1px); height: calc(var(--slot) - 2px);
  display: flex; align-items: center; gap: 5px; padding: 0 4px 0 6px; overflow: hidden; cursor: grab;
  border-radius: 7px; border: 1.5px dashed var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface));
  color: color-mix(in srgb, var(--c) 50%, var(--text)); font-size: 12px; font-weight: 650;
  box-shadow: 0 0 0 1px var(--surface); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  container-type: inline-size;
}
.note-pin:hover { z-index: 20; box-shadow: 0 3px 10px rgba(0, 0, 0, .14); }
.note-pin.dim, .note-chip.dim { opacity: .25; }
.note-pin.lifted { opacity: .35; }
.np-icon { display: grid; flex: none; }
.np-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-time { flex: none; font-size: 11px; font-weight: 500; opacity: .8; }
.np-meta { flex: none; font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.note-pin .ev-badges { position: static; transform: none; margin-left: auto; display: flex; gap: 2px; flex: none; }
.note-pin .ev-eye { width: 17px; height: 17px; }
@container (max-width: 160px) { .note-pin .np-meta { display: none; } }
@container (max-width: 110px) { .note-pin .np-time { display: none; } }
@container (max-width: 90px) { .note-pin .np-icon { display: none; } }
.ad-chip.note-chip { border-left-style: dashed; }
.drop-preview.is-note { height: calc(var(--slot) - 2px); border-style: dashed; flex-direction: row; gap: 6px; align-items: center; }

/* sidebar list tiles and the list editor */
.note-tile .tile-meta { display: flex; align-items: center; gap: 4px; }
.tile-who { position: absolute; right: 6px; top: 6px; }
.note-details { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.m-note .group-color { display: none; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.m-note.is-multi .group-color { display: flex; }
.when-row input[type="date"] { flex: 1.2; }
.when-row select { flex: 1; }

/* brand */
.logo svg { color: #fff; --accent: #0f766e; }
.settings-brand { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.settings-brand .logo { width: 22px; height: 22px; border-radius: 6px; }

/* ---------- v0.5 ---------- */
/* dialogs start 7vh from the top, so size them to fit below that (keeps Done/Delete on screen) */
@media (min-width: 761px) {
  .modal { max-height: calc(100dvh - max(16px, 7vh) - 16px); }
}
.modal-body { min-height: 0; }

/* week templates */
.template-banner { --c: var(--accent); }
.template-mode .dnum { display: none; }
.template-mode .day-head { padding: 12px 2px; }
.template-mode .dow { font-size: 13px; color: var(--text); }
.template-mode .day-col, .template-mode .allday-cell { background-color: color-mix(in srgb, var(--accent) 3%, transparent); }
button:disabled { cursor: default; }
.navbtns button:disabled, #viewSeg button:disabled { opacity: .4; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tpl-row { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.tpl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tpl-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-info small { color: var(--muted); font-size: 12px; }
input.bad { border-color: var(--danger) !important; }
/* addresses */
.ev-map { border: 0; padding: 0; width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 28%, var(--surface)); color: inherit; cursor: pointer; }
.ev-map:hover { background: var(--c); color: #fff; }
.ad-chip .ev-map { width: 17px; height: 17px; }
.maps-pop { width: min(280px, calc(100vw - 16px)); padding: 8px; }
.maps-pop .pop-head span { white-space: normal; }
.pop-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.pop-item:hover { background: var(--surface-2); }

/* favorites + collapsible side panel */
.panel-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--muted); }
.panel-toggle:hover h3, .panel-toggle:hover .chev { color: var(--text); }
.panel-toggle .chev { transition: transform .15s; }
.panel.collapsed .chev { transform: rotate(-90deg); }
.panel.collapsed .panel-body { display: none; }
.panel.collapsed .panel-head { margin-bottom: 0; }
.panel-head .link { margin-left: auto; }
.tile { padding-right: 24px; }
.tile.add-tile { padding-right: 9px; }
.tile-star { position: absolute; right: 3px; bottom: 3px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: none;
  color: var(--muted); display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity .12s; }
.tile:hover .tile-star, .tile-star:focus-visible, .tile-star.on { opacity: 1; }
.tile-star.on { color: #f5b700; }
.tile-star:hover { background: var(--surface-2); color: #f5b700; }
@media (hover: none) { .tile-star { opacity: .6; } }
.fav-empty { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.sidebar-btn { margin-right: -4px; }
@media (min-width: 761px) {
  body.sidebar-hidden .sidebar, body.sidebar-hidden .garage .g-rail { display: none; } /* Team, Garage and Activities share the switch */
  body.sidebar-hidden .sidebar-btn { color: var(--accent); }
}
@media (max-width: 760px) { .sidebar-btn { display: none; } }

/* sign-in */
.account-btn { padding: 0 10px 0 8px; gap: 6px; }
.account-btn.signed-in { padding: 0 4px; border-color: transparent; }
.account-btn svg { color: var(--muted); }
.signin-buttons { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 6px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent, #0f766e); text-decoration: underline; cursor: pointer; }
.signin-btn { height: 44px; justify-content: center; gap: 10px; font-weight: 600; font-size: 15px; }
.signin-btn small { font-weight: 500; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.acct-card { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.acct-card div { display: flex; flex-direction: column; min-width: 0; }
.acct-card small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; }
@media (max-width: 760px) { .account-btn { order: 3; } .account-btn .v-lbl { display: none; } }

/* family (server) mode */
.user-row.cloud { flex-wrap: wrap; }
.role-sel { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 6px; }
.who-tag { font-size: 12px; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.who-tag.me { color: var(--accent); font-weight: 650; }
.who-tag.joined { color: #22a06b; font-weight: 600; }
.who-tag.joined::before { content: "✓ "; }
.invite-box[hidden] { display: none; }
.invite-box { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px 46px; }
.invite-box input { font-size: 12px; font-family: ui-monospace, Consolas, monospace; }
.fam-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin: 12px 0 4px; }
.fam-card small { color: var(--muted); font-size: 12.5px; }
.fam-card .sync-line { color: var(--accent); }
.m-family .user-chip.on { box-shadow: inset 0 0 0 2px var(--c); }
.m-family .new-me { margin-top: 8px; }
.fam-error { color: var(--danger); font-size: 13px; margin-top: 8px; }
.sync-dot { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); background: #22a06b; }
.sync-dot.saving { background: #f5b700; }
.sync-dot.error { background: var(--danger); }
.account-btn { position: relative; }

/* month view */
.month-grid { display: none; }
.month-mode .cal-head, .month-mode .cal-grid { display: none; }
.month-mode .month-grid { display: flex; flex-direction: column; min-height: 100%; }
.mg-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); }
.mg-head div { padding: 9px 4px; text-align: center; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mg-body { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(var(--weeks, 5), minmax(112px, 1fr)); }
.month-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; padding: 4px 4px 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); cursor: cell; }
.month-cell.out { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.month-cell.out .mc-num { color: var(--muted); font-weight: 500; }
.month-cell.drop-hot { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mc-num { align-self: flex-start; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; font-size: 13px; font-weight: 650; cursor: pointer; }
.mc-num:hover { background: var(--surface-2); }
.month-cell.is-today .mc-num { background: var(--accent); color: var(--accent-ink); }
.mc-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-item { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 1px 5px; border-radius: 5px; font-size: 11.5px; line-height: 1.35; cursor: grab;
  color: color-mix(in srgb, var(--c) 50%, var(--text)); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mc-item span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-item b { font-weight: 650; }
.mc-item:hover { background: color-mix(in srgb, var(--c) 12%, transparent); }
.mc-item:not(.allday):not(.note)::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.mc-item.allday, .mc-item.note { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.mc-item.note { border: 1px dashed var(--c); padding: 0 4px; }
.mc-item.note svg { flex: none; }
.mc-item.done span { text-decoration: line-through; opacity: .6; }
.mc-item.dim { opacity: .25; }
.mc-item.lifted { opacity: .35; }
.mc-more { align-self: flex-start; border: 0; background: none; padding: 1px 5px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mc-more:hover { color: var(--accent); }
.month-cell .quick-add.qa-allday input { font-size: 12px; height: 24px; }
@media (max-width: 760px) {
  .mg-body { grid-template-rows: repeat(var(--weeks, 5), minmax(86px, 1fr)); }
  .mc-item { font-size: 10px; padding: 0 3px; }
  .mc-item b, .mc-item.note svg { display: none; }
  .month-cell { padding: 2px; }
}

/* Common Activity categories */
.pool-groups { display: flex; flex-direction: column; gap: 8px; }
.cat-group .tiles { margin-top: 6px; }
.cat-group.collapsed .tiles { display: none; }
.cat-head { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.cat-head.drop-hot { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.cat-toggle { display: inline-flex; align-items: center; gap: 6px; flex: 1; min-width: 0; border: 0; background: none; padding: 4px 2px; cursor: pointer; font-size: 12.5px; font-weight: 650; color: var(--text); text-align: left; }
.cat-toggle .chev { color: var(--muted); transition: transform .15s; flex: none; }
.cat-group.collapsed .chev { transform: rotate(-90deg); }
.cat-count { margin-left: 2px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 0 7px; }
.cat-tools { display: flex; gap: 0; opacity: 0; transition: opacity .12s; }
.cat-head:hover .cat-tools, .cat-tools:focus-within { opacity: 1; }
@media (hover: none) { .cat-tools { opacity: .7; } }
.cat-empty { grid-column: 1 / -1; margin: 0; padding: 8px; border: 1.5px dashed var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
.pool-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.btn.danger-fill { background: var(--danger); color: #fff; }

.ev-eye.locked { cursor: default; }
.see-locked { flex-basis: 100%; }

/* email code sign-in */
.or-line { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.email-signin { display: flex; flex-direction: column; gap: 8px; }
.es-step1, .es-step2 { display: flex; gap: 8px; }
.es-step1 .input, .es-step2 .input { flex: 1; min-width: 0; }
.es-step2 .code { letter-spacing: .3em; font-family: ui-monospace, Consolas, monospace; font-size: 16px; }
.es-step2[hidden] { display: none; }
/* Cloudflare Turnstile (HQ-86): invisible unless Cloudflare asks for a tap; then it takes the row's width */
.captcha-box { min-height: 0; max-width: 100%; overflow: hidden; }
.captcha-box.shown { margin-top: 2px; }
.captcha-spare { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; width: min(320px, 92vw); }
/* the region notice (HQ-86): new families and teams can't be started from the EU, EEA, UK or Switzerland */
.region-card p { margin: 0 0 10px; }
/* auto-renewal disclosure (HQ-86): next to every price and Subscribe button */
.renew-note { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.renew-terms { margin: 10px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 1.45; }

/* ================= Garage (vehicle maintenance prototype) ================= */
.mode-seg button { font-weight: 650; }
.garage { display: none; }
body.mode-garage .garage { display: flex; flex: 1; min-width: 0; min-height: 0; }
body.mode-garage .sidebar, body.mode-garage .calendar, body.mode-garage .navbtns, body.mode-garage #rangeLabel,
body.mode-garage #viewSeg, body.mode-garage .density-btn, body.mode-garage .block-btn, body.mode-garage [data-action="copy-week"], body.mode-garage #viewerBtn,
body.mode-garage .viewer-banner, body.mode-garage #dropBar, body.mode-garage #btnSheet { display: none !important; }
body.mode-garage .mode-seg { margin-right: auto; }

.g-rail { width: 260px; flex: none; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 10px 30px; display: flex; flex-direction: column; gap: 2px; }
.g-rail-head { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 8px 4px; }
.g-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--text); }
.g-item:hover { background: var(--surface-2); }
.g-item.on { background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface)); box-shadow: inset 3px 0 0 var(--c, var(--accent)); }
.g-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.g-name b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-name small { color: var(--muted); font-size: 12px; }
.g-ico { display: inline-grid; place-items: center; width: 22px; color: var(--accent); }
.g-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.g-dot.lg { width: 16px; height: 16px; margin-right: 8px; vertical-align: -1px; }
.g-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.g-badge.overdue { background: var(--danger); } .g-badge.soon { background: #d97706; }
.g-add { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 10px; padding: 9px 10px; cursor: pointer; font-weight: 600; }
.g-add:hover { color: var(--text); border-color: var(--accent); }
.g-proto { margin: auto 6px 0; padding-top: 18px; font-size: 12px; color: var(--muted); }

.g-main { flex: 1; min-width: 0; overflow-y: auto; padding: 22px clamp(16px, 3vw, 36px) 60px; background: var(--bg); }
.g-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.g-head h2 { margin: 0; font-size: 22px; display: flex; align-items: center; }
.g-head p { margin: 4px 0 0; }
.g-owners { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 8px; }
.g-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.g-stat b { font-size: 24px; line-height: 1.1; }
.g-stat span { color: var(--muted); font-size: 12px; }
.g-stat.s-overdue b { color: var(--danger); } .g-stat.s-soon b { color: #d97706; }
.g-sec { display: flex; align-items: center; gap: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.g-sec .link { text-transform: none; letter-spacing: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.g-list { display: flex; flex-direction: column; gap: 6px; }
.g-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; }
.g-row.s-overdue { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.g-row-main { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.g-row-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.g-row-main small { color: var(--muted); font-size: 12.5px; }
.g-veh { font-size: 12px; font-weight: 650; color: var(--c); }
.g-who .avatars { display: inline-flex; }
.g-nobody { font-size: 12px; color: var(--muted); }
.g-pill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.g-pill.s-overdue { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.g-pill.s-soon { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.g-pill.s-ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.g-row-acts { display: inline-flex; align-items: center; gap: 4px; }
/* (HQ-114) a document's files on its card, and Replace in the files box */
.g-doc-files { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 45%; }
.g-doc-file { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.at-rep { flex: none; }
.g-empty { color: var(--muted); padding: 8px 2px; margin: 0; }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 24px; }
.g-card h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.g-card ul { margin: 8px 0 0; padding-left: 18px; } .g-card li { margin: 4px 0; }
.g-meter-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 14px; padding: 14px 16px; }
.g-meter { font-size: 30px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.g-meter span { font-size: 15px; font-weight: 600; color: var(--muted); }
.g-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.g-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; cursor: pointer; color: var(--text); }
.g-chip:hover { border-color: var(--accent); } .g-chip small { color: var(--muted); }
.g-rec { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--text); }
.g-rec:hover { border-color: var(--accent); }
.g-rec-date { width: 64px; flex: none; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.g-rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.g-rec-main small { color: var(--muted); font-size: 12.5px; }
.g-cost { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.g-reads { display: flex; flex-wrap: wrap; gap: 6px; }
.g-read { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 13px; }
.icon-btn.xs { width: 22px; height: 22px; }
.g-row2 { grid-template-columns: 1fr 1fr; }
.g-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.g-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.g-swatch.on { box-shadow: 0 0 0 2px var(--text); }
.g-checks { display: flex; flex-direction: column; gap: 6px; }
/* a checkbox with its label (forms everywhere). Not .g-check: that's the grocery list's round button */
.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; line-height: 1.35; }
.chk input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); margin: 0; }
.modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.g-cal-what { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; }

@media (max-width: 760px) {
  body.mode-garage .garage { flex-direction: column; }
  .g-rail { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; gap: 6px; }
  .g-rail-head, .g-proto { display: none; }
  .g-item { width: auto; flex: none; padding: 6px 10px; }
  .g-add { margin-top: 0; flex: none; }
  .g-row { flex-wrap: wrap; }
  .g-row-main { flex-basis: calc(100% - 30px); }
  .g-who { margin-left: 24px; }
  .g-row-acts { margin-left: auto; }
}

/* ---- Garage: Quick add panel ---- */
.g-quick-head { display: flex; align-items: center; justify-content: space-between; padding-right: 2px; }
.g-quick-head .link { text-transform: none; letter-spacing: 0; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.g-hint { margin: 0 8px 6px; font-size: 12px; color: var(--muted); }
.g-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 2px; }
.g-qtile { position: relative; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.g-qtile:hover { border-color: var(--c); }
.g-qmain { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 26px 8px 10px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; }
.g-qmain b { font-weight: 650; font-size: 13px; }
.g-qmain small { color: var(--muted); font-size: 11.5px; }
.g-qedit { position: absolute; top: 4px; right: 3px; opacity: .55; }
.g-qtile:hover .g-qedit, .g-qedit:focus-visible { opacity: 1; }
.g-qins { border-style: dashed; }

/* ---- Garage: inspections ---- */
.g-filter { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; }
.g-sec .g-filter { margin-left: auto; }
.g-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.g-tpl { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.g-tpl-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.g-photo-row { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: 0 0 12px; } /* New checklist template › From a photo (HQ-127) */
.g-photo-row .help { flex: 1 1 220px; margin: 0; }
.g-tally { display: inline-flex; gap: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.g-tally .t-pass { color: var(--accent); } .g-tally .t-fail { color: var(--danger); } .g-tally .t-na, .g-tally .t-open { color: var(--muted); }
.g-ins-row { border-left: 4px solid var(--c); }
.g-rec-date small { display: block; font-weight: 500; }
.g-back { display: inline-flex; align-items: center; gap: 2px; margin-bottom: 6px; font-size: 13px; }
.g-pill-lg { font-size: 13px; padding: 6px 12px; align-self: center; }
.g-ins-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin-top: 0; padding-top: 4px; padding-bottom: 4px; }
.g-ins-meta .field { margin: 8px 0; }
.g-ins-who { grid-column: 1 / -1; }
.g-progress { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; }
.g-bar { flex: 1 1 160px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.g-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.g-ins-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px 10px; margin-top: 12px; }
.g-ins-sec h3 { margin: 8px 0 4px; font-size: 14px; }
.g-ins-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.g-ins-sec h3 + .g-ins-item { border-top: 0; }
.g-ins-text { font-weight: 550; }
.g-ins-item.r-fail .g-ins-text { color: var(--danger); }
.g-ins-item.r-na .g-ins-text { color: var(--muted); }
.g-tri { display: inline-flex; align-items: center; gap: 4px; }
.g-tri button { height: 32px; min-width: 52px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 650; cursor: pointer; }
.g-tri button:hover { color: var(--text); }
.g-tri .t-pass.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.g-tri .t-fail.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.g-tri .t-na.on { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.g-tri .g-note-btn { min-width: 32px; padding: 0; display: inline-grid; place-items: center; }
.g-ins-note { grid-column: 1 / -1; height: 34px !important; }
.g-ins-notes { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--surface); color: var(--text); font: inherit; }
.g-foot-acts { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.g-foot-acts .grow { flex: 1; }
.g-chip.on { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.modal.g-wide { width: min(640px, calc(100vw - 24px)); }
.g-fixing { margin: 0 0 4px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.g-pick-veh { margin: 0; font-weight: 650; color: var(--text); }
.g-issue .g-row-main { cursor: default; }

/* ---- Garage: reports ---- */
.g-tabs { flex-wrap: wrap; margin-bottom: 10px; }
.g-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.g-hbars { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.g-hbar { display: grid; grid-template-columns: minmax(90px, 180px) 1fr minmax(90px, auto); align-items: center; gap: 12px; }
.g-hbar-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-hbar-track { height: 14px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.g-hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.g-hbar:hover .g-hbar-fill { filter: brightness(1.12); }
.g-hbar-val { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; display: flex; flex-direction: column; }
.g-hbar-val small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.g-cols { display: flex; align-items: flex-end; gap: 2px; height: 170px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 14px 26px; }
.g-col { flex: 1; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.g-col-bar { width: min(100%, 36px); background: var(--accent); border-radius: 4px 4px 0 0; }
.g-col:hover .g-col-bar { filter: brightness(1.12); }
.g-col-lbl { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.g-col-val { font-size: 11.5px; font-weight: 650; white-space: nowrap; margin-bottom: 3px; }
.g-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.g-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.g-table th, .g-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.g-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.g-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.g-table tfoot td { font-weight: 700; border-bottom: 0; }
.g-table tr[data-g] { cursor: pointer; }
.g-table tbody tr:hover { background: var(--surface-2); }
.g-table .g-dot { width: 10px; height: 10px; vertical-align: -1px; }

@media (max-width: 760px) {
  .g-quick { display: flex; flex: none; gap: 6px; padding: 0; }
  .g-qtile { flex: none; width: 150px; }
  .g-hint { display: none; }
  .g-quick-head { margin: 0 4px; flex: none; flex-direction: column; justify-content: center; }
  .g-ins-meta { grid-template-columns: 1fr 1fr; }
  .g-hbar { grid-template-columns: 90px 1fr auto; gap: 8px; }
  .g-ins-item { grid-template-columns: 1fr; }
}

/* ---- Print / Save as PDF (inspections and reports) ---- */
#printArea { display: none; }
@media print {
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block; }
  html, body.printing { height: auto !important; overflow: visible !important; background: #fff !important; color: #111 !important; }
  body.printing { font: 11pt/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
  .p-head { border-bottom: 2px solid #0f766e; padding-bottom: 8px; margin-bottom: 12px; }
  .p-brand { font-size: 9pt; color: #0f766e; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .p-head h1 { margin: 2px 0; font-size: 18pt; }
  .p-meta, .p-filters { font-size: 9pt; color: #555; }
  #printArea h2 { font-size: 12pt; margin: 14px 0 6px; break-after: avoid; }
  #printArea table { width: 100%; border-collapse: collapse; }
  #printArea th, #printArea td { border: 1px solid #ccc; padding: 4px 6px; text-align: left; vertical-align: top; font-size: 10pt; background: #fff; color: #111; white-space: normal; }
  #printArea th { background: #f2f2f2; }
  #printArea tr { break-inside: avoid; }
  .p-info th { width: 16%; }
  .p-r { font-weight: 700; } .p-pass { color: #0f766e; } .p-fail { color: #c81e1e; } .p-na { color: #666; }
  .p-fails li { color: #c81e1e; }
  .p-sign { display: flex; justify-content: space-between; margin-top: 36px; font-size: 10pt; }
  #printArea .g-stats { display: flex; flex-wrap: wrap; gap: 8px; }
  #printArea .g-stat { border: 1px solid #ccc; border-radius: 6px; padding: 6px 10px; min-width: 120px; background: #fff; }
  #printArea .g-stat b { font-size: 14pt; color: #111; }
  #printArea .g-stat span, #printArea .muted, #printArea small, #printArea .help { color: #555; }
  #printArea .g-sec { text-transform: uppercase; font-size: 10pt; color: #333; letter-spacing: .04em; margin: 14px 0 6px; }
  #printArea .g-hbars, #printArea .g-cols, #printArea .g-table-wrap { background: #fff; border-color: #ccc; }
  #printArea .g-hbar-track { background: #eee; }
  #printArea .g-hbar-fill, #printArea .g-col-bar, #printArea .g-bar span { background: #0f766e; }
  #printArea .g-hbar-label, #printArea .g-hbar-val, #printArea .g-col-val { color: #111; }
}
.g-actions a.btn { text-decoration: none; color: var(--text); display: inline-flex; align-items: center; }

/* ---- Garage: collapsible panel sections, documents, fuel, recalls ---- */
.g-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 12px 4px 4px; }
.g-rail-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; padding: 4px; border-radius: 6px; }
.g-rail-toggle:hover { color: var(--text); }
.g-rail-toggle .chev { transition: transform .15s; }
.g-rail-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.g-sec-head .link { font-size: 12px; text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 3px; }
.g-count { font-weight: 600; color: var(--muted); letter-spacing: 0; }
.g-stats-sm .g-stat b { font-size: 19px; }
.g-eff { font-size: 12.5px; font-weight: 650; color: var(--accent); white-space: nowrap; }
.g-recall { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.g-recall summary { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; list-style: none; }
.g-recall summary::-webkit-details-marker { display: none; }
.g-recall summary small { margin-left: auto; }
.g-recall p { margin: 8px 0; font-size: 13px; line-height: 1.45; }
.g-recall.done { opacity: .7; }
.g-recall-all { margin-top: 12px; }
.g-sec .link[disabled] { opacity: .45; pointer-events: none; }
@media (max-width: 760px) {
  .g-sec-head { margin: 0 2px; flex: none; }
  .g-rail-toggle { writing-mode: horizontal-tb; }
}

/* ---- Garage: bases (locations) ---- */
.g-base-head { margin: 8px 10px 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.g-base-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; font-size: 13px; }
.g-base-pill { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.g-base-pill svg { width: 13px; height: 13px; }
.g-moves { margin: 0; padding-left: 18px; } .g-moves li { margin: 3px 0; }
@media (max-width: 760px) { .g-base-head { margin: 0 2px 0 6px; flex: none; } }

/* ---- Garage: vehicle tree + due list grouping ---- */
.g-tree { display: flex; flex-direction: column; gap: 1px; }
.g-node-head { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 6px 8px 6px calc(6px + var(--d, 0) * 14px); border-radius: 8px; text-align: left; }
.g-node-head:hover { background: var(--surface-2); }
.g-node-head .chev { flex: none; color: var(--muted); transition: transform .15s; }
.g-node-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.g-node-label { display: inline-flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-node-label svg { width: 12px; height: 12px; color: var(--accent); flex: none; }
.g-node[style*="--d:1"] > .g-node-head, .g-node[style*="--d: 1"] > .g-node-head { font-weight: 650; color: var(--muted); }
.g-node-head .g-badge { min-width: 20px; height: 20px; font-size: 11px; }
.g-leaf { padding-left: calc(10px + var(--d, 0) * 14px); }
.g-viewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 2px; font-size: 13px; }
.g-viewgroup { display: inline-flex; align-items: center; gap: 10px; }
.g-sec-note { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 650; color: #d97706; }
.g-sec-note.ok { color: var(--accent); }
.g-sec svg { width: 13px; height: 13px; vertical-align: -1px; color: var(--accent); }
.g-veh-sec { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); gap: 8px; }
.g-veh-sec .muted { font-size: 12.5px; font-weight: 500; }
.g-veh-link { font-weight: 700; font-size: 15px; color: var(--text); }
.g-org-list { display: flex; flex-direction: column; gap: 6px; }
.g-org-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; }
.g-org-row .muted { font-size: 12px; white-space: nowrap; }
.tm-glist .g-org-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.tm-gskill { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
@media (max-width: 480px) {
  .tm-glist .g-org-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tm-glist .g-org-row > input { grid-column: 1 / -1; }
  .tm-gskill { justify-self: start; }
}
@media (max-width: 760px) {
  .g-tree { flex-direction: row; gap: 4px; flex: none; }
  .g-node { display: flex; align-items: center; gap: 4px; flex: none; }
  .g-node-kids { display: flex; gap: 4px; }
  .g-node-head { width: auto; padding: 6px 8px; white-space: nowrap; }
  .g-leaf { padding-left: 10px; }
}

/* ---- Garage: photos ---- */
.g-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--surface-2); cursor: zoom-in; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumb.missing { opacity: .4; }
.g-add-photo { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 650; color: var(--muted); cursor: pointer; text-align: center; }
.g-add-photo:hover { border-color: var(--accent); color: var(--text); }
.g-add-photo.busy { opacity: .5; pointer-events: none; }
.g-ins-photos { grid-column: 1 / -1; }
.g-ins-photos .g-thumb, .g-ins-photos .g-add-photo { width: 56px; height: 56px; }
.g-cam-count { display: inline-flex; align-items: center; gap: 3px; vertical-align: -2px; }
.g-cam-count svg { width: 13px; height: 13px; }
.g-tri .g-note-btn svg { width: 16px; height: 16px; }
.modal.g-photo-modal { width: min(900px, calc(100vw - 24px)); }
.g-photo-big { display: block; max-width: 100%; max-height: 65vh; margin: 0 auto; border-radius: 10px; }
@media print { #printArea .p-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } #printArea .p-photos img { width: 160px; height: 120px; object-fit: cover; border: 1px solid #ccc; } }

/* ---- Notifications settings ---- */
.nt-status { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; }
.nt-status svg { flex: none; margin-top: 2px; }
.nt-status.ok { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.nt-status.bad { background: color-mix(in srgb, #d97706 14%, var(--surface)); }
.nt-checks { display: flex; flex-direction: column; gap: 6px; }
.soon-tag { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; margin-left: 4px; }
.nt-note { margin-top: 14px; }

/* ---- Garage: tags, out of service, parts, specs, QR labels ---- */
.g-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.g-tag.overdue { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.g-tag.soon { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.g-head h2 .g-tag { margin-left: 10px; font-size: 12px; }
.g-oos-mini { color: var(--danger); font-weight: 700; }
.g-oos { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.g-oos-icon { color: var(--danger); flex: none; margin-top: 2px; }
.g-oos-main { flex: 1 1 260px; min-width: 0; }
.g-oos-main p { margin: 4px 0; }
.g-oos-main small { color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.g-oos-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.g-late { color: var(--danger); }
.g-sec-oos { color: var(--danger); }
.g-sec-oos svg { color: var(--danger) !important; }
.g-oos-check { margin-top: 10px; }
.g-stat b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.g-lowcard p { margin: 4px 0 10px; }
.g-lowcard h3 svg { color: #d97706; }
.g-part { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 8px 12px; }
.g-part.low { border-color: color-mix(in srgb, #d97706 45%, var(--line)); }
.g-part-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.g-part-main small { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.g-part-main small svg { width: 12px; height: 12px; vertical-align: -1px; }
.g-partno { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
.g-qty { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.g-qty b { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
.g-qty .icon-btn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; font-weight: 700; }
.g-search { min-width: 220px; flex: 1 1 220px; height: 32px; }
.g-filter-check { font-size: 13px; color: var(--muted); white-space: nowrap; }
.g-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin: 0 0 8px; }
.g-specs div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.g-specs dt { font-size: 11.5px; color: var(--muted); }
.g-specs dd { margin: 2px 0 0; font-weight: 600; }
.g-parts-fit { margin-top: 6px; }
.g-fits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 12px; max-height: 180px; overflow: auto; padding: 2px; }
.g-fits .g-dot { width: 9px; height: 9px; }
.g-used-list { display: flex; flex-direction: column; gap: 6px; }
.g-used { display: flex; align-items: center; gap: 8px; }
.g-used span { flex: 1; min-width: 0; }
.g-used .input { width: 70px; flex: none; height: 32px; }
.g-used-add { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 8px; }
.g-label { display: flex; align-items: center; gap: 14px; padding: 12px; border: 2px solid #111; border-radius: 12px; background: #fff; color: #111; width: 100%; max-width: 360px; }
.g-label .qr { width: 132px; height: 132px; flex: none; }
.g-label-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-label-text b { font-size: 26px; line-height: 1.05; border-left: 6px solid var(--c); padding-left: 8px; }
.g-label-text span { font-size: 15px; font-weight: 700; padding-left: 14px; }
.g-label-text small { font-size: 13px; margin-top: 6px; }
.g-label-text em { font-style: normal; font-size: 11px; color: #555; }
.g-label-preview { display: flex; justify-content: center; margin: 6px 0 10px; }
.g-proto-note { font-size: 12px; }
@media print {
  #printArea .p-labels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  #printArea .g-label { break-inside: avoid; max-width: none; }
  #printArea .g-label .qr { width: 1.6in; height: 1.6in; }
}
@media (max-width: 640px) {
  .g-part { flex-wrap: wrap; }
  .g-label .qr { width: 110px; height: 110px; }
}

/* ---- Team roster: grouped sidebar, roster, checklists ---- */
#userChips.tm-big { display: block; }
.tm-search { height: 32px; margin-bottom: 6px; }
.tm-shown { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 12px; }
.tm-shown .user-chip { height: 26px; font-size: 12px; padding-right: 8px; }
.tm-shown .avatar { width: 20px; height: 20px; font-size: 9px; }
.tm-group { margin-bottom: 2px; }
.tm-ghead { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 4px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 8px; font-size: 13px; text-align: left; }
.tm-ghead:hover { background: var(--surface-2); }
.tm-ghead .chev { transition: transform .15s; color: var(--muted); }
.tm-group.closed .tm-ghead .chev { transform: rotate(-90deg); }
.tm-group.closed .tm-rows { display: none; }
.tm-group[hidden] { display: none; }
.tm-on { margin-left: auto; font-size: 11px; color: var(--accent); font-weight: 600; }
.tm-rows { display: flex; flex-direction: column; gap: 2px; padding: 0 0 4px 12px; }
.user-chip.tm-row { display: flex; width: 100%; height: 30px; border-radius: 8px; border-color: transparent; background: none; padding: 0 8px 0 3px; font-weight: 500; font-size: 13px; }
.user-chip.tm-row:hover { border-color: var(--line); background: var(--surface); }
.user-chip.tm-row.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.user-chip.tm-row[hidden] { display: none; }
.tm-row .avatar, .tm-person .avatar, .tm-shown .avatar { font-size: 10px; letter-spacing: -.02em; }
.tm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.tm-status { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tm-status.s-onboarding { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tm-status.s-offboarding { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.tm-bar { display: block; height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 40px; }
.tm-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.tm-bar.lg { height: 8px; flex: 1; }
.tm-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tm-q { flex: 1 1 200px; height: 34px; }
.tm-tools .tm-sel { width: auto; flex: 0 0 auto; }
.tm-sel { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 6px; }
.tm-list { display: flex; flex-direction: column; gap: 2px; }
.tm-gh { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tm-person { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; }
.tm-person:hover { background: var(--surface-2); }
.tm-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tm-pmain small { color: var(--muted); font-size: 12px; }
/* the person's role next to their name (Nov 22, 2026): Organizer, Adult, Kid, View only */
.tm-role { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px; background: var(--chip, rgba(127,127,127,.14)); color: var(--muted); }
.tm-role.role-organizer, .tm-role.role-admin { background: color-mix(in srgb, var(--accent, #22a06b) 18%, transparent); color: var(--text); }
.tm-role.role-kid { background: color-mix(in srgb, #f59e0b 20%, transparent); color: var(--text); }
.tm-mini { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.tm-mini .tm-bar { width: 60px; }
.tm-roster .modal-foot, .tm-run .modal-foot { flex-wrap: wrap; }
.tm-namerow { display: flex; align-items: flex-end; gap: 10px; }
.tm-namerow .field { flex: 1; min-width: 0; }
.tm-namerow .swatch { margin-bottom: 14px; flex: none; }
.tm-signin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-runs { display: flex; flex-direction: column; gap: 6px; }
.tm-runrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.tm-runrow small { color: var(--muted); font-size: 12px; grid-column: 1; }
.tm-runrow .tm-bar { grid-column: 2; grid-row: 1 / 3; width: 80px; align-self: center; }
.tm-startrow { flex-wrap: wrap; gap: 6px; }
.tm-runrow[hidden] { display: none; }
/* (HQ-123) Team › Checklists: a template, then its Give to… */
.tm-tpls { display: flex; flex-direction: column; gap: 4px; }
.tm-tplrow { display: flex; align-items: center; gap: 8px; }
.tm-tplrow .tm-person { flex: 1; min-width: 0; border-color: var(--line); }
/* Team › Checklists › In progress (HQ-147) */
.cl-queue { container-type: inline-size; }
.cl-queue-filters { margin-bottom: 12px; }
.cl-queue-filters .ps-q { flex: 1 1 220px; width: auto; min-width: 0; max-width: 340px; margin: 0; }
.cl-queue-filters select { max-width: 100%; height: 38px; }
.cl-queue-filters .chk { min-height: 38px; }
.cl-queue-filters .chk input { flex: none; margin: 0; accent-color: var(--accent); }
.cl-queue-list { display: grid; gap: 6px; }
.cl-queue-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.15fr) minmax(0, .7fr);
  grid-template-areas: "person title progress waiting due"; align-items: start; gap: 8px 14px;
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.cl-queue-row[hidden] { display: none; }
.cl-queue-row:hover { border-color: var(--accent); }
.cl-queue-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-queue-row > span { min-width: 0; overflow-wrap: anywhere; }
.cl-queue-person { grid-area: person; font-weight: 700; }
.cl-queue-title { grid-area: title; }
.cl-queue-kind { display: table; margin: 3px 0 0; border-radius: 999px; padding: 1px 8px; background: var(--surface-2); font-size: 11px; font-weight: 600; color: var(--muted); }
.cl-queue-progress { grid-area: progress; display: grid; gap: 4px; min-width: 0; }
.cl-queue-progress .tm-bar { min-width: 0; }
.cl-queue-waiting { grid-area: waiting; }
.cl-queue-due { grid-area: due; }
.cl-queue-progress small, .cl-queue-waiting small, .cl-queue-due small { display: block; margin-bottom: 2px; font-size: 12px; color: var(--muted); }
@container (max-width: 640px) {
  .cl-queue-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas: "person person person" "title title title" "progress waiting due";
  }
}
@container (max-width: 400px) {
  .cl-queue-filters .ps-q { flex-basis: 100%; max-width: none; }
  .cl-queue-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "person person" "title title" "progress due" "waiting waiting";
  }
}
.me-clq { margin: 0 0 8px; width: 100%; max-width: 360px; }
.tm-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tm-chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 2px; border-radius: 999px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); font-size: 12px; }
.tm-chip .avatar { width: 20px; height: 20px; font-size: 9px; }
.tm-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.modal .tm-add, .modal .tm-stepsel { width: auto; }
.tm-add { height: 28px; border: 1px dashed var(--line); border-radius: 999px; background: var(--surface); padding: 0 8px; font-size: 12px; max-width: 170px; }
.tm-sec { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.tm-sec .row .input { flex: 1; font-weight: 600; }
.tm-sec textarea { width: 100%; }
.tm-sec-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.tm-run-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tm-run-top > div { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.tm-run-top small { color: var(--muted); font-size: 12px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.tm-due { margin: 0; width: 160px; }
.tm-progress { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.tm-progress b { font-size: 13px; white-space: nowrap; }
.tm-helpers { display: inline-flex; gap: 2px; }
.tm-finish { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); margin-bottom: 10px; }
.tm-done-note { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; flex-wrap: wrap; }
.tm-rsec { margin-top: 14px; }
.tm-rsec header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.tm-rsec h4 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.tm-step { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 2px; border-bottom: 1px dashed var(--line); }
.tm-stepcheck { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.tm-stepcheck input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.tm-step.done .tm-stepcheck span { color: var(--muted); text-decoration: line-through; }
.tm-stepwho { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tm-stepwho small { color: var(--accent); font-size: 11.5px; white-space: nowrap; }
.tm-stepsel { height: 28px; max-width: 170px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12px; color: var(--muted); }
.tm-stepsel.own { color: var(--text); border-color: var(--accent); }
.tm-note { grid-column: 1 / -1; height: 28px; font-size: 12px; margin-left: 26px; width: calc(100% - 26px); }
.tm-step:not(:focus-within) .tm-note:placeholder-shown { opacity: .55; }
.chip-find { flex-basis: 100%; height: 32px; margin-bottom: 4px; }
.chips:has(.chip-find) { max-height: 220px; overflow-y: auto; align-content: flex-start; }
.user-chip[hidden] { display: none; }
@media (max-width: 640px) {
  .tm-step { grid-template-columns: 1fr; }
  .tm-stepwho { justify-content: flex-start; margin-left: 26px; }
  .tm-namerow { flex-wrap: wrap; }
}

/* ---- Checklist steps: real checkboxes, instructions underneath, struck through when done ---- */
input.tm-box { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; flex: none; margin: 0; border: 2px solid var(--muted); border-radius: 6px; background: var(--surface) center / 15px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
input.tm-box:hover { border-color: var(--accent); }
input.tm-box:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
input.tm-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
span.tm-box { width: 18px; height: 18px; flex: none; border: 2px solid var(--line); border-radius: 5px; margin-top: 9px; }
.tm-stepcheck { align-items: flex-start; }
.tm-steptext { padding-top: 1px; font-weight: 550; }
.tm-step { padding: 9px 2px; }
.tm-step.done .tm-steptext { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.tm-details { grid-column: 1 / -1; margin: 2px 0 0 32px; font-size: 13px; line-height: 1.45; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-details a { color: var(--accent); }
.tm-step.done .tm-details { text-decoration: line-through; opacity: .65; }
.tm-note { margin-left: 32px; width: calc(100% - 32px); margin-top: 4px; }
.tm-editstep { font-size: 12px; }
.tm-tsteps { display: flex; flex-direction: column; gap: 6px; }
.tm-tstep, .tm-newrow { display: flex; align-items: flex-start; gap: 8px; }
.tm-tstep-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tm-tdetails { width: 100%; font-size: 13px; }
.tm-adddet { align-self: flex-start; font-size: 12px; }
.tm-tstep-acts { display: flex; gap: 2px; margin-top: 6px; }
.tm-tstep-acts .icon-btn { width: 24px; height: 24px; font-size: 13px; }
.tm-tstep-acts .icon-btn[disabled] { opacity: .3; }
.tm-newrow span.tm-box { border-style: dashed; }
.tm-newstep { flex: 1; }
@media (max-width: 640px) {
  .tm-details, .tm-note { margin-left: 32px; }
  .tm-stepwho { margin-left: 32px; }
}

/* ---- Phones: the left panel is a slide-in menu (☰ next to Team | Garage) ---- */
.drawer-btn, .drawer-top, .drawer-scrim { display: none; }
@media (max-width: 760px) {
  .drawer-btn { display: inline-grid; place-items: center; order: 6; margin-left: auto; width: 38px; height: 38px; }
  #modeSeg { margin-left: 0; }
  body:not(.mode-garage) .drawer-btn { margin-left: 0; }
  .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(15, 17, 20, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  .drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .drawer-title { font-weight: 700; font-size: 15px; }
  body:not(.drawer-open) .sidebar .drawer-top { display: none; }

  /* calendar side: the sidebar as a left drawer (the Activities button still opens it as a bottom sheet) */
  body.drawer-open .sidebar {
    top: 0; bottom: 0; left: 0; right: auto; width: min(330px, 86vw); max-height: none; z-index: 200;
    border-radius: 0 18px 18px 0; box-shadow: 12px 0 40px rgba(0, 0, 0, .3);
    padding: max(12px, env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
    transform: none; visibility: visible; overflow-y: auto;
  }
  body.drawer-open .sidebar .grabber { display: none; }

  /* Garage: the menu is a left drawer with the normal vertical list, not a sideways strip */
  body.mode-garage .garage { flex-direction: row; }
  .garage .g-rail {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 200; width: min(330px, 86vw);
    flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    border-right: 1px solid var(--line); border-bottom: 0; border-radius: 0 18px 18px 0; box-shadow: 12px 0 40px rgba(0, 0, 0, .3);
    padding: max(12px, env(safe-area-inset-top)) 10px calc(24px + env(safe-area-inset-bottom)); gap: 2px;
    transform: translateX(-105%); visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s .24s;
  }
  body.drawer-open .garage .g-rail { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
  .garage .g-rail .drawer-top { display: flex; }
  .garage .g-rail-head, .garage .g-proto { display: flex; }
  .garage .g-proto { display: block; }
  .garage .g-item { width: 100%; flex: none; padding: 8px 10px; }
  .garage .g-add { margin-top: 4px; }
  .garage .g-tree { flex-direction: column; gap: 0; }
  .garage .g-node { display: block; }
  .garage .g-node-kids { display: block; }
  .garage .g-node-head { width: 100%; padding: 6px 8px; }
  .garage .g-leaf { padding-left: calc(10px + var(--d, 0) * 14px); }
  .garage .g-sec-head { margin: 10px 2px 2px; }
  .garage .g-base-head { margin: 8px 10px 2px; }
  .g-main { width: 100%; }
}

.g-demo-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 14px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, #d97706 12%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 35%, var(--line)); }
.g-demo-note > svg { color: #d97706; flex: none; }
.g-demo-note span { flex: 1 1 220px; }

/* ---- Sign-in-only sites: the sign-in page ---- */
#gate { display: none; }
body.gated #app { visibility: hidden; }
body.gated #gate { display: grid; place-items: center; position: fixed; inset: 0; z-index: 180; padding: 24px 16px; background: var(--bg); }
.gate-wait { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.gate-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: gate-spin .8s linear infinite; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
.gate-card { width: min(380px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.gate-card h1 { margin: 0; font-size: 26px; }
.gate-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.gate-card small { color: var(--muted); margin-top: 12px; }
.gate-logo { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--accent-ink, #fff); }
.gate-logo svg { width: 30px; height: 30px; }
.gate-btn { min-width: 180px; height: 44px; font-size: 15px; }
body.gated #toast { visibility: visible; }

/* ---- Corner logo / family photo ---- */
.logo.custom { background: transparent; overflow: hidden; padding: 0; }
.logo.custom img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
/* the Day Pack icon (brand kit, HQ-66): its own hex shape, so no tile behind it and no rounding */
.logo.mark:not(.custom) { background: transparent; border-radius: 0; }
.logo.mark .dp-mark { width: 100%; height: 100%; display: block; object-fit: contain; }
.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-preview { width: 48px; height: 48px; border-radius: 12px; }

/* ---- Demo bar (signed out) ---- */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 14px; font-size: 13px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-bottom: 1px solid var(--line); }
.demo-bar[hidden] { display: none; }
.demo-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); }
.demo-text { flex: 1 1 auto; min-width: 0; }
.demo-sub { color: var(--muted); }
.demo-acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .demo-bar { padding: 6px 10px; gap: 6px 10px; }
  .demo-sub { display: none; }
}

.tm-bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin: 4px 0 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); font-size: 13px; }

/* ---- Tags on people ---- */
.tm-tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-tagbtn { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; }
.tm-tagbtn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-weight: 650; }
.tm-tagbtn.add { border-style: dashed; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.tm-tags-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tm-tag { font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tm-count { margin: 4px 2px 6px; font-size: 12px; }

/* ---- Contacts ---- */
.panel-links { display: inline-flex; gap: 12px; }
.tm-cs { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.ct-list { display: flex; flex-direction: column; gap: 6px; }
.ct-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); }
.ct-row .avatar { font-size: 12px; width: 36px; height: 36px; }
.ct-main { display: flex; flex-direction: column; min-width: 0; }
.ct-main b { display: inline; }
.ct-line { display: flex; align-items: center; flex-wrap: wrap; row-gap: 3px; }
.ct-main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ct-call { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--text); vertical-align: 1px; }
.ct-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ct-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.ct-note { margin: 0 0 8px; }
.ct-privacy { display: block; margin: -4px 0 10px; }
/* (HQ-150) several phones and emails: contact-list-editor.js. One row: label, value, ★ primary, ×. Fits 375 px. */
.cle { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cle-rows { display: flex; flex-direction: column; gap: 6px; }
.cle-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 34px 34px; gap: 6px; align-items: center; min-width: 0; }
.cle-row .cle-label { width: 100%; padding: 0 2px 0 8px; }
.cle-row .cle-v { width: 100%; }
.cle-src { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; margin: -2px 0 2px; }
.cle-pri[aria-pressed="true"] { color: #d99a00; }
.cle[data-n="1"] .cle-pri { visibility: hidden; }
.cle-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.cle-add svg { width: 14px; height: 14px; }
.cle-add[hidden], .cle-add:disabled, .cle-del:disabled, .cle-pri:disabled:not([aria-pressed="true"]) { display: none; }
.ct-lists { gap: 6px; }
.ct-primary-help { display: block; margin: -4px 0 8px; }
/* (HQ-149) sign-ins waiting for approval (join-requests.js): Members, a person's page, the count on ⋯ */
.jr-box { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.jr-head { display: flex; align-items: center; gap: 8px; }
.jr-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--danger, #d64545); }
.jr-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jr-row + .jr-row { border-top: 1px solid var(--line); padding-top: 8px; }
.jr-text { margin: 0; overflow-wrap: anywhere; }
.jr-meta { color: var(--muted); font-size: 12px; }
.jr-add { font-size: 13px; overflow-wrap: anywhere; }
.jr-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.jr-badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; line-height: 1; color: #fff; background: var(--danger, #d64545); pointer-events: none; }
.menu-btn { position: relative; }
[data-action="manage-users"] .jr-badge { position: static; margin-left: 6px; vertical-align: 1px; }
.m-joinwait .jw-msg { font-size: 15px; }
.m-joinwait .jw-body p { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .cle-row { grid-template-columns: 98px minmax(0, 1fr) 28px 28px; gap: 4px; }
  .cle-row .icon-btn { width: 30px; height: 34px; }
}
@media (max-width: 640px) {
  .ct-row { grid-template-columns: auto 1fr; }
  .ct-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .ct-btn span { display: none; }
  .ct-btn { width: 44px; justify-content: center; height: 38px; }
}
.ct-modal .modal-foot { flex-wrap: wrap; }

/* ================= Activities (local preview) ================= */
/* Type colors: slots 1-3 of the validated categorical palette (all-pairs CVD-safe, light and dark), fixed order. */
:root { --t-incident: #eb6834; --t-training: #2a78d6; --t-event: #1baf7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --t-incident: #d95926; --t-training: #3987e5; --t-event: #199e70; } }
:root[data-theme="dark"] { --t-incident: #d95926; --t-training: #3987e5; --t-event: #199e70; }
/* the Activities page uses the Garage layout; only one of the two shows */
body.mode-acts #garage, body:not(.mode-acts) #acts { display: none !important; }
/* the Me page uses it too */
body.mode-me #garage, body.mode-me #acts, body:not(.mode-me) #me { display: none !important; }
body.mode-hub #garage, body.mode-hub #acts, body.mode-hub #me, body:not(.mode-hub) #hub { display: none !important; }
/* a team's Team tab (members, contacts, who's away); its calendar's side panel then has no people list */
body.mode-team #garage, body.mode-team #acts, body.mode-team #me, body.mode-team #hub, body:not(.mode-team) #team { display: none !important; }
body.audience-team .panel[data-panel="family"] { display: none; }
.tp-tools { margin: 14px 0 8px; }
.tp-q { flex: 1; min-width: 200px; max-width: 420px; height: 36px; font-size: 14px; }
.tp-list .ct-row { scroll-margin-top: 10px; }
.ct-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; text-align: left; }
.ct-name:hover { text-decoration: underline; color: var(--accent); }
.tp-pill { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: 1px; }
.tp-pill.away { background: color-mix(in srgb, #d97706 18%, var(--surface)); color: #b45309; }
/* Team tab's left panel: parts that fold up (Tags, Checklists, Schedule, Team) */
.tp-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 4px; }
.tp-sec-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 4px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.tp-sec-btn:hover { color: var(--text); }
.tp-sec-btn .chev { transition: transform .15s; }
.tp-sec.closed .tp-sec-btn .chev { transform: rotate(-90deg); }
.tp-sec.closed .tp-sec-body { display: none; }
.tp-sec-btn .g-count { margin-left: 4px; }
.tp-rail .tm-runs { margin: 2px 6px 4px; }
@media (max-width: 760px) {
  /* (HQ-142) the Team menu is the same full-height drawer as every other tab's (.garage .g-rail: top 0 / bottom 0); the old
     38vh cap from when it was a strip above the page cut it to a box with its last items clipped */
  .tp-rail { flex-direction: column; overflow-x: hidden; overflow-y: auto; max-height: none; flex: none; }
  .tp-rail .g-rail-head.tp-sec-head { display: flex; margin: 6px 2px 2px; }
  .tp-sec-body { display: flex; flex-wrap: wrap; gap: 4px; }
}
/* Team › Team organization (org.js): a top-down chart of cards; each opens one level at a time. Phones: an indented list. */
.org-view { position: relative; }
.org-wrap { overflow: auto; height: calc(100vh - 210px); min-height: 380px; padding: 18px 8px 40px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 14px; cursor: grab; scrollbar-width: thin;
  background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.org-wrap.nogrid { background-image: none; }
.org-zoom .org-gridbtn.on { color: var(--accent); }
.org-wrap.panning { cursor: grabbing; user-select: none; }
.org-wrap.panning * { cursor: grabbing !important; }
.org-zoom { position: absolute; top: 10px; right: 12px; display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 8px rgb(0 0 0 / 12%); }
.org-zoom button { border: 0; border-right: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; min-width: 34px; height: 32px; padding: 0 9px; cursor: pointer; }
.org-zoom button:last-child { border-right: 0; }
.org-zoom button:hover { background: var(--surface-2); }
.org-pct { min-width: 54px !important; font-variant-numeric: tabular-nums; }
.org-ref { display: inline-block; margin-top: 5px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); border-radius: 6px; font: inherit; font-size: 11px; font-weight: 700; padding: 1px 7px; cursor: pointer; }
.org-ref:hover { border-color: var(--accent); }
.org-jd { display: inline-flex; align-items: center; gap: 4px; }
.org-jd svg { width: 13px; height: 13px; }
.org-jd.none { color: var(--muted); font-weight: 500; }
.org-jd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.org-jd-tools .muted { font-size: 12.5px; margin-right: 2px; }
.org-upload { cursor: pointer; }
.org-jd-write textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; }
.org-jd-write, .org-jd-link { margin-top: 12px; }
.org-btnrow { display: flex; justify-content: flex-end; gap: 8px; margin: 8px 0 0; }
.org-jd-empty { margin: 4px 0 0; }
.org-jd-tools[hidden], .org-jd-read[hidden] { display: none; }
.org-jdm { width: min(640px, 100%); }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org-tree { flex-direction: column; align-items: safe center; gap: 34px; min-width: min-content; }
@media (min-width: 701px) { .org-tree { padding: 0 50vw 45vh; } }
/* desktop: blocks two wide, cards almost touching, placed beside the card that opened them; the lines in an SVG
   (org.js layoutOrg places it all after drawing) */
.og-root { position: relative; display: block; }
.og-canvas { position: relative; margin: 0 auto; }
.og-canvas > .og-grid { position: absolute; z-index: 1; }
.og-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 0; }
.og-lines path { fill: none; stroke: color-mix(in srgb, var(--muted) 70%, transparent); stroke-width: 2; stroke-linejoin: round; }
.og-grid { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 6px; align-items: start; }
.og-grid.one { grid-template-columns: auto; }
.og-cell { display: flex; align-items: flex-start; }
.og-cell.sided { grid-column: 1 / -1; }
.og-sidelink { width: 6px; margin-top: 28px; border-top: 2px dashed var(--muted); opacity: .6; flex: none; }
.og-side .org-card { border-style: dashed; border-top-style: solid; }
/* Edit chart: drag a card to another spot in its block */
.og-root.editing .og-cell > .org-card { cursor: grab; user-select: none; touch-action: none; }
.og-root.editing .og-cell > .org-card button { cursor: pointer; }
.og-cell > .org-card.og-dragging { position: relative; z-index: 5; cursor: grabbing; box-shadow: 0 14px 32px rgb(0 0 0 / 40%); transition: none; }
.og-cell.og-drop > .org-card { outline: 2px dashed var(--accent); outline-offset: 3px; }
.og-root .org-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); } /* room around the chart: any group can be moved to the middle of the view */
.org-tree > .org-li + .org-li { padding-top: 6px; }
.org-tree ul { position: relative; padding-top: 22px; }
.org-li { display: flex; flex-direction: column; align-items: center; }
.org-tree ul > .org-li { position: relative; padding: 22px 8px 0; }
.org-tree ul > .org-li::before, .org-tree ul > .org-li::after { content: ''; position: absolute; top: 0; right: 50%; width: calc(50% + 1px); height: 22px; border-top: 2px solid var(--line); } /* +1px: the halves overlap, no hairline breaks */
.org-tree ul > .org-li::after { right: auto; left: 50%; border-left: 2px solid var(--line); }
.org-tree ul > .org-li:only-child::before, .org-tree ul > .org-li:only-child::after { display: none; }
.org-tree ul > .org-li:only-child { padding-top: 0; }
.org-tree ul > .org-li:first-child::before, .org-tree ul > .org-li:last-child::after { border: 0 none; }
.org-tree ul > .org-li:last-child::before { border-right: 2px solid var(--line); border-radius: 0 8px 0 0; }
.org-tree ul > .org-li:first-child::after { border-radius: 8px 0 0 0; }
.org-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--line); }
.org-card { width: 212px; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.org-title { font-weight: 800; font-size: 14px; line-height: 1.25; }
.org-people { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 6px; }
.org-name { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.org-name:hover { color: var(--accent); text-decoration: underline; }
.org-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.org-sub { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.org-sub-l { margin: 0 0 8px; color: var(--muted); }
.org-people:empty { display: none; }
.org-vacant { font-size: 12.5px; color: var(--muted); font-style: italic; }
.org-more { font-size: 12px; margin-top: 2px; }
.org-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.org-jd { font-size: 12.5px; white-space: nowrap; }
.org-toggle { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; padding: 2px 10px 2px 7px; cursor: pointer; white-space: nowrap; }
.org-toggle:hover { border-color: var(--accent); }
.org-toggle .chev { transition: transform .15s; }
.org-li:not(.open) > .org-card .org-toggle .chev, .org-li:not(.open) > .org-cardrow > .org-card .org-toggle .chev { transform: rotate(-90deg); }
.org-li { position: relative; }
.org-cardrow { display: flex; align-items: stretch; box-sizing: content-box; }
.org-main { display: flex; flex-direction: column; align-items: center; }
.org-stem { flex: 1; min-height: 0; border-left: 2px solid var(--line); }
.org-sides { align-self: flex-start; }
.org-li.sided { align-items: flex-start; }
.org-tree ul > .org-li.sided::before { left: -1px; right: auto; width: calc(var(--drop, 50%) + 2px); }
.org-tree ul > .org-li.sided::after { left: var(--drop, 50%); right: -1px; width: auto; }
/* a level too wide for the view: rows hanging off a line on the left */
.org-tree .org-rows { flex-direction: column; align-items: flex-start; padding-top: 22px; }
.org-tree .org-rows::after { content: ''; position: absolute; top: 22px; left: 0; width: 50%; border-top: 2px solid var(--line); }
.org-rowli { position: relative; list-style: none; }
.org-rowli:not(:last-child) { padding-bottom: 20px; }
.org-rowli:not(:last-child)::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.org-tree .org-row { padding-top: 0; justify-content: flex-start; }
.org-tree .org-row::before { display: none; }
.org-tree .org-row > .org-li:nth-child(n) { padding-top: 22px; }
.org-tree .org-row > .org-li:nth-child(n)::before, .org-tree .org-row > .org-li:nth-child(n)::after { display: block; border: 0; border-radius: 0; border-top: 2px solid var(--line); }
.org-tree .org-row > .org-li:nth-child(n)::after { border-left: 2px solid var(--line); }
.org-tree .org-row > .org-li:nth-child(n):last-child::after { border-top: 0; }
.org-sides { display: flex; flex-direction: column; gap: 12px; }
.org-sidebox { display: flex; align-items: flex-start; position: relative; padding-left: 18px; }
.org-sidebox > .org-li > .org-card, .org-sidebox > .org-li > .org-cardrow > .org-main > .org-card { width: 184px; }
.org-side-link { position: absolute; left: 0; top: 30px; width: var(--link, 18px); border-top: 2px dashed var(--muted); opacity: .6; }
.org-sidebox > .org-li .org-card { border-style: dashed; border-top-style: solid; }
.org-edit { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--line); }
.org-edit .icon-btn:disabled { opacity: .35; cursor: default; }
.org-start p { margin: 8px 0 0; }
.org-h { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.org-person .ct-row { margin-bottom: 4px; grid-template-columns: auto 1fr; }
.org-person .ct-acts { grid-column: 1 / -1; justify-content: flex-start; }
.org-links a.btn { color: var(--text); text-decoration: none; }
.org-flags { margin: 6px 0 0; } .org-flags .tp-pill:first-child { margin-left: 0; }
.org-pos, .org-quals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.org-pos li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.org-quals li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.org-quals li:last-child { border-bottom: 0; }
.group-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; }
.group-skill { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 3px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.group-skill-name, .group-skill-source { overflow-wrap: anywhere; }
.group-skill-badge { border-radius: 999px; padding: 2px 7px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); font-size: 11px; font-weight: 650; }
.group-skill-source { grid-column: 1 / -1; color: var(--muted); }
.tm-member-quals:empty { display: none; }
.org-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.org-person .org-tags .g-tag { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.org-meta { margin: 0 0 12px; line-height: 1.6; }
.org-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.org-desc { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 700px) {
  .org-wrap { height: auto; min-height: 0; overflow: visible; padding: 4px 0 20px; border: 0; background: none; cursor: auto; }
  .org-zoom { display: none; }
  .org-cardrow, .org-main { display: block; padding-left: 0 !important; } .org-side-link, .org-stem { display: none; }
  .org-tree ul:not(.org-row) { margin-left: 12px !important; }
  .org-rows::after, .org-rowli::before { display: none; } .org-tree .org-row { padding: 0; margin: 0; border: 0; } .org-rowli { padding: 0; }
  .org-sidebox { display: block; margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px dashed var(--line); }
  .org-tree, .org-tree ul { display: block; }
  .org-tree ul { padding: 0 0 0 14px; margin-left: 12px; border-left: 2px solid var(--line); }
  .org-tree .org-li, .org-tree ul > .org-li, .org-tree ul > .org-li:only-child { display: block; padding: 8px 0 0; }
  .org-tree ul > .org-li::before, .org-tree ul > .org-li::after, .org-tree ul::before { display: none; }
  .org-tree > .org-li + .org-li { margin-top: 10px; }
  .org-card { width: 100%; max-width: 420px; }
}
/* Team › Active Mission (mission.js): who showed up on the left, the teams on the right; drag people onto a team. */
.mi-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line, var(--border)); }
.mi-tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line, var(--border)); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; max-width: 100%; }
.mi-tab b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.mi-tab.on { color: var(--text); border-color: var(--accent, #2563eb); box-shadow: 0 0 0 1px var(--accent, #2563eb) inset; }
.mi-tab .mi-dot { width: 8px; height: 8px; border-radius: 50%; background: #dc2626; flex: none; }
.mi-tab .mi-ttimer { font-variant-numeric: tabular-nums; color: var(--muted); }
.mi-tab-add { border-style: dashed; }
.mi-tab-past small { color: var(--muted); }
.mi-timer { margin-left: 12px; font-variant-numeric: tabular-nums; font-weight: 700; }
.mi-live { margin-left: 10px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, #dc2626 18%, var(--surface)); color: #dc2626; }
.mi-badge { background: #dc2626; color: #fff; }
.mi-grid { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 18px; align-items: start; }
.mi-left, .mi-team { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mi-left.drop-on, .mi-team.drop-on { border-color: var(--accent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.mi-left-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mi-left-head h3 { margin: 0; font-size: 15px; }
.mi-left-head .tp-pill { margin-left: 0; }
.mi-find { width: 100%; height: 34px; margin-bottom: 8px; box-sizing: border-box; }
.mi-people { display: flex; flex-direction: column; gap: 6px; }
.mi-person { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 7px 9px; background: var(--surface); }
.mi-person[draggable="true"] { cursor: grab; }
.mi-person.dragging { opacity: .45; }
.mi-p-top { display: flex; align-items: center; gap: 6px; }
.mi-p-top .ct-call { margin-left: 2px; }
.mi-person-name { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; min-width: 0; }
.mi-skills { display: inline-flex; flex-wrap: wrap; gap: 3px; min-width: 0; max-width: 100%; }
.mi-skill { padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); font-size: 10.5px; font-weight: 650; max-width: 100%; overflow-wrap: anywhere; }
.mi-tag-note { margin-top: 5px; }
.mi-tteam { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--t) 20%, var(--surface)); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 55%, transparent); }
.mi-tteam.none { background: var(--surface-2); color: var(--muted); box-shadow: none; font-weight: 600; }
.mi-tbtn { border: 0; background: none; padding: 0; cursor: pointer; }
.mi-q.hit { box-shadow: inset 0 0 0 2px var(--accent); }
.mi-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 8px; }
.mi-filter .btn.on { border-color: var(--accent); }
.mi-filter .seg button { padding: 3px 10px; font-size: 12px; }
.mi-fchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); border-radius: 999px; padding: 2px 6px 2px 9px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.mi-fchip svg { width: 11px; height: 11px; }
.mi-count { font-size: 12px; margin-left: auto; }
.mi-fpanel { display: flex; flex-direction: column; gap: 8px; padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); max-height: 300px; overflow-y: auto; }
.mi-fcat { display: flex; flex-direction: column; gap: 4px; }
.mi-fcat-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mi-fopts { display: flex; flex-wrap: wrap; gap: 4px; }
.mi-fq { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.mi-fq small { color: var(--muted); margin-left: 2px; }
.mi-fq.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-weight: 700; }
.mi-team { border-top: 4px solid var(--t); }
.mi-swatch { width: 16px; height: 16px; border-radius: 50%; background: var(--t); border: 2px solid color-mix(in srgb, var(--t) 60%, var(--surface)); flex: none; padding: 0; }
button.mi-swatch { cursor: pointer; }
.mi-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.mi-sw { width: 24px; height: 24px; border-radius: 50%; background: var(--s); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.mi-sw.on { box-shadow: 0 0 0 2px var(--text); }
.mi-moves { display: flex; flex-direction: column; gap: 6px; }
.mi-move { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 12px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; }
.mi-move.on { border-color: var(--accent); }
.mi-move small { color: var(--muted); margin-left: auto; }
.mi-move:disabled { opacity: .5; }
.mi-qs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.mi-qs.sm { margin: 0; flex-wrap: nowrap; overflow: hidden; min-width: 0; }
.mi-qs.sm .mi-q { max-width: 110px; }
.mi-q { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.mi-q.c-medical { background: color-mix(in srgb, #dc2626 16%, var(--surface)); }
.mi-q.c-avalanche { background: color-mix(in srgb, #2563eb 16%, var(--surface)); }
.mi-q.c-helicopter { background: color-mix(in srgb, #7c3aed 16%, var(--surface)); }
.mi-q.c-search-classes { background: color-mix(in srgb, #059669 16%, var(--surface)); }
.mi-q.soon { box-shadow: inset 0 0 0 1px #d97706; }
.mi-q.more { background: none; color: var(--muted); }
.mi-none { font-size: 12px; color: var(--muted); }
.mi-empty { color: var(--muted); font-size: 13px; margin: 6px 2px; }
.mi-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mi-team { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.mi-team-head { display: flex; align-items: center; gap: 8px; }
.mi-team-head b { font-size: 15px; }
.mi-task { height: 32px; font-size: 13px; width: 100%; box-sizing: border-box; }
.mi-task-ro { margin: 0; font-size: 13px; }
.mi-cap { font-size: 12.5px; color: var(--muted); }
.mi-cap b { color: var(--text); }
.mi-warn { color: #b45309; font-weight: 700; }
.mi-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mi-members li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mi-members .org-name { flex: none; }
.mi-members .icon-btn { margin-left: auto; flex: none; }
.mi-lead { border: 0; background: none; padding: 0; width: 20px; height: 20px; display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; flex: none; }
.mi-lead svg { width: 15px; height: 15px; }
.mi-lead.on { color: #d97706; }
.mi-gear { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }
.mi-gear-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.mi-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 2px 6px 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.mi-chip button { border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.mi-chip button svg { width: 12px; height: 12px; }
.mi-common { display: flex; flex-wrap: wrap; gap: 6px; }
.mi-pick { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.mi-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); font-weight: 700; }
.mi-kind { margin-bottom: 8px; } .mi-kind small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.mi-pick:disabled { opacity: .45; cursor: default; }
/* Active Mission's people picker: always open, searchable, Enter picks the first match */
.pp { display: flex; flex-direction: column; gap: 6px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 26px; }
.pp-count { font-size: 12px; font-weight: 700; margin-right: 4px; }
.pp-chip { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--text); border-radius: 999px; padding: 2px 6px 2px 9px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pp-chip svg { width: 11px; height: 11px; }
.pp-q { height: 38px; font-size: 15px; }
.pp-list { max-height: min(46vh, 340px); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.pp-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.pp-row:hover { background: var(--surface-2); }
.pp-row.on { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 650; }
.pp-row[hidden] { display: none; }
.pp-box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line); flex: none; display: inline-grid; place-items: center; }
.pp-row.on .pp-box { background: var(--accent); border-color: var(--accent); }
.pp-row.on .pp-box::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.pp-person { flex: 1; }
.pp-person .pp-name { min-width: 0; overflow-wrap: anywhere; }
.pp-none { margin: 8px; }
.pp-scope { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; font-size: 12.5px; color: var(--muted); }
.pp-why { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.mi-startm { width: min(560px, 100%); }
.mi-past { display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
@media (max-width: 760px) { .mi-grid { grid-template-columns: 1fr; } .mi-teams { grid-template-columns: 1fr; } }
.ac-new { margin: 2px 4px 10px; }
.acts-view .g-rail-head { margin-top: 16px; }
.ac-filters { margin-bottom: 10px; }
.ac-period { max-width: 260px; }
.ac-types { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ac-type { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ac-type i, .ac-th i, .ac-key i, .ac-stat span i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; flex: none; }
.ac-type.on { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); font-weight: 650; }
.ac-q { min-width: 200px; flex: 1; max-width: 320px; }
.ac-metric { height: 32px; }
.ac-metric button { font-size: 13px; padding: 0 10px; }
.ac-viewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.ac-vname { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.ac-vname b { color: var(--text); }
.ac-vname small { color: #d97706; font-weight: 650; }
.link.danger { color: var(--danger); }
.ac-range { margin-left: 10px; font-size: 13px; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.ac-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ac-stat span { display: inline-flex; align-items: center; gap: 6px; }
.ac-stat small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ac-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ac-grid2 .ac-wide { grid-column: 1 / -1; }
.ac-card { margin-top: 16px; }
.ac-card h3 { margin-bottom: 8px; }
.ac-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ac-card-head h3 { margin: 0; }
.ac-more { margin-top: 10px; display: inline-block; }
.ac-gap { margin-top: 14px; }
.ac-empty { padding: 18px 4px; }
.ac-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.ac-key { display: inline-flex; align-items: center; gap: 6px; }
.ac-key b { color: var(--text); font-weight: 650; }
.ac-chart { width: 100%; min-height: 40px; }
.ac-svg { display: block; overflow: visible; }
.ac-grid { stroke: var(--line-soft); stroke-width: 1; }
.ac-grid.base { stroke: var(--line); }
.ac-ylab { fill: var(--muted); font-size: 11px; text-anchor: end; font-variant-numeric: tabular-nums; }
.ac-xlab { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.ac-hit { fill: transparent; cursor: default; }
.ac-bar:hover .ac-hit { fill: color-mix(in srgb, var(--text) 6%, transparent); }
.ac-tip { position: fixed; z-index: 300; pointer-events: none; white-space: pre-line; max-width: 280px; padding: 8px 10px; border-radius: 9px; background: var(--text); color: var(--surface); font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow); }
.ac-hbars { display: flex; flex-direction: column; gap: 6px; }
.ac-hrow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; padding: 3px 4px; border-radius: 8px; }
button.ac-hrow { cursor: pointer; }
button.ac-hrow:hover { background: var(--surface-2); }
.ac-hlabel { display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-hlabel small { color: var(--muted); font-weight: 600; font-size: 11px; }
.ac-htrack { display: flex; gap: 2px; height: 12px; }
.ac-htrack i { display: block; height: 100%; min-width: 2px; }
.ac-htrack i:last-child { border-radius: 0 4px 4px 0; }
.ac-hval { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; min-width: 44px; text-align: right; }
.ac-table td { vertical-align: middle; }
.ac-table tr[data-a] { cursor: pointer; }
.ac-title { white-space: normal !important; min-width: 220px; font-weight: 600; }
.ac-ref { color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-tags { white-space: normal !important; }
.ac-tag { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--surface-2); color: var(--text); }
.ac-tag.ac-soft { color: var(--muted); font-style: italic; }
.ac-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 2px 9px 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text); white-space: nowrap; vertical-align: middle; }
.ac-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ac-th { display: inline-flex; align-items: center; gap: 5px; }
.ac-sort { cursor: pointer; user-select: none; }
.ac-sort:hover, .ac-sort.on { color: var(--text) !important; }
.ac-hours-table td b { font-weight: 650; }
.ac-mtags { display: block; color: var(--muted); font-size: 11.5px; }
.ac-zero td { color: var(--muted); }
.ac-cs { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); vertical-align: 2px; }
.ac-foot { margin-top: 10px; }
.ac-showmore { margin: 14px auto 0; display: flex; }
.ac-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.ac-h-title { margin-left: 8px; }
.ac-meta { margin: -6px 0 6px; }
.ac-att { display: flex; flex-direction: column; gap: 4px; }
.ac-att-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-soft); }
.ac-att-row .avatar { width: 30px; height: 30px; font-size: 11px; }
.ac-att-row.req { border-style: dashed; border-color: #d97706; }
.ac-att-name { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.ac-att-name small { color: #d97706; font-weight: 650; width: 100%; }
.ac-hours { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.ac-hours input { width: 70px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--text); font: inherit; text-align: right; }
.ac-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.ac-fields { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 0; }
.ac-fields dt { color: var(--muted); font-weight: 600; }
.ac-fields dd { margin: 0; }
.ac-seasons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ac-season { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-sname { width: 130px; font-weight: 650; }
.ac-day { width: 60px; }
.ac-eg { font-size: 12.5px; }
.ac-form2 { display: flex; gap: 10px; flex-wrap: wrap; }
.ac-form2 .field { flex: 1; min-width: 120px; }
.ac-form2 .ac-grow { flex: 3; }
.ac-ref-f { max-width: 130px; }
.ac-type-seg button { padding: 0 14px; }
.user-chip .ac-cs { margin-left: 2px; vertical-align: 0; }
@media (max-width: 900px) { .ac-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ac-period { max-width: 100%; flex: 1 1 100%; }
  .ac-q { max-width: none; }
  .ac-att-row { flex-wrap: wrap; }
  .ac-att-name { flex-basis: calc(100% - 80px); }
  .ac-fields { grid-template-columns: 1fr; }
}
.ac-filters select.g-filter { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
@media (max-width: 640px) { .ac-filters select.g-filter { flex: 1 1 160px; } }
.ac-md { display: flex; gap: 6px; }
.ac-md select { flex: 1; height: 38px; }
.ac-md .ac-day { height: 38px; width: 70px; flex: none; }
.ac-md select.g-filter { width: auto; min-width: 84px; }
.ac-season-eg { margin: 4px 0 0; }
/* Activities: tag picker (checkbox dropdown) */
.ac-ms { position: relative; }
.ac-ms-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 170px; max-width: 260px; cursor: pointer; }
.ac-ms-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-ms-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 650; }
.ac-ms-panel { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; }
.ac-ms-q { height: 34px; margin-bottom: 6px; }
.ac-ms-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.ac-ms-item { padding: 6px 6px; border-radius: 8px; font-size: 13.5px; }
.ac-ms-item:hover { background: var(--surface-2); }
.ac-ms-item[hidden] { display: none; }
.ac-ms-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 12.5px; }
.ac-ms-foot .link[disabled] { opacity: .4; cursor: default; }
@media (max-width: 640px) { .ac-ms { flex: 1 1 160px; } .ac-ms-btn { width: 100%; max-width: none; } }
/* Activities: Attendance (requirements) */
.ac-at-wrap { margin-top: 12px; }
.ac-at-cycle th, .ac-at-cycle td, .ac-at-sum th, .ac-at-sum td { white-space: normal; }
.ac-at-sec th { background: var(--surface-2); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 650; vertical-align: bottom; }
.ac-at-sec th:first-child { font-size: 13px; }
.ac-at-cycle .ac-at-dark { background: var(--text); color: var(--surface); }
.ac-at-hl { background: color-mix(in srgb, #16a34a 16%, var(--surface)); font-weight: 700; }
.ac-at-total { font-weight: 800; font-size: 15px; }
.ac-at-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.ac-at-side { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.ac-at-side .ac-card { margin-top: 12px; }
.ac-at-op b { font-size: 28px; }
.ac-at-notes p { margin: 6px 0; font-size: 13px; line-height: 1.5; }
.ac-at-notes h3 { display: flex; align-items: center; justify-content: space-between; }
.ac-at-colors { font-size: 12.5px; font-weight: 600; }
.ac-key-bad { color: var(--danger); font-weight: 700; }
.ac-key-good { color: #16a34a; font-weight: 700; }
.ac-at-members td, .ac-at-members th { white-space: nowrap; }
.ac-at-members thead th { white-space: normal; vertical-align: bottom; min-width: 86px; }
.ac-at-req td { background: var(--surface); border-top: 2px solid var(--line); padding-top: 14px; }
.ac-at-req td u { text-underline-offset: 3px; font-weight: 700; }
.ac-at-name { font-weight: 600; color: var(--text); padding: 0; }
.ac-at-name:hover { color: var(--accent); }
.ac-at-adj { cursor: pointer; }
.ac-at-adj:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.ac-bad { background: color-mix(in srgb, var(--danger) 20%, var(--surface)); }
.ac-good { background: color-mix(in srgb, #16a34a 22%, var(--surface)); }
.ac-na { color: var(--muted); font-style: italic; }
.ac-at-note { white-space: normal !important; min-width: 160px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.ac-at-note:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 980px) { .ac-at-top { grid-template-columns: minmax(0, 1fr); } }

/* ---- Attendance, second pass: cards, meters, a calmer member table ---- */
.ac-colors-panel { width: min(340px, calc(100vw - 32px)); padding: 12px; }
.ac-colors .ac-ms-btn { min-width: 0; }
.ac-legend-list { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.ac-legend-list li { display: flex; align-items: center; gap: 10px; }
.ac-legend-list li > span { flex: none; }
.ac-cycle { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin: 4px 0 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ac-cycle > span { display: flex; flex-direction: column; padding: 10px 16px; border-right: 1px solid var(--line-soft); }
.ac-cycle small { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ac-cycle b { font-size: 14.5px; }
.ac-cycle .ac-cycle-note { margin-left: auto; justify-content: center; color: var(--muted); font-size: 12.5px; border-right: 0; }
.ac-gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.ac-gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ac-gtop { display: flex; align-items: center; gap: 8px; }
.ac-gtop h3 { margin: 0; font-size: 15px; }
.ac-gtop .g-count { margin-left: 0; }
.ac-gbig { display: flex; align-items: center; gap: 12px; }
.ac-gbig b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.ac-gbig span { display: flex; flex-direction: column; font-weight: 600; font-size: 13px; }
.ac-gbig small { color: var(--muted); font-weight: 500; }
.ac-gempty { color: var(--muted); }
.ac-gempty p { margin: 0; font-size: 13px; }
.ac-meter { display: block; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.ac-meter.lg { height: 10px; }
.ac-meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.ac-greqs { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 10px; }
.ac-greqs li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; }
.ac-greqs .ac-meter { grid-column: 1 / -1; }
.ac-greq-l { font-size: 13px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.ac-greq-l small { color: var(--muted); font-weight: 500; font-size: 12px; }
.ac-greq-v { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-greq-v b { color: var(--text); }
.ac-at-card { padding-bottom: 6px; }
.ac-at-card .g-table-wrap { border: 0; border-radius: 0; margin: 0 -16px; }
.ac-at-members thead th { white-space: normal; vertical-align: bottom; min-width: 0; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text); }
.ac-at-members thead th small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.ac-at-members td { padding-top: 7px; padding-bottom: 7px; }
.ac-grp td { background: var(--surface-2); padding: 10px 12px !important; white-space: normal !important; }
.ac-grp b { font-size: 13.5px; margin-right: 6px; }
.ac-grp .g-count { margin: 0 10px 0 0; background: var(--surface); }
.ac-rchip { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.ac-rchip b { color: var(--text); }
.ac-at-who { white-space: nowrap; }
.ac-v { display: inline-flex; flex-direction: column; align-items: flex-end; padding: 2px 8px; border-radius: 7px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ac-v small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.ac-v.bad { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); color: color-mix(in srgb, var(--danger) 70%, var(--text)); }
.ac-v.bad small { color: inherit; opacity: .85; }
.ac-v.ac-na { font-style: italic; color: var(--muted); font-weight: 500; }
.ac-at-adj { cursor: pointer; }
.ac-at-adj:hover, .ac-at-note:hover { outline: 0; background: var(--surface-2); }
.ac-st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.ac-st.good { background: color-mix(in srgb, #16a34a 18%, var(--surface)); color: color-mix(in srgb, #16a34a 75%, var(--text)); }
.ac-st.no { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.ac-addnote { opacity: 0; font-style: italic; }
tr:hover .ac-addnote { opacity: .7; }
.ac-howto dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 18px; margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; }
.ac-howto dt { font-weight: 650; }
.ac-howto dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) {
  .ac-cycle > span { flex: 1 1 45%; border-bottom: 1px solid var(--line-soft); }
  .ac-cycle .ac-cycle-note { margin-left: 0; flex-basis: 100%; }
  .ac-howto dl { grid-template-columns: 1fr; gap: 2px; }
  .ac-howto dd { margin-bottom: 8px; }
}
.ac-gnote { margin: 8px 2px 0; }
.ac-colors .ac-ms-panel { left: auto; right: 0; }
.ac-stats { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.ac-stat b { white-space: nowrap; font-size: 22px; }
.ac-warn { margin: 6px 2px 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #d97706 14%, var(--surface)); color: var(--text); }
/* Activities: incident paged to team / ML only */
.ac-paged { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; font-size: 13px; }
.ac-paged > span:first-child { font-weight: 650; }
.ac-paged .seg button { font-size: 12.5px; padding: 0 10px; height: 28px; }
.ac-paged small { flex-basis: 100%; }
.ac-mllist { display: flex; flex-direction: column; gap: 6px; }
.ac-mlrow { display: grid; grid-template-columns: 110px 1fr; gap: 2px 12px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.ac-mlrow:hover { background: var(--surface-2); }
.ac-mlrow span { color: var(--muted); font-size: 12.5px; }
.ac-mlrow small { grid-column: 2; color: var(--muted); font-size: 12px; }
.ac-paged .seg { margin: 0; order: 1; }
.ac-paged > span:first-child { order: 0; }
.ac-paged small { order: 2; }
/* Attendance header tiles (larger; missions split in two) */
.ac-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 10px 0 4px; }
.ac-tiles .ac-stat { padding: 16px 18px; min-height: 108px; justify-content: flex-start; gap: 4px; }
.ac-tiles .ac-stat > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-tiles .ac-stat b { font-size: 30px; line-height: 1.1; }
.ac-tiles .ac-stat small { font-size: 12.5px; }
.ac-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-split > div { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.ac-split b { font-size: 26px !important; }
.ac-split small { color: var(--muted); font-weight: 600; }
.ac-drafts { margin: 4px 2px 0; }
.ac-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* Attendance: bigger tile numbers; sortable member table; tag picker grouped by D4H category */
.ac-tiles .ac-stat > span { font-size: 14px; }
.ac-tiles .ac-stat b { font-size: 42px; line-height: 1.05; letter-spacing: -0.01em; }
.ac-tiles .ac-split b { font-size: 36px !important; }
.ac-at-members th.ac-sort .ac-arrow { margin-left: 4px; font-size: 12px; }
.ac-at-members th.ac-sort:hover { background: var(--surface-2); }
.ac-ms-group[hidden] { display: none; }
.ac-ms-group + .ac-ms-group { margin-top: 6px; }
.ac-ms-ghead { position: sticky; top: 0; z-index: 1; padding: 6px 6px 4px; background: var(--surface); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.ac-ms-list { max-height: 380px; gap: 0; }
/* Attendance: flags (hover or focus shows the rule) */
.ac-flag { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 4px; border-radius: 6px; color: #b45309; background: color-mix(in srgb, #d97706 14%, transparent); cursor: help; vertical-align: middle; }
.ac-flag:hover, .ac-flag:focus-visible { background: color-mix(in srgb, #d97706 26%, transparent); outline: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ac-flag { color: #f59e0b; } }
:root[data-theme="dark"] .ac-flag { color: #f59e0b; }
.ac-legend-list .ac-flag { margin: 0 4px 0 0; }
@media print { .ac-flag { color: #000; background: none; } }
/* Header tiles: numbers shrink with the tile (tablet / phone) instead of spilling out */
.ac-tiles > .ac-stat { container-type: inline-size; min-width: 0; overflow: hidden; }
.ac-tiles .ac-stat b { font-size: clamp(26px, 17cqi, 42px); white-space: normal; overflow-wrap: anywhere; }
.ac-tiles .ac-split b { font-size: clamp(22px, 13cqi, 36px) !important; }
.ac-tiles .ac-split > div { min-width: 0; }
.ac-hm { white-space: nowrap; }
.ac-u { font-size: .5em; font-weight: 700; color: var(--muted); margin-left: 2px; }
.ac-title .ac-flag { margin-left: 6px; }
.ac-stat b .ac-hm { display: inline; font-size: inherit; color: inherit; gap: 0; }
/* Activities dashboard: compare two periods */
.ac-vs-word { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ac-range-b { margin-left: 6px; background: var(--surface-2); color: var(--text); }
.ac-cmp.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ac-align { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.ac-cstat .ac-vs { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.ac-cstat .ac-vs b { font-size: inherit; color: var(--text); font-weight: 650; white-space: normal; }
.ac-delta { font-weight: 600; color: var(--text); font-size: 12px; }
.ac-delta span { font-size: 10px; color: var(--muted); }
.ac-cmp2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ac-cmp2 h3 small { font-weight: 500; font-size: 12px; margin-left: 6px; }
.ac-ctable td.n, .ac-ctable th.n { white-space: nowrap; }
@media (max-width: 900px) { .ac-cmp2 { grid-template-columns: minmax(0, 1fr); } }

/* Sign-in sheet → D4H exercise (phone first) */
.si-entry-btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 44px; font-weight: 650; }
.m-signin { width: min(560px, 100%); }
.m-signin .modal-body { padding-top: 8px; }
.m-signin .modal-foot { gap: 10px; }
.si-foot { display: flex; align-items: center; gap: 10px; width: 100%; }
.si-go { min-height: 46px; padding: 0 22px; font-size: 16px; font-weight: 700; }
.si-sum { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }
.si-ev { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--surface-2); }
.si-ev b { font-size: 16px; }
.si-ev span { font-size: 13px; color: var(--muted); }
.si-snap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 46vh; padding: 24px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px; color: var(--accent); text-align: center; cursor: pointer; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
button.si-snap, button.si-addphoto { font: inherit; background: none; width: 100%; text-align: inherit; }
button.si-addphoto { text-align: left; }
.si-snap b { font-size: 18px; color: var(--text); }
.pp-source-btns { display: grid; gap: 10px; margin: 6px 0; }
.pp-source-btns .btn { padding: 14px 16px; font-size: 16px; justify-content: center; }
.pp-video { width: 100%; max-height: 52vh; border-radius: 12px; background: #000; }
.si-snap small { color: var(--muted); font-size: 13px; }
.si-snap:active { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.si-shot { display: block; width: 100%; max-height: 58vh; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.si-alt { margin: 12px 0 4px; text-align: center; font-size: 14px; }
.si-alt .link { min-height: 40px; }
.si-proto { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, #d97706 12%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 35%, var(--line)); }
.si-card { padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.si-cardhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.si-cardhead h3, .si-h { margin: 0; font-size: 15px; }
.si-thumb { width: 52px; height: 52px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.si-thumb img { width: 100%; height: 100%; object-fit: cover; }
.si-full { display: block; width: 100%; height: auto; }
.si-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.m-signin .field input, .m-signin .field select, .si-pick, .si-find .input { height: 44px; font-size: 16px; } /* 16px: iPhone doesn't zoom in */
.si-sheet { margin: 6px 0 8px; font-size: 12.5px; color: var(--muted); }
.si-warn { margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; background: color-mix(in srgb, #d97706 12%, var(--surface)); }
.si-h { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; }
.si-n { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.si-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.si-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px 10px 12px; border-top: 1px solid var(--line); }
.si-row:first-child { border-top: 0; }
.si-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%; font-size: 14px; font-weight: 800; background: color-mix(in srgb, var(--t-event) 16%, var(--surface)); color: color-mix(in srgb, var(--t-event) 80%, var(--text)); }
.si-row.is-check .si-mark { background: color-mix(in srgb, #d97706 18%, var(--surface)); color: #b45309; }
.si-row.is-none .si-mark { background: color-mix(in srgb, #dc2626 14%, var(--surface)); color: #b91c1c; }
.si-row.is-check, .si-row.is-none { background: color-mix(in srgb, #d97706 5%, var(--surface)); }
.si-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.si-who b { font-size: 15px; font-weight: 650; }
.si-who small { font-size: 12.5px; color: var(--muted); }
.si-who .link { align-self: flex-start; min-height: 32px; }
.si-pick { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; background: var(--surface); color: var(--text); }
.si-cs { font-size: 12px; font-weight: 800; color: var(--muted); margin-left: 4px; }
.si-former { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.si-ok { flex: none; min-height: 36px; margin-top: 2px; }
.si-x { flex: none; width: 40px; height: 40px; font-size: 22px; color: var(--muted); }
.si-find { margin-top: 6px; }
.si-hits { display: flex; flex-direction: column; margin-top: 4px; }
.si-hit { min-height: 44px; padding: 0 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.si-hit:hover, .si-hit:focus-visible { background: var(--surface-2); }
.si-add { width: 100%; min-height: 46px; margin-top: 12px; font-weight: 650; }
.si-empty { padding: 12px; color: var(--muted); }
.si-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: 14px; }
.si-dl dt { color: var(--muted); }
.si-dl dd { margin: 0; font-weight: 600; }
.si-names { columns: 2; gap: 16px; margin: 0 0 10px; padding-left: 18px; font-size: 14px; }
.si-names small { color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .si-row.is-check .si-mark { color: #f59e0b; } :root:not([data-theme="light"]) .si-row.is-none .si-mark { color: #f87171; } }
:root[data-theme="dark"] .si-row.is-check .si-mark { color: #f59e0b; }
:root[data-theme="dark"] .si-row.is-none .si-mark { color: #f87171; }
@media (max-width: 760px) {
  .m-signin { max-height: 100dvh; height: 100dvh; border-radius: 0; border-top-width: 4px; }
  .m-signin .modal-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .si-names { columns: 1; }
}
.ac-range { white-space: nowrap; }
@media (max-width: 760px) {
  .ac-ctable { font-size: 12.5px; }
  .ac-ctable th, .ac-ctable td { padding-left: 6px; padding-right: 6px; }
  .ac-ctable th { font-size: 10.5px; }
  .ac-ctable .ac-cs { display: none; }
}
.m-signin .modal-body { flex: 1; }
.si-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.si-tag { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--t-training) 14%, var(--surface)); color: var(--text); }
.si-tagbtn { min-height: 36px; }
.m-signin-tags .si-tagq { height: 44px; font-size: 16px; margin-bottom: 8px; }
.si-taglist { display: flex; flex-direction: column; }
.si-tghead { margin: 10px 0 2px; font-size: 11.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.si-titem { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; border-bottom: 1px solid var(--line); }
.si-titem input { width: 20px; height: 20px; }
@media (max-width: 760px) { .m-signin-tags { max-height: 100dvh; height: 100dvh; border-radius: 0; } .m-signin-tags .modal-body { flex: 1; } }
.si-tall { margin-top: 12px; min-height: 40px; }
.si-reading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 40vh; text-align: center; }
.si-reading small { color: var(--muted); }
.si-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: si-spin 0.9s linear infinite; }
@keyframes si-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .si-spin { animation-duration: 3s; } }
.si-read { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.si-done { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: color-mix(in srgb, var(--t-event) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--t-event) 40%, var(--line)); }
.si-copy { display: block; margin: -4px 0 10px; text-align: left; font-size: 13px; min-height: 32px; }
.si-leads { margin-bottom: 6px; }
.si-tag .si-untag { margin-left: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.si-tag .si-untag:hover, .si-tag .si-untag:focus-visible { background: var(--surface-2); color: var(--text); }
.si-tag:has(.si-untag) { display: inline-flex; align-items: center; padding-right: 2px; }
.m-signin .field textarea { font-size: 16px; min-height: 58px; }
/* Team calendars: chips above the calendar, the ML schedule */
.cal-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-manage { font-size: 13px; align-self: center; margin-left: 4px; }
.cal-list { display: grid; gap: 8px; margin: 10px 0; }
.cal-row { display: flex; align-items: center; gap: 8px; }
.cal-row input[type=color] { width: 36px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); flex: none; }
.cal-row input[type=text] { flex: 1; min-width: 0; }
.cal-row small { flex: none; }
.cf-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cf-chip i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c); background: transparent; }
.cf-chip.on { color: var(--text); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.cf-chip.on i { background: var(--c); }
/* Linked calendars: one pill and its on/off popover (linkcals.js, HQ-68). Some off: a dashed edge and "2/3". */
.cf-linked svg { flex: none; }
.cf-linked .cf-count { min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 750; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.cf-linked.on .cf-count { background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: var(--text); }
.cf-linked.some { border-style: dashed; }
.cf-linked[aria-expanded="true"] { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.lc-pop { width: min(340px, calc(100vw - 16px)); padding: 10px 10px 8px; max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.lc-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; }
.lc-head h3 { margin: 0; font-size: 14px; }
.lc-sub { color: var(--muted); font-size: 12.5px; }
.lc-x { margin-left: auto; width: 30px; height: 30px; font-size: 18px; line-height: 1; }
.lc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; }
.lc-row:hover { background: var(--surface-2); }
.lc-row:has(.lc-sw:not(:checked)) .lc-name { opacity: .6; }
.lc-row:has(.lc-sw:not(:checked)) .fd-dot { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.lc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lc-name b, .lc-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-name b { font-size: 13.5px; font-weight: 650; }
.lc-name small { color: var(--muted); font-size: 12px; }
.lc-sw { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: background .15s; }
.lc-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.lc-sw:checked { background: var(--accent); }
.lc-sw:checked::after { transform: translateX(16px); }
.lc-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .lc-sw, .lc-sw::after { transition: none; } }
.lc-foot { display: flex; align-items: center; gap: 6px; padding: 8px 2px 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.lc-foot .link { font-size: 13px; }
.lc-note { margin: 6px 2px 0; font-size: 12px; }
.lc-scrim { position: fixed; inset: 0; z-index: 269; background: rgba(15, 17, 20, .45); }
/* phones: a bottom sheet */
.lc-pop.lc-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
.lc-pop.lc-sheet .lc-row { padding: 10px 6px; }
.lc-pop.lc-sheet .lc-head h3 { font-size: 16px; }
.cf-oncall { font-size: 13px; color: var(--muted); }
.cf-oncall b { color: var(--text); }
.cf-cs { font-size: 11.5px; font-weight: 800; padding: 0 6px; border-radius: 5px; background: var(--surface-2); }
.cf-none { color: #b45309; font-weight: 650; }
.cf-add { margin-left: auto; }
.ml-gap { display: block; width: 100%; margin: 0 0 2px; padding: 1px 6px; border: 1px dashed #d97706; border-radius: 6px; background: color-mix(in srgb, #d97706 10%, transparent); color: #b45309; font: inherit; font-size: 11px; font-weight: 700; text-align: left; cursor: pointer; }
.ml-gap:hover, .ml-gap:focus-visible { background: color-mix(in srgb, #d97706 20%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ml-gap, :root:not([data-theme="light"]) .cf-none { color: #f59e0b; } }
:root[data-theme="dark"] .ml-gap, :root[data-theme="dark"] .cf-none { color: #f59e0b; }
.ml-roles button { min-width: 72px; }
.ml-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.ml-preview { min-height: 1.4em; }
@media (max-width: 760px) {
  .cal-filter { padding: 6px 10px; gap: 6px 8px; }
  .cf-chip { min-height: 32px; padding: 0 10px; font-size: 12.5px; }
  .cf-oncall { order: 3; width: 100%; font-size: 12.5px; }
}
@media print { .cal-filter { display: none; } }
.ml-gap { white-space: nowrap; overflow: hidden; text-overflow: clip; }
@media (max-width: 760px) { .month-cell .ml-gap { padding: 0 3px; font-size: 9.5px; line-height: 15px; border-radius: 4px; } }
/* Mid-size screens (tablets, small laptops): Sign in and "Viewing as" move into the ⋯ menu so the top bar fits */
.menu .mid-only { display: none; }
@media (min-width: 761px) and (max-width: 1240px) {
  .topbar .account-btn, .topbar .viewer-btn, .topbar .hide-sm { display: none; }
  .menu button.mid-only { display: flex; }
  .menu hr.mid-only { display: block; }
}
@media (min-width: 761px) and (max-width: 960px) { .topbar .brand-name { display: none; } }
/* Garage: vehicle details (equipment list fields) */
.g-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin: 0 0 6px; }
.g-details div { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.g-details dt { font-size: 12px; color: var(--muted); }
.g-details dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.g-more { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.g-more summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.g-more[open] { padding-bottom: 8px; }
/* Garage › Fleet table: every vehicle in one wide table (like the equipment spreadsheet) */
.g-ft-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.g-ft-seg { max-width: 100%; overflow-x: auto; }
.g-ft-seg button small { font-weight: 600; color: var(--muted); font-size: 11px; }
.g-ft-filters { justify-content: space-between; }
.g-ft-types { display: flex; flex-wrap: wrap; gap: 6px; }
.g-ft-chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.g-ft-chip small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.g-ft-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.g-ft-chip.on small { color: inherit; opacity: .8; }
.g-ft-right { display: flex; gap: 8px; flex-wrap: wrap; }
.g-ft-q { width: 220px; }
.g-ft-wrap { max-height: calc(100vh - 230px); overflow: auto; }
.g-ft { font-size: 13px; }
.g-ft thead th { position: sticky; top: 0; z-index: 2; text-transform: none; letter-spacing: 0; font-size: 12px; cursor: pointer; user-select: none; }
.g-ft thead th:hover { color: var(--text); }
.g-ft th.on { color: var(--text); }
.g-ft-arrow { margin-left: 4px; }
.g-ft th, .g-ft td { padding: 7px 10px; }
.g-ft .g-ft-name { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line-soft); }
.g-ft thead .g-ft-name { z-index: 3; background: var(--surface-2); }
.g-ft tbody tr:hover .g-ft-name { background: var(--surface-2); }
.g-ft-name .g-dot { display: inline-block; border-radius: 50%; background: var(--c); margin-right: 7px; }
.g-ft-name .g-tag { margin-left: 6px; font-size: 10.5px; padding: 1px 7px; }
.g-ft-grp td { background: var(--surface-2); padding: 0 !important; }
.g-ft-grp-label { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 700; font-size: 13.5px; }
.g-ft-grp .g-count { margin: 0; background: var(--surface); }
.g-ft-exp.s-overdue { color: var(--danger); font-weight: 650; }
.g-ft-exp.s-soon { color: #b45309; font-weight: 650; }
.g-ft-needs { font-size: 12px; font-weight: 600; }
.g-ft-needs.s-overdue { color: var(--danger); } .g-ft-needs.s-soon { color: #b45309; }
.g-ft-notes { color: var(--muted); }
.g-ft-more { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: help; }
.g-ft-more .g-ft-full { display: none; }
.g-ft-more.open .g-ft-short { display: none; }
.g-ft-more.open .g-ft-full { display: inline-block; white-space: normal; min-width: 180px; max-width: 260px; }
.g-ft-vin { white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-ft-copy { margin-left: 4px; vertical-align: middle; opacity: .6; }
.g-ft-copy:hover, .g-ft-copy:focus-visible { opacity: 1; }
@media (hover: none) { .g-ft-more { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; } .g-ft-copy { opacity: .85; } }
.g-ft-sold td { color: var(--muted); }
.g-ft-foot { margin-top: 8px; }
@media (max-width: 760px) {
  .g-ft-right, .g-ft-q { width: 100%; } .g-ft-right select { flex: 1; }
  .g-ft-wrap { max-height: none; }
  .g-ft .g-ft-name b { white-space: normal; display: inline-block; max-width: 150px; vertical-align: middle; }
}
.g-vnotes { margin: 8px 0 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.g-vnotes b { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- Multi-select people dropdown (msel.js) ---------- */
.msel { position: relative; display: inline-block; max-width: 100%; }
.msel-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; max-width: 100%; padding: 2px 8px 2px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.msel-btn:hover, .msel.open .msel-btn { border-color: var(--accent); }
.msel-btn svg { flex: none; color: var(--muted); }
.msel-ph { color: var(--muted); padding-left: 4px; }
.msel-avs { display: inline-flex; }
.msel-avs .msel-av + .msel-av { margin-left: -6px; }
.msel-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-av { width: 22px; height: 22px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; box-shadow: 0 0 0 2px var(--surface); }
.msel-panel { position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; width: min(290px, calc(100vw - 40px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; }
.msel-q { width: 100%; height: 34px; margin-bottom: 6px; }
/* (HQ-142) people search (psearch.js): ONE single-line box above a long scrolling list ... */
.ps-q { display: block; width: 100%; height: 38px; flex: none; margin: 2px 0 8px; font-size: 16px; }
@media (min-width: 700px) { .ps-q { font-size: 14px; } }
.ps-none { margin: 8px 2px; }
/* ... and for a people <select>, one compact dropdown with the search inside */
.psel { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.field .psel, .pm-check .psel { display: block; }
.psel-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.psel-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 100%; min-width: 0; height: 34px; padding: 0 10px; text-align: left; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; }
.field .psel-btn, .pm-check .psel-btn { width: 100%; height: 38px; }
.psel-btn:disabled { opacity: .55; cursor: not-allowed; }
.psel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psel-panel { position: fixed; z-index: 3000; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; box-sizing: border-box; }
.psel-q { display: block; width: 100%; height: 36px; margin: 0 0 6px; font-size: 16px; }
@media (min-width: 700px) { .psel-q { font-size: 14px; } }
.psel-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 1px; }
.psel-opt { padding: 8px 8px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.psel-opt:hover, .psel-opt.on { background: var(--surface-2); }
.psel-opt.sel { font-weight: 600; }
.psel-grp { padding: 6px 8px 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.psel-none { margin: 6px 4px 2px; }
.msel-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; overscroll-behavior: contain; }
.msel-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; font-size: 13.5px; cursor: pointer; }
.msel-item:hover { background: var(--surface-2); }
.msel-item[hidden] { display: none; }
.msel-grp { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 6px 2px; }
.msel-grp[hidden] { display: none; }
/* Gear › Import / Export CSV */
.gcsv-sec + .gcsv-sec { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.gcsv-pick { gap: 12px; align-items: center; flex-wrap: wrap; }
.gcsv-preview:not(:empty) { margin-top: 10px; }
.gcsv-list { max-height: 240px; overflow: auto; }
.gcsv-notes { margin-top: 8px; font-size: 13px; }
.gcsv-notes summary { cursor: pointer; color: var(--muted); }
.gcsv-notes ul { margin: 6px 0 0; padding-left: 18px; }
.msel-item input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }
.msel-item small { display: block; color: var(--muted); font-size: 11.5px; }
.msel-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.tm-stepsel:has(.msel) { border: 0; height: auto; max-width: none; background: none; }
.tm-stepsel .msel-btn { min-height: 28px; }
.tm-stepsel.own .msel-btn { border-color: var(--accent); }

/* ---------- Me ---------- */
.me-badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; }
.me-who { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.me-who .avatar { width: 34px; height: 34px; font-size: 14px; }
.me-who b { display: block; }
.me-who small { color: var(--muted); font-size: 12px; }
.me-who .me-contact { display: block; padding: 2px 0; font-size: 12px; text-align: left; } /* (HQ-150) */
.me-switch { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 10px; font-size: 12px; }
.me-switch select { width: 100%; }
.me-rail-head { padding: 14px 8px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.me-pickme { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.me-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.me-task { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.me-task:last-child { border-bottom: 0; }
.me-task.s-overdue { box-shadow: inset 3px 0 0 var(--danger); }
.me-task .tm-box { width: 20px; height: 20px; flex: none; accent-color: var(--accent); margin: 0; cursor: pointer; }
.me-dot { width: 20px; display: grid; place-items: center; flex: none; }
.me-dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.me-src-cred::after { background: #b45309; }
.me-src-res::after { background: var(--accent); }
.me-task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: none; padding: 2px 0; font: inherit; color: var(--text); cursor: pointer; }
span.me-task-main { cursor: default; }
.me-task-main b { font-weight: 600; }
.me-task-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.me-task.done .me-task-main b { text-decoration: line-through; color: var(--muted); }
.me-src { font-weight: 650; }
.me-task-side { display: flex; align-items: center; gap: 8px; flex: none; }
.me-others { display: inline-flex; }
.me-others .avatar + .avatar { margin-left: -6px; }
.me-due { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.me-due.s-overdue { color: var(--danger); }
.me-due.s-soon { color: #b45309; }
.me-done { margin-top: 18px; }
.me-done summary { cursor: pointer; font-weight: 650; margin-bottom: 8px; }
.me-creds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.me-cred { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.me-cred:hover { border-color: var(--accent); }
.me-cred.s-expired { box-shadow: inset 3px 0 0 var(--danger); }
.me-cred.s-soon { box-shadow: inset 3px 0 0 #d97706; }
.me-cred-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.me-cred small { color: var(--muted); font-size: 12px; }
.me-cred-exp { font-size: 13px; font-weight: 600; }
.me-cred-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.me-cred-foot svg { width: 12px; height: 12px; vertical-align: -1px; }
.me-pill { display: inline-flex; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.me-pill.s-expired { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.me-pill.s-soon { background: color-mix(in srgb, #d97706 18%, transparent); color: #b45309; }
.me-pill.s-ok { background: color-mix(in srgb, #15803d 16%, transparent); color: #15803d; }
.me-thumbs { display: inline-flex; gap: 4px; align-items: center; }
.me-thumb { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2) center / cover no-repeat; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 700; color: var(--muted); flex: none; }
.me-thumb.gone { opacity: .4; }
.me-card h3 { margin: 0 0 10px; font-size: 15px; }
.me-card .chk { margin-top: 10px; align-items: flex-start; }
.me-card + .me-card { margin-top: 12px; }
.me-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.me-day { position: relative; display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); user-select: none; }
.me-day input { position: absolute; opacity: 0; pointer-events: none; }
.me-day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.me-day:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.me-day-add { display: inline-flex; gap: 4px; align-items: center; }
.me-day-add .input { width: 76px; height: 30px; }
.me-coming { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.me-coming .s-overdue { color: var(--danger); }
.me-missing { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.me-team td { vertical-align: middle; }
.me-team .avatar { width: 22px; height: 22px; font-size: 10px; vertical-align: middle; }
.me-team tr[data-m] { cursor: pointer; }
.me-files .me-filelist { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.me-file { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 6px; max-width: 220px; }
.me-file-open { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; min-width: 0; padding: 0; }
.me-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.me-upload { align-self: flex-start; cursor: pointer; }
.me-remind .me-owndays { margin-top: 8px; }
.me-cred-owner { display: flex; align-items: center; gap: 8px; font-weight: 650; margin: 0 0 6px; }
.me-view-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
@media (max-width: 760px) {
  .me-task-side .me-others { display: none; }
  .me-creds { grid-template-columns: 1fr; }
}

/* checklist sub-items */
.tm-tstep-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.tm-tsubs { display: flex; flex-direction: column; gap: 4px; margin: 2px 0 2px 2px; }
.tm-tsub { display: flex; align-items: center; gap: 8px; }
.tm-tsub span.tm-box { width: 15px; height: 15px; margin-top: 0; border-radius: 4px; }
.tm-tsub .input { flex: 1; min-width: 0; height: 32px; font-size: 13.5px; }
.tm-tsub-acts { display: flex; gap: 2px; flex: none; }
.tm-tsub-acts .icon-btn { width: 24px; height: 24px; font-size: 13px; }
.tm-tsub-acts .icon-btn[disabled] { opacity: .3; }
.tm-esubs .tm-tsubs { margin: 4px 0 6px; }
.tm-subcount { font-size: 11.5px; font-weight: 650; color: var(--muted); margin-left: 4px; }
.tm-subs { grid-column: 1 / -1; list-style: none; margin: 4px 0 2px 32px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tm-subs li { display: flex; align-items: center; gap: 10px; }
.tm-subs label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; padding: 3px 0; }
.tm-subs input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
.tm-subs li.done span { color: var(--muted); text-decoration: line-through; }
.tm-subs small { color: var(--muted); font-size: 11.5px; }
.msel-panel.right { left: auto; right: 0; }
.msel-panel.up { top: auto; bottom: calc(100% + 4px); }
/* tags dropdown: full-width button listing every tag as a chip */
.msel-block { display: block; }
.msel-block .msel-btn { width: 100%; min-height: 40px; padding: 5px 10px; border-radius: 10px; justify-content: space-between; text-align: left; }
.msel-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.msel-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.msel-block .msel-panel { width: min(340px, 100%); }
.msel-new { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); color: var(--accent); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.msel-new[hidden] { display: none; }
.msel-new b { color: var(--text); }

/* Me: qualifications from D4H */
.me-from { align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.me-d4hfiles { margin: 2px 0 4px; padding-left: 18px; }
.tm-d4h { margin: -4px 0 6px; font-size: 12.5px; color: var(--muted); }
.tm-d4h-on, .tm-d4h-off { font-weight: 700; }
.tm-d4h-on { color: #15803d; }

/* repeating events */
.rp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 4px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.rp-bar svg { width: 14px; height: 14px; vertical-align: -2px; }
.rp-bar small { color: var(--muted); }
.rp-scope { display: flex; align-items: center; gap: 8px; }
.rp-scope > span { color: var(--muted); font-size: 12px; }
.rp-scope .seg button { height: 26px; font-size: 12.5px; padding: 0 9px; }
.rp-row { flex-wrap: wrap; }
.rp-row select, .rp-row input { width: auto; flex: 1 1 160px; }
.rp-row .rp-count { flex: 0 0 90px; }
.rp-row [hidden] { display: none; }
.rp-del { display: flex; flex-direction: column; gap: 8px; }

/* announcements */
.ann-slot:empty { display: none; }
.ann-bar { display: flex; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 8px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.ann-bar.urgent { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.ann-ico { font-size: 18px; }
.ann-bar-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ann-bar-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ann-bar-main small { color: var(--muted); font-size: 12px; }
.ann-meta { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.ann-body { font-size: 15px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.ann-body a { color: var(--accent); }
.ann-ok { color: #15803d; font-weight: 600; }
.ann-receipts { margin-top: 14px; }
.ann-receipts summary { cursor: pointer; font-weight: 600; }
.ann-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ann-pick[hidden] { display: none; }
.ann-to { margin-bottom: 2px; }
.me-anns { display: flex; flex-direction: column; gap: 8px; }
.me-ann { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.me-ann:hover { border-color: var(--accent); }
.me-ann.unread { box-shadow: inset 3px 0 0 var(--accent); }
.me-ann.urgent.unread { box-shadow: inset 3px 0 0 var(--danger); }
.me-ann-top { display: flex; justify-content: space-between; gap: 8px; }
.me-ann small { color: var(--muted); font-size: 12px; }
.me-ann-body { color: var(--muted); font-size: 13.5px; }

/* calendar feed */
.ics-h { margin: 6px 0 2px; font-size: 15px; }
.ics-h + .help { margin-top: 0; }
.ics-cals { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ics-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: 0; }
.ics-src { flex-wrap: wrap; }
.ics-src .input { flex: 1 1 240px; }
.ics-note { margin-bottom: 14px; }
.ics-found { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ics-found p { margin: 0 0 8px; }
.done-line { color: #15803d; font-weight: 600; }

/* RSVP */
.rsvp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.rsvp-head { display: flex; align-items: baseline; gap: 8px; }
.rsvp-head small { color: var(--muted); }
.rsvp-head .link { margin-left: auto; font-size: 12.5px; }
.rsvp-me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rsvp-me > span { font-weight: 600; }
.rsvp-me .seg button.on { color: var(--accent-ink); background: var(--accent); }
.rsvp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px 12px; }
.rsvp-sum summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.rsvp-sum summary b { color: var(--text); font-size: 15px; }
.rsvp-sum p { margin: 2px 0 6px; font-size: 12.5px; }
.rsvp-by { max-width: 220px; }
.rsvp-badge { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, #15803d 18%, transparent); color: #15803d; margin-right: 3px; }

/* permissions and the activity log */
.pm-ro { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.pm-h { margin: 16px 0 6px; font-size: 15px; }
.pm-h small { font-weight: 500; font-size: 12px; }
/* (HQ-76 round 4) Settings › Permissions: each section under a color band (the theme's accent, light and dark) */
.pm-h.pm-band { display: flex; flex-direction: column; gap: 2px; margin: 22px -4px 8px; padding: 9px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-left: 4px solid var(--accent); color: var(--text); font-size: 15px; }
.pm-modal .modal-body > .pm-h.pm-band:first-child { margin-top: 2px; }
.pm-h.pm-band .pm-sub { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.pm-ra { margin: 2px 0 10px; }
.imp-out:not(:empty) { margin-top: 10px; }
.imp-list { margin: 6px 0 10px; padding-left: 20px; }
.imp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.imp-table { overflow-x: auto; }
.imp-table td.n, .imp-table th.n { text-align: right; padding: 2px 8px; }
.imp-out .warn { color: var(--danger, #c92a2a); }
.imp-out .ok { color: var(--ok, #22a06b); font-weight: 600; }
.pm-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.pm-name { font-weight: 600; font-size: 13.5px; padding-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pm-name small { font-weight: 500; }
.pm-rule { display: flex; flex-direction: column; gap: 6px; }
.pm-some { display: flex; flex-direction: column; gap: 6px; }
.pm-some[hidden] { display: none; }
@media (max-width: 560px) { .pm-row { grid-template-columns: 1fr; } }
.lg-list { display: flex; flex-direction: column; }
.lg-row { display: flex; gap: 12px; padding: 6px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.lg-time { flex: none; width: 64px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-row small { color: var(--muted); }
.lg-removed b + * { color: var(--muted); }

/* documents & SOPs */
.dc-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dc-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dc-row:last-child { border-bottom: 0; }
.dc-row:hover { background: var(--surface-2); }
.dc-row[hidden] { display: none; }
.dc-row.need { box-shadow: inset 3px 0 0 var(--danger); }
.dc-ico { flex: none; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; color: #fff; background: #64748b; }
.dc-ico.dc-page { background: var(--accent); color: var(--accent-ink); }
.dc-ico.dc-img { background: #0891b2; }
.dc-ico.dc-file { background: #b91c1c; }
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dc-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-reads, .dc-off { flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.dc-off:empty { display: none; }
.dc-q { width: min(320px, 100%); }
.dc-meta { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.dc-page { font-size: 15px; line-height: 1.6; }
.dc-page h3, .dc-page h4, .dc-page h5 { margin: 16px 0 6px; }
.dc-page p { margin: 0 0 10px; }
.dc-page a { color: var(--accent); }
.dc-file { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.dc-file > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dc-file small { color: var(--muted); }

/* sign-in sheet: by hand first, photo optional */
.si-addphoto { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; color: var(--accent); cursor: pointer; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.si-addphoto span { display: flex; flex-direction: column; }
.si-addphoto b { color: var(--text); }
.si-addphoto small { color: var(--muted); font-size: 12.5px; }
.si-pick-many { margin: 2px 0 8px; }
.m-signin .msel, .si-pick-many .msel { display: block; }
.m-signin .msel-btn { width: 100%; min-height: 40px; border-radius: 10px; padding: 4px 10px 4px 6px; justify-content: space-between; }
.m-signin .msel-panel { width: min(340px, 100%); }

/* US holidays */
.hol-chip { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hol-chip.fed { color: var(--text); }
.hol-chip span { font-size: 9px; color: #94a3b8; }
.hol-chip.fed span { color: #d97706; }

/* documents: folders that open, drag and drop */
.dc-folder { margin-top: 8px; }
.dc-fhead { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.dc-fhead .chev { transition: transform .15s; transform: rotate(-90deg); color: var(--muted); }
.dc-folder.open .dc-fhead .chev { transform: none; }
.dc-fhead .g-count { margin-left: 0; }
.dc-drop-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.garage.dc-dragging .g-main { outline: 3px dashed var(--accent); outline-offset: -8px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dc-newfolder { margin-top: 6px; }
.dc-newfolder[hidden] { display: none; }
.dc-adds { margin: 0 0 10px; padding-left: 18px; max-height: 180px; overflow: auto; }

/* gear */
.gr-table td { vertical-align: middle; }
.gr-act { text-align: right; }
.gr-h { margin: 14px 0 6px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-h small { font-weight: 500; font-size: 12px; }
.gr-after { align-self: end; margin-bottom: 10px; }
.gr-logs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.gr-log { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.gr-log > span:nth-child(2) { flex: 1; }
.gr-when { flex: none; width: 92px; color: var(--muted); }
.gr-checks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gr-checks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.gr-checks .seg button.on[data-v="bad"] { background: var(--danger); color: #fff; }
.gr-result { flex-wrap: wrap; }
.gr-result button.on[data-r="fail"], .gr-result button.on[data-r="retire"] { background: var(--danger); color: #fff; }
/* gear: use log details */
.gr-chips, .gr-events { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.gr-chip input { margin: 0; accent-color: var(--accent); }
.gr-chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.gr-chip.review { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
.gr-chip.review:has(input:checked) { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); border-color: var(--danger); }
.gr-evpick[hidden] { display: none; }
.gr-ev { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.gr-sub { color: var(--muted); font-size: 12.5px; }
.gr-logbtns { margin: 0 0 8px; flex-wrap: wrap; }
.gr-warn { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line)); font-size: 13px; }
.gr-level button { font-size: 12.5px; }
.modal .gr-chip input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; flex: none; border-radius: 4px; }
.gr-chip { line-height: 1.25; }

/* ---------- Hub ---------- */
.hb-q { width: min(420px, 100%); height: 38px; margin: 2px 0 10px; }
.hb-hits { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.hb-hit { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; font: inherit; text-align: left; cursor: pointer; }
.hb-hit small { margin-left: auto; color: var(--muted); }
.hb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.hb-card h3 { margin: 0 0 8px; font-size: 15px; }
.hb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hb-when { display: inline-block; min-width: 92px; color: var(--muted); font-size: 12.5px; }
.hb-warn { color: var(--danger); font-weight: 600; }
/* tools */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tl-tile { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tl-tile:hover { border-color: var(--c); }
.tl-tile.nolink { opacity: .65; }
.tl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 10px; color: var(--text); text-decoration: none; }
.tl-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.tl-name { min-width: 0; display: flex; flex-direction: column; }
.tl-name b { font-size: 14px; }
.tl-name small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-acts { display: flex; flex-direction: column; justify-content: center; padding: 4px; gap: 2px; }
.tl-acts .icon-btn { width: 24px; height: 24px; font-size: 13px; color: var(--muted); }
.tl-pin.on { color: #d97706; }
.tl-mission { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
/* access codes */
.pr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.pr-bar .pr-q { flex: 1 1 240px; max-width: 420px; height: 36px; margin: 0; }
.pr-bar .pr-all { margin-left: auto; }
.pr-group { margin-bottom: 12px; }
.pr-ghead { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.pr-gbtn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; font: inherit; font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--text); cursor: pointer; }
.pr-gbtn .chev { transition: transform .15s; }
.pr-group.closed .pr-gbtn .chev { transform: rotate(-90deg); }
.pr-rename { font-size: 12px; }
.pr-card .avatar { color: #fff; }
.pr-who { grid-template-columns: minmax(150px, 30%) 1fr auto; }
.pr-card .ct-main, .pr-need { text-align: left; align-items: flex-start; }
.pr-need { display: flex; flex-direction: column; min-width: 0; }
.pr-need small { color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .pr-who { grid-template-columns: 1fr; } .pr-who .ct-acts { justify-content: flex-start; } .ct-row.pr-card:not(.pr-who) { grid-template-columns: auto 1fr; } .ct-row.pr-card:not(.pr-who) .ct-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.pr-who-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-who-head .g-sec { margin-right: auto; }
.pr-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 6px; }
.pr-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.pr-row:last-child { border-bottom: 0; }
.pr-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; }
.pr-main small, .pr-det { color: var(--muted); font-size: 12px; }
.pr-acts, .pr-ans { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pr-ans { flex: 1 1 280px; }
.pr-det { flex-basis: 100%; }
.pr-tel { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pr-tel::before { content: '📞'; font-size: 12px; margin-right: 5px; }
.pr-link { color: var(--accent); font-size: 13px; }
.pr-empty { padding: 10px 12px; margin: 0; }
.pr-modes { display: flex; gap: 14px; }
.pr-hit { cursor: default; flex-wrap: wrap; }
.pr-modal .pr-list { max-height: 60vh; overflow: auto; margin-top: 10px; }
.cd-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cd-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.cd-row:last-child { border-bottom: 0; }
.cd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd-main small { color: var(--muted); font-size: 12px; }
.cd-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; font-weight: 700; letter-spacing: .08em; min-width: 70px; text-align: right; }
/* schedule */
.sc-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sc-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; flex-wrap: wrap; }
.sc-row:last-child { border-bottom: 0; }
.sc-row > b { min-width: 96px; }
.sc-row > span { flex: 1; min-width: 160px; }
.sc-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sc-rule { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.sc-rule input[type="number"] { width: 80px; }
.sc-plan { max-height: 280px; overflow: auto; }
.sc-plan .sc-row.sc-wanted { background: color-mix(in srgb, #16a34a 10%, transparent); }
.sc-want { color: #16a34a; font-weight: 600; margin-left: 4px; }
.sc-row .ml-warn { display: inline; margin: 0; }
/* ML Schedule: draft months, open turns (Nov 20, 2026) */
.sc-draft { color: var(--warn, #b45309); }
.sc-claim-days { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 10px; }
.sc-remind { margin-top: -4px; }
.sc-day.covered.draft { border-style: dashed; opacity: .8; }
.sc-day.covered.draft i { color: var(--warn, #b45309); font-weight: 700; }
.sc-draft-view { margin: 10px 0 4px; }
.sc-draft-view h4 { margin: 0 0 6px; font-size: 13px; }
.sc-draft-view .sc-row .link { font-weight: 600; }
.nt-ml label { display: inline-flex; align-items: center; gap: 6px; }
.sc-missed { margin-top: 8px; font-size: 13px; }
.sc-missed summary { cursor: pointer; color: var(--muted); }
.sc-backup { align-self: end; margin-bottom: 10px; }
.ml-warn { display: block; color: var(--danger); font-weight: 600; margin-top: 4px; }
/* phones: the tabs move to a bar along the bottom */
@media (max-width: 760px) {
  #modeSeg { position: fixed; left: 0; right: 0; bottom: 0; z-index: 170; display: flex; margin: 0; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-radius: 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(0, 0, 0, .12); }
  #modeSeg button { flex: 1; height: 44px; justify-content: center; font-size: 13px; border-radius: 10px; padding: 0 4px; }
  #app { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .fab { bottom: calc(68px + env(safe-area-inset-bottom)); }
}

.sc-mlrules { margin-top: 18px; }
.sc-mlrules summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

/* Hub: a big hello */
.hb-hello { margin: 2px 0 14px; }
.hb-hello h2 { margin: 0; font-size: clamp(30px, 5vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; }
.hb-hello p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.hb-viewing { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, #d97706 18%, var(--surface)); color: #b45309; }
.hb-viewas { padding-top: 2px; }

.sc-bad { color: var(--danger); font-style: normal; }
.sc-preview code { font-size: 12.5px; }

/* ---------- Tabs inside the app (workspace.js): placed over the content area by place() ---------- */
.ws { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); }
.ws[hidden] { display: none; }
.ws-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; }
.ws-bar .grow { flex: 1; }
.ws-tab { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); flex: none; }
.ws-tab.on { border-color: var(--c); box-shadow: inset 0 -2px 0 var(--c); }
.ws-tab > button { background: none; border: 0; color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 6px 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.ws-tab .ws-x { padding: 6px 8px 6px 2px; color: var(--muted); }
.ws-frames { flex: 1; position: relative; background: #fff; }
.ws-frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ws-pill { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
.ws-pill[hidden] { display: none; }
@media (max-width: 767px) { .ws-pill { bottom: calc(76px + env(safe-area-inset-bottom)); } }
.tl-in { font-size: 11px; opacity: .7; }
.ws-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--bg); color: var(--text); text-align: center; }
.ws-card[hidden] { display: none; }
.ws-card > div { max-width: 420px; display: grid; gap: 12px; justify-items: center; }
.ws-card h3 { margin: 0; font-size: 20px; }
.ws-card p { margin: 0; color: var(--muted); }
.ws-card-ico { font-size: 40px; }

/* install the app (install.js) */
.hb-install { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hb-install > span { flex: 1; min-width: 200px; }
.inst-steps { padding-left: 20px; display: grid; gap: 6px; }

/* gear: manual link, printed log; rig supplies (supplies.js) */
.gr-manual { display: flex; gap: 8px; align-items: center; }
.gr-manual input { flex: 1; min-width: 0; }
.p-facts { border-collapse: collapse; margin: 0 0 12px; font-size: 12px; }
.p-facts th { text-align: left; padding: 2px 12px 2px 0; color: #555; font-weight: 600; }
.p-log td, .p-log th { font-size: 11px; vertical-align: top; }
.p-log tr.p-blank td { height: 26px; }
.p-note { font-size: 10px; color: #555; margin-top: 8px; }
.sup-count { white-space: nowrap; }
.sup-count b { display: inline-block; min-width: 26px; text-align: center; }
.sup-in { width: 100%; min-width: 70px; }
.sup-gear { margin: 4px 0 8px; }
.g-sec-acts { margin-left: auto; font-size: 13px; font-weight: 500; }

/* Activities on the server (acts/cloud.js) */
.ac-cloud { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ac-cloud.warn { color: var(--danger); }
.ac-share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ac-share > span { flex: 1; min-width: 220px; }

/* required credentials (me/required.js) */
.me-req { margin-bottom: 12px; }
.me-req-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.user-chip.expired { outline: 1px dashed var(--danger); }

/* permissions manager (permsui.js) */
.pm-roles { display: grid; gap: 4px; margin-bottom: 8px; max-height: 320px; overflow: auto; }
.pm-check { display: grid; gap: 8px; margin-bottom: 8px; }
.pm-can { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; }
.pm-yes { color: var(--text); } .pm-no { color: var(--muted); } .pm-info { color: var(--muted); font-style: italic; }

/* calendar subscribe link (ics.js) */
.ics-sub { display: grid; gap: 8px; }
.ics-link { width: 100%; font-size: 12px; }

/* ---------- New / Edit activity: location with a map, the sign-in sheet picture (acts/view.js, mappick.js) ---------- */
.ac-loc { display: flex; gap: 8px; align-items: stretch; }
/* the Location box (locfield.js): type, a D4H saved place (▾), or the map */
.loc-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.loc-box { position: relative; flex: 1 1 220px; min-width: 0; display: flex; }
.loc-box .input { flex: 1; min-width: 0; padding-right: 34px; }
.loc-drop { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.loc-drop:hover { background: var(--surface-2); color: var(--text); }
.loc-drop[hidden] { display: none; }
.loc-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.25); padding: 4px; overscroll-behavior: contain; }
.loc-menu[hidden] { display: none; }
.loc-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 8px 4px; }
.loc-opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.loc-opt:hover, .loc-opt.hi { background: var(--surface-2); }
.loc-opt.on { color: var(--accent); font-weight: 600; }
.loc-at:empty { display: none; }
.ac-loc .input { flex: 1; min-width: 0; }
.ac-loc-at:empty { display: none; }
.ac-photo:empty { display: none; }
.ac-photo .si-addphoto { margin: 4px 0 0; cursor: pointer; }
.ac-photo-on { border-style: solid; cursor: default; }
.ac-photo-on .link { margin-left: auto; }
.m-mappick .mp-search { margin-bottom: 8px; }
.m-mappick .mp-search gmp-place-autocomplete { width: 100%; }
.m-mappick .mp-map { height: min(60vh, 460px); border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.m-mappick .mp-now { margin: 8px 2px 0; min-height: 22px; }
/* Sign-in sheet: each person's hours (from the sheet's time in / out) */
.si-hrs { flex: none; align-self: center; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; }
.si-hrs.is-part { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.si-hrs:hover, .si-hrs:focus-visible { border-color: var(--accent); color: var(--text); }
/* Activity page: the person signed in ("Not me" / "I was there") */
.ac-mebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ac-mebar span { flex: 1 1 200px; }
/* Search */
.search-btn, .support-btn { order: 0; }
.m-search { width: min(640px, calc(100vw - 24px)); }
.m-search .modal-body { display: flex; flex-direction: column; gap: 10px; min-height: min(420px, 60vh); }
.sr-q { height: 46px; font-size: 16px; }
.sr-out { display: flex; flex-direction: column; gap: 14px; max-height: min(62vh, 560px); overflow: auto; }
.sr-g h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sr-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 10px 8px 12px; border: 0; border-left: 3px solid var(--c, transparent); border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sr-item small { color: var(--muted); font-size: 12.5px; }
.sr-item:hover, .sr-item.on, .sr-item:focus-visible { background: var(--surface-2); }
.sr-more { margin: 2px 0 0 12px; }
.sr-hint kbd { padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 12px var(--font, inherit); }
/* Ask (HQ-79 beta): the ✨ in Search, a one-line command bar */
.ask-btn[hidden], .sr-ask[hidden], .sr-out[hidden] { display: none; }
.sr-bar { display: flex; gap: 8px; align-items: center; }
.sr-bar .sr-q { flex: 1 1 auto; min-width: 0; }
.sr-ask-btn { height: 46px; white-space: nowrap; }
.sr-ask-btn.on { background: var(--accent, #2f6fed); color: #fff; border-color: transparent; }
.beta-tag { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 1px 5px; border-radius: 999px; border: 1px solid currentColor; opacity: .75; vertical-align: middle; }
.sr-ask { display: flex; flex-direction: column; gap: 12px; max-height: min(62vh, 560px); overflow: auto; }
.as-trail { display: flex; flex-direction: column; gap: 6px; }
.as-turn { margin: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.as-turn b { color: var(--text); font-weight: 600; }
.as-say { margin: 0; font-size: 15px; }
.as-err { color: var(--danger, #c0392b); }
.as-busy { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.as-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.as-title { font-size: 17px; }
.as-meta { font-size: 13px; color: var(--muted); }
.as-guess { color: var(--muted); font-style: normal; border-bottom: 1px dotted currentColor; }
.as-warn { font-size: 13px; color: var(--danger, #b35c00); }
.as-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* Linked calendars (family) / share with my family (team) */
.fd-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fd-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.fd-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.fd-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fd-name small { color: var(--muted); }
.fd-add { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fd-add .fd-url { grid-column: 1 / -1; }
.fd-share { flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.fd-what { margin: 6px 0 10px; padding-left: 20px; }
.nt-brief { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .fd-add { grid-template-columns: 1fr; } }

/* ---------- Seasons (Settings › Seasons, Activities › Seasons): seasons.js ---------- */
.ss { display: flex; flex-direction: column; gap: 18px; }
.ss h4 { margin: 0 0 8px; font-size: 14px; }
.ss .help { margin: 6px 0 0; }
.ss-year .ac-season { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ss .ac-season select, .ss .ac-season input { width: auto; flex: none; }
.ss .ac-season .ac-sname { width: 130px; }
.ss .ac-season .ac-day { width: 64px; }
.ss .ac-season .ac-eg { flex-basis: 100%; }

/* ---------- Me › Attendance: me/attendance.js ---------- */
.ma-headline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.ma-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ma-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ma-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ma-name { font-size: 13px; font-weight: 650; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.ma-val { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ma-val b { font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ma-val span { color: var(--muted); font-size: 13px; }
.ma-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ma-type { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ma-type b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ma-type .ma-name i, .ma-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.ma-dot { margin-right: 8px; vertical-align: -1px; }
.ma-list tbody tr { cursor: pointer; }
.ma-list tbody tr:hover { background: var(--surface-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Hub › Polls (& feedback): hub/polls.js ---------- */
.pl-filter { margin: 0 0 6px; }
.pl-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.pl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.pl-card.closed { opacity: .85; }
.pl-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.pl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.pl-kind { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 11px; color: var(--accent); }
.pl-pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pl-details { margin: 0; color: var(--muted); }
.pl-opts { display: flex; flex-direction: column; gap: 6px; }
.pl-opt { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; min-height: 44px; }
.pl-opt:hover { border-color: var(--accent); }
.pl-opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.pl-box { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); flex: none; position: relative; }
.pl-box.sq { border-radius: 4px; }
.pl-opt.on .pl-box { border-color: var(--accent); background: var(--accent); }
.pl-opt.on .pl-box::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pl-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pl-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pl-results li { display: flex; flex-direction: column; gap: 4px; }
.pl-row { display: flex; justify-content: space-between; gap: 10px; }
.pl-results li.lead .pl-row > span:first-child { font-weight: 650; }
.pl-n { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.pl-n small { color: var(--muted); font-weight: 500; }
.pl-who { color: var(--muted); font-size: 12px; }
.pl-manage { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.link.danger { color: var(--danger); }
.pl-idea { flex-direction: row; align-items: flex-start; gap: 14px; }
.pl-ibody { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pl-plus { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.pl-plus span { font-size: 18px; font-weight: 700; line-height: 1; color: var(--muted); }
.pl-plus b { font-size: 20px; font-variant-numeric: tabular-nums; }
.pl-plus small { font-size: 11px; color: var(--muted); }
.pl-plus.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pl-plus.on span, .pl-plus.on small { color: var(--accent); }
.pl-plus:disabled { cursor: default; opacity: .7; }
.pl-reply { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.pl-edit-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.pl-edit-opt { display: flex; gap: 6px; align-items: center; }
.pl-edit-opt .input { flex: 1; }
.pl-compose .seg { flex-wrap: wrap; }

/* ---------- Hub › Kitchen: hub/kitchen.js ---------- */
.kc-tabs { margin: 0 0 14px; flex-wrap: wrap; }
.kc-tabs small { color: var(--muted); font-weight: 500; }
.kc-empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.kc-drop.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
/* the grocery list (same look as the calendar's list) */
.kc-grocery { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.kc-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.kc-list-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.kc-add { width: 100%; margin-bottom: 10px; }
.kc-grocery section.g-sec { display: block; margin: 0 0 10px; font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; }
.kc-grocery li.g-item { width: auto; padding: 0 4px; cursor: default; border-radius: 6px; gap: 8px; }
.kc-grocery li.g-item[draggable="true"] { cursor: grab; }
.kc-putaway { margin-top: 10px; font-size: 14px; }
/* common foods */
.kc-pal { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-width: 0; }
.kc-pal summary { cursor: pointer; font-weight: 650; padding: 4px 0; }
.kc-pal summary small { font-weight: 500; }
.kc-pal-sec { margin-top: 10px; }
.kc-pal-h { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.kc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: grab; touch-action: manipulation; }
.kc-chip:hover { border-color: var(--accent); }
.kc-chip:active { cursor: grabbing; }
/* fridge, freezer, pantry */
.kc-places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kc-place { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; min-height: 160px; }
.kc-place h3 { margin: 0 0 8px; font-size: 16px; }
.kc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kc-item { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 8px; background: var(--surface); }
.kc-item[draggable="true"] { cursor: grab; }
.kc-item.low { border-style: dashed; }
.kc-item.ub-soon { border-color: #d97706; }
.kc-item.ub-past { border-color: var(--danger); }
.kc-iname { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; padding: 0; display: flex; flex-direction: column; }
.kc-iname small { color: var(--muted); font-size: 12px; }
.kc-item.ub-past .kc-iname small { color: var(--danger); }
.kc-iacts { display: flex; gap: 2px; flex: none; }
.kc-none { color: var(--muted); font-size: 13px; margin: 6px 2px; }
.kc-stock .kc-pal { margin-top: 14px; }
/* recipes */
.kc-rbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kc-rbar .g-filter[type="search"] { flex: 1; min-width: 180px; }
.kc-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kc-rcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--text); font: inherit; }
.kc-rcard:hover { border-color: var(--accent); }
.kc-rcard b { font-size: 16px; }
.kc-rcard small { color: var(--muted); }
.kc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.kc-tags span { font-size: 11px; background: var(--surface-2); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.kc-tags .kc-tcat { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); font-weight: 600; }
.kc-tags .kc-tcat span { all: unset; }
/* recipe categories (HQ-80): filter chips above the recipes, the same chips to pick them in the editor */
.kc-catbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.kc-fchip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.kc-fchip small { color: var(--muted); font-weight: 600; }
.kc-fchip.empty { color: var(--muted); font-weight: 500; }
.kc-fchip:hover { border-color: var(--accent); }
.kc-fchip.on, .kc-fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kc-fchip.on small, .kc-fchip[aria-pressed="true"] small { color: inherit; opacity: .85; }
.kc-catbar .kc-cat-edit { margin-left: 4px; }
.kc-catedit { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; }
.kc-catedit .help { margin: 0 0 8px; }
.kc-catpick { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-catnew { margin-top: 8px; max-width: 260px; }
@media (max-width: 760px) {
  /* one row that scrolls sideways, so the recipes stay near the top; 36px tall to tap */
  .kc-catbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: -2px; padding: 2px; }
  .kc-catbar::-webkit-scrollbar { display: none; }
  .kc-catbar .kc-fchip, .kc-catpick .kc-fchip { min-height: 36px; }
  .kc-catbar .kc-cat-edit { flex: none; padding: 0 6px; }
  .kc-catnew { max-width: none; }
}
.kc-rmeta { color: var(--muted); margin-bottom: 8px; }
.kc-scale { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.kc-serv { display: inline-flex; align-items: center; gap: 6px; }
.kc-serv b { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.kc-rcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.kc-rcols h4 { margin: 0 0 8px; }
.kc-ings { list-style: none; margin: 0; padding: 0; }
.kc-ings li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.kc-ings li small { color: color-mix(in srgb, #16a34a 75%, var(--text)); white-space: nowrap; font-weight: 600; }
.kc-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.kc-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kc-form3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.kc-readnote { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
@media (max-width: 760px) {
  .kc-grocery, .kc-places, .kc-rcols, .kc-form2 { grid-template-columns: 1fr; }
  .kc-form3 { grid-template-columns: 1fr 1fr; }
  .pl-plus { width: 54px; }
}

/* ---------- Nov 18: polls as tiles (like Tools) that open in a window; feedback in two columns ---------- */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.pl-tile { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; padding: 10px 8px 10px 10px; cursor: pointer; min-height: 64px; }
.pl-tile:hover { border-color: var(--accent); }
.pl-tile.todo { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pl-tile.closed { opacity: .75; }
.pl-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.pl-tile.closed .pl-ico { background: var(--surface-2); }
.pl-tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-q { font-weight: 650; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-status { font-size: 12px; color: var(--muted); }
.pl-tile.todo .pl-status { color: var(--accent); font-weight: 650; }
.pl-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-chev { flex: none; color: var(--muted); font-size: 18px; line-height: 1; }
.pl-igrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; align-items: start; }
.pl-igrid .pl-card { padding: 12px; gap: 12px; }
.pl-iopen { text-align: left; border: 0; background: transparent; color: var(--text); font: inherit; padding: 0; cursor: pointer; align-self: stretch; }
.pl-iopen:hover .pl-iq { color: var(--accent); }
.pl-iq { font-weight: 650; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.pl-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
.pl-answered { color: var(--accent); font-size: 12px; font-weight: 600; }
.modal.pl-modal { width: min(560px, calc(100vw - 24px)); }
.pl-detail { display: flex; flex-direction: column; gap: 10px; }
.pl-detail h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.pl-detail .pl-idea { display: flex; gap: 14px; align-items: flex-start; }
@media (max-width: 760px) { .pl-igrid { grid-template-columns: 1fr; } }

/* ---------- Nov 16: Kitchen amounts, + / −, folding places, editing common foods ---------- */
.kc-iline { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.kc-amt { font-size: 13px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kc-step { display: inline-flex; gap: 2px; flex: none; }
.kc-step .icon-btn { border: 1px solid var(--line); font-size: 16px; font-weight: 700; color: var(--text); }
.kc-step .icon-btn:hover { border-color: var(--accent); }
.kc-item { flex-wrap: wrap; }
.kc-place.shut { min-height: 0; }
.kc-place h3 { margin: 0 0 8px; }
.kc-place.shut h3 { margin: 0; }
.kc-fold { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 650; cursor: pointer; padding: 2px 0; text-align: left; }
.kc-chev { color: var(--muted); display: inline-block; transition: transform .15s; transform: rotate(90deg); }
.kc-place.shut .kc-chev { transform: none; }
/* fridge / freezer / pantry sections (Nov 22, 2026): folded until opened */
.kc-cats { display: flex; flex-direction: column; gap: 4px; }
.kc-cat { border-top: 1px solid var(--line); padding-top: 4px; }
.kc-cat:first-child { border-top: 0; padding-top: 0; }
.kc-cat-h { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 2px; text-align: left; border-radius: 8px; }
.kc-cat-h:hover { background: var(--hover, rgba(127,127,127,.08)); }
.kc-cat.shut .kc-chev { transform: none; }
.kc-cat .kc-items { margin: 2px 0 6px; }
.kc-cat-warn { margin-left: auto; font-size: 13px; }
.kc-pal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.kc-pal-bar .kc-add { flex: 1; min-width: 200px; margin: 0; }
.kc-chip.edit { display: inline-flex; align-items: center; gap: 4px; cursor: default; padding-right: 4px; }
.kc-chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.kc-chip-x:hover { background: var(--surface); color: var(--danger); }
.kc-howmuch { display: flex; gap: 6px; }
.kc-howmuch input { width: 80px; flex: none; }
.kc-howmuch select { flex: 1; min-width: 0; }

/* ---------- Nov 16: View as, seasons now ---------- */
.acct-viewas { margin-top: 12px; }
.demo-tag.viewas { background: #b45309; color: #fff; }
.ss-now { margin: 0 0 10px; }
.ss .ss-periods .ac-season { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ss .ac-season .ac-eg { order: 2; }
.ss .ac-season .icon-btn { margin-left: auto; }
/* Nov 16: Kitchen item card in two lines (name, amount, added / − + Low Used up); the edit window in two rows */
.kc-item { flex-direction: column; align-items: stretch; gap: 4px; }
.kc-iline { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; }
.kc-iline small { color: var(--muted); font-size: 12px; font-weight: 500; }
.kc-item.ub-past .kc-iline small { color: var(--danger); }
.kc-irow { display: flex; align-items: center; gap: 12px; }
.kc-irow .kc-step { margin-right: 4px; }
.kc-step .icon-btn { display: inline-grid; place-items: center; padding: 0; }
.kc-step .icon-btn svg { display: block; }
.kc-howmuch input { width: 72px; }
.kc-howmuch select { flex: 1; min-width: 90px; width: auto; }
/* Nov 16: the top bar's view controls fold into a menu when the date title has no room (app.js fitTopbar) */
.view-menu-btn { display: none; }
.topbar.tight .view-menu-btn { display: inline-grid; }
.topbar.tight #viewSeg, .topbar.tight .density-btn, .topbar.tight .block-btn, .topbar.tight [data-action="copy-week"], .topbar.tight #viewerBtn { display: none; }
body.mode-garage .view-menu-btn { display: none !important; }
/* Nov 16: Kitchen, third pass: receipt / fridge photo, What can I make?, cook mode */
.kc-sbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.kc-rv { display: flex; flex-direction: column; gap: 6px; max-height: 55vh; overflow-y: auto; }
.kc-rv-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 70px 110px 110px; gap: 6px; align-items: center; }
.kc-rv-row select { width: 100%; }
@media (max-width: 640px) { .kc-rv-row { grid-template-columns: auto minmax(0, 1fr) 64px; } .kc-rv-row select { grid-column: 2 / -1; } }
.btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.kc-rcard .kc-miss { color: var(--muted); }
.kc-rcard .kc-all { color: var(--accent); font-weight: 650; }
.kc-cook { position: fixed; inset: 0; z-index: 400; background: var(--bg, var(--surface)); color: var(--text); display: flex; flex-direction: column; }
.kc-cook-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 18px; }
.kc-cook-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); }
.kc-cook-b aside { border-right: 1px solid var(--line); padding: 14px 16px; overflow-y: auto; }
.kc-cook-b aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.kc-cook-b aside label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.kc-cook-b aside input:checked + span { text-decoration: line-through; color: var(--muted); }
.kc-cook-b main { display: flex; flex-direction: column; justify-content: center; padding: 24px clamp(16px, 5vw, 64px); gap: 18px; overflow-y: auto; }
.kc-cook-n { margin: 0; color: var(--muted); font-weight: 650; }
.kc-cook-step { margin: 0; font-size: clamp(24px, 3.4vw, 40px); line-height: 1.35; }
.kc-cook-nav { display: flex; gap: 12px; }
.kc-cook-nav .btn { height: 52px; padding: 0 26px; font-size: 18px; }
@media (max-width: 760px) { .kc-cook-b { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .kc-cook-b aside { border-right: 0; border-bottom: 1px solid var(--line); max-height: 30vh; } }

/* Team › Schedule: ML availability (phase 2, Nov 19, 2026) */
.sc-av-row > span { min-width: 140px; }
.sc-av { margin-left: auto; }
.sc-av button { height: 30px; padding: 0 12px; font-size: 13px; }
.sc-av button.on.av-want { background: color-mix(in srgb, #16a34a 22%, var(--surface)); color: var(--text); }
.sc-av button.on.av-can { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--text); }
.sc-av button.on.av-no { background: color-mix(in srgb, var(--danger) 20%, var(--surface)); color: var(--text); }
.sc-team-av { margin: 6px 0 10px; }
.sc-fair { margin: 6px 0 10px; }
/* My availability, day by day */
.sc-av-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sc-av-head .g-sec { margin-bottom: 0; }
.sc-av-mode button { height: 28px; }
.sc-days { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.sc-dweek { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.sc-dwk { font-size: 12.5px; }
.sc-drow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sc-day { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 52px; padding: 4px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.sc-day small { font-size: 10.5px; color: var(--muted); }
.sc-day span { font-size: 12.5px; font-weight: 700; }
.sc-day i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent); }
.sc-day i.sc-daway { color: #b45309; }
.sc-day.av-want { background: color-mix(in srgb, #16a34a 26%, var(--surface)); border-color: color-mix(in srgb, #16a34a 50%, var(--line)); }
.sc-day.av-can { background: color-mix(in srgb, #2563eb 14%, var(--surface)); }
.sc-day.av-no { background: color-mix(in srgb, #dc2626 22%, var(--surface)); border-color: color-mix(in srgb, #dc2626 45%, var(--line)); }
.sc-day.from-week { border-style: dashed; }
.sc-day.on { box-shadow: inset 0 0 0 2px var(--accent); }
.sc-day.past { opacity: .4; cursor: default; }
.sc-day.covered { cursor: default; background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); border-style: solid; }
.sc-day.covered span { font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.sc-day.covered i { color: var(--muted); font-weight: 600; }
.sc-day.covered.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.sc-day.covered.mine i { color: var(--accent); }
.sc-day:not(.past):hover { border-color: var(--accent); }
.sc-grid-days th, .sc-grid-days td { padding: 4px 3px; min-width: 22px; font-size: 11.5px; }
.sc-grid-days .wk { border-left: 2px solid var(--line); }
.sc-grid-days th.today { color: var(--accent); }
.sc-grid-days td.past { opacity: .45; }
@media (max-width: 700px) { .sc-dweek { grid-template-columns: 1fr; } .sc-day { min-height: 46px; } }
/* Schedule › By the hour: paint half-hours (12px rows, the JS matches) */
.hp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 8px; }
.hp-wk { min-width: 120px; text-align: center; }
.hp-brush button { height: 28px; }
.hp-brush button.on.hb-a { background: color-mix(in srgb, #16a34a 22%, var(--surface)); color: var(--text); }
.hp-brush button.on.hb-n { background: color-mix(in srgb, #dc2626 22%, var(--surface)); color: var(--text); }
.hp-sum { font-size: 12.5px; }
.hp-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; user-select: none; -webkit-user-select: none; }
.hp-grid { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 11px; }
.hp-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); padding: 4px 2px; font-weight: 700; line-height: 1.2; }
.hp-grid thead th.today { color: var(--accent); }
.hp-grid thead th:first-child, .hp-grid tbody th { width: 46px; }
.hp-grid tbody th { font-weight: 500; color: var(--muted); text-align: right; padding: 0 6px 0 0; vertical-align: top; line-height: 1; font-size: 10px; }
.hp-c { height: 12px; padding: 0; border-left: 1px solid var(--line); cursor: crosshair; }
.hp-grid tr.hp-hour .hp-c { border-top: 1px solid var(--line); }
.hp-grid tr.hp-half .hp-c { border-top: 1px dotted color-mix(in srgb, var(--line) 60%, transparent); }
.hp-c.s-a { background: color-mix(in srgb, #16a34a 55%, var(--surface)); }
.hp-c.s-n { background: color-mix(in srgb, #dc2626 45%, var(--surface)); }
.hp-c.past { opacity: .45; }
.hp-c.cov { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 28%, transparent) 0 3px, transparent 3px 7px); cursor: not-allowed; }
.hp-c.mine { box-shadow: inset 3px 0 0 var(--accent); }
.hp-brush button.on.hb-f { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--text); }
.sc-free { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.sc-want-btn { border-style: solid; font-weight: 600; }
.sc-want-help .btn { margin-left: 6px; }
.sc-free-btn { font: inherit; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px dashed color-mix(in srgb, #16a34a 60%, var(--line)); background: color-mix(in srgb, #16a34a 10%, var(--surface)); color: var(--text); cursor: pointer; }
.hp-c.sel { box-shadow: inset 0 0 0 2px var(--accent); background-color: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
/* the ML shift window: when, hours, who's free */
.ml-when button { padding: 0 14px; }
.ml-days[hidden], .ml-hours[hidden] { display: none; }
.ml-hours .row { gap: 10px; }
.ml-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.ml-free-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.ml-free-row { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.ml-free-row b { margin-right: 4px; }
.ml-free-pick { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.ml-free-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.sc-fair > summary { cursor: pointer; }
.sc-fair-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.sc-fair-bar .seg button { height: 26px; font-size: 12.5px; }
.sc-fair-t td { font-variant-numeric: tabular-nums; }
.sc-fair-col { text-align: left !important; min-width: 150px; }
.sc-fair-bar-in { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); margin-right: 8px; overflow: hidden; }
.sc-fair-bar-in i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.sc-fair-t tr.due th { color: var(--accent); }
.sc-due { color: var(--accent); font-weight: 700; }
.sc-heavy { color: #b45309; font-weight: 700; }
.sc-break b { color: #b45309; }
.sc-limits { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.sc-lim-n input { width: 80px; }
.sc-lim-row { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.sc-limits select { max-width: 420px; }
.ml-rule { display: block; margin: 0 0 2px; padding: 1px 6px; border: 1px dashed #b45309; border-radius: 6px; background: color-mix(in srgb, #b45309 10%, transparent); color: #b45309; font-size: 11px; font-weight: 700; cursor: help; }
.sc-team-av > summary { cursor: pointer; }
.sc-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sc-grid { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.sc-grid th, .sc-grid td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: center; white-space: nowrap; }
.sc-grid thead th { font-weight: 600; color: var(--muted); background: var(--surface-2); }
.sc-grid tbody th { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.sc-grid td.av-want { background: color-mix(in srgb, #16a34a 18%, var(--surface)); }
.sc-grid td.av-no { background: color-mix(in srgb, var(--danger) 16%, var(--surface)); }
.sc-grid td.av-none { color: var(--muted); }
.sc-grid td.av-on { font-weight: 800; }
.sc-grid sup { color: #d97706; font-weight: 700; margin-left: 2px; }

/* ---------- Activities › incident report (Nov 20, 2026): D4H-style steps ---------- */
.ac-report { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 8px 0 10px; border: 1px solid var(--line); border-left: 4px solid var(--t-incident, #dc2626); border-radius: 12px; background: var(--surface); }
.ac-report > span { flex: 1 1 240px; display: flex; flex-direction: column; }
.rp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 12px; }
.rp-head > div:first-child { flex: 1 1 280px; min-width: 0; }
.rp-head h2 { margin: 0; font-size: 22px; }
.rp-head p { margin: 2px 0 0; }
.rp-kind { display: inline-block; padding: 1px 9px; border-radius: 6px; background: var(--t-incident, #dc2626); color: #fff; font-size: .8em; margin-right: 4px; }
.rp-badge { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; }
.rp-badge.draft { background: color-mix(in srgb, #d97706 22%, var(--surface)); color: var(--text); }
.rp-badge.done { background: color-mix(in srgb, #16a34a 22%, var(--surface)); color: var(--text); }
.rp-count { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.rp-count b { font-size: 22px; font-variant-numeric: tabular-nums; }
.rp-count small { color: var(--muted); font-size: 12px; }
.rp-steps { display: flex; gap: 2px; margin: 0 0 14px; overflow-x: auto; }
.rp-step { flex: 1 0 auto; min-width: 92px; height: 30px; border: 0; padding: 0 16px 0 20px; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--muted); background: var(--surface-2); cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.rp-step:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 12px; }
.rp-step.done { color: var(--text); background: color-mix(in srgb, #16a34a 18%, var(--surface-2)); }
.rp-step.on { color: #fff; background: #16a34a; }
.rp-step.fin:not(.on) { background: color-mix(in srgb, var(--muted) 35%, var(--surface-2)); color: var(--text); }
.rp-body { display: flex; flex-direction: column; gap: 12px; }
.rp-sec { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.rp-sec h3 { margin: 0 0 8px; font-size: 14px; }
.rp-sec h3 + h3, .rp-sec .rp-lock { margin-top: 12px; }
.rp-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rp-sec-head h3 { margin: 0; }
.rp-grid2 { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 10px; }
.rp-f { margin-bottom: 8px; }
.rp-text { width: 100%; }
.rp-times { display: flex; flex-direction: column; gap: 6px; }
.rp-time { display: grid; grid-template-columns: 130px 150px 110px 1fr auto; gap: 8px; align-items: center; }
.rp-time > span { font-weight: 600; font-size: 13px; }
.rp-weather { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; }
.rp-pair { display: flex; gap: 6px; }
.rp-pair > * { flex: 1; min-width: 0; }
.rp-tags, .rp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.rp-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.rp-add { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rp-add .input { flex: 1 1 240px; min-width: 0; }
.rp-gear, .rp-files { display: flex; flex-direction: column; gap: 4px; }
.rp-gear-row, .rp-file, .rp-person { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line-soft, var(--line)); border-radius: 10px; }
.rp-gear-row b { flex: 1; }
.rp-person > div { display: flex; flex-direction: column; min-width: 0; }
.rp-person + .rp-person { margin-top: 6px; }
.rp-file .link { text-align: left; }
.rp-file small { margin-left: auto; }
.rp-drop { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 22px 12px; margin-top: 8px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; }
.rp-drop small { color: var(--muted); }
.rp-vis, .rp-radios { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.rp-check { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.rp-check li.ok { color: var(--text); font-weight: 600; }
.rp-med { border: 1px solid var(--line-soft, var(--line)); border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.rp-med summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.rp-pm h4 { margin: 14px 0 6px; font-size: 13px; }
.rp-foot { display: flex; gap: 8px; margin-top: 14px; }
.rp-save { margin-top: 6px; }
@media (max-width: 640px) {
  .rp-grid2 { grid-template-columns: 1fr; }
  .rp-time { grid-template-columns: 1fr 1fr; }
  .rp-time > span { grid-column: 1 / -1; }
  .rp-step { min-width: 0; padding: 0 12px 0 16px; font-size: 11.5px; }
}

.rp-pv-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.rp-pv-h h3 { margin: 0; flex: 1; }
.rp-to { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rp-to.go { background: color-mix(in srgb, #16a34a 20%, var(--surface)); color: var(--text); }
.rp-to.stay { background: var(--surface-2); color: var(--muted); }
.rp-dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 4px 14px; margin: 0; }
.rp-dl dt { color: var(--muted); font-size: 13px; }
.rp-dl dd { margin: 0; overflow-wrap: anywhere; }
.rp-pv-text { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.rp-pv-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rp-pv-t th, .rp-pv-t td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line-soft, var(--line)); }
.rp-pv-t .n { text-align: right; font-variant-numeric: tabular-nums; }
.rp-pv-person { padding: 6px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.rp-pv-person:last-child { border-bottom: 0; }
.rp-pv-person .rp-dl { margin-top: 4px; }
.rp-pv-files { margin: 0; padding-left: 18px; }
.rp-pv-foot { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.rp-preview { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 640px) { .rp-dl { grid-template-columns: 1fr; } .rp-dl dt { margin-top: 4px; } }

/* ---------- incident report, our own look (Nov 20, 2026; docs/INCIDENT-REPORT-UX.md) ---------- */
.ir { --ir-red: var(--t-incident, #dc2626); max-width: 1180px; }
.ir-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 18px; margin: 6px 0 16px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--ir-red) 10%, var(--surface)), var(--surface) 55%); position: relative; overflow: hidden; }
.ir-hero::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--ir-red); }
.ir-hero-main { flex: 1 1 320px; min-width: 0; }
.ir-hero-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ir-hero h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.ir-hero p { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ir-pill { font-size: 11.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; background: var(--ir-red); color: #fff; }
.ir-status { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.ir-status.draft { color: #b45309; border-color: color-mix(in srgb, #d97706 45%, var(--line)); }
.ir-status.done { color: #15803d; border-color: color-mix(in srgb, #16a34a 45%, var(--line)); }
.ir-status.sent, .ir-status.d4h { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ir-stats { display: flex; gap: 8px; }
.ir-stats > div { min-width: 86px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.ir-stats b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ir-stats small { color: var(--muted); font-size: 11.5px; }
.ir-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.ir-nav { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 10px; }
.ir-nav-now { display: none; }
.ir-prog { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ir-prog span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .25s; }
.ir-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.ir-steps::before { content: ""; position: absolute; left: 21px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.ir-step { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ir-step:hover { background: var(--surface-2); }
.ir-step.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.ir-num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface); border: 2px solid var(--line); color: var(--muted); z-index: 1; }
.ir-step.done .ir-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.ir-step.on .ir-num { border-color: var(--accent); color: var(--accent); }
.ir-step.on.done .ir-num { color: var(--accent-ink, #fff); }
.ir-step-t { display: flex; flex-direction: column; min-width: 0; }
.ir-step-t b { font-size: 13.5px; font-weight: 650; }
.ir-step-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ir-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ir-stephead { display: flex; align-items: center; gap: 12px; }
.ir-stephead h3 { margin: 0; font-size: 19px; }
.ir-stephead small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.ir-stephead p { margin: 0; font-size: 13px; }
.ir-stepicon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.ir-stepicon svg { width: 20px; height: 20px; }
.ir-main .rp-body { gap: 12px; }
.ir-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ir-card-h { display: flex; align-items: center; gap: 8px; }
.ir-card-h h4 { margin: 0; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.ir-card-ic { color: var(--muted); display: inline-flex; }
.ir-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ir-private { border-style: dashed; }
.ir-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.ir-grid > .field { flex: 1 1 160px; margin: 0; }
.ir-grid > .ir-grow, .ir-grow { flex: 3 1 260px; }
.ir-grid > .ir-ref { flex: 0 1 140px; }
.ir-grid > .ir-age { flex: 0 1 90px; }
.ir-text { width: 100%; resize: vertical; }
.ir-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ir-opt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.ir-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ir-opt small { color: var(--muted); font-size: 12px; }
.ir-opt.on, .ir-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.ir-opt:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.ir-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.ir-tl::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.ir-tl-i { position: relative; display: grid; grid-template-columns: 16px 170px 1fr; gap: 12px; align-items: center; padding: 6px 0; }
.ir-tl-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); z-index: 1; }
.ir-tl-i.set .ir-tl-dot { background: var(--accent); border-color: var(--accent); }
.ir-tl-i.main.set .ir-tl-dot { background: var(--ir-red); border-color: var(--ir-red); }
.ir-tl-label { display: flex; flex-direction: column; min-width: 0; }
.ir-tl-label b { font-size: 13.5px; }
.ir-tl-label small { color: var(--muted); font-size: 12px; }
.ir-tl-i.main:not(.set) .ir-tl-label small { color: #b45309; }
.ir-tl-in { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ir-tl-in input[type="date"] { width: 150px; }
.ir-tl-in .tf-box { width: 112px; }
.ir-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ir-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; user-select: none; }
.ir-chip:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ir-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-weight: 650; }
.ir-chip:focus-within, .ir-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ir-av::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--lv); }
.ir-chip.ir-av.lvl1 { --lv: #50b848; }
.ir-chip.ir-av.lvl2 { --lv: #fff200; }
.ir-chip.ir-av.lvl3 { --lv: #f7941e; }
.ir-chip.ir-av.lvl4 { --lv: #ed1c24; }
.ir-chip.ir-av.lvl5 { --lv: #231f20; }
.ir-chip.ir-av.lvl5::before { outline: 1.5px solid #ed1c24; }
.ir-chip.ir-av.on { border-color: var(--lv); background: color-mix(in srgb, var(--lv) 22%, var(--surface)); }
.ir-wx { display: flex; flex-direction: column; gap: 10px; }
.ir-wx .field { margin: 0; }
.ir-sel { margin-top: 6px; max-width: 260px; }
.ir-unit { display: flex; align-items: center; gap: 6px; }
.ir-unit em { font-style: normal; color: var(--muted); }
.ir-unit input { min-width: 0; flex: 1; }
.ir-debrief, .ir-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 14px; }
.ir-debrief .field, .ir-fields .field { margin: 0; }
.ir-debrief .field > span small { font-weight: 400; }
.ir-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ir-tok { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 11px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.ir-tok button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.ir-tok button:hover { color: var(--danger); }
.ir-add { display: flex; gap: 8px; flex-wrap: wrap; }
.ir-add .input { flex: 1 1 240px; min-width: 0; }
.ir-list { display: flex; flex-direction: column; gap: 6px; }
.ir-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.ir-row > b { flex: 1; min-width: 0; }
.ir-row-ic { color: var(--muted); display: inline-flex; }
.ir-hrs { width: 96px; }
.ir-people { display: flex; flex-direction: column; gap: 8px; }
.ir-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.ir-person:hover { border-color: var(--accent); }
.ir-av-p, .ir-person .ir-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: #64748b; }
.ir-person .ir-av::before { content: none; }
.ir-person .ir-av.subj { background: var(--ir-red); }
.ir-person .ir-av.rp { background: #2563eb; }
.ir-person .ir-av.wit { background: #7c3aed; }
.ir-person-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ir-person-t small { color: var(--muted); font-size: 12.5px; }
.ir-badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ir-red) 16%, var(--surface)); white-space: nowrap; }
.ir-badge.soft { background: var(--surface-2); font-weight: 600; }
.ir-go { color: var(--accent); font-size: 13px; font-weight: 600; }
.ir-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 12px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.ir-empty svg { width: 28px; height: 28px; }
.ir-empty p { margin: 0; }
.ir-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 12px; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer; text-align: center; background: var(--surface); }
.ir-drop:hover { border-color: var(--accent); }
.ir-drop svg { width: 24px; height: 24px; color: var(--accent); }
.ir-drop small { color: var(--muted); }
.ir-vis { margin-top: 2px; }
.ir-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 4px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); z-index: 2; }
.ir-saved { font-size: 12.5px; color: var(--muted); }
.ir-finish { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface) 60%); }
.ir-finish-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ir-finish-t { display: flex; flex-direction: column; }
.ir-finish-t small { color: var(--muted); }
.ir-d4h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ir-d4h span { flex: 1 1 260px; }
.ir-edit { font-size: 13px; }
.rp-preview .ir-card { gap: 8px; }
.ir-pm .modal-body { display: flex; flex-direction: column; gap: 12px; }
.ir-tabs { align-self: flex-start; }
.ir-tab-n { color: var(--ir-red, #dc2626); font-weight: 800; }
.ir-tab { display: flex; flex-direction: column; gap: 10px; }
.ir-tab[hidden] { display: none; }
.ir-tab .field { margin: 0; }
.ir-tab h4 { margin: 6px 0 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ir-body { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 16px; align-items: start; }
.ir-body-fig { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ir-fig { width: 100%; max-width: 250px; }
.ir-body-pick { display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.ir-pick-h { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.ir-pick-g small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ir-pick-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); }
.ir-pick-empty b { color: var(--text); }
.ir-injlist { border-top: 1px solid var(--line); padding-top: 10px; }
.bm-svg { width: 100%; height: auto; display: block; }
.bm-outline > * { fill: none; stroke: color-mix(in srgb, var(--muted) 55%, var(--surface)); stroke-width: 3; stroke-linejoin: round; }
.bm-fill > * { fill: color-mix(in srgb, var(--muted) 14%, var(--surface)); stroke: none; }
.bm-hair { fill: color-mix(in srgb, var(--muted) 38%, var(--surface)); pointer-events: none; }
.bm-hair.back { fill: color-mix(in srgb, var(--muted) 42%, var(--surface)); }
.bm-r { cursor: pointer; outline: none; }
.bm-r > .bm-hit { fill: transparent; stroke: color-mix(in srgb, var(--muted) 35%, transparent); stroke-width: 1; stroke-dasharray: 2 3; transition: fill .12s; }
.bm-r:hover > .bm-hit, .bm-r:focus-visible > .bm-hit { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
.bm-r.has > .bm-hit { fill: color-mix(in srgb, #dc2626 45%, transparent); stroke: none; }
.bm-r.sel > .bm-hit { fill: color-mix(in srgb, var(--accent) 38%, transparent); stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; }
.bm-r.has.sel > .bm-hit { fill: color-mix(in srgb, #dc2626 50%, transparent); }
.bm-badge { pointer-events: none; }
.bm-badge circle { fill: #dc2626; stroke: var(--surface); stroke-width: 1.5; }
.bm-badge text { fill: #fff; font-size: 9.5px; font-weight: 800; }
.bm-side { fill: var(--muted); font-size: 12px; font-weight: 700; }
@media (max-width: 900px) {
  .ir-layout { grid-template-columns: 1fr; gap: 12px; }
  .ir-nav { position: sticky; top: 0; z-index: 3; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); }
  .ir-nav-now { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; font: inherit; color: var(--text); padding: 2px 4px; cursor: pointer; text-align: left; }
  .ir-nav-now span:first-child { display: flex; flex-direction: column; }
  .ir-nav-now small { color: var(--muted); font-size: 11.5px; }
  .ir-nav-chev { transition: transform .15s; }
  .ir-nav.open .ir-nav-chev { transform: rotate(180deg); }
  .ir-nav:not(.open) .ir-steps { display: none; }
  .ir-stats { width: 100%; }
  .ir-stats > div { flex: 1; min-width: 0; }
  .ir-tl-i { grid-template-columns: 16px 1fr; }
  .ir-tl-in { grid-column: 2; }
  .ir-body { grid-template-columns: 1fr; }
  .ir-fig { max-width: 220px; margin: 0 auto; }
}

/* incident report: organizers' Edit, the Resources pick list, the figure's landmark lines (Nov 20, 2026) */
.ir-req { color: var(--ir-red, #dc2626); font-weight: 800; }
.ir-cfg { padding: 0 10px; }
.ir-fields .ir-wide { grid-column: 1 / -1; }
.ir-combo { position: relative; flex: 1 1 260px; min-width: 0; }
.ir-combo .input { width: 100%; }
.ir-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 30; }
.ir-menu-g { padding: 8px 10px 3px; font-size: 11px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ir-menu-o { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; }
.ir-menu-o:hover, .ir-menu-o.hi { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
.ir-menu-none { padding: 10px; color: var(--muted); font-size: 13px; }
.ir-cfgm .modal-body { display: flex; flex-direction: column; gap: 10px; }
.ir-cfg-list, .ir-tf-list { display: flex; flex-direction: column; gap: 8px; }
.ir-cfg-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(160px, 1.4fr) auto; gap: 8px; align-items: center; }
.ir-cfg-row.off .input, .ir-tf.off .input { opacity: .5; }
.ir-tf { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ir-tf-top, .ir-tf-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ir-tf-top .ir-grow { flex: 1 1 200px; }
.ir-tf-top select { flex: 0 0 auto; width: auto; }
.ir-tf-move { display: inline-flex; flex-direction: column; gap: 2px; }
.ir-tf-move .icon-btn { width: 22px; height: 18px; font-size: 11px; }
.ir-tf-bot small { color: var(--muted); }
.link.danger { color: var(--danger); }
.ir-switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: none; cursor: pointer; }
.ir-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ir-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s; }
.ir-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.ir-switch input:checked + span { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); border-color: var(--accent); }
.ir-switch input:checked + span::after { transform: translateX(14px); background: var(--accent); }
.ir-switch input:disabled + span { opacity: .55; cursor: not-allowed; }
.ir-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.bm-lines { pointer-events: none; }
.bm-lines path { fill: none; stroke: color-mix(in srgb, var(--muted) 45%, var(--surface)); stroke-width: 1.1; stroke-linecap: round; }
.bm-lines .bm-navel { fill: color-mix(in srgb, var(--muted) 55%, var(--surface)); }
@media (max-width: 640px) { .ir-cfg-row { grid-template-columns: auto 1fr; } .ir-cfg-row [data-hint] { grid-column: 1 / -1; } .ir-cfg-row [data-reset] { justify-self: end; grid-column: 2; } }

/* ---------- Help & support (Nov 20, 2026) ---------- */
.modal.sp-modal { width: min(880px, calc(100vw - 24px)); max-width: none; }
.sp-modal .modal-body { display: flex; flex-direction: column; gap: 16px; }
.sp-modal .modal-body > * { flex-shrink: 0; } /* sections keep their height: the window scrolls */
.sp-q { height: 42px; font-size: 15px; }
.sp-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.sp-q-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.sp-q-card:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sp-q-card svg { color: var(--accent); margin-bottom: 2px; }
.sp-q-card small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sp-sec { --sc: var(--accent); display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-top: 4px solid var(--sc); border-radius: 14px; overflow: hidden; background: var(--surface); scroll-margin-top: 8px; }
.sp-sec > :not(.sp-h) { margin-left: 16px; margin-right: 16px; }
.sp-sec > :last-child { margin-bottom: 16px; }
.sp-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: color-mix(in srgb, var(--sc) 16%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--sc) 30%, var(--line)); }
.sp-h svg { color: var(--sc); }
/* each section its own color (Scott, Nov 21) */
.sp-sec[data-sec="feedback"] { --sc: #d97706; }
.sp-sec[data-sec="contact"] { --sc: #2563eb; }
.sp-sec[data-sec="news"] { --sc: #8b5cf6; }
.sp-sec[data-sec="about"] { --sc: #64748b; }
.sp-q-card:nth-child(1) svg, .sp-q-card:nth-child(2) svg { color: #d97706; }
.sp-q-card:nth-child(3) svg { color: #2563eb; }
.sp-q-card:nth-child(4) svg { color: #8b5cf6; }
.sp-sec[data-sec="feedback"] .sp-kind.on { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, var(--surface)); }
.sp-sec[data-sec="feedback"] .sp-kind.on svg { color: var(--sc); }
.sp-h h3 { margin: 0; font-size: 15.5px; }
.sp-h small { flex-basis: 100%; color: var(--muted); }
.sp-guides { display: flex; flex-direction: column; gap: 8px; }
.sp-topic { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sp-topic > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; border-radius: 12px; }
.sp-topic > summary::-webkit-details-marker { display: none; }
.sp-topic > summary:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.sp-topic > summary svg { flex: none; color: var(--accent); transition: transform .15s; }
.sp-topic[open] > summary svg { transform: rotate(90deg); }
.sp-topic > summary b { font-size: 14px; }
.sp-n { margin-left: auto; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--text); font-size: 12px; font-weight: 700; text-align: center; }
.sp-topic[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.sp-topic-b { padding: 8px 10px 4px; }
.sp-topic-b .sp-guide { border: 0; border-bottom: 1px solid var(--line-soft, var(--line)); border-radius: 0; margin: 0; }
.sp-topic-b .sp-guide:last-child { border-bottom: 0; }
.sp-guide { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 6px; }
.sp-guide summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; }
.sp-guide summary::-webkit-details-marker { display: none; }
.sp-guide summary svg { flex: none; color: var(--muted); transition: transform .15s; }
.sp-guide[open] summary svg { transform: rotate(90deg); }
.sp-guide-b { padding: 0 12px 12px 34px; font-size: 13.5px; }
.sp-guide-b ol { margin: 0 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.sp-guide-b p { margin: 0; color: var(--muted); }
.sp-shot { position: relative; border-radius: 10px; overflow: hidden; border: 1px dashed var(--line); background: var(--surface-2); }
.sp-shot svg { display: block; width: 100%; height: auto; opacity: .55; }
.sp-shot span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sp-s-frame { fill: var(--surface); stroke: var(--line); }
.sp-s-bar { fill: color-mix(in srgb, var(--muted) 20%, var(--surface)); }
.sp-s-side, .sp-s-card { fill: color-mix(in srgb, var(--muted) 14%, var(--surface)); }
.sp-s-card.hi { fill: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.sp-none { color: var(--muted); }
.sp-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; }
.sp-kind svg { width: 16px; height: 16px; color: var(--muted); }
.sp-kind.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 650; }
.sp-kind.on svg { color: var(--accent); }
.sp-kind:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.sp-msg { width: 100%; resize: vertical; }
.sp-tech { font-size: 13px; }
.sp-tech-list { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sp-send { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sp-send .btn svg { margin-right: 4px; }
.sp-send small { flex: 1 1 260px; }
.sp-thanks { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.sp-sec p { margin: 0; }
.sp-news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-news li { display: grid; grid-template-columns: 96px 1fr; gap: 2px 12px; }
.sp-news small { color: var(--muted); grid-row: span 2; padding-top: 2px; }
.sp-news span { color: var(--muted); font-size: 13px; }
.sp-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; font-size: 13.5px; }
.sp-dl dt { color: var(--muted); }
.sp-dl dd { margin: 0; }
.sp-dl kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); font: 600 11.5px/1.5 ui-monospace, Menlo, Consolas, monospace; text-align: center; }
.sp-about-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-foot { font-size: 12px; }
/* ---- the help window (/help/, HQ-66): the same help, in its own browser window next to the app ---- */
body.help-page { height: auto; min-height: 100%; overflow: auto; display: flex; flex-direction: column; }
.hp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.hp-top .logo { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.hp-top h1 { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; }
.hp-app { margin-left: auto; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-body { flex: 1; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 880px; margin: 0 auto; padding: 14px 14px 20px; box-sizing: border-box; }
.hp-body > * { flex-shrink: 0; }
.hp-foot a.btn { text-decoration: none; }
.hp-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
@media (max-width: 560px) { .sp-news li { grid-template-columns: 1fr; } .sp-news small { grid-row: auto; } .sp-dl { grid-template-columns: 1fr; } }

/* ---------- Attendance › How it's counted › Edit (rules-edit.js, Nov 21, 2026) ---------- */
.ac-howto-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.ac-howto-h h3 { margin: 0; }
.ac-howto-h .btn svg { margin-right: 4px; vertical-align: -2px; }
.ac-how-goals { display: block; margin-top: 3px; color: var(--text); font-size: 13px; }
.ac-norules { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.modal.ar-modal { width: min(900px, calc(100vw - 24px)); }
.ar-modal .modal-body { display: block; }
.ar-body { display: flex; flex-direction: column; gap: 18px; }
.ar-body > * { flex-shrink: 0; }
.ar-period { margin: 0; font-size: 13px; }
.ar-top { display: flex; flex-direction: column; gap: 10px; }
.ar-start { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ar-tpl { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.ar-tpl select { font-weight: 400; color: var(--text); }
.ar-ai-btn { display: inline-flex; align-items: center; gap: 6px; }
.ar-ai-btn svg, .ar-applied svg { color: #9333ea; }
.ar-ai-btn.on { border-color: #9333ea; background: color-mix(in srgb, #9333ea 10%, var(--surface)); }
.ar-ai, .ar-applied { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, #9333ea 35%, var(--line)); background: color-mix(in srgb, #9333ea 6%, var(--surface)); }
.ar-ai p, .ar-applied p { margin: 0; font-size: 13.5px; }
.ar-ai-text { width: 100%; resize: vertical; }
.ar-ai-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-file { cursor: pointer; }
.ar-fname { font-size: 13px; }
.ar-reading { min-height: 0; padding: 8px 0; }
.ar-applied b svg { vertical-align: -3px; margin-right: 2px; }
.ar-src, .ar-notes { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.ar-src li { color: var(--muted); }
.ar-src b { color: var(--text); margin-right: 4px; }
.ar-notes-h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ar-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ar-sec > .btn { align-self: flex-start; }
.ar-sh h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ar-sh small { display: block; color: var(--muted); margin-top: 2px; }
.ar-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.ar-none { margin: 0; font-size: 13px; }
.ar-grow { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.6fr) auto auto; gap: 8px; align-items: center; }
.ar-op { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ar-btns { display: inline-flex; gap: 2px; }
.ar-btns .icon-btn:disabled { opacity: .3; cursor: default; }
.ar-count { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.ar-chead { display: flex; gap: 8px; align-items: center; }
.ar-cname { flex: 1; font-weight: 650; }
.ar-which { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(160px, 1fr); gap: 8px 12px; align-items: end; }
.ar-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; min-width: 0; }
.ar-f select { color: var(--text); font-weight: 400; }
.ar-team { grid-column: 1 / -1; font-size: 13.5px; }
.ar-goals { width: 100%; border-collapse: collapse; font-size: 13px; }
.ar-goals th { text-align: left; font-weight: 650; color: var(--muted); font-size: 12px; padding: 4px 6px; white-space: nowrap; }
.ar-goals tbody th { color: var(--text); font-size: 13px; white-space: normal; min-width: 110px; }
.ar-goals td { padding: 3px 6px; }
.ar-goals tbody tr + tr { border-top: 1px solid var(--line); }
.ar-in { display: inline-flex; align-items: center; gap: 4px; }
.ar-in i { font-style: normal; color: var(--muted); font-size: 12px; min-width: 10px; }
.ar-num { width: 68px; height: 32px; padding: 0 8px; text-align: right; }
.ar-or { height: 32px; padding: 0 6px; font-size: 12.5px; }
.ar-or:disabled { opacity: .45; }
.ar-goal-txt { font-weight: 650; white-space: nowrap; color: var(--text); }
.ar-goal-help { margin: 0; font-size: 12px; }
.ar-extra { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ar-extra .input { font-weight: 400; color: var(--text); max-width: 360px; }
.ar-extra small { font-weight: 400; }
.ar-evconf { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr); gap: 8px; }
.ar-evconf .input { max-width: none; }
.ar-foot-note { font-size: 12.5px; }
@media (max-width: 640px) {
  .ar-grow { grid-template-columns: 1fr auto; }
  .ar-grow .msel { grid-column: 1 / -1; grid-row: 2; }
  .ar-which, .ar-evconf { grid-template-columns: 1fr; }
  .ar-goals th:nth-child(6), .ar-goals td.ar-goal-txt { display: none; }
  .ar-num { width: 54px; }
  .ar-foot-note { display: none; }
}
.ar-ai-text { min-height: 120px; height: auto; padding: 10px 12px; line-height: 1.45; }
.ar-goals { table-layout: fixed; min-width: 520px; }
.ar-goals th:nth-child(1) { width: 26%; }
.ar-goals th:nth-child(2), .ar-goals th:nth-child(3), .ar-goals th:nth-child(4) { width: 16%; }
.ar-goals th:nth-child(5) { width: 15%; }
.ar-goals th:nth-child(6) { width: 11%; }
.ar-goals .ar-or { width: 100%; }
@media (max-width: 640px) { .ar-goals { min-width: 0; } .ar-goals th:nth-child(1) { width: 30%; } }

/* ---------- Hub › Countdowns (families) ---------- */
.ctd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 6px; }
.ctd-card { position: relative; overflow: hidden; min-height: 164px; padding: 14px 16px; border-radius: 18px; color: #fff; background: var(--ctd-bg); box-shadow: 0 6px 18px rgba(15, 23, 42, .16); display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: transform .12s, box-shadow .12s; isolation: isolate; }
.ctd-card[data-h]:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .22); }
.ctd-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ctd-card:not([data-h]) { cursor: default; }
.ctd-mark { position: absolute; right: -14px; bottom: -22px; font-size: 128px; line-height: 1; opacity: .22; z-index: -1; transform: rotate(-8deg); pointer-events: none; }
/* the title at the top of the icon, the age or milestone under it (Nov 22, 2026, Scott: tighter cards) */
.ctd-top { display: flex; align-items: flex-start; gap: 12px; }
.ctd-head { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 1px 34px 0 0; }
.ctd-ico { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 15px; background: rgba(255, 255, 255, .2); font-size: 32px; line-height: 1; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ctd-title { font-size: 17px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ctd-num { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.ctd-num > b { font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.ctd-num > span { font-size: 15px; font-weight: 650; opacity: .92; }
.ctd-num > b.ctd-today { font-size: 40px; }
.ctd-clock { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ctd-clock i { font-style: normal; display: inline-flex; align-items: baseline; gap: 1px; padding: 4px 8px; border-radius: 10px; background: rgba(0, 0, 0, .18); font-size: 13px; font-weight: 650; }
.ctd-clock b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.ctd-tickline .ctd-clock { gap: 4px; }
.ctd-tickline .ctd-clock i { padding: 2px 6px; font-size: 11px; border-radius: 7px; background: rgba(0, 0, 0, .16); }
.ctd-tickline .ctd-clock b { font-size: 15px; }
.ctd-when { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 600; opacity: .95; }
.ctd-rep, .ctd-note { font-weight: 500; font-size: 12.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctd-card.is-today { box-shadow: 0 0 0 3px #fde047, 0 8px 22px rgba(15, 23, 42, .25); }
.ctd-card.is-past { filter: grayscale(.6); opacity: .8; }
.ctd-empty { padding: 18px; border: 1px dashed var(--line); border-radius: 14px; }
.ctd-empty p { margin: 0 0 10px; color: var(--muted); }
.ctd-ideas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctd-idea { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.ctd-idea span { font-size: 18px; }
.ctd-idea:hover { border-color: var(--accent); }
.ctd-ideas.sm .ctd-idea { height: 30px; font-size: 12.5px; padding: 0 10px; }
.ctd-lab { font-size: 12px; font-weight: 650; color: var(--muted); margin-right: 2px; }
.ctd-past { margin-top: 18px; }
.ctd-past summary { cursor: pointer; font-weight: 650; padding: 6px 2px; }
.ctd-grid.sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ctd-pastrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ctd-pastrow > span { font-size: 24px; }
.ctd-pastrow b { flex: 1; min-width: 0; }
.ctd-pastrow small { white-space: nowrap; }
/* at a glance */
.ctd-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ctd-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--ctd-bg); color: #fff; text-align: left; cursor: pointer; font: inherit; }
.ctd-mini .ctd-ico { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; }
.ctd-mtext { display: flex; flex-direction: column; min-width: 0; }
.ctd-mtext > b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctd-mini .ctd-num { margin: 0; gap: 5px; }
.ctd-mini .ctd-num > b { font-size: 24px; text-shadow: none; }
.ctd-mini .ctd-num > b.ctd-today { font-size: 20px; }
.ctd-mini .ctd-num > span { font-size: 12.5px; }
.ctd-mini .ctd-clock b { font-size: 16px; }
.ctd-mini .ctd-clock i { padding: 2px 5px; font-size: 11px; border-radius: 7px; }
.g-sec .link { font-size: 12px; margin-left: 6px; font-weight: 600; }
/* the editor */
.ctd-modal { max-width: 760px; }
.ctd-ed { display: flex; flex-direction: column; gap: 12px; }
.ctd-prev .ctd-card { min-height: 150px; max-width: 360px; margin: 0 auto; }
.ctd-picker { max-height: 236px; overflow-y: auto; padding: 4px 2px; border: 1px solid var(--line); border-radius: 12px; }
.ctd-ikind { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 2px; }
.ctd-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; padding: 2px 6px 6px; }
.ctd-ipick { height: 52px; border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); font-size: 30px; line-height: 1; cursor: pointer; }
.ctd-ipick:hover { border-color: var(--line); }
.ctd-ipick.on { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.ctd-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ctd-swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.ctd-swatch.on { box-shadow: 0 0 0 2px var(--accent); }
.ctd-ed .seg.ctd-freq { order: 0; margin: 0 0 8px; align-self: flex-start; }
.ctd-pat { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.ctd-pat:has(.ctd-pat-none) { background: transparent; padding: 0 2px; }
.ctd-pat-none { margin: 0; font-size: 13px; }
.ctd-rad, .ctd-line { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 500; color: var(--text); }
.ctd-ed .ctd-rad input[type="radio"] { width: 18px; height: 18px; min-width: 18px; flex: none; margin: 0 4px 0 0; padding: 0; border-radius: 50%; accent-color: var(--accent); }
.ctd-ed .ctd-pat select, .ctd-ed .ctd-ends select { width: auto; height: 34px; padding: 0 8px; }
.ctd-ed .ctd-pat input[type="number"], .ctd-ed .ctd-ends input[type="number"] { width: 68px; height: 34px; }
.ctd-ed .ctd-ends input[type="date"] { width: auto; height: 34px; }
.ctd-ed .ctd-day input { width: 1px; height: 1px; }
.ctd-pat input[type="number"], .ctd-ends input[type="number"] { width: 64px; height: 32px; }
.ctd-pat select, .ctd-ends input[type="date"] { height: 32px; }
.ctd-days { display: flex; flex-wrap: wrap; gap: 6px; }
.ctd-day input { position: absolute; opacity: 0; pointer-events: none; }
.ctd-day span { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
.ctd-day input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.ctd-day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ctd-ends { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.ctd-nexts { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .ctd-grid { grid-template-columns: 1fr; }
  .ctd-num > b { font-size: 44px; }
  .ctd-icons { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
  .ctd-ipick { height: 46px; font-size: 26px; }
}

/* ---------- Block view (families): each day a list in time order (calendar.js renderBlock) ---------- */
.block-grid { display: none; }
.block-mode .cal-head, .block-mode .cal-grid, .block-mode .month-grid { display: none; }
.block-mode .block-grid { display: flex; flex-direction: column; min-height: 100%; min-width: calc(var(--days, 7) * 150px); }
.blk-head { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(var(--days, 7), minmax(0, 1fr)); background: var(--surface); border-bottom: 1px solid var(--line); }
.blk-head .day-head:first-child { border-left: 0; }
.blk-body { flex: 1; display: grid; grid-template-columns: repeat(var(--days, 7), minmax(0, 1fr)); }
.blk-day { position: relative; min-width: 0; container-type: inline-size; padding: 6px 5px 40px; border-left: 1px solid var(--line-soft); cursor: cell; }
.blk-day:first-child { border-left: 0; }
.blk-day.is-today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.blk-day.drop-hot { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.blk-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blk-item { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time main" "time badges"; align-items: start; column-gap: 8px; min-width: 0; padding: 6px 8px; border-radius: 8px;
  border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 20%, var(--surface)); color: var(--text); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.blk-item:hover { background: color-mix(in srgb, var(--c) 30%, var(--surface)); }
.blk-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.blk-item.multi { border-image: var(--stripe) 1; border-image-slice: 0 0 0 1; }
.blk-time { grid-area: time; display: flex; flex-direction: column; min-width: 42px; font-size: 12px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.blk-time b { font-weight: 750; }
.blk-time small { color: var(--muted); font-size: 11px; font-weight: 600; }
.blk-time .ad-check { margin-top: 1px; }
.blk-main { grid-area: main; display: flex; flex-direction: column; min-width: 0; }
.blk-title { font-size: 13px; font-weight: 650; line-height: 1.3; overflow-wrap: break-word; hyphens: auto; }
.blk-title svg { display: inline; vertical-align: -2px; margin-right: 2px; }
.blk-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk-item .ev-badges { grid-area: badges; position: static; display: flex; align-items: center; gap: 3px; margin-top: 3px; min-height: 0; }
.blk-item .ev-badges:empty { display: none; }
.blk-item.allday { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.blk-item.done .blk-title { text-decoration: line-through; opacity: .6; }
.blk-item.dim { opacity: .25; }
.blk-item.lifted { opacity: .35; }
.blk-note { border-left-style: dashed; background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.blk-now { display: flex; align-items: center; gap: 6px; color: var(--danger, #dc2626); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; margin: 2px 0; }
.blk-now::before, .blk-now::after { content: ""; height: 2px; background: currentColor; flex: 1; border-radius: 2px; }
.blk-now::before { flex: 0 0 8px; }
.blk-empty { margin: 8px 4px; font-size: 12px; color: var(--muted); }
.block-mode .blk-day .quick-add.qa-allday { position: relative; }
.one-day .blk-item, .block-grid[style*="--days: 1"] .blk-item { padding: 8px 12px; }
.block-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; }
.block-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .block-btn .blk-lab { display: none; }
  .block-btn { order: 7; padding: 0 9px; }
  .block-mode .block-grid { min-width: calc(var(--days, 7) * 118px); }
}
/* a narrow day (Week on a laptop, 3 Day on a phone): the time on its own line above the title */
@container (max-width: 230px) {
  .blk-item { grid-template-columns: minmax(0, 1fr); grid-template-areas: "time" "main" "badges"; padding: 5px 7px; }
  .blk-time { flex-direction: row; flex-wrap: wrap; gap: 0 4px; min-width: 0; }
}

.block-mode .cal-body { overflow-x: auto; }
@media (max-width: 430px) {
  #viewSeg button { padding: 0 7px; }
  .block-btn { padding: 0 8px; }
}
body.block-on .density-btn { display: none; }
/* Block view: a drop takes the time of the card above it; this line shows where and when */
.blk-drop { position: absolute; left: 5px; right: 5px; z-index: 6; height: 0; border-top: 3px solid var(--c, var(--accent)); border-radius: 2px; pointer-events: none; }
.blk-drop span { position: absolute; left: 0; top: 2px; max-width: 100%; padding: 2px 7px; border-radius: 6px; background: var(--c, var(--accent)); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow); }
.quick-add.qa-block { margin: 0; }
.quick-add.qa-block .qa-hint { color: var(--accent); font-weight: 600; }
/* Calendars… : who sees each calendar */
.cal-item { display: grid; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.cal-item:last-child { border-bottom: 0; }
.cal-see { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-left: 44px; }
.cal-see-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cal-see select { width: auto; }
.cal-see-pick { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 220px; min-width: 0; }
.cal-see-pick[hidden] { display: none; }
@media (max-width: 520px) { .cal-see { padding-left: 0; } }
/* ---------- Hub › Do I have time? (hub/dotime.js) ---------- */
:root { --dit-ok: #15803d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dit-ok: #4ade80; } }
:root[data-theme="dark"] { --dit-ok: #4ade80; }
.dit { max-width: 760px; }
.dit-empty { display: grid; justify-items: start; gap: 10px; padding: 24px; border: 1px dashed var(--line); border-radius: 14px; max-width: 520px; }
.dit-empty .btn svg { vertical-align: -3px; }
.dit-plans { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.dit-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; }
.dit-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dit-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; font-size: 18px; font-weight: 650; }
.dit-set label { display: inline-flex; align-items: center; gap: 8px; }
.dit-set input { font: inherit; font-size: 18px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.dit-what input { width: 13ch; }
.dit-sum { --c: var(--dit-ok); padding: 14px 16px; border-radius: 14px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); margin-bottom: 14px; }
.dit-sum.over { --c: var(--danger); }
.dit-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; color: var(--c); }
.dit-big b { font-size: 44px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dit-big span { font-size: 16px; font-weight: 700; }
.dit-line { margin-top: 6px; color: var(--muted); font-size: 13px; }
.dit-bar { height: 8px; margin-top: 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); overflow: hidden; }
.dit-bar i { display: block; height: 100%; background: var(--c); border-radius: inherit; transition: width .3s; }
.dit-list { display: grid; gap: 8px; }
.dit-none { padding: 6px 2px; }
.dit-card { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "check ico mid min tools" "check gap gap gap gap"; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--dit-ok); background: var(--surface); }
.dit-card.over { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.dit-card.over .dit-when { color: var(--danger); font-weight: 700; }
.dit-card.done { opacity: .55; border-left-color: var(--line); }
.dit-card.done .dit-mid b { text-decoration: line-through; }
.dit-check { grid-area: check; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; cursor: pointer; padding: 0; }
.dit-check[aria-pressed="true"] { background: var(--dit-ok); border-color: var(--dit-ok); box-shadow: inset 0 0 0 3px var(--surface); }
.dit-ico { grid-area: ico; font-size: 24px; line-height: 1; }
.dit-mid { grid-area: mid; display: grid; min-width: 0; }
.dit-mid b { font-size: 15px; overflow-wrap: anywhere; }
.dit-when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dit-min { grid-area: min; display: inline-flex; align-items: center; gap: 4px; }
.dit-min button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer; }
.dit-min input, .dit-gap input { width: 54px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; text-align: center; }
.dit-min span, .dit-gap span { color: var(--muted); font-size: 12.5px; }
.dit-tools { grid-area: tools; display: inline-flex; }
.dit-tools .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.dit-gap { grid-area: gap; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dit-pill { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dit-pill.on { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); color: var(--text); }
.dit-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.dit-foot .link.danger { color: var(--danger); }
.dit-modal .modal-body { display: grid; gap: 10px; }
.dit-h { margin: 6px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.dit-tile { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ico name" "ico min"; align-items: center; column-gap: 8px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.dit-tile:hover { border-color: var(--accent); }
.dit-tile .dit-ico { grid-area: ico; font-size: 22px; }
.dit-tile b { grid-area: name; font-size: 13px; overflow-wrap: anywhere; }
.dit-tile small { grid-area: min; color: var(--muted); font-size: 12px; }
.dit-x { position: absolute; top: 2px; right: 4px; font-size: 11px; color: var(--muted); padding: 2px 4px; border-radius: 6px; }
.dit-x:hover { color: var(--danger); }
.dit-new { border-top: 1px solid var(--line); padding-top: 8px; }
.dit-new summary { cursor: pointer; font-weight: 650; }
.dit-new[open] { display: grid; gap: 8px; }
.dit-icons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dit-icons button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; cursor: pointer; }
.dit-icons button.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.dit-new-row { display: flex; align-items: center; gap: 8px; }
.dit-new-row input[type=text] { flex: 1; min-width: 0; }
.dit-new-row input[type=number] { width: 72px; }
.dit-new .btn { justify-self: start; }
.dit-glance { display: grid; gap: 6px; margin: 10px 0; }
.dit-gl { --c: var(--dit-ok); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; }
.dit-gl.over { --c: var(--danger); }
.dit-gl svg { color: var(--c); flex: none; }
.dit-gl span { display: grid; flex: 1; min-width: 0; }
.dit-gl small { color: var(--muted); font-size: 12px; }
.dit-gl em { font-style: normal; font-weight: 800; color: var(--c); white-space: nowrap; }
@media (max-width: 600px) {
  .dit-card { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "check ico mid tools" "check min min min" "check gap gap gap"; }
  .dit-big b { font-size: 38px; }
}
/* a multi-select list that doesn't fit in its window floats over the page (msel.js place) */
.msel-panel.fixed { position: fixed; z-index: 2000; right: auto; bottom: auto; }
/* Countdowns: ☆ favorite (each person's own; countdowns.js favs) */
.ctd-fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .18); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; opacity: .75; transition: opacity .12s, transform .12s, background .12s; }
.ctd-fav:hover, .ctd-fav:focus-visible { opacity: 1; background: rgba(0, 0, 0, .3); }
.ctd-fav.on { opacity: 1; color: #ffd43b; background: rgba(0, 0, 0, .28); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.ctd-fav:active { transform: scale(.9); }
.ctd-card.is-fav { box-shadow: 0 0 0 3px #ffd43b, 0 6px 18px rgba(15, 23, 42, .16); }
.ctd-card .ctd-top { padding-right: 34px; }
.ctd-mini .ctd-star { color: #ffd43b; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
/* Countdowns › Favorites: their own area above the rest */
.ctd-favs { padding: 14px; margin: 0 -14px 6px; border-radius: 20px; background: color-mix(in srgb, #ffd43b 9%, transparent); border: 1px solid color-mix(in srgb, #ffd43b 35%, transparent); }
.ctd-favs .ctd-sec { margin-top: 0; }
.ctd-sec .ctd-star { color: #e0a800; font-size: 16px; }
/* Do I have time?: the activity's name is typed right on its card */
.dit-name { width: 100%; min-width: 0; padding: 4px 8px; margin-left: -8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 700; }
.dit-name:hover { border-color: var(--line); }
.dit-name:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.dit-name::placeholder { color: var(--muted); font-weight: 600; }
.dit-when { padding-left: 0; }

/* Time boxes (timefield.js): typed or picked, shown the way Settings › Clock says */
.tf-box { min-width: 0; font-variant-numeric: tabular-nums; }
.tf-list { position: fixed; z-index: 2100; overflow-y: auto; overscroll-behavior: contain; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.tf-list button { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: pointer; }
.tf-list button:hover { background: var(--surface-2); }
.tf-list button.on { background: var(--accent); color: var(--accent-ink); }
.poll-closes { display: flex; gap: 8px; }
.poll-closes > input { flex: 1 1 0; min-width: 0; }

/* Countdowns: which birthday, how many years (a year born / started) */
.ctd-age { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .24); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); font-size: 12.5px; font-weight: 750; letter-spacing: .01em; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.ctd-mage { font-weight: 600; opacity: .9; }
/* Hub › Tools › Family link: common links to start from (Nov 22, 2026) */
.tl-common { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-common .btn.on { border-color: var(--accent, #22a06b); box-shadow: 0 0 0 1px var(--accent, #22a06b) inset; }

/* Anything the app hides (hidden attribute) stays hidden, whatever its own display (Nov 23, 2026: Backup and the
   Everyone button showed for a kid because .field and .btn set display). */
[hidden] { display: none !important; }
/* What kids and view-only members can't do isn't shown at all (Scott, Nov 23: hidden, not grayed, so nobody tries to get
   around it). The roles are set on <body> by app.js; the database refuses the same things (20261123000000). */
body.role-kid [data-g="add-plan"],
body.role-kid [data-g="add-vehicle"],
body.role-kid [data-g="del-reading"],
body.role-kid [data-g="doc-edit"],
body.role-kid [data-g="doc-new"],
body.role-kid [data-g="doc-renew"],
body.role-kid [data-g="edit-plan"],
body.role-kid [data-g="edit-record"],
body.role-kid [data-g="edit-vehicle"],
body.role-kid [data-g="fuel-edit"],
body.role-kid [data-g="gear-add"],
body.role-kid [data-g="gear-kind"],
body.role-kid [data-g="ins-del"],
body.role-kid [data-g="issue-dismiss"],
body.role-kid [data-g="issue-fix"],
body.role-kid [data-g="log-service"],
body.role-kid [data-g="move"],
body.role-kid [data-g="oos-back"],
body.role-kid [data-g="oos-edit"],
body.role-kid [data-g="oos-start"],
body.role-kid [data-g="organize"],
body.role-kid [data-g="part-dec"],
body.role-kid [data-g="part-edit"],
body.role-kid [data-g="part-inc"],
body.role-kid [data-g="part-new"],
body.role-kid [data-g="parts-reorder"],
body.role-kid [data-g="preset"],
body.role-kid [data-g="quick"],
body.role-kid [data-g="quick-edit"],
body.role-kid [data-g="quick-new"],
body.role-kid [data-g="recall-done"],
body.role-kid [data-g="rep-clear"],
body.role-kid [data-g="rep-rec"],
body.role-kid [data-g="reset"],
body.role-kid [data-g="specs-edit"],
body.role-kid [data-g="sup-add"],
body.role-kid [data-g="sup-check"],
body.role-kid [data-g="sup-copy"],
body.role-kid [data-g="sup-dec"],
body.role-kid [data-g="sup-edit"],
body.role-kid [data-g="sup-inc"],
body.role-kid [data-g="tpl-copy"],
body.role-kid [data-g="tpl-edit"],
body.role-kid [data-g="tpl-new"],
body.role-viewer [data-g="add-plan"],
body.role-viewer [data-g="add-vehicle"],
body.role-viewer [data-g="del-reading"],
body.role-viewer [data-g="doc-edit"],
body.role-viewer [data-g="doc-new"],
body.role-viewer [data-g="doc-renew"],
body.role-viewer [data-g="edit-plan"],
body.role-viewer [data-g="edit-record"],
body.role-viewer [data-g="edit-vehicle"],
body.role-viewer [data-g="fuel-edit"],
body.role-viewer [data-g="gear-add"],
body.role-viewer [data-g="gear-kind"],
body.role-viewer [data-g="ins-del"],
body.role-viewer [data-g="issue-dismiss"],
body.role-viewer [data-g="issue-fix"],
body.role-viewer [data-g="log-service"],
body.role-viewer [data-g="move"],
body.role-viewer [data-g="oos-back"],
body.role-viewer [data-g="oos-edit"],
body.role-viewer [data-g="oos-start"],
body.role-viewer [data-g="organize"],
body.role-viewer [data-g="part-dec"],
body.role-viewer [data-g="part-edit"],
body.role-viewer [data-g="part-inc"],
body.role-viewer [data-g="part-new"],
body.role-viewer [data-g="parts-reorder"],
body.role-viewer [data-g="preset"],
body.role-viewer [data-g="quick"],
body.role-viewer [data-g="quick-edit"],
body.role-viewer [data-g="quick-new"],
body.role-viewer [data-g="recall-done"],
body.role-viewer [data-g="rep-clear"],
body.role-viewer [data-g="rep-rec"],
body.role-viewer [data-g="reset"],
body.role-viewer [data-g="specs-edit"],
body.role-viewer [data-g="sup-add"],
body.role-viewer [data-g="sup-check"],
body.role-viewer [data-g="sup-copy"],
body.role-viewer [data-g="sup-dec"],
body.role-viewer [data-g="sup-edit"],
body.role-viewer [data-g="sup-inc"],
body.role-viewer [data-g="tpl-copy"],
body.role-viewer [data-g="tpl-edit"],
body.role-viewer [data-g="tpl-new"],
body.role-viewer [data-g="fuel-quick"],
body.role-viewer [data-g="fuel-new"],
body.role-viewer [data-g="log-reading"],
body.role-viewer [data-g="issue-new"],
body.role-viewer [data-g="ins-start"],
body.role-viewer [data-g="ins-set"],
body.role-viewer [data-g="ins-note"],
body.role-viewer [data-g="ins-complete"],
body.role-viewer [data-g="ins-rest"],
body.role-viewer [data-g="photo"],
body.role-viewer [data-g="gear-use"],
body.role-viewer [data-g="gear-inspect"],
body.role-kid [data-action="copy-week"], body.role-kid [data-action^="tpl-"], body.role-kid [data-action="new-activity"], body.role-kid [data-roster="templates"], body.role-kid [data-tp="templates"],
body.role-viewer [data-action="copy-week"], body.role-viewer [data-action^="tpl-"], body.role-viewer [data-action="new-activity"], body.role-viewer [data-roster="templates"], body.role-viewer [data-tp="templates"],
body.role-kid [data-action="new-category"], body.role-kid [data-action="rename-cat"], body.role-kid [data-action="delete-cat"], /* HQ-70 */
body.role-viewer [data-action="new-category"], body.role-viewer [data-action="rename-cat"], body.role-viewer [data-action="delete-cat"], body.role-viewer [data-action="new-note"] { display: none !important; }

/* Plans and billing (billing.js) */
.bill-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 14px; font-size: 13px; background: color-mix(in srgb, #f59e0b 14%, var(--surface)); border-bottom: 1px solid var(--line); }
.bill-text { flex: 1 1 auto; min-width: 0; }
.bill-line { margin: 0 0 8px; line-height: 1.45; }
.bill-int { margin-bottom: 14px; }
.bill-int small { font-weight: 500; opacity: .75; margin-left: 4px; }
.bill-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.bill-plan { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--surface)); }
.bill-plan > b { font-size: 15px; }
.bill-price { font-size: 26px; font-weight: 800; }
.bill-price small { font-size: 13px; font-weight: 500; opacity: .7; }
.bill-plan ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; flex: 1; }
.bill-plan:has([data-plan="family_ai"]) { border-color: var(--accent, #2f6fed); }
/* AI: the upsell card for a plan without it, and "12 of 50 photo reads this month" (billing.js, photopick.js; HQ-74) */
.ai-card > b { display: block; font-size: 17px; margin-bottom: 6px; }
.ai-card p { margin: 0 0 8px; line-height: 1.45; }
.pp-quota { margin: 0; font-weight: 600; }
.bill-ai:empty { display: none; }

/* Icon and color (avatar.js, Nov 23, 2026): a person's emoji in their round avatar, and the window to pick it */
.avatar.xl { width: 72px; height: 72px; font-size: 34px; }
.av-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px; }
.av-pick { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel, transparent); font-size: 22px; cursor: pointer; line-height: 1; }
.av-pick.letter { font-size: 16px; font-weight: 700; color: var(--muted); }
.av-pick.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.av-own { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.av-own .input { width: 72px; text-align: center; font-size: 20px; }
.user-row .av-btn { border: 0; cursor: pointer; padding: 0; }
.user-row .av-btn:disabled { cursor: default; }
.acct-look { margin-top: 6px; align-self: flex-start; }

/* Do I have time? › How long will it take? (hub/dotime.js, Nov 23, 2026) */
.dit-mode { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dit-next { margin-top: 4px; }
.dit-empty .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Add events from a photo (photoevents.js, Nov 23, 2026) */
.pe-list { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.pe-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.pe-tick { padding-top: 8px; }
.pe-main { flex: 1; display: grid; gap: 6px; min-width: 0; }
.pe-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pe-when .input { width: auto; }

/* The pages window: photos for the reader, "Add another page" (photopick.js, HQ-73) */
.pp-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.pp-page { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pp-page img, .pp-page.wait .si-spin { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.pp-page.wait { justify-content: center; }
.pp-page.wait .si-spin { width: 34px; height: 34px; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); margin: 50px auto; }
.pp-page figcaption { font-size: 13px; color: var(--muted); }
.pp-del { position: absolute; top: 4px; right: 4px; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); }
.pp-add { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-add[hidden] { display: none; }
.pp-max { margin: 8px 0 0; }
.pp-modal .pp-reading { min-height: 0; padding: 18px 0; }
.pp-modal .pp-reading[hidden] { display: none; }
.pp-msg { margin: 10px 0 0; color: var(--danger, #c92a2a); font-weight: 600; }
.pp-msg:empty { display: none; }

/* Hub › Finances (families with the add-on, parents only) */
.fin-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fin-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.fin-totals .g-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.fin-totals b { font-size: 24px; font-variant-numeric: tabular-nums; }
.fin-bank { padding: 12px 16px; margin-bottom: 12px; }
.fin-bank-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fin-bank-head h3 { margin: 0; font-size: 16px; flex: 1; }
.fin-when { display: block; font-size: 12px; font-weight: 400; margin-top: 2px; }
.fin-list { list-style: none; margin: 8px 0 0; padding: 0; }
.fin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.fin-name { display: flex; flex-direction: column; min-width: 0; }
.fin-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-bal { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; font-weight: 600; }
.fin-share { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fin-blur { filter: blur(7px); user-select: none; }
.fin-off { color: var(--danger); }
@media (max-width: 520px) { .fin-row { grid-template-columns: 1fr auto; } .fin-share { grid-column: 1 / -1; } }
/* Finances: the second sign-in step (HQ-28, Nov 24, 2026) */
.fin-mfa { max-width: 520px; display: grid; gap: 10px; justify-items: start; }
.fin-mfa h3 { margin: 0; font-size: 17px; }
.fin-mfa p { margin: 0; }
.fin-qr { background: #fff; padding: 8px; border-radius: 10px; }
.fin-secret { font-family: ui-monospace, monospace; word-break: break-all; user-select: all; }
.fin-code { display: flex; gap: 8px; }
.fin-code .input { width: 9em; font-size: 18px; letter-spacing: 0.15em; text-align: center; }
.fin-err { color: var(--danger, #d64545); }
.fin-2fa { margin-top: 4px; }
/* The beta testers' checklist (HQ-75, Nov 27, 2026): the /beta/ window and the in-app panel share these; the frame is
   Help's (.help-page, .hp-top, .hp-body, .hp-foot). */
.bc-body { gap: 10px; }
.bc-msg { padding: 18px 4px; display: grid; gap: 10px; }
.bc-msg p { margin: 0; }
.bc-loading, .bc-err { padding: 18px 4px; }
.bc-err { color: var(--danger, #d64545); }
.bc-replay { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #8b5cf6 16%, var(--surface)); border: 1px solid color-mix(in srgb, #8b5cf6 40%, var(--line)); }
.bc-intro p { margin: 0 0 8px; font-size: 13.5px; }
.bc-sum { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; }
.bc-pr { color: var(--danger, #d64545); }
.bc-filter button { height: 26px; font-size: 12.5px; }
.bc-path { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bc-path > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; border-radius: 12px; }
.bc-path > summary::-webkit-details-marker, .bc-item > summary::-webkit-details-marker { display: none; }
.bc-path > summary:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.bc-path[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.bc-path > summary b { font-size: 14px; flex: 1; min-width: 0; }
.bc-ic { font-size: 18px; line-height: 1; }
.bc-prog { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-size: 12px; font-weight: 700; text-align: center; white-space: nowrap; }
.bc-prog.done { background: color-mix(in srgb, #16a34a 24%, var(--surface)); }
.bc-prog.pr { background: color-mix(in srgb, #dc2626 18%, var(--surface)); }
.bc-path-b { padding: 6px 10px 8px; }
.bc-blurb { margin: 4px 4px 8px; color: var(--muted); font-size: 13px; }
.bc-item { border-bottom: 1px solid var(--line-soft, var(--line)); }
.bc-item:last-child { border-bottom: 0; }
.bc-item > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 6px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; }
.bc-it-t { flex: 1 1 12em; min-width: 0; }
/* an item is a row that opens (chevron, "Tap for steps"); its state is a label, not a control, until you pick one inside */
.bc-chev { flex: none; width: 20px; text-align: center; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .15s; }
.bc-item[open] > summary .bc-chev { transform: rotate(90deg); }
.bc-hint { font-size: 11.5px; font-weight: 500; color: var(--accent); }
.bc-item[open] > summary .bc-hint { display: none; }
.bc-item > summary:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-radius: 8px; }
.bc-state { flex: none; margin-left: auto; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); pointer-events: none; }
.bc-item[data-st="pass"] .bc-state { background: #16a34a; border: 1px solid #16a34a; color: #fff; }
.bc-item[data-st="problem"] .bc-state { background: #dc2626; border: 1px solid #dc2626; color: #fff; }
.bc-item[data-st="skipped"] .bc-state { background: var(--muted); border: 1px solid var(--muted); color: var(--surface); }
.bc-howto { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bc-howto:empty { display: none; }
.bc-who { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.bc-jira { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, #2563eb 16%, var(--surface)); color: var(--text); }
.bc-it-b { padding: 0 6px 12px 34px; display: grid; gap: 8px; font-size: 13.5px; }
.bc-it-b dl { margin: 0; display: grid; gap: 2px; }
.bc-it-b dt { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; }
.bc-it-b dd { margin: 0; }
.bc-safe { margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #d97706 14%, var(--surface)); border: 1px solid color-mix(in srgb, #d97706 40%, var(--line)); }
.bc-status, .bc-sev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-s, .bc-v { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; }
.bc-v { height: 28px; font-size: 12.5px; font-weight: 550; }
.bc-s:disabled, .bc-v:disabled { cursor: default; opacity: .75; }
.bc-s-pass.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.bc-s-problem.on { background: #dc2626; border-color: #dc2626; color: #fff; }
.bc-s-skipped.on { background: var(--muted); border-color: var(--muted); color: var(--surface); }
.bc-v.on { background: color-mix(in srgb, #dc2626 18%, var(--surface)); border-color: #dc2626; }
.bc-note, .bc-onew textarea { height: auto; min-height: 44px; width: 100%; box-sizing: border-box; padding: 8px 10px; resize: vertical; line-height: 1.4; }
.bc-saved, .bc-meta { color: var(--muted); font-size: 12px; min-height: 1em; }
.bc-other { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-top: 4px solid #d97706; border-radius: 12px; background: var(--surface); }
.bc-other h3 { margin: 0; font-size: 15px; }
.bc-other p { margin: 0; font-size: 13px; }
.bc-onote { display: grid; gap: 4px; justify-items: start; }
.bc-onew { display: grid; gap: 8px; justify-items: start; }
.bc-missed { display: grid; gap: 4px; margin-top: 4px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.bc-missed label { display: grid; gap: 6px; font-size: 13px; }
.bc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bc-foot { font-size: 12px; text-align: center; margin: 4px 0 0; }
.sp-q-card.sp-beta svg { color: #8b5cf6; }
.menu .menu-beta { font-weight: 650; }
/* the in-app panel (the installed phone app): slides in over the app; "–" tucks it into the Beta button */
.bc-panel { position: fixed; z-index: 420; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); display: flex; flex-direction: column; background: var(--bg, var(--surface)); box-shadow: -8px 0 28px rgba(0, 0, 0, .22); padding-top: env(safe-area-inset-top); animation: bc-in .18s ease-out; }
.bc-panel[hidden] { display: none; }
.bc-panel .bc-top { position: static; padding-right: 8px; }
.bc-panel .bc-top .hp-app { margin-left: auto; }
.bc-panel .bc-body { overflow: auto; overscroll-behavior: contain; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.bc-panel .bc-top .icon-btn { font-size: 22px; font-weight: 700; color: var(--text); }
@keyframes bc-in { from { transform: translateX(30%); opacity: .4; } to { transform: none; opacity: 1; } }
.bc-pill { position: fixed; z-index: 190; /* HQ-75: under sheets and modals (.backdrop is 200) */ left: 12px; bottom: max(76px, calc(env(safe-area-inset-bottom) + 64px)); display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: #8b5cf6; color: #fff; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }


/* iPhone home-screen app + phones (HQ-81, Nov 28, 2026). Scott, iPhone, v228: the top bar's icons were tiny and jammed
   together, the ☰ sat alone on a second row, and an empty band showed under the tab bar. Causes: (1) the phone top bar wrapped
   (icons row, then a break, then ☰) with 34px / 38px controls; (2) the tab bar's bottom padding was the whole home-indicator
   inset (34px) on top of its 44px buttons, and the page's reserve for it (56px + inset) was a few px off from the bar's real
   height. Now: one row of 44px controls (Help, Compact / Block view and "Viewing as" live in the ⋯ menu), the safe areas
   applied once each (--tab-pad, --tab-h), and every bottom-anchored thing (button, toast, undo chip) is placed from --tab-h.
   tests/phone-topbar.mjs checks all of it at 390x844 with the iPhone's insets simulated. Desktop is unchanged. */
html, body { overscroll-behavior: none; }
.menu .phone-only { display: none; }
@media (max-width: 760px) {
  :root {
    /* the home indicator needs ~16px under the tab labels, not the whole 34px inset: the 44px buttons reach into it */
    --tab-pad: max(4px, calc(env(safe-area-inset-bottom, 0px) - 18px));
    --tab-h: calc(49px + var(--tab-pad)); /* 4 + 44 button + pad + 1px border */
  }
  #modeSeg { padding: 4px 6px var(--tab-pad); }
  #app { padding-bottom: var(--tab-h); }
  .fab { bottom: calc(var(--tab-h) + 12px); }
  .toast { bottom: calc(var(--tab-h) + 12px); }
  .undo-chip { bottom: calc(var(--tab-h) + 12px); }
  .ws-pill { bottom: calc(var(--tab-h) + 12px); }
  .sidebar { padding-bottom: calc(var(--tab-h) + 28px); }

  /* the top bar: ONE row (☰ · logo or date · ✨ · search · you · ⋯), every control 44 x 44, the notch inset once */
  .topbar { flex-wrap: wrap; gap: 0 2px; padding: 4px 8px 4px; padding-top: max(6px, env(safe-area-inset-top)); }
  .topbar .icon-btn, .topbar .drawer-btn { width: 44px; height: 44px; border-radius: 12px; }
  .topbar .drawer-btn { order: 1; margin-left: 0; }
  .topbar .brand { order: 2; margin: 0 auto 0 6px; }
  body:not(.mode-garage) .topbar .brand { display: none; }
  .topbar .range { order: 3; flex: 1 1 0; min-width: 0; margin: 0 4px 0 4px; font-size: 16px; }
  .topbar .ask-btn { order: 4; font-size: 20px; }
  .topbar .search-btn { order: 5; }
  .topbar .account-btn { order: 6; width: 44px; min-width: 44px; height: 44px; padding: 0; border-radius: 12px; }
  .topbar .account-btn .avatar { width: 32px; height: 32px; font-size: 14px; }
  .topbar .account-btn .sync-dot { right: 6px; bottom: 6px; }
  .topbar .menu-btn { order: 7; }
  .topbar .support-btn, .topbar .viewer-btn, .topbar .density-btn, .topbar .block-btn, .topbar .view-menu-btn { display: none; }
  /* the calendar's own second row: previous / Today / next, then Day · 3 Day · Week · Month */
  .topbar .break { order: 8; }
  body.mode-garage .topbar .break { display: none; }
  .topbar .navbtns { order: 9; gap: 2px; margin-top: 2px; }
  .topbar .navbtns .icon-btn { width: 44px; height: 44px; }
  .topbar .navbtns .btn { height: 44px; padding: 0 10px; border-radius: 12px; }
  .topbar #viewSeg { order: 10; margin: 2px 0 0 auto; padding: 2px; }
  .topbar #viewSeg button { height: 44px; min-width: 44px; justify-content: center; padding: 0 8px; font-size: 13px; }
  .menu button { min-height: 44px; }
  .menu .phone-only, .menu button.phone-show { display: flex; }
  .menu hr.phone-only { display: block; }
  body.mode-garage .menu .fam-only { display: none; }
}
/* iPhone home-screen app: iOS's stuck short viewport (HQ-81, third look, Nov 28, 2026). Scott, v229 and v231, signed in:
   the tab bar ~60pt above the bottom edge over an empty band of the page's own background. WebKit bug: in a home-screen app,
   after the keyboard has been up (the email code, search, Ask...), innerHeight / 100dvh / what position:fixed sits on can
   stay short of the screen (by about the top inset) until the app is relaunched; WebKit still paints the whole screen.
   install.js keepFullHeight() measures it (portrait, full-width window, no field focused) and sets html.vp-pin with
   --vp-short; these rules then size the page to the screen and put everything that hangs off the bottom back on it.
   tests/signed-in-band.mjs simulates it. */
@media (max-width: 760px) {
  html.vp-pin { height: calc(100% + var(--vp-short, 0px)); }
  html.vp-pin #app { height: calc(100dvh + var(--vp-short, 0px)); }
  html.vp-pin #modeSeg, html.vp-pin .sidebar, html.vp-pin .garage .g-rail, html.vp-pin .drawer-scrim, html.vp-pin .backdrop,
  html.vp-pin .ws, html.vp-pin .kc-cook, html.vp-pin .lc-scrim, html.vp-pin .lc-pop.lc-sheet { bottom: calc(0px - var(--vp-short, 0px)); }
  html.vp-pin .fab, html.vp-pin .toast, html.vp-pin .undo-chip, html.vp-pin .ws-pill { bottom: calc(var(--tab-h) + 12px - var(--vp-short, 0px)); }
  html.vp-pin .m-signin, html.vp-pin .m-signin-tags { height: calc(100dvh + var(--vp-short, 0px)); max-height: calc(100dvh + var(--vp-short, 0px)); }
}

/* Under-13 members and parent consent (kidconsent.js, HQ-82) */
.kid-bar { background: color-mix(in srgb, #2563eb 12%, var(--surface)); }
.kid-notice { margin: 8px 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.kid-notice li { margin-bottom: 6px; }
.kid-ai-note, .ai-kids-note { font-size: 12.5px; }
.m-kidconsent .modal-body, .m-kidprivacy .modal-body { max-height: 70vh; overflow: auto; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent, #2563eb); text-decoration: underline; cursor: pointer; font: inherit; }
.kp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kp-who { display: flex; flex-direction: column; gap: 2px; flex: 1 1 150px; min-width: 0; }
.kp-chip { font-size: 12px; opacity: .8; }
.kp-chip.ok { color: #15803d; opacity: 1; }
.kp-chip.warn { color: #b45309; opacity: 1; }
.kp-chip.bad { color: #b91c1c; opacity: 1; }
.kp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.kp-hold { padding-left: 18px; line-height: 1.6; }
.who-tag.under13 { background: color-mix(in srgb, #2563eb 16%, var(--surface)); }
.fam-adult { margin-top: 8px; }
.kb-msg { font-size: 17px; }
.m-kidcode .kcn-code, .m-kidconsent .kcn-code { font-size: 22px; letter-spacing: .3em; text-align: center; max-width: 12em; }

/* ---------- Hub › Gifts (HQ-95): people tiles, ideas, bought, budget ---------- */
.gf { max-width: 980px; }
.gf-empty .btn { margin-top: 6px; }
.gf-total { margin-top: 4px; }
.gf-total-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.gf-total-lab { font-weight: 700; font-size: 15px; }
.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.gf-tile { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 14px 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; min-width: 0; transition: border-color .12s, box-shadow .12s; }
.gf-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.gf-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gf-tile-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gf-tile-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gf-tile-name b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-tile-name small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; } /* wraps, so "+1 more" always shows */
.gf-lock { font-size: 14px; opacity: .85; }
.gf-counts { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.gf-counts b { color: var(--text); font-size: 15px; }
.avatar.gf-av { font-size: 15px; }
.avatar.gf-av.lg { width: 44px; height: 44px; font-size: 20px; }
.avatar.gf-av.xl { width: 60px; height: 60px; font-size: 28px; }
.gf-money { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.gf-money.big { font-size: 14px; }
.gf-money.big .gf-mline b { font-size: 20px; }
.gf-mline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.gf-warn { color: #b45309; font-weight: 600; }
:root[data-theme="dark"] .gf-warn { color: #f59e0b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gf-warn { color: #f59e0b; } }
.gf-over { color: var(--danger); font-weight: 600; }
.gf-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.gf-money.big .gf-bar { height: 10px; }
.gf-bar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.gf-bar-plan { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.gf-bar-spent { background: var(--accent); }
.gf-bar.is-over .gf-bar-spent { background: var(--danger); }
.gf-bar .gf-bar-budget { width: 2px; border-radius: 0; background: var(--text); opacity: .45; transform: translateX(-1px); }
.gf-back { margin-bottom: 10px; font-size: 14px; }
.gf-phead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gf-phead-text { flex: 1; min-width: 160px; }
.gf-phead-text h2 { margin: 0; font-size: 22px; }
.gf-phead-text p { margin: 2px 0 0; }
.gf-phead-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px !important; }
.gf-phead-acts { margin-left: auto; }
.gf-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--accent); }
.gf-pill.is-private { background: var(--surface-2); color: var(--text); }
.gf-by { font-size: 12px; }
.gf-hidden-note { margin-top: 10px; }
.gf-pbudget { margin-top: 12px; }
.gf-sec-n { font-weight: 600; letter-spacing: 0; }
.gf-none { margin: 4px 2px 10px; }
.gf-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gf-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "chk body cost" "chk body stage"; align-items: center; column-gap: 8px;
  padding: 8px 12px 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gf-check { grid-area: chk; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; position: relative; }
.gf-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.gf-check span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.gf-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.gf-check input:checked + span::after { content: ''; width: 10px; height: 5px; border: 2.5px solid var(--accent-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.gf-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.gf-check input:disabled { cursor: default; }
.gf-ibody { grid-area: body; min-width: 0; padding: 2px 0; }
.gf-iname { display: block; max-width: 100%; border: 0; background: none; padding: 0; text-align: left; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--text); overflow-wrap: anywhere; }
.gf-iname:disabled { cursor: default; }
.gf-item.is-given .gf-iname { color: var(--muted); }
.gf-imeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.gf-link { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--accent); text-decoration: none; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-link:hover { text-decoration: underline; }
.gf-note { overflow-wrap: anywhere; }
.gf-icost { grid-area: cost; justify-self: end; font-weight: 700; font-variant-numeric: tabular-nums; }
.gf-stage { grid-area: stage; justify-self: end; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; margin-top: 4px; }
.gf-stage.is-wrapped { border-color: color-mix(in srgb, #d97706 45%, var(--line)); }
.gf-stage.is-given { color: var(--accent); }
.gf-stage:disabled { cursor: default; opacity: .8; }
.gf-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-pick { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 550; }
.gf-pick .avatar { width: 28px; height: 28px; font-size: 13px; }
.gf-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 650; box-shadow: 0 0 0 1px var(--accent) inset; }
.gf-pick:disabled { opacity: .55; cursor: default; }
.gf-share, .gf-status, .gf-modal .seg.gf-share, .gf-modal .seg.gf-status { display: flex; flex-wrap: wrap; order: 0; margin: 0; width: 100%; align-self: stretch; }
.gf-share button, .gf-status button { flex: 1 1 auto; justify-content: center; min-height: 34px; height: auto; white-space: normal; }
.gf-emoji-f input { text-align: center; font-size: 18px; }
.gf-url-help { margin-top: -6px; }
.gf-url-help.gf-bad { color: var(--danger); }
.gf-sync { margin-top: 18px; }
.gf-more { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 11.5px; font-weight: 600; }
.gf-occs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gf-occ { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; min-height: 36px; }
.gf-occ-name { font-weight: 650; }
.gf-occ .gf-cd { height: 28px; border-radius: 999px; }
.gf-addrow { margin: 16px 0 4px; }
.gf-addrow .btn { height: 40px; }
.gf .seg.gf-filter { display: flex; flex-wrap: wrap; order: 0; margin: 16px 0 0; width: max-content; max-width: 100%; }
.gf-filter button { min-height: 32px; }
.gf-tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; color: var(--text); }
.gf-heads { margin-top: 4px; margin-bottom: 12px; border-color: color-mix(in srgb, #d97706 55%, var(--line)); background: color-mix(in srgb, #d97706 7%, var(--surface)); }
.gf-heads p { margin: 0 0 6px; }
.gf-heads .g-actions { margin-top: 8px; }
.gf-pick.is-match { border-style: dashed; border-color: #d97706; }
.gf-linkhelp { color: var(--text); }
.gf-orows { display: flex; flex-direction: column; gap: 8px; }
.gf-orow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.gf-orow .input { height: 38px; }
.gf-orow .gf-oother { grid-column: 1 / 3; }
.gf-oadd { align-self: flex-start; margin-top: 8px; }
@media (max-width: 760px) {
  .gf-grid { grid-template-columns: 1fr; gap: 10px; }
  .gf-phead-acts { margin-left: 0; width: 100%; }
  .gf-modal .row3.g-row2 { grid-template-columns: 1fr 1fr; }
}

/* First-visit tips (tour.js, HQ-91): a bubble pointing at the real control, a soft spotlight on it, the page dimmed and
   not clickable behind. Above menus and windows (260 / 200), under the toast (400). Light and dark from the theme's own
   colors; no movement with reduced motion. */
.tour { position: fixed; inset: 0; z-index: 350; }
.tour-block { position: absolute; inset: 0; }
.tour-spot { --dim: rgba(12, 14, 18, .46); position: fixed; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 0 200vmax var(--dim);
  transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease; }
.tour-spot.none { box-shadow: 0 0 0 200vmax var(--dim); }
:root[data-theme="dark"] .tour-spot { --dim: rgba(0, 0, 0, .62); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tour-spot { --dim: rgba(0, 0, 0, .62); } }
.tour-tip { position: fixed; box-sizing: border-box; padding: 14px 16px 12px; border-radius: 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow); outline: none; animation: tour-in .18s ease-out; }
.tour-tip:focus-visible { box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
@keyframes tour-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tour-tip h2 { margin: 0 0 4px; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.tour-tip p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.tour-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
.tour-n { font-size: 12px; font-weight: 650; color: var(--muted); }
.tour-off { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 1px 8px; border-radius: 999px;
  color: color-mix(in srgb, var(--accent) 80%, var(--text)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.tour-off::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tour-skip-sec { color: var(--accent); font-weight: 600; padding: 6px 4px; }
.tour-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tour-btns .btn { flex: 0 0 auto; }
.tour-skip { margin-left: auto; color: var(--muted); font-weight: 600; padding: 6px 4px; }
.tour-skip:hover { color: var(--text); text-decoration: underline; }
.tour-wait { color: var(--muted); font-size: 13px; padding: 7px 0; }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--surface); border: 1px solid var(--line); transform: rotate(45deg); }
.tour-tip[data-side="below"] .tour-arrow { top: -8px; margin-left: -7px; border-right: 0; border-bottom: 0; }
.tour-tip[data-side="above"] .tour-arrow { bottom: -8px; margin-left: -7px; border-left: 0; border-top: 0; }
.tour-tip[data-side="right"] .tour-arrow { left: -8px; margin-top: -7px; border-top: 0; border-right: 0; }
.tour-tip[data-side="left"] .tour-arrow { right: -8px; margin-top: -7px; border-bottom: 0; border-left: 0; }
.tour-tip[data-side="center"] .tour-arrow { display: none; }
.tour-safe { position: fixed; visibility: hidden; pointer-events: none; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
@media (max-width: 760px) {
  .tour-tip { padding: 14px 14px 10px; }
  .tour-btns .btn { height: 44px; padding: 0 14px; border-radius: 12px; }
  .tour-skip, .tour-skip-sec { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .tour-tip { animation: none; } .tour-spot { transition: none; } }

/* Settings › Permissions › Sections (HQ-76 round 3): where each level comes from, and the calendar settings */
.rl-tree .rl-lv { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 12px; }
.rl-pick { display: inline-flex; flex-direction: column; gap: 2px; }
.rl-src { font-size: 11.5px; line-height: 1.3; }
.rl-src.set { color: var(--accent); font-weight: 600; }
.rl-sec.rl-set > .pm-name b { color: var(--accent); }
.rl-star .pm-name i { color: var(--muted); }
.cal-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; }
.cal-acc .msel { min-width: 200px; flex: 1 1 200px; }
/* (HQ-76 round 5) the team's words: Settings › Team words, Roles & access › Integrations › Connection name */
.settings-words .sw-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.settings-words .sw-l { flex: 0 0 120px; font-size: 13px; color: var(--muted); }
.settings-words .sw-row input { flex: 1 1 auto; min-width: 0; }
.rl-conn { margin: 4px 0 12px; }
.rl-conn .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rl-conn .row .input { flex: 1 1 180px; max-width: 280px; }
.rl-conn-now { margin: 2px 0; }
/* (HQ-76 round 4) Roles & access: each section opens and closes (chevron), Expand all / Collapse all */
.rl-tree .rl-sec[hidden] { display: none; }
.rl-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.rl-tog { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -3px 2px -3px -4px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.rl-tog:hover, .rl-tog:focus-visible { background: var(--surface-2); color: var(--text); }
.rl-tog svg { transition: transform .15s ease; }
.rl-tog[aria-expanded="true"] svg { transform: rotate(90deg); }
.rl-tog-pad { display: inline-block; width: 22px; flex: none; }
.rl-name[data-rl-tog] { cursor: pointer; }
.rl-under { flex-basis: 100%; padding-left: 22px; font-weight: 500; font-size: 11.5px; }
.rl-sec[aria-expanded="true"] .rl-under { display: none; }
.rl-under-set { color: var(--accent); font-weight: 600; }
.rl-tree .rl-sec.rl-d0 { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-radius: 8px; margin-top: 4px; padding-left: 6px !important; padding-right: 6px; }
/* (HQ-76 round 4) Calendars…: removed calendars wait to be brought back */
.cal-ml-note { flex-basis: 100%; }
.cal-gone { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-gone-h { margin: 0 0 6px; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; }
.cal-gone-h small { font-weight: 500; font-size: 12px; }
.cal-gone-item { display: grid; grid-template-columns: minmax(110px, 160px) 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.cal-gone-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.cal-gone-what { color: var(--muted); }
.cal-gone-item.looser .cal-gone-what b, .cal-looser b { color: var(--danger); }
@media (max-width: 520px) { .cal-gone-item { grid-template-columns: 1fr auto; } .cal-gone-what { grid-column: 1 / -1; } }

/* (HQ-112) Custom checklists with a sign-off: who checks, who finalizes, the history, Settings › Ranks */
.so-panel { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.so-panel p { margin: 0 0 4px; }
.so-panel .so-you { color: var(--muted); margin: 0; }
/* (HQ-123) a signer slot nobody can fill; a View Only person named for an action (a warning, never a block) */
.so-panel .so-gone, .vo-note { margin: 4px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; background: color-mix(in srgb, #d97706 12%, var(--surface)); color: var(--text); }
.so-badge { display: inline-block; font-size: .78em; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 4px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.so-badge.done { background: color-mix(in srgb, #16a34a 16%, var(--surface)); color: #15803d; }
.so-run .tm-box:disabled { opacity: .55; cursor: not-allowed; }
.so-edit .so-who { gap: 8px; flex-wrap: wrap; }
.tm-tpl-so { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.tm-tpl-so h4 { margin: 4px 0; }
.so-ranks { padding-left: 22px; }
.so-ranks li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.so-rank-acts { margin-left: auto; display: inline-flex; gap: 2px; }
.so-hist { padding-left: 20px; }
.so-hist li { padding: 3px 0; }
/* (HQ-112, Dec 1) ALL / ANY signers, ranks of several tags, the before → after of a change */
.so-needs { font-weight: 600; }
.so-needs-flag { display: inline-block; font-size: .78em; font-weight: 700; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.so-needs-pick { gap: 14px; flex-wrap: wrap; margin: 6px 0 2px; }
.so-ranks li { flex-wrap: wrap; }
.so-rank-tag { display: inline-flex; align-items: center; gap: 2px; }
.so-hist .so-change { color: var(--muted); }
@media print { #printArea .so-print .so-p-sub td { color: #444; } #printArea .so-p-status { margin: 8px 0; } }
/* (HQ-121) the QR a checker scans: big, black on white whatever the theme, its link under it; on the PDF a small one */
.so-qr { max-width: min(340px, 80vw); margin: 4px auto 0; padding: 10px; background: #fff; border-radius: 12px; }
.so-qr .qr { display: block; width: 100%; height: auto; }
.so-qr-what { text-align: center; margin: 10px 0 4px; }
.so-qr-link { text-align: center; margin: 6px 0 0; }
.so-qr-link code { font-size: 12px; overflow-wrap: anywhere; color: var(--muted); }
.so-row-wrap { display: flex; flex-direction: column; gap: 6px; }
.so-row-wrap .so-qr-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
#printArea .so-p-qr { float: right; display: flex; gap: 8px; align-items: center; width: 72mm; margin: 0 0 4mm 6mm; font-size: 9pt; }
#printArea .so-p-qr .qr { width: 26mm; height: 26mm; flex: none; }
#printArea .so-p-qr small { display: block; overflow-wrap: anywhere; color: #444; }

/* ---------- Hub › Notes (HQ-113) ---------- */
.nt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nt-head h2 { margin: 0 0 2px; }
.nt-q { width: 100%; margin: 12px 0 8px; }
.nt-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.nt-tools { display: flex; justify-content: flex-end; margin: 2px 0 -4px; } /* (HQ-113) Collapse all / Expand all */
.nt-cat { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.nt-cat small { color: var(--muted); margin-left: 2px; }
.nt-cat.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.nt-cat.on small { color: inherit; opacity: .8; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.nt-card { margin-top: 0; padding: 12px 12px 10px; position: relative; min-width: 0; }
.nt-open { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 28px 0 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.nt-ico { font-size: 20px; line-height: 1; flex: none; }
.nt-title { display: flex; flex-direction: column; min-width: 0; }
.nt-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-vis { color: var(--muted); font-size: 12px; }
.nt-pin { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.nt-pin.on { color: #d97706; }
.nt-fields { margin: 8px 0 0; display: grid; gap: 4px; }
.nt-field { display: grid; grid-template-columns: minmax(80px, 38%) 1fr; gap: 8px; align-items: center; min-width: 0; }
.nt-field dt { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-field dd { margin: 0; display: flex; align-items: center; gap: 4px; min-width: 0; }
.nt-val { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; min-width: 0; }
.nt-val.masked { letter-spacing: 2px; cursor: pointer; color: var(--muted); }
.nt-fields.big .nt-field { grid-template-columns: minmax(110px, 34%) 1fr; padding: 6px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.nt-fields.big dt { font-size: 13.5px; }
.nt-copy { flex: none; color: var(--muted); }
.nt-body-peek { margin: 8px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt-files { margin: 6px 0 0; font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.nt-empty { text-align: center; }
.nt-warn { margin-top: 18px; }
.nt-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.nt-pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); }
.nt-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.nt-sub { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 14px; }
.nt-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.nt-tpl { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.nt-tpl small { display: block; color: var(--muted); font-size: 12px; }
.nt-tpl:hover, .nt-cat:hover { border-color: var(--accent); }
.nt-frows { display: grid; gap: 6px; margin-bottom: 4px; }
.nt-frow { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto auto; gap: 6px; align-items: center; }
.nt-frow .input { min-width: 0; }
.nt-hide { white-space: nowrap; font-size: 13px; }
.nt-vis-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 520px) {
  .nt-frow { grid-template-columns: 1fr auto auto; }
  .nt-frow [name="fl"] { grid-column: 1 / -1; }
  .nt-field, .nt-fields.big .nt-field { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Files on service records and notes (HQ-114, attach.js) ---------- */
.at-box { display: grid; gap: 6px; }
.at-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.at-list li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.at-file { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.at-file:hover { border-color: var(--accent); }
.at-ico { font-size: 18px; flex: none; }
.at-name { display: flex; flex-direction: column; min-width: 0; }
.at-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.at-name small { color: var(--muted); font-size: 12px; }
.at-dl { text-decoration: none; }
.at-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.at-add.busy { opacity: .55; pointer-events: none; }
.at-add.busy::after { content: 'Uploading…'; font-size: 12.5px; color: var(--muted); }
.at-big { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
.at-doc { text-align: center; font-size: 42px; padding: 18px 0 4px; }
.at-doc p { font-size: 14px; color: var(--muted); }
.g-cam-count svg, .g-clip-count svg { vertical-align: -2px; }
