:root {
  color-scheme: dark;
  --bg: #0b111c;
  --bg2: #0d1420;
  --panel: #131c2b;
  --panel2: #182238;
  --border: #22314a;
  --border-soft: #1a2740;
  --text: #e6edf3;
  --muted: #8fa3bf;
  --accent: #38bdf8;
  --accent2: #f5a524;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #4ade80;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hidden { display: none !important; }

/* ---------- header ---------- */
#app-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11,17,28,.96); border-bottom: 1px solid var(--border);
  padding: 8px 12px; display: flex; flex-direction: column; gap: 8px;
}
.header-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-tabs { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.view-tab { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.view-tab.active { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
/* Build C: Taskboard scope steppers, right after the Org Tree tab */
.scope-stepper { display: inline-flex; align-items: center; gap: 2px; margin-left: 2px; padding-left: 6px; border-left: 1px solid var(--border); }
.scope-step { color: var(--muted); font-size: 10px; line-height: 1; padding: 7px 5px; border-radius: 6px; }
.scope-step:hover { color: var(--text); background: var(--panel2); }
.scope-chip { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; padding: 0 4px; }
.header-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hdr-btn { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 7px 12px; font-weight: 600; }
.hdr-btn:hover { border-color: var(--accent); }
.hdr-btn.primary { background: var(--accent); border-color: var(--accent); color: #06222f; }
.hdr-btn.icon { padding: 7px 10px; }
#project-switcher { max-width: 200px; }
.board-tools { gap: 6px; }
.board-tools input[type="search"] { flex: 1 1 140px; min-width: 110px; }
.board-tools select { flex: 0 1 auto; max-width: 160px; }

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; }
main { padding: 10px 12px 90px; max-width: 100%; }

/* ---------- board layout: edge rails + river + panels ---------- */
#board-layout { display: flex; gap: 10px; align-items: stretch; position: relative; }

/* First-arrival welcome card (Item 4): in-flow panel at the top of the
 * Taskboard — no positioning/z-index, so it simply sits under the
 * onboarding tour overlay while the tour runs. */
.welcome-card {
  position: relative; margin: 12px 12px 0; padding: 16px 18px 12px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  transition: opacity .3s ease;
}
.welcome-card.wc-fade { opacity: 0; }
.wc-title { margin: 0 0 4px; font-size: 19px; }
.wc-sub { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.wc-close {
  position: absolute; top: 8px; right: 10px; width: 28px; height: 28px;
  border-radius: 8px; color: var(--muted); font-size: 18px; line-height: 1;
}
.wc-close:hover { background: var(--panel2); color: var(--text); }
.wc-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.wc-join { display: flex; gap: 8px; align-items: center; }
.wc-join-label { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.wc-join input { width: 150px; }
.wc-note { margin: 10px 0 2px; color: var(--muted); font-size: 12px; }
.welcome-card .error-text { margin-top: 8px; }
/* CSS hover/focus tooltip for the ⓘ next to "Join Code" */
.wc-info { position: relative; cursor: help; color: var(--accent); font-size: 14px; line-height: 1; }
.wc-tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(3px);
  width: 250px; max-width: 70vw; padding: 9px 11px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border); color: var(--text);
  font-size: 12.5px; line-height: 1.45; text-align: left; cursor: default;
  opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 60;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
}
.wc-info:hover .wc-tip, .wc-info:focus .wc-tip, .wc-info:focus-within .wc-tip {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
/* slim rails pinned to the board's edges; always visible, always drop
   targets; click expands the matching panel */
.rail {
  flex: 0 0 44px; width: 44px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 0; background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); color: var(--text); cursor: pointer;
}
.rail:hover { border-color: var(--accent); }
.rail.drop-hint { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(56,189,248,.35); background: rgba(56,189,248,.08); }
.rail-label { writing-mode: vertical-rl; font-weight: 700; font-size: 13.5px; letter-spacing: .05em; white-space: nowrap; }
.rail-chev { color: var(--muted); font-size: 17px; line-height: 1; margin-top: auto; }
/* expanded panels slide over the board from their edge */
.board-panel {
  position: absolute; top: 0; bottom: 0; width: min(350px, 88vw); z-index: 30;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0,0,0,.55); padding: 10px; overflow-y: auto;
}
.panel-left { left: 0; animation: panel-in-left .18s ease; }
.panel-right { right: 0; background: linear-gradient(180deg, #101827, #0d1420); animation: panel-in-right .18s ease; }
.board-panel.drop-hint { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(56,189,248,.35), 0 18px 44px rgba(0,0,0,.55); }
@keyframes panel-in-left { from { transform: translateX(-14px); opacity: .3; } }
@keyframes panel-in-right { from { transform: translateX(14px); opacity: .3; } }
.panel-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: nowrap; }
/* the whole panel header row doubles as the collapse toggle (it carries
   the same data-rail-toggle as its × button): pointer cursor plus a soft
   wash on hover advertise it; negative margins keep the text in place */
.panel-head[data-rail-toggle] { cursor: pointer; border-radius: 8px; padding: 4px 6px; margin: -4px -6px 6px; }
.panel-head[data-rail-toggle]:hover { background: var(--panel2); }
.panel-title { font-weight: 700; font-size: 14px; line-height: 1.25; white-space: nowrap; flex: 0 1 auto; }
.panel-close { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 7px; border-radius: 6px; flex: 0 0 auto; }
.panel-close:hover { color: var(--text); background: var(--panel2); }
.panel-cards { display: flex; flex-direction: column; gap: 8px; }

/* ---------- river board ---------- */
#river { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding-bottom: 14px; flex: 1 1 auto; min-width: 0; }
.column {
  flex: 1 1 0; min-width: 210px; background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 8px; min-height: 180px;
}
.column.drop-hint { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(56,189,248,.35); }
.column-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: nowrap; }
.column-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
/* status name stays on the header's single line; the columns' 210px floor
   (the river scrolls rather than going below it) keeps every built-in name
   whole — ellipsis is only a last-resort fallback for an absurdly long
   user-created status name */
.column-title { font-weight: 700; font-size: 14px; line-height: 1.25; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.column-count { color: var(--muted); font-size: 12px; background: var(--bg2); border-radius: 999px; padding: 0 7px; flex: 0 0 auto; white-space: nowrap; }
.column-add { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; flex: 0 0 auto; }
.column-add:hover { color: var(--text); background: var(--panel2); }
.column-cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.column-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 10px 2px; border: 1px dashed var(--border-soft); border-radius: 8px; }

/* cards */
.card {
  position: relative; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 10px; cursor: pointer; user-select: none;
  -webkit-user-select: none; touch-action: pan-x pan-y;
}
.card:hover { border-color: var(--accent); }
.card .card-title { font-weight: 600; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.card .card-meta { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.card.stalled { opacity: .55; filter: saturate(.4); transform: translateY(3px); }
.card.drag-src { opacity: .35; }
.card.drop-target { box-shadow: 0 0 0 2px var(--accent2); }
.label-bar { height: 5px; border-radius: 3px; margin-bottom: 7px; }
.label-dots { display: flex; gap: 4px; }
.label-dot { width: 9px; height: 9px; border-radius: 50%; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
  color: #06222f; font-size: 11px; font-weight: 800; flex: 0 0 auto;
}
.due-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--bg2); border: 1px solid var(--border); white-space: nowrap; }
.due-badge.overdue { color: #fecaca; background: rgba(248,113,113,.18); border-color: var(--danger); }
.due-badge.today { color: #fde68a; background: rgba(251,191,36,.15); border-color: var(--warn); }
.subtask-badge { font-size: 11px; color: var(--muted); }
.watching-badge { font-size: 11px; color: var(--muted); }
/* aura treatment on full cards */
.card.aura { border-color: var(--label-color, var(--border)); box-shadow: 0 0 0 1px var(--label-color, transparent), 0 4px 18px -6px var(--label-color, transparent); background: linear-gradient(180deg, var(--label-wash, transparent), transparent 55%), var(--panel2); }
/* chips (downstream compression) */
.card.chip { padding: 7px 8px; }
.card.chip .card-title { font-size: 12.5px; }
.card.chip .card-meta { margin-top: 5px; }
.card.chip .avatar { width: 20px; height: 20px; font-size: 9.5px; }
.card.chip.paint-dip { background: linear-gradient(180deg, var(--panel2) 55%, var(--label-color, var(--panel2)) 145%); border-bottom: 4px solid var(--label-color, var(--border)); }
.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; opacity: .92;
  box-shadow: 0 14px 34px rgba(0,0,0,.55); transform: rotate(1.5deg);
}
/* timer clock button */
.timer-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; padding: 0; flex: 0 0 auto;
  background: var(--bg2); border: 1px solid var(--border);
}
.timer-btn svg { display: block; }
.timer-btn.running { border-color: #2dd4bf; box-shadow: 0 0 0 1px #2dd4bf, 0 0 10px rgba(45,212,191,.45); }
.timer-btn:hover { border-color: var(--accent); }
/* card ⋯ menu button: absolutely positioned in the card's bottom-
 * right corner — the meta row is left-packed, so this corner stays
 * clear of the avatar, badges, timer button and Reopen. It overlays
 * the card (never participates in layout, so appearing/disappearing
 * shifts nothing), is revealed on card hover or keyboard focus, and
 * is always visible on touch devices, which have no hover. */
.card-menu-btn {
  position: absolute; right: 4px; bottom: 4px; z-index: 3;
  width: 28px; height: 28px; padding: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid var(--border); color: var(--muted);
  font-size: 10px; letter-spacing: 1.5px; line-height: 1; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.card:hover .card-menu-btn, .card:focus-within .card-menu-btn { opacity: 1; pointer-events: auto; }
.card-menu-btn:hover { color: var(--text); border-color: var(--accent); }
@media (hover: none) { .card-menu-btn { opacity: 1; pointer-events: auto; } }

/* ---------- completed panel: day layers ---------- */
.strata { display: flex; flex-direction: column; gap: 6px; }
.strata-cards { display: flex; flex-direction: column; gap: 8px; }
.completed-note { font-size: 12px; font-weight: 600; color: var(--ok); margin-top: 6px; }
.strata-day { border-top: 2px solid var(--border); padding-top: 6px; }
.strata-day:first-child { border-top: none; padding-top: 0; }
.strata-label { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.card.archived { opacity: .82; }
.reopen-btn { font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; background: var(--bg2); }

/* ---------- timer popup ---------- */
#timer-popup {
  position: fixed; z-index: 90; width: 248px; max-width: calc(100vw - 16px);
  background: var(--panel); border: 1px solid var(--accent); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6); overflow: hidden;
}
#timer-popup .tp-head {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  background: var(--panel2); cursor: grab; touch-action: none; user-select: none;
}
#timer-popup .tp-head:active { cursor: grabbing; }
#timer-popup .tp-title { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
#timer-popup .tp-close { color: var(--muted); font-size: 16px; padding: 0 4px; }
#timer-popup .tp-body { padding: 10px; cursor: pointer; }
#timer-popup .tp-desc { color: var(--muted); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#timer-popup .tp-clock { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 6px 0; }
#timer-popup .tp-row { display: flex; align-items: center; gap: 8px; }
#timer-popup .tp-toggle { background: var(--accent); color: #06222f; font-weight: 700; border-radius: 8px; padding: 6px 12px; }
.paused-chip { font-size: 11px; font-weight: 800; color: #fde68a; background: rgba(251,191,36,.16); border: 1px solid var(--warn); border-radius: 999px; padding: 2px 8px; }
#timer-popup .tp-status-row { margin-top: 8px; }
#timer-popup .tp-status-row label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
#timer-popup .tp-status { flex: 1; min-width: 0; padding: 5px 7px; font-size: 13px; cursor: pointer; }

/* ---------- card context menu ---------- */
.ctx-menu {
  position: fixed; z-index: 160; min-width: 216px; max-width: calc(100vw - 16px);
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 5px; box-shadow: 0 18px 44px rgba(0,0,0,.55); font-size: 13.5px;
}
.ctx-item {
  display: flex; align-items: center; gap: 3px; width: 100%; box-sizing: border-box;
  text-align: left; padding: 7px 9px; border-radius: 8px;
  font-weight: 600; color: var(--text); position: relative;
}
.ctx-item:hover, .ctx-item:focus-visible { background: var(--panel2); outline: none; }
.ctx-item:disabled { opacity: .45; cursor: default; }
.ctx-item:disabled:hover { background: transparent; }
.ctx-check { display: inline-block; width: 16px; flex: 0 0 16px; color: var(--accent); font-weight: 700; }
.ctx-item .column-dot { flex: 0 0 auto; }
.ctx-label { flex: 1; white-space: nowrap; }
.ctx-arrow { color: var(--muted); flex: 0 0 auto; }
.ctx-parent { cursor: pointer; }
.ctx-sub {
  display: none; position: absolute; left: 100%; top: -5px; z-index: 1;
  min-width: 204px; max-width: calc(100vw - 16px); max-height: 264px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 5px; box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
.ctx-parent:hover > .ctx-sub, .ctx-parent.open > .ctx-sub, .ctx-parent:focus-within > .ctx-sub { display: block; }
.ctx-menu.ctx-flip .ctx-sub { left: auto; right: 100%; }
.ctx-sect { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 7px 9px 3px; }
.ctx-note { font-size: 12.5px; color: var(--muted); padding: 7px 9px; max-width: 224px; line-height: 1.4; }
.ctx-danger { color: #fecaca; }
.ctx-danger:hover, .ctx-danger:focus-visible { background: rgba(248,113,113,.14); }
.ctx-danger.armed { background: var(--danger); color: #fff; }
.ctx-pop {
  position: absolute; left: calc(100% + 6px); top: 0; z-index: 2; width: 264px;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.55);
}
.ctx-menu.ctx-flip .ctx-pop { left: auto; right: calc(100% + 6px); }
.ctx-pop .field { margin-bottom: 8px; }
.ctx-pop .field input, .ctx-pop .field textarea { width: 100%; }
.ctx-pop textarea { min-height: 84px; resize: vertical; }
.ctx-pop .btn-row { margin-top: 8px; }

/* ---------- roles ---------- */
.role-badge { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 7px; text-transform: uppercase; letter-spacing: .02em; vertical-align: 1px; }
.role-badge.role-admin { background: rgba(244,114,182,.16); color: #f9a8d4; border: 1px solid #f472b6; }
.role-badge.role-member { background: rgba(56,189,248,.13); color: #7dd3fc; border: 1px solid var(--accent); }
.role-badge.role-guest { background: rgba(148,163,184,.13); color: var(--muted); border: 1px solid var(--border); }
.role-select { font-size: 12px; padding: 3px 6px; border-radius: 8px; background: var(--bg2); color: var(--text); border: 1px solid var(--border); }
.role-chip { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; white-space: nowrap; align-self: center; }

/* ---------- feedback ---------- */
.fb-badge { background: #f472b6; color: #2b0a1c; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 0 6px; margin-left: 2px; }
#feedback-popup {
  position: fixed; right: 12px; bottom: 12px; z-index: 95; width: 356px; max-width: calc(100vw - 16px);
  max-height: 74vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6); overflow: hidden;
}
#feedback-popup .fb-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel2); }
#feedback-popup .fb-title { font-weight: 700; font-size: 13px; flex: 1; }
#feedback-popup .fb-close { color: var(--muted); font-size: 16px; padding: 0 4px; }
#feedback-popup .fb-tabs { display: flex; gap: 4px; }
#feedback-popup .fb-tab { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }
#feedback-popup .fb-tab.active { color: #06222f; background: var(--accent); border-color: var(--accent); }
#feedback-popup .fb-body { padding: 10px; overflow-y: auto; }
.fb-thread { border: 1px solid var(--border); border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.fb-thread-head { margin-bottom: 6px; }
.fb-status { font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 7px; text-transform: uppercase; letter-spacing: .02em; }
.fb-status-open { background: rgba(56,189,248,.15); color: #7dd3fc; border: 1px solid var(--accent); }
.fb-status-executing { background: rgba(74,222,128,.14); color: #86efac; border: 1px solid #4ade80; }
.fb-status-designing { background: rgba(251,191,36,.14); color: #fde68a; border: 1px solid var(--warn); }
.fb-status-rejected { background: rgba(248,113,113,.13); color: #fca5a5; border: 1px solid #f87171; }
.fb-msgs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fb-msg { border-radius: 10px; padding: 6px 8px; max-width: 92%; }
.fb-msg-text { font-size: 13px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.fb-msg-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.fb-from-user { background: rgba(56,189,248,.12); align-self: flex-end; }
.fb-from-admin { background: var(--bg2); border: 1px solid var(--border); align-self: flex-start; }
.fb-from-system { background: rgba(251,191,36,.1); border: 1px dashed var(--warn); align-self: stretch; max-width: 100%; }
.fb-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.fb-reject { margin: 6px 0; }
.fb-reject input, .fb-reply input { width: 100%; box-sizing: border-box; }
.fb-reply { display: flex; gap: 6px; margin-top: 6px; }
.fb-reply input { flex: 1; }
.fb-compose textarea { width: 100%; box-sizing: border-box; }

/* ---------- modals ---------- */
#modal-root:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4,8,15,.7);
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 18px 10px;
}
.modal {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  width: 560px; max-width: 100%; padding: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal.wide { width: 720px; }
.modal h2 { margin: 0 0 4px; font-size: 18px; }
.modal h3 { margin: 16px 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.modal .modal-sub { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.modal-close { float: right; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 6px; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { min-height: 70px; resize: vertical; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 160px; }
.btn { background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 14px; font-weight: 700; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #06222f; }
.btn.danger { color: #fecaca; border-color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--border-soft); font-size: 14px; }
.check-row input { width: auto; }
.check-row .grow { flex: 1; }
.swatch-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; position: relative; }
.swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.swatch-name { font-size: 12px; color: var(--muted); }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .grow { flex: 1; }
.toggle-row .t-label { font-weight: 600; font-size: 14px; }
.toggle-row .t-sub { color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 999px; transition: .15s; pointer-events: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: .15s; }
.switch input:checked + .track { background: rgba(56,189,248,.25); border-color: var(--accent); }
.switch input:checked + .track::after { left: 22px; background: var(--accent); }
.notice { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.4); color: #fde68a; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.error-text { color: #fca5a5; font-size: 13px; min-height: 18px; }
.kv { display: flex; gap: 8px; font-size: 14px; padding: 4px 0; }
.kv .k { color: var(--muted); min-width: 96px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.private-tag { color: var(--warn); font-size: 12px; font-weight: 700; }
.family-list { display: flex; flex-direction: column; gap: 5px; }
.family-item { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--border-soft); border-radius: 8px; padding: 6px 9px; font-size: 14px; cursor: pointer; }
.family-item:hover { border-color: var(--accent); }
.family-item .grow { flex: 1; }
.timer-big { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.copy-row { display: flex; gap: 6px; align-items: center; }
.copy-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 13px; }

/* team & projects panel */
.org-block { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: var(--bg2); }
.org-block > h3 { margin-top: 0; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 16px; }
.proj-block { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px; margin: 8px 0; background: var(--panel); }
.proj-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-icon { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: var(--panel2); border: 1px solid var(--border); }
.proj-name { font-weight: 700; }
.team-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 13px; margin: 2px 2px 2px 0; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; border-bottom: 1px solid var(--border-soft); }
.member-row:last-child { border-bottom: none; }
.member-row .grow { flex: 1; }
.member-row .m-email { color: var(--muted); font-size: 12px; }
.you-tag { font-size: 10px; font-weight: 800; background: var(--accent); color: #06222f; border-radius: 999px; padding: 1px 7px; text-transform: uppercase; }

/* ---------- whiteboard ---------- */
#wb-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-tools { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.wb-tool { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; font-weight: 600; font-size: 13px; }
.wb-tool.active { border-color: var(--accent); color: var(--accent); }
.wb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 3px; }
#wb-palette { display: inline-flex; gap: 4px; }
.wb-shape-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; touch-action: none; }
.wb-shape-btn.active { border-color: var(--accent); }
.wb-shape-btn svg { pointer-events: none; }
.wb-hint { color: var(--muted); font-size: 12px; }
#wb-color { width: 38px; height: 32px; padding: 2px; }
.wb-proj { margin-left: auto; color: var(--muted); font-size: 13px; }
#wb-board {
  position: relative; width: 100%; height: 62vh; min-height: 380px;
  background:
    radial-gradient(circle, #1c2a44 1px, transparent 1px) 0 0 / 26px 26px,
    var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; touch-action: none;
}
#wb-board svg.wb-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wb-shape { position: absolute; cursor: grab; touch-action: none; }
.wb-shape.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.wb-shape .wb-del {
  position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px; line-height: 1; display: none;
  align-items: center; justify-content: center; z-index: 3;
}
.wb-shape.selected .wb-del { display: flex; }
.wb-resize {
  position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px; border-radius: 4px;
  background: var(--accent); display: none; cursor: nwse-resize; z-index: 3; touch-action: none;
}
.wb-shape.selected .wb-resize { display: block; }
.wb-note {
  position: absolute; background: #fef08a; color: #1c1917; border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45); display: flex; flex-direction: column; touch-action: none;
}
.wb-note.selected { outline: 2px solid var(--accent); }
.wb-note-head { height: 16px; cursor: grab; background: rgba(0,0,0,.12); border-radius: 4px 4px 0 0; position: relative; flex: 0 0 auto; }
.wb-note textarea { flex: 1; background: transparent; border: none; color: #1c1917; resize: none; padding: 6px 8px; font-size: 13px; }
.wb-note textarea:focus { outline: none; }
.wb-note .wb-del {
  position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: 12px; display: none; align-items: center; justify-content: center; z-index: 3;
}
.wb-note.selected .wb-del { display: flex; }
.wb-note .wb-resize { background: #a16207; }
.wb-note.selected .wb-resize { display: block; }

/* ---------- org tree ---------- */
#tree-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
#tree-zoom-label { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 44px; text-align: center; }
.tree-hint { color: var(--muted); font-size: 12px; }
#tree-canvas {
  position: relative; height: 68vh; min-height: 420px; overflow: hidden;
  background: radial-gradient(circle, #16233c 1px, transparent 1px) 0 0 / 28px 28px, var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius); touch-action: none;
}
#tree-world { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
#tree-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
#tree-nodes { position: absolute; left: 0; top: 0; }
.tnode {
  position: absolute; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; overflow: visible; cursor: grab; user-select: none; -webkit-user-select: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
/* Build C: tree node cards get the Taskboard cards' hover outline */
.tnode:hover { border-color: var(--accent); }
.tnode.drag-src { opacity: .4; }
.tnode.tn-ghost { pointer-events: none; }
#tree-edges g.tn-ghost { pointer-events: none; }
.tnode.drop-hint { box-shadow: 0 0 0 2px var(--accent); }
.tnode .tn-head { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px 2px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.tnode .tn-name { font-weight: 700; font-size: 13.5px; padding: 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnode .tn-sub { color: var(--muted); font-size: 11.5px; padding: 1px 9px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnode.kind-org { border-color: var(--accent); }
.tnode.kind-org .tn-head { color: var(--accent); }
.tnode.kind-project .tn-head { color: var(--accent2); }
.tnode.kind-task { background: var(--panel2); cursor: pointer; }
.tnode.kind-task .tn-name { font-weight: 600; font-size: 12.5px; padding-top: 5px; }
.tnode.you { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(0,0,0,.35); }
.tn-add {
  position: absolute; top: -9px; right: -9px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--accent); color: #06222f; font-weight: 900; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
/* Build G: peripheral footer — tasks bottom-left, whiteboards bottom-right */
.tn-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 9px 8px; margin-top: 1px; }
.tn-periph-btn {
  font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px;
}
.tn-periph-btn:hover:not(:disabled) { border-color: var(--accent); }
.tn-periph-btn.active { background: var(--accent); color: #06222f; border-color: var(--accent); }
.tn-periph-btn:disabled { color: var(--muted); opacity: .45; cursor: default; }
.tn-icon { width: 15px; height: 15px; border-radius: 4px; object-fit: cover; vertical-align: -2px; }
#tree-test-result { margin-top: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }

/* Build G: peripheral overlay lists (anchored to a card, tree never moves) */
#tree-periph { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.tree-periph-panel {
  position: fixed; pointer-events: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.55); padding: 5px; font-size: 13.5px;
}
#tree-periph.dragging .tree-periph-panel { pointer-events: none; }
.tp-head { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 7px 9px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-rows { max-height: 264px; overflow-y: auto; }
.tp-row {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  text-align: left; padding: 7px 9px; border-radius: 8px; font-weight: 600; color: var(--text); cursor: pointer; background: transparent;
}
.tp-row:hover, .tp-row:focus-visible { background: var(--panel2); outline: none; }
.tp-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-status { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--muted); }
.tp-empty { color: var(--muted); padding: 7px 9px; font-size: 12.5px; }
.tp-drag-ghost {
  position: fixed; z-index: 400; pointer-events: none; max-width: 240px;
  background: var(--panel2); border: 1px solid var(--accent); border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 14px 34px rgba(0,0,0,.55);
}

/* Build G: Taskboard focus chip */
.focus-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px; white-space: nowrap; }
#focus-chip-x { color: var(--accent); font-weight: 900; font-size: 14px; line-height: 1; padding: 2px 6px; border-radius: 999px; background: transparent; }
#focus-chip-x:hover { background: var(--panel2); }

/* ---------- toasts ---------- */
#toast-root { position: fixed; right: 12px; bottom: 12px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 24px)); }
.toast {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 14px 34px rgba(0,0,0,.55); font-size: 14px; position: relative; overflow: hidden;
}
.toast .toast-row { display: flex; align-items: center; gap: 10px; }
.toast .toast-msg { flex: 1; font-weight: 600; }
.toast .toast-undo { color: var(--accent); font-weight: 800; }
.toast .toast-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.toast .toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transition: width 1s linear; }
.toast.error { border-color: var(--danger); }

/* ---------- landscape phones ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  #app-header { padding: 5px 10px; gap: 5px; }
  .view-tab { padding: 4px 10px; }
  .hdr-btn { padding: 5px 9px; }
  main { padding: 6px 10px 60px; }
  #river { max-height: calc(100vh - 150px); }
  .column { max-height: calc(100vh - 160px); overflow-y: auto; }
  #wb-board { height: calc(100vh - 130px); min-height: 240px; }
  #tree-canvas { height: calc(100vh - 120px); min-height: 240px; }
  .modal-backdrop { padding: 8px; }
}
@media (max-width: 560px) {
  #project-switcher { max-width: 130px; }
  .header-actions { margin-left: 0; }
  .board-tools select { max-width: 118px; }
  .modal { padding: 14px; }
}

/* ---------- onboarding tutorial ---------- */
#tour-root { position: fixed; inset: 0; z-index: 250; }
.tour-dim { position: absolute; inset: 0; background: transparent; }
.tour-spot {
  position: fixed; border: 2px solid var(--accent); border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(3, 7, 13, .72), 0 0 18px rgba(56, 189, 248, .45);
  pointer-events: none;
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}
.tour-card {
  position: fixed; width: 320px; max-width: calc(100vw - 24px);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6); padding: 14px 16px;
}
.tour-step-label { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.tour-title { margin: 0 0 6px; font-size: 16px; }
.tour-body { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tour-body p { margin: 0 0 8px; }
.tour-body p:last-child { margin-bottom: 0; }
.tour-body strong { color: var(--text); }
.tour-btns { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.tour-skip { color: var(--muted); }
.tour-card-docked { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; }

/* ============ WARP GATE LOADER (shared brand buffering treatment) ============
 * Warp Gate icon wrapped in a rotating cyan radial ring + soft pulse.
 * The ring is a conic-gradient arc clipped to a ring by a radial mask. */
.wg-ring-wrap { position: relative; width: 104px; height: 104px; flex: 0 0 auto; }
.wg-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(56,200,255,0) 0deg, rgba(56,200,255,.18) 100deg, #38c8ff 325deg, rgba(56,200,255,0) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: wg-spin .9s linear infinite;
}
.wg-icon {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  animation: wg-pulse 1.8s ease-in-out infinite;
}
.wg-text { color: var(--muted); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
@keyframes wg-spin { to { transform: rotate(360deg); } }
@keyframes wg-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(56,200,255,.35)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 16px rgba(56,200,255,.6)); }
}
@media (prefers-reduced-motion: reduce) {
  .wg-ring, .wg-icon { animation: none; }
}

/* Boot overlay: covers the app from first paint until init() renders.
 * z-index 80 = above content/header (40), below modals (100) and popups.
 * The wg-autohide animation is a pure-CSS safety net (CSP blocks inline
 * scripts): if app.js ever fails to run, the overlay still fades away
 * after 20s instead of trapping the user behind the spinner. */
#wg-boot {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .3s ease;
  animation: wg-autohide .4s ease 20s forwards;
}
#wg-boot.done { opacity: 0; pointer-events: none; }
@keyframes wg-autohide { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #wg-boot { transition: none; }
}

/* ---- completion celebration (Build D Part 4) ----
 * All overlays are pointer-events:none and removed on timers by
 * app.js. The JS suppresses everything except the banner under
 * prefers-reduced-motion; the media query below also stills the
 * banner's own pop/fade as a second layer. */
.celebration-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 260; pointer-events: none; text-align: center;
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid #22d3ee; border-radius: 999px; padding: 10px 26px;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45), 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: celebration-pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
  transition: opacity 0.25s ease;
}
.celebration-banner.out { opacity: 0; }
.celebration-banner-main { font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap; }
.celebration-banner-sub { font-weight: 600; font-size: 13px; color: #ffd166; margin-top: 2px; white-space: nowrap; }
.celebration-banner.tier2 { border-color: #ffd166; box-shadow: 0 0 28px rgba(255, 209, 102, 0.5), 0 10px 30px rgba(0, 0, 0, 0.5); }
.celebration-banner.tier3 { border-color: #ffd166; padding: 14px 34px; box-shadow: 0 0 38px rgba(255, 209, 102, 0.65), 0 0 18px rgba(34, 211, 238, 0.5), 0 12px 34px rgba(0, 0, 0, 0.55); }
.celebration-banner.tier3 .celebration-banner-main { font-size: 22px; letter-spacing: 0.4px; }
@keyframes celebration-pop {
  0% { transform: translateX(-50%) scale(0.6); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
.celebration-tracer {
  position: fixed; top: 0; left: 0; height: 3px; width: 38vw; z-index: 260;
  pointer-events: none; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee 55%, #ffffff);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.9);
  animation: celebration-tracer-move 1s ease-in forwards;
}
@keyframes celebration-tracer-move {
  from { transform: translateX(-40vw); }
  to { transform: translateX(103vw); }
}
.celebration-flight {
  position: fixed; z-index: 261; pointer-events: none; margin: 0;
  transition: transform 0.62s cubic-bezier(0.5, -0.1, 0.3, 1), opacity 0.62s ease;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}
.celebration-confetti { position: fixed; inset: 0; z-index: 259; pointer-events: none; }
.celebration-lightning { position: fixed; inset: 0; z-index: 260; pointer-events: none; animation: celebration-flash 0.55s ease-out forwards; }
.celebration-bolt { position: absolute; width: 30px; height: 50px; filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.95)); }
.celebration-bolt svg { width: 100%; height: 100%; display: block; }
@keyframes celebration-flash {
  0%, 100% { opacity: 0; }
  15% { opacity: 1; }
  32% { opacity: 0.15; }
  48% { opacity: 0.9; }
  64% { opacity: 0; }
}
.rail-impact { animation: rail-jitter 0.45s ease-in-out; }
.rail-impact-strong { animation: rail-jitter-strong 0.5s ease-in-out; }
@keyframes rail-jitter {
  0%, 100% { transform: none; }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}
@keyframes rail-jitter-strong {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px) rotate(-0.4deg); }
  40% { transform: translateX(6px) rotate(0.4deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
body.celebrate-shake { animation: celebrate-shake 0.3s linear; }
@keyframes celebrate-shake {
  0%, 100% { transform: none; }
  25% { transform: translate(2px, -1px); }
  50% { transform: translate(-2px, 1px); }
  75% { transform: translate(1px, 2px); }
}
@media (prefers-reduced-motion: reduce) {
  .celebration-banner { animation: none; transition: none; }
}

/* App version label — minimal, bottom-left, never interactive */
#app-version {
  position: fixed;
  left: 10px;
  bottom: 8px;
  font-size: 11px;
  line-height: 1;
  color: #7d8697;
  pointer-events: none;
  user-select: none;
  z-index: 40;
}
